org.hl7.fhir.Encounter Maven / Gradle / Ivy
Show all versions of quick Show documentation
//
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2024.01.18 at 08:26:13 AM MST
//
package org.hl7.fhir;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* If the element is present, it must have either a @value, an @id, or extensions
*
* Java class for Encounter complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Encounter">
* <complexContent>
* <extension base="{http://hl7.org/fhir}DomainResource">
* <sequence>
* <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
* <element name="status" type="{http://hl7.org/fhir}EncounterState"/>
* <element name="statusHistory" type="{http://hl7.org/fhir}Encounter.StatusHistory" maxOccurs="unbounded" minOccurs="0"/>
* <element name="class" type="{http://hl7.org/fhir}EncounterClass" minOccurs="0"/>
* <element name="type" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
* <element name="priority" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="patient" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="episodeOfCare" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
* <element name="incomingReferral" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
* <element name="participant" type="{http://hl7.org/fhir}Encounter.Participant" maxOccurs="unbounded" minOccurs="0"/>
* <element name="appointment" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="period" type="{http://hl7.org/fhir}Period" minOccurs="0"/>
* <element name="length" type="{http://hl7.org/fhir}Duration" minOccurs="0"/>
* <element name="reason" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
* <element name="indication" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
* <element name="hospitalization" type="{http://hl7.org/fhir}Encounter.Hospitalization" minOccurs="0"/>
* <element name="location" type="{http://hl7.org/fhir}Encounter.Location" maxOccurs="unbounded" minOccurs="0"/>
* <element name="serviceProvider" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="partOf" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Encounter", propOrder = {
"identifier",
"status",
"statusHistory",
"clazz",
"type",
"priority",
"patient",
"episodeOfCare",
"incomingReferral",
"participant",
"appointment",
"period",
"length",
"reason",
"indication",
"hospitalization",
"location",
"serviceProvider",
"partOf"
})
public class Encounter
extends DomainResource
implements Equals2, HashCode2, ToString2
{
protected List identifier;
@XmlElement(required = true)
protected EncounterState status;
protected List statusHistory;
@XmlElement(name = "class")
protected EncounterClass clazz;
protected List type;
protected CodeableConcept priority;
protected Reference patient;
protected List episodeOfCare;
protected List incomingReferral;
protected List participant;
protected Reference appointment;
protected Period period;
protected Duration length;
protected List reason;
protected List indication;
protected EncounterHospitalization hospitalization;
protected List location;
protected Reference serviceProvider;
protected Reference partOf;
/**
* Gets the value of the identifier property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a set
method for the identifier property.
*
*
* For example, to add a new item, do as follows:
*
* getIdentifier().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Identifier }
*
*
*/
public List getIdentifier() {
if (identifier == null) {
identifier = new ArrayList();
}
return this.identifier;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link EncounterState }
*
*/
public EncounterState getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link EncounterState }
*
*/
public void setStatus(EncounterState value) {
this.status = value;
}
/**
* Gets the value of the statusHistory property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a set
method for the statusHistory property.
*
*
* For example, to add a new item, do as follows:
*
* getStatusHistory().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link EncounterStatusHistory }
*
*
*/
public List getStatusHistory() {
if (statusHistory == null) {
statusHistory = new ArrayList();
}
return this.statusHistory;
}
/**
* Gets the value of the clazz property.
*
* @return
* possible object is
* {@link EncounterClass }
*
*/
public EncounterClass getClazz() {
return clazz;
}
/**
* Sets the value of the clazz property.
*
* @param value
* allowed object is
* {@link EncounterClass }
*
*/
public void setClazz(EncounterClass value) {
this.clazz = value;
}
/**
* Gets the value of the type property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a set
method for the type property.
*
*
* For example, to add a new item, do as follows:
*
* getType().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link CodeableConcept }
*
*
*/
public List getType() {
if (type == null) {
type = new ArrayList();
}
return this.type;
}
/**
* Gets the value of the priority property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getPriority() {
return priority;
}
/**
* Sets the value of the priority property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setPriority(CodeableConcept value) {
this.priority = value;
}
/**
* Gets the value of the patient property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getPatient() {
return patient;
}
/**
* Sets the value of the patient property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setPatient(Reference value) {
this.patient = value;
}
/**
* Gets the value of the episodeOfCare property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a set
method for the episodeOfCare property.
*
*
* For example, to add a new item, do as follows:
*
* getEpisodeOfCare().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getEpisodeOfCare() {
if (episodeOfCare == null) {
episodeOfCare = new ArrayList();
}
return this.episodeOfCare;
}
/**
* Gets the value of the incomingReferral property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a set
method for the incomingReferral property.
*
*
* For example, to add a new item, do as follows:
*
* getIncomingReferral().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getIncomingReferral() {
if (incomingReferral == null) {
incomingReferral = new ArrayList();
}
return this.incomingReferral;
}
/**
* Gets the value of the participant property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a set
method for the participant property.
*
*
* For example, to add a new item, do as follows:
*
* getParticipant().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link EncounterParticipant }
*
*
*/
public List getParticipant() {
if (participant == null) {
participant = new ArrayList();
}
return this.participant;
}
/**
* Gets the value of the appointment property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getAppointment() {
return appointment;
}
/**
* Sets the value of the appointment property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setAppointment(Reference value) {
this.appointment = value;
}
/**
* Gets the value of the period property.
*
* @return
* possible object is
* {@link Period }
*
*/
public Period getPeriod() {
return period;
}
/**
* Sets the value of the period property.
*
* @param value
* allowed object is
* {@link Period }
*
*/
public void setPeriod(Period value) {
this.period = value;
}
/**
* Gets the value of the length property.
*
* @return
* possible object is
* {@link Duration }
*
*/
public Duration getLength() {
return length;
}
/**
* Sets the value of the length property.
*
* @param value
* allowed object is
* {@link Duration }
*
*/
public void setLength(Duration value) {
this.length = value;
}
/**
* Gets the value of the reason property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a set
method for the reason property.
*
*
* For example, to add a new item, do as follows:
*
* getReason().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link CodeableConcept }
*
*
*/
public List getReason() {
if (reason == null) {
reason = new ArrayList();
}
return this.reason;
}
/**
* Gets the value of the indication property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a set
method for the indication property.
*
*
* For example, to add a new item, do as follows:
*
* getIndication().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getIndication() {
if (indication == null) {
indication = new ArrayList();
}
return this.indication;
}
/**
* Gets the value of the hospitalization property.
*
* @return
* possible object is
* {@link EncounterHospitalization }
*
*/
public EncounterHospitalization getHospitalization() {
return hospitalization;
}
/**
* Sets the value of the hospitalization property.
*
* @param value
* allowed object is
* {@link EncounterHospitalization }
*
*/
public void setHospitalization(EncounterHospitalization value) {
this.hospitalization = value;
}
/**
* Gets the value of the location property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the Jakarta XML Binding object.
* This is why there is not a set
method for the location property.
*
*
* For example, to add a new item, do as follows:
*
* getLocation().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link EncounterLocation }
*
*
*/
public List getLocation() {
if (location == null) {
location = new ArrayList();
}
return this.location;
}
/**
* Gets the value of the serviceProvider property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getServiceProvider() {
return serviceProvider;
}
/**
* Sets the value of the serviceProvider property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setServiceProvider(Reference value) {
this.serviceProvider = value;
}
/**
* Gets the value of the partOf property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getPartOf() {
return partOf;
}
/**
* Sets the value of the partOf property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setPartOf(Reference value) {
this.partOf = value;
}
public Encounter withIdentifier(Identifier... values) {
if (values!= null) {
for (Identifier value: values) {
getIdentifier().add(value);
}
}
return this;
}
public Encounter withIdentifier(Collection values) {
if (values!= null) {
getIdentifier().addAll(values);
}
return this;
}
public Encounter withStatus(EncounterState value) {
setStatus(value);
return this;
}
public Encounter withStatusHistory(EncounterStatusHistory... values) {
if (values!= null) {
for (EncounterStatusHistory value: values) {
getStatusHistory().add(value);
}
}
return this;
}
public Encounter withStatusHistory(Collection values) {
if (values!= null) {
getStatusHistory().addAll(values);
}
return this;
}
public Encounter withClazz(EncounterClass value) {
setClazz(value);
return this;
}
public Encounter withType(CodeableConcept... values) {
if (values!= null) {
for (CodeableConcept value: values) {
getType().add(value);
}
}
return this;
}
public Encounter withType(Collection values) {
if (values!= null) {
getType().addAll(values);
}
return this;
}
public Encounter withPriority(CodeableConcept value) {
setPriority(value);
return this;
}
public Encounter withPatient(Reference value) {
setPatient(value);
return this;
}
public Encounter withEpisodeOfCare(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getEpisodeOfCare().add(value);
}
}
return this;
}
public Encounter withEpisodeOfCare(Collection values) {
if (values!= null) {
getEpisodeOfCare().addAll(values);
}
return this;
}
public Encounter withIncomingReferral(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getIncomingReferral().add(value);
}
}
return this;
}
public Encounter withIncomingReferral(Collection values) {
if (values!= null) {
getIncomingReferral().addAll(values);
}
return this;
}
public Encounter withParticipant(EncounterParticipant... values) {
if (values!= null) {
for (EncounterParticipant value: values) {
getParticipant().add(value);
}
}
return this;
}
public Encounter withParticipant(Collection values) {
if (values!= null) {
getParticipant().addAll(values);
}
return this;
}
public Encounter withAppointment(Reference value) {
setAppointment(value);
return this;
}
public Encounter withPeriod(Period value) {
setPeriod(value);
return this;
}
public Encounter withLength(Duration value) {
setLength(value);
return this;
}
public Encounter withReason(CodeableConcept... values) {
if (values!= null) {
for (CodeableConcept value: values) {
getReason().add(value);
}
}
return this;
}
public Encounter withReason(Collection values) {
if (values!= null) {
getReason().addAll(values);
}
return this;
}
public Encounter withIndication(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getIndication().add(value);
}
}
return this;
}
public Encounter withIndication(Collection values) {
if (values!= null) {
getIndication().addAll(values);
}
return this;
}
public Encounter withHospitalization(EncounterHospitalization value) {
setHospitalization(value);
return this;
}
public Encounter withLocation(EncounterLocation... values) {
if (values!= null) {
for (EncounterLocation value: values) {
getLocation().add(value);
}
}
return this;
}
public Encounter withLocation(Collection values) {
if (values!= null) {
getLocation().addAll(values);
}
return this;
}
public Encounter withServiceProvider(Reference value) {
setServiceProvider(value);
return this;
}
public Encounter withPartOf(Reference value) {
setPartOf(value);
return this;
}
@Override
public Encounter withText(Narrative value) {
setText(value);
return this;
}
@Override
public Encounter withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public Encounter withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public Encounter withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public Encounter withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public Encounter withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public Encounter withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public Encounter withId(Id value) {
setId(value);
return this;
}
@Override
public Encounter withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public Encounter withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public Encounter withLanguage(Code value) {
setLanguage(value);
return this;
}
@Override
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final Encounter that = ((Encounter) object);
{
List lhsIdentifier;
lhsIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null);
List rhsIdentifier;
rhsIdentifier = (((that.identifier!= null)&&(!that.identifier.isEmpty()))?that.getIdentifier():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "identifier", lhsIdentifier), LocatorUtils.property(thatLocator, "identifier", rhsIdentifier), lhsIdentifier, rhsIdentifier, ((this.identifier!= null)&&(!this.identifier.isEmpty())), ((that.identifier!= null)&&(!that.identifier.isEmpty())))) {
return false;
}
}
{
EncounterState lhsStatus;
lhsStatus = this.getStatus();
EncounterState rhsStatus;
rhsStatus = that.getStatus();
if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus, (this.status!= null), (that.status!= null))) {
return false;
}
}
{
List lhsStatusHistory;
lhsStatusHistory = (((this.statusHistory!= null)&&(!this.statusHistory.isEmpty()))?this.getStatusHistory():null);
List rhsStatusHistory;
rhsStatusHistory = (((that.statusHistory!= null)&&(!that.statusHistory.isEmpty()))?that.getStatusHistory():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "statusHistory", lhsStatusHistory), LocatorUtils.property(thatLocator, "statusHistory", rhsStatusHistory), lhsStatusHistory, rhsStatusHistory, ((this.statusHistory!= null)&&(!this.statusHistory.isEmpty())), ((that.statusHistory!= null)&&(!that.statusHistory.isEmpty())))) {
return false;
}
}
{
EncounterClass lhsClazz;
lhsClazz = this.getClazz();
EncounterClass rhsClazz;
rhsClazz = that.getClazz();
if (!strategy.equals(LocatorUtils.property(thisLocator, "clazz", lhsClazz), LocatorUtils.property(thatLocator, "clazz", rhsClazz), lhsClazz, rhsClazz, (this.clazz!= null), (that.clazz!= null))) {
return false;
}
}
{
List lhsType;
lhsType = (((this.type!= null)&&(!this.type.isEmpty()))?this.getType():null);
List rhsType;
rhsType = (((that.type!= null)&&(!that.type.isEmpty()))?that.getType():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, ((this.type!= null)&&(!this.type.isEmpty())), ((that.type!= null)&&(!that.type.isEmpty())))) {
return false;
}
}
{
CodeableConcept lhsPriority;
lhsPriority = this.getPriority();
CodeableConcept rhsPriority;
rhsPriority = that.getPriority();
if (!strategy.equals(LocatorUtils.property(thisLocator, "priority", lhsPriority), LocatorUtils.property(thatLocator, "priority", rhsPriority), lhsPriority, rhsPriority, (this.priority!= null), (that.priority!= null))) {
return false;
}
}
{
Reference lhsPatient;
lhsPatient = this.getPatient();
Reference rhsPatient;
rhsPatient = that.getPatient();
if (!strategy.equals(LocatorUtils.property(thisLocator, "patient", lhsPatient), LocatorUtils.property(thatLocator, "patient", rhsPatient), lhsPatient, rhsPatient, (this.patient!= null), (that.patient!= null))) {
return false;
}
}
{
List lhsEpisodeOfCare;
lhsEpisodeOfCare = (((this.episodeOfCare!= null)&&(!this.episodeOfCare.isEmpty()))?this.getEpisodeOfCare():null);
List rhsEpisodeOfCare;
rhsEpisodeOfCare = (((that.episodeOfCare!= null)&&(!that.episodeOfCare.isEmpty()))?that.getEpisodeOfCare():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "episodeOfCare", lhsEpisodeOfCare), LocatorUtils.property(thatLocator, "episodeOfCare", rhsEpisodeOfCare), lhsEpisodeOfCare, rhsEpisodeOfCare, ((this.episodeOfCare!= null)&&(!this.episodeOfCare.isEmpty())), ((that.episodeOfCare!= null)&&(!that.episodeOfCare.isEmpty())))) {
return false;
}
}
{
List lhsIncomingReferral;
lhsIncomingReferral = (((this.incomingReferral!= null)&&(!this.incomingReferral.isEmpty()))?this.getIncomingReferral():null);
List rhsIncomingReferral;
rhsIncomingReferral = (((that.incomingReferral!= null)&&(!that.incomingReferral.isEmpty()))?that.getIncomingReferral():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "incomingReferral", lhsIncomingReferral), LocatorUtils.property(thatLocator, "incomingReferral", rhsIncomingReferral), lhsIncomingReferral, rhsIncomingReferral, ((this.incomingReferral!= null)&&(!this.incomingReferral.isEmpty())), ((that.incomingReferral!= null)&&(!that.incomingReferral.isEmpty())))) {
return false;
}
}
{
List lhsParticipant;
lhsParticipant = (((this.participant!= null)&&(!this.participant.isEmpty()))?this.getParticipant():null);
List rhsParticipant;
rhsParticipant = (((that.participant!= null)&&(!that.participant.isEmpty()))?that.getParticipant():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "participant", lhsParticipant), LocatorUtils.property(thatLocator, "participant", rhsParticipant), lhsParticipant, rhsParticipant, ((this.participant!= null)&&(!this.participant.isEmpty())), ((that.participant!= null)&&(!that.participant.isEmpty())))) {
return false;
}
}
{
Reference lhsAppointment;
lhsAppointment = this.getAppointment();
Reference rhsAppointment;
rhsAppointment = that.getAppointment();
if (!strategy.equals(LocatorUtils.property(thisLocator, "appointment", lhsAppointment), LocatorUtils.property(thatLocator, "appointment", rhsAppointment), lhsAppointment, rhsAppointment, (this.appointment!= null), (that.appointment!= null))) {
return false;
}
}
{
Period lhsPeriod;
lhsPeriod = this.getPeriod();
Period rhsPeriod;
rhsPeriod = that.getPeriod();
if (!strategy.equals(LocatorUtils.property(thisLocator, "period", lhsPeriod), LocatorUtils.property(thatLocator, "period", rhsPeriod), lhsPeriod, rhsPeriod, (this.period!= null), (that.period!= null))) {
return false;
}
}
{
Duration lhsLength;
lhsLength = this.getLength();
Duration rhsLength;
rhsLength = that.getLength();
if (!strategy.equals(LocatorUtils.property(thisLocator, "length", lhsLength), LocatorUtils.property(thatLocator, "length", rhsLength), lhsLength, rhsLength, (this.length!= null), (that.length!= null))) {
return false;
}
}
{
List lhsReason;
lhsReason = (((this.reason!= null)&&(!this.reason.isEmpty()))?this.getReason():null);
List rhsReason;
rhsReason = (((that.reason!= null)&&(!that.reason.isEmpty()))?that.getReason():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "reason", lhsReason), LocatorUtils.property(thatLocator, "reason", rhsReason), lhsReason, rhsReason, ((this.reason!= null)&&(!this.reason.isEmpty())), ((that.reason!= null)&&(!that.reason.isEmpty())))) {
return false;
}
}
{
List lhsIndication;
lhsIndication = (((this.indication!= null)&&(!this.indication.isEmpty()))?this.getIndication():null);
List rhsIndication;
rhsIndication = (((that.indication!= null)&&(!that.indication.isEmpty()))?that.getIndication():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "indication", lhsIndication), LocatorUtils.property(thatLocator, "indication", rhsIndication), lhsIndication, rhsIndication, ((this.indication!= null)&&(!this.indication.isEmpty())), ((that.indication!= null)&&(!that.indication.isEmpty())))) {
return false;
}
}
{
EncounterHospitalization lhsHospitalization;
lhsHospitalization = this.getHospitalization();
EncounterHospitalization rhsHospitalization;
rhsHospitalization = that.getHospitalization();
if (!strategy.equals(LocatorUtils.property(thisLocator, "hospitalization", lhsHospitalization), LocatorUtils.property(thatLocator, "hospitalization", rhsHospitalization), lhsHospitalization, rhsHospitalization, (this.hospitalization!= null), (that.hospitalization!= null))) {
return false;
}
}
{
List lhsLocation;
lhsLocation = (((this.location!= null)&&(!this.location.isEmpty()))?this.getLocation():null);
List rhsLocation;
rhsLocation = (((that.location!= null)&&(!that.location.isEmpty()))?that.getLocation():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "location", lhsLocation), LocatorUtils.property(thatLocator, "location", rhsLocation), lhsLocation, rhsLocation, ((this.location!= null)&&(!this.location.isEmpty())), ((that.location!= null)&&(!that.location.isEmpty())))) {
return false;
}
}
{
Reference lhsServiceProvider;
lhsServiceProvider = this.getServiceProvider();
Reference rhsServiceProvider;
rhsServiceProvider = that.getServiceProvider();
if (!strategy.equals(LocatorUtils.property(thisLocator, "serviceProvider", lhsServiceProvider), LocatorUtils.property(thatLocator, "serviceProvider", rhsServiceProvider), lhsServiceProvider, rhsServiceProvider, (this.serviceProvider!= null), (that.serviceProvider!= null))) {
return false;
}
}
{
Reference lhsPartOf;
lhsPartOf = this.getPartOf();
Reference rhsPartOf;
rhsPartOf = that.getPartOf();
if (!strategy.equals(LocatorUtils.property(thisLocator, "partOf", lhsPartOf), LocatorUtils.property(thatLocator, "partOf", rhsPartOf), lhsPartOf, rhsPartOf, (this.partOf!= null), (that.partOf!= null))) {
return false;
}
}
return true;
}
@Override
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.getInstance();
return equals(null, null, object, strategy);
}
@Override
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) {
int currentHashCode = super.hashCode(locator, strategy);
{
List theIdentifier;
theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier, ((this.identifier!= null)&&(!this.identifier.isEmpty())));
}
{
EncounterState theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus, (this.status!= null));
}
{
List theStatusHistory;
theStatusHistory = (((this.statusHistory!= null)&&(!this.statusHistory.isEmpty()))?this.getStatusHistory():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "statusHistory", theStatusHistory), currentHashCode, theStatusHistory, ((this.statusHistory!= null)&&(!this.statusHistory.isEmpty())));
}
{
EncounterClass theClazz;
theClazz = this.getClazz();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "clazz", theClazz), currentHashCode, theClazz, (this.clazz!= null));
}
{
List theType;
theType = (((this.type!= null)&&(!this.type.isEmpty()))?this.getType():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, ((this.type!= null)&&(!this.type.isEmpty())));
}
{
CodeableConcept thePriority;
thePriority = this.getPriority();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "priority", thePriority), currentHashCode, thePriority, (this.priority!= null));
}
{
Reference thePatient;
thePatient = this.getPatient();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "patient", thePatient), currentHashCode, thePatient, (this.patient!= null));
}
{
List theEpisodeOfCare;
theEpisodeOfCare = (((this.episodeOfCare!= null)&&(!this.episodeOfCare.isEmpty()))?this.getEpisodeOfCare():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "episodeOfCare", theEpisodeOfCare), currentHashCode, theEpisodeOfCare, ((this.episodeOfCare!= null)&&(!this.episodeOfCare.isEmpty())));
}
{
List theIncomingReferral;
theIncomingReferral = (((this.incomingReferral!= null)&&(!this.incomingReferral.isEmpty()))?this.getIncomingReferral():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "incomingReferral", theIncomingReferral), currentHashCode, theIncomingReferral, ((this.incomingReferral!= null)&&(!this.incomingReferral.isEmpty())));
}
{
List theParticipant;
theParticipant = (((this.participant!= null)&&(!this.participant.isEmpty()))?this.getParticipant():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "participant", theParticipant), currentHashCode, theParticipant, ((this.participant!= null)&&(!this.participant.isEmpty())));
}
{
Reference theAppointment;
theAppointment = this.getAppointment();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "appointment", theAppointment), currentHashCode, theAppointment, (this.appointment!= null));
}
{
Period thePeriod;
thePeriod = this.getPeriod();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "period", thePeriod), currentHashCode, thePeriod, (this.period!= null));
}
{
Duration theLength;
theLength = this.getLength();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "length", theLength), currentHashCode, theLength, (this.length!= null));
}
{
List theReason;
theReason = (((this.reason!= null)&&(!this.reason.isEmpty()))?this.getReason():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reason", theReason), currentHashCode, theReason, ((this.reason!= null)&&(!this.reason.isEmpty())));
}
{
List theIndication;
theIndication = (((this.indication!= null)&&(!this.indication.isEmpty()))?this.getIndication():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "indication", theIndication), currentHashCode, theIndication, ((this.indication!= null)&&(!this.indication.isEmpty())));
}
{
EncounterHospitalization theHospitalization;
theHospitalization = this.getHospitalization();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "hospitalization", theHospitalization), currentHashCode, theHospitalization, (this.hospitalization!= null));
}
{
List theLocation;
theLocation = (((this.location!= null)&&(!this.location.isEmpty()))?this.getLocation():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "location", theLocation), currentHashCode, theLocation, ((this.location!= null)&&(!this.location.isEmpty())));
}
{
Reference theServiceProvider;
theServiceProvider = this.getServiceProvider();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "serviceProvider", theServiceProvider), currentHashCode, theServiceProvider, (this.serviceProvider!= null));
}
{
Reference thePartOf;
thePartOf = this.getPartOf();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partOf", thePartOf), currentHashCode, thePartOf, (this.partOf!= null));
}
return currentHashCode;
}
@Override
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.getInstance();
return this.hashCode(null, strategy);
}
@Override
public java.lang.String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
super.appendFields(locator, buffer, strategy);
{
List theIdentifier;
theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null);
strategy.appendField(locator, this, "identifier", buffer, theIdentifier, ((this.identifier!= null)&&(!this.identifier.isEmpty())));
}
{
EncounterState theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus, (this.status!= null));
}
{
List theStatusHistory;
theStatusHistory = (((this.statusHistory!= null)&&(!this.statusHistory.isEmpty()))?this.getStatusHistory():null);
strategy.appendField(locator, this, "statusHistory", buffer, theStatusHistory, ((this.statusHistory!= null)&&(!this.statusHistory.isEmpty())));
}
{
EncounterClass theClazz;
theClazz = this.getClazz();
strategy.appendField(locator, this, "clazz", buffer, theClazz, (this.clazz!= null));
}
{
List theType;
theType = (((this.type!= null)&&(!this.type.isEmpty()))?this.getType():null);
strategy.appendField(locator, this, "type", buffer, theType, ((this.type!= null)&&(!this.type.isEmpty())));
}
{
CodeableConcept thePriority;
thePriority = this.getPriority();
strategy.appendField(locator, this, "priority", buffer, thePriority, (this.priority!= null));
}
{
Reference thePatient;
thePatient = this.getPatient();
strategy.appendField(locator, this, "patient", buffer, thePatient, (this.patient!= null));
}
{
List theEpisodeOfCare;
theEpisodeOfCare = (((this.episodeOfCare!= null)&&(!this.episodeOfCare.isEmpty()))?this.getEpisodeOfCare():null);
strategy.appendField(locator, this, "episodeOfCare", buffer, theEpisodeOfCare, ((this.episodeOfCare!= null)&&(!this.episodeOfCare.isEmpty())));
}
{
List theIncomingReferral;
theIncomingReferral = (((this.incomingReferral!= null)&&(!this.incomingReferral.isEmpty()))?this.getIncomingReferral():null);
strategy.appendField(locator, this, "incomingReferral", buffer, theIncomingReferral, ((this.incomingReferral!= null)&&(!this.incomingReferral.isEmpty())));
}
{
List theParticipant;
theParticipant = (((this.participant!= null)&&(!this.participant.isEmpty()))?this.getParticipant():null);
strategy.appendField(locator, this, "participant", buffer, theParticipant, ((this.participant!= null)&&(!this.participant.isEmpty())));
}
{
Reference theAppointment;
theAppointment = this.getAppointment();
strategy.appendField(locator, this, "appointment", buffer, theAppointment, (this.appointment!= null));
}
{
Period thePeriod;
thePeriod = this.getPeriod();
strategy.appendField(locator, this, "period", buffer, thePeriod, (this.period!= null));
}
{
Duration theLength;
theLength = this.getLength();
strategy.appendField(locator, this, "length", buffer, theLength, (this.length!= null));
}
{
List theReason;
theReason = (((this.reason!= null)&&(!this.reason.isEmpty()))?this.getReason():null);
strategy.appendField(locator, this, "reason", buffer, theReason, ((this.reason!= null)&&(!this.reason.isEmpty())));
}
{
List theIndication;
theIndication = (((this.indication!= null)&&(!this.indication.isEmpty()))?this.getIndication():null);
strategy.appendField(locator, this, "indication", buffer, theIndication, ((this.indication!= null)&&(!this.indication.isEmpty())));
}
{
EncounterHospitalization theHospitalization;
theHospitalization = this.getHospitalization();
strategy.appendField(locator, this, "hospitalization", buffer, theHospitalization, (this.hospitalization!= null));
}
{
List theLocation;
theLocation = (((this.location!= null)&&(!this.location.isEmpty()))?this.getLocation():null);
strategy.appendField(locator, this, "location", buffer, theLocation, ((this.location!= null)&&(!this.location.isEmpty())));
}
{
Reference theServiceProvider;
theServiceProvider = this.getServiceProvider();
strategy.appendField(locator, this, "serviceProvider", buffer, theServiceProvider, (this.serviceProvider!= null));
}
{
Reference thePartOf;
thePartOf = this.getPartOf();
strategy.appendField(locator, this, "partOf", buffer, thePartOf, (this.partOf!= null));
}
return buffer;
}
public void setIdentifier(List value) {
this.identifier = value;
}
public void setStatusHistory(List value) {
this.statusHistory = value;
}
public void setType(List value) {
this.type = value;
}
public void setEpisodeOfCare(List value) {
this.episodeOfCare = value;
}
public void setIncomingReferral(List value) {
this.incomingReferral = value;
}
public void setParticipant(List value) {
this.participant = value;
}
public void setReason(List value) {
this.reason = value;
}
public void setIndication(List value) {
this.indication = value;
}
public void setLocation(List value) {
this.location = value;
}
}