org.hl7.fhir.MedicationAdministration 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.10.07 at 09:31:25 AM MDT
//
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 MedicationAdministration complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="MedicationAdministration">
* <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}MedicationAdministrationStatus"/>
* <choice>
* <element name="medicationCodeableConcept" type="{http://hl7.org/fhir}CodeableConcept"/>
* <element name="medicationReference" type="{http://hl7.org/fhir}Reference"/>
* </choice>
* <element name="patient" type="{http://hl7.org/fhir}Reference"/>
* <element name="encounter" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <choice>
* <element name="effectiveTimeDateTime" type="{http://hl7.org/fhir}dateTime"/>
* <element name="effectiveTimePeriod" type="{http://hl7.org/fhir}Period"/>
* </choice>
* <element name="practitioner" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="prescription" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="wasNotGiven" type="{http://hl7.org/fhir}boolean" minOccurs="0"/>
* <element name="reasonNotGiven" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
* <element name="reasonGiven" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
* <element name="device" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
* <element name="note" type="{http://hl7.org/fhir}Annotation" maxOccurs="unbounded" minOccurs="0"/>
* <element name="dosage" type="{http://hl7.org/fhir}MedicationAdministration.Dosage" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MedicationAdministration", propOrder = {
"identifier",
"status",
"medicationCodeableConcept",
"medicationReference",
"patient",
"encounter",
"effectiveTimeDateTime",
"effectiveTimePeriod",
"practitioner",
"prescription",
"wasNotGiven",
"reasonNotGiven",
"reasonGiven",
"device",
"note",
"dosage"
})
public class MedicationAdministration
extends DomainResource
implements Equals2, HashCode2, ToString2
{
protected List identifier;
@XmlElement(required = true)
protected MedicationAdministrationStatus status;
protected CodeableConcept medicationCodeableConcept;
protected Reference medicationReference;
@XmlElement(required = true)
protected Reference patient;
protected Reference encounter;
protected DateTime effectiveTimeDateTime;
protected Period effectiveTimePeriod;
protected Reference practitioner;
protected Reference prescription;
protected Boolean wasNotGiven;
protected List reasonNotGiven;
protected List reasonGiven;
protected List device;
protected List note;
protected MedicationAdministrationDosage dosage;
/**
* 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 MedicationAdministrationStatus }
*
*/
public MedicationAdministrationStatus getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link MedicationAdministrationStatus }
*
*/
public void setStatus(MedicationAdministrationStatus value) {
this.status = value;
}
/**
* Gets the value of the medicationCodeableConcept property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getMedicationCodeableConcept() {
return medicationCodeableConcept;
}
/**
* Sets the value of the medicationCodeableConcept property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setMedicationCodeableConcept(CodeableConcept value) {
this.medicationCodeableConcept = value;
}
/**
* Gets the value of the medicationReference property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getMedicationReference() {
return medicationReference;
}
/**
* Sets the value of the medicationReference property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setMedicationReference(Reference value) {
this.medicationReference = 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 encounter property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getEncounter() {
return encounter;
}
/**
* Sets the value of the encounter property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setEncounter(Reference value) {
this.encounter = value;
}
/**
* Gets the value of the effectiveTimeDateTime property.
*
* @return
* possible object is
* {@link DateTime }
*
*/
public DateTime getEffectiveTimeDateTime() {
return effectiveTimeDateTime;
}
/**
* Sets the value of the effectiveTimeDateTime property.
*
* @param value
* allowed object is
* {@link DateTime }
*
*/
public void setEffectiveTimeDateTime(DateTime value) {
this.effectiveTimeDateTime = value;
}
/**
* Gets the value of the effectiveTimePeriod property.
*
* @return
* possible object is
* {@link Period }
*
*/
public Period getEffectiveTimePeriod() {
return effectiveTimePeriod;
}
/**
* Sets the value of the effectiveTimePeriod property.
*
* @param value
* allowed object is
* {@link Period }
*
*/
public void setEffectiveTimePeriod(Period value) {
this.effectiveTimePeriod = value;
}
/**
* Gets the value of the practitioner property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getPractitioner() {
return practitioner;
}
/**
* Sets the value of the practitioner property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setPractitioner(Reference value) {
this.practitioner = value;
}
/**
* Gets the value of the prescription property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getPrescription() {
return prescription;
}
/**
* Sets the value of the prescription property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setPrescription(Reference value) {
this.prescription = value;
}
/**
* Gets the value of the wasNotGiven property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean getWasNotGiven() {
return wasNotGiven;
}
/**
* Sets the value of the wasNotGiven property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setWasNotGiven(Boolean value) {
this.wasNotGiven = value;
}
/**
* Gets the value of the reasonNotGiven 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 reasonNotGiven property.
*
*
* For example, to add a new item, do as follows:
*
* getReasonNotGiven().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link CodeableConcept }
*
*
*/
public List getReasonNotGiven() {
if (reasonNotGiven == null) {
reasonNotGiven = new ArrayList();
}
return this.reasonNotGiven;
}
/**
* Gets the value of the reasonGiven 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 reasonGiven property.
*
*
* For example, to add a new item, do as follows:
*
* getReasonGiven().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link CodeableConcept }
*
*
*/
public List getReasonGiven() {
if (reasonGiven == null) {
reasonGiven = new ArrayList();
}
return this.reasonGiven;
}
/**
* Gets the value of the device 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 device property.
*
*
* For example, to add a new item, do as follows:
*
* getDevice().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getDevice() {
if (device == null) {
device = new ArrayList();
}
return this.device;
}
/**
* Gets the value of the note 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 note property.
*
*
* For example, to add a new item, do as follows:
*
* getNote().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Annotation }
*
*
*/
public List getNote() {
if (note == null) {
note = new ArrayList();
}
return this.note;
}
/**
* Gets the value of the dosage property.
*
* @return
* possible object is
* {@link MedicationAdministrationDosage }
*
*/
public MedicationAdministrationDosage getDosage() {
return dosage;
}
/**
* Sets the value of the dosage property.
*
* @param value
* allowed object is
* {@link MedicationAdministrationDosage }
*
*/
public void setDosage(MedicationAdministrationDosage value) {
this.dosage = value;
}
public MedicationAdministration withIdentifier(Identifier... values) {
if (values!= null) {
for (Identifier value: values) {
getIdentifier().add(value);
}
}
return this;
}
public MedicationAdministration withIdentifier(Collection values) {
if (values!= null) {
getIdentifier().addAll(values);
}
return this;
}
public MedicationAdministration withStatus(MedicationAdministrationStatus value) {
setStatus(value);
return this;
}
public MedicationAdministration withMedicationCodeableConcept(CodeableConcept value) {
setMedicationCodeableConcept(value);
return this;
}
public MedicationAdministration withMedicationReference(Reference value) {
setMedicationReference(value);
return this;
}
public MedicationAdministration withPatient(Reference value) {
setPatient(value);
return this;
}
public MedicationAdministration withEncounter(Reference value) {
setEncounter(value);
return this;
}
public MedicationAdministration withEffectiveTimeDateTime(DateTime value) {
setEffectiveTimeDateTime(value);
return this;
}
public MedicationAdministration withEffectiveTimePeriod(Period value) {
setEffectiveTimePeriod(value);
return this;
}
public MedicationAdministration withPractitioner(Reference value) {
setPractitioner(value);
return this;
}
public MedicationAdministration withPrescription(Reference value) {
setPrescription(value);
return this;
}
public MedicationAdministration withWasNotGiven(Boolean value) {
setWasNotGiven(value);
return this;
}
public MedicationAdministration withReasonNotGiven(CodeableConcept... values) {
if (values!= null) {
for (CodeableConcept value: values) {
getReasonNotGiven().add(value);
}
}
return this;
}
public MedicationAdministration withReasonNotGiven(Collection values) {
if (values!= null) {
getReasonNotGiven().addAll(values);
}
return this;
}
public MedicationAdministration withReasonGiven(CodeableConcept... values) {
if (values!= null) {
for (CodeableConcept value: values) {
getReasonGiven().add(value);
}
}
return this;
}
public MedicationAdministration withReasonGiven(Collection values) {
if (values!= null) {
getReasonGiven().addAll(values);
}
return this;
}
public MedicationAdministration withDevice(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getDevice().add(value);
}
}
return this;
}
public MedicationAdministration withDevice(Collection values) {
if (values!= null) {
getDevice().addAll(values);
}
return this;
}
public MedicationAdministration withNote(Annotation... values) {
if (values!= null) {
for (Annotation value: values) {
getNote().add(value);
}
}
return this;
}
public MedicationAdministration withNote(Collection values) {
if (values!= null) {
getNote().addAll(values);
}
return this;
}
public MedicationAdministration withDosage(MedicationAdministrationDosage value) {
setDosage(value);
return this;
}
@Override
public MedicationAdministration withText(Narrative value) {
setText(value);
return this;
}
@Override
public MedicationAdministration withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public MedicationAdministration withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public MedicationAdministration withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public MedicationAdministration withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public MedicationAdministration withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public MedicationAdministration withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public MedicationAdministration withId(Id value) {
setId(value);
return this;
}
@Override
public MedicationAdministration withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public MedicationAdministration withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public MedicationAdministration 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 MedicationAdministration that = ((MedicationAdministration) 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;
}
}
{
MedicationAdministrationStatus lhsStatus;
lhsStatus = this.getStatus();
MedicationAdministrationStatus 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;
}
}
{
CodeableConcept lhsMedicationCodeableConcept;
lhsMedicationCodeableConcept = this.getMedicationCodeableConcept();
CodeableConcept rhsMedicationCodeableConcept;
rhsMedicationCodeableConcept = that.getMedicationCodeableConcept();
if (!strategy.equals(LocatorUtils.property(thisLocator, "medicationCodeableConcept", lhsMedicationCodeableConcept), LocatorUtils.property(thatLocator, "medicationCodeableConcept", rhsMedicationCodeableConcept), lhsMedicationCodeableConcept, rhsMedicationCodeableConcept, (this.medicationCodeableConcept!= null), (that.medicationCodeableConcept!= null))) {
return false;
}
}
{
Reference lhsMedicationReference;
lhsMedicationReference = this.getMedicationReference();
Reference rhsMedicationReference;
rhsMedicationReference = that.getMedicationReference();
if (!strategy.equals(LocatorUtils.property(thisLocator, "medicationReference", lhsMedicationReference), LocatorUtils.property(thatLocator, "medicationReference", rhsMedicationReference), lhsMedicationReference, rhsMedicationReference, (this.medicationReference!= null), (that.medicationReference!= 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;
}
}
{
Reference lhsEncounter;
lhsEncounter = this.getEncounter();
Reference rhsEncounter;
rhsEncounter = that.getEncounter();
if (!strategy.equals(LocatorUtils.property(thisLocator, "encounter", lhsEncounter), LocatorUtils.property(thatLocator, "encounter", rhsEncounter), lhsEncounter, rhsEncounter, (this.encounter!= null), (that.encounter!= null))) {
return false;
}
}
{
DateTime lhsEffectiveTimeDateTime;
lhsEffectiveTimeDateTime = this.getEffectiveTimeDateTime();
DateTime rhsEffectiveTimeDateTime;
rhsEffectiveTimeDateTime = that.getEffectiveTimeDateTime();
if (!strategy.equals(LocatorUtils.property(thisLocator, "effectiveTimeDateTime", lhsEffectiveTimeDateTime), LocatorUtils.property(thatLocator, "effectiveTimeDateTime", rhsEffectiveTimeDateTime), lhsEffectiveTimeDateTime, rhsEffectiveTimeDateTime, (this.effectiveTimeDateTime!= null), (that.effectiveTimeDateTime!= null))) {
return false;
}
}
{
Period lhsEffectiveTimePeriod;
lhsEffectiveTimePeriod = this.getEffectiveTimePeriod();
Period rhsEffectiveTimePeriod;
rhsEffectiveTimePeriod = that.getEffectiveTimePeriod();
if (!strategy.equals(LocatorUtils.property(thisLocator, "effectiveTimePeriod", lhsEffectiveTimePeriod), LocatorUtils.property(thatLocator, "effectiveTimePeriod", rhsEffectiveTimePeriod), lhsEffectiveTimePeriod, rhsEffectiveTimePeriod, (this.effectiveTimePeriod!= null), (that.effectiveTimePeriod!= null))) {
return false;
}
}
{
Reference lhsPractitioner;
lhsPractitioner = this.getPractitioner();
Reference rhsPractitioner;
rhsPractitioner = that.getPractitioner();
if (!strategy.equals(LocatorUtils.property(thisLocator, "practitioner", lhsPractitioner), LocatorUtils.property(thatLocator, "practitioner", rhsPractitioner), lhsPractitioner, rhsPractitioner, (this.practitioner!= null), (that.practitioner!= null))) {
return false;
}
}
{
Reference lhsPrescription;
lhsPrescription = this.getPrescription();
Reference rhsPrescription;
rhsPrescription = that.getPrescription();
if (!strategy.equals(LocatorUtils.property(thisLocator, "prescription", lhsPrescription), LocatorUtils.property(thatLocator, "prescription", rhsPrescription), lhsPrescription, rhsPrescription, (this.prescription!= null), (that.prescription!= null))) {
return false;
}
}
{
Boolean lhsWasNotGiven;
lhsWasNotGiven = this.getWasNotGiven();
Boolean rhsWasNotGiven;
rhsWasNotGiven = that.getWasNotGiven();
if (!strategy.equals(LocatorUtils.property(thisLocator, "wasNotGiven", lhsWasNotGiven), LocatorUtils.property(thatLocator, "wasNotGiven", rhsWasNotGiven), lhsWasNotGiven, rhsWasNotGiven, (this.wasNotGiven!= null), (that.wasNotGiven!= null))) {
return false;
}
}
{
List lhsReasonNotGiven;
lhsReasonNotGiven = (((this.reasonNotGiven!= null)&&(!this.reasonNotGiven.isEmpty()))?this.getReasonNotGiven():null);
List rhsReasonNotGiven;
rhsReasonNotGiven = (((that.reasonNotGiven!= null)&&(!that.reasonNotGiven.isEmpty()))?that.getReasonNotGiven():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "reasonNotGiven", lhsReasonNotGiven), LocatorUtils.property(thatLocator, "reasonNotGiven", rhsReasonNotGiven), lhsReasonNotGiven, rhsReasonNotGiven, ((this.reasonNotGiven!= null)&&(!this.reasonNotGiven.isEmpty())), ((that.reasonNotGiven!= null)&&(!that.reasonNotGiven.isEmpty())))) {
return false;
}
}
{
List lhsReasonGiven;
lhsReasonGiven = (((this.reasonGiven!= null)&&(!this.reasonGiven.isEmpty()))?this.getReasonGiven():null);
List rhsReasonGiven;
rhsReasonGiven = (((that.reasonGiven!= null)&&(!that.reasonGiven.isEmpty()))?that.getReasonGiven():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "reasonGiven", lhsReasonGiven), LocatorUtils.property(thatLocator, "reasonGiven", rhsReasonGiven), lhsReasonGiven, rhsReasonGiven, ((this.reasonGiven!= null)&&(!this.reasonGiven.isEmpty())), ((that.reasonGiven!= null)&&(!that.reasonGiven.isEmpty())))) {
return false;
}
}
{
List lhsDevice;
lhsDevice = (((this.device!= null)&&(!this.device.isEmpty()))?this.getDevice():null);
List rhsDevice;
rhsDevice = (((that.device!= null)&&(!that.device.isEmpty()))?that.getDevice():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "device", lhsDevice), LocatorUtils.property(thatLocator, "device", rhsDevice), lhsDevice, rhsDevice, ((this.device!= null)&&(!this.device.isEmpty())), ((that.device!= null)&&(!that.device.isEmpty())))) {
return false;
}
}
{
List lhsNote;
lhsNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null);
List rhsNote;
rhsNote = (((that.note!= null)&&(!that.note.isEmpty()))?that.getNote():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "note", lhsNote), LocatorUtils.property(thatLocator, "note", rhsNote), lhsNote, rhsNote, ((this.note!= null)&&(!this.note.isEmpty())), ((that.note!= null)&&(!that.note.isEmpty())))) {
return false;
}
}
{
MedicationAdministrationDosage lhsDosage;
lhsDosage = this.getDosage();
MedicationAdministrationDosage rhsDosage;
rhsDosage = that.getDosage();
if (!strategy.equals(LocatorUtils.property(thisLocator, "dosage", lhsDosage), LocatorUtils.property(thatLocator, "dosage", rhsDosage), lhsDosage, rhsDosage, (this.dosage!= null), (that.dosage!= 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())));
}
{
MedicationAdministrationStatus theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus, (this.status!= null));
}
{
CodeableConcept theMedicationCodeableConcept;
theMedicationCodeableConcept = this.getMedicationCodeableConcept();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "medicationCodeableConcept", theMedicationCodeableConcept), currentHashCode, theMedicationCodeableConcept, (this.medicationCodeableConcept!= null));
}
{
Reference theMedicationReference;
theMedicationReference = this.getMedicationReference();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "medicationReference", theMedicationReference), currentHashCode, theMedicationReference, (this.medicationReference!= null));
}
{
Reference thePatient;
thePatient = this.getPatient();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "patient", thePatient), currentHashCode, thePatient, (this.patient!= null));
}
{
Reference theEncounter;
theEncounter = this.getEncounter();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "encounter", theEncounter), currentHashCode, theEncounter, (this.encounter!= null));
}
{
DateTime theEffectiveTimeDateTime;
theEffectiveTimeDateTime = this.getEffectiveTimeDateTime();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "effectiveTimeDateTime", theEffectiveTimeDateTime), currentHashCode, theEffectiveTimeDateTime, (this.effectiveTimeDateTime!= null));
}
{
Period theEffectiveTimePeriod;
theEffectiveTimePeriod = this.getEffectiveTimePeriod();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "effectiveTimePeriod", theEffectiveTimePeriod), currentHashCode, theEffectiveTimePeriod, (this.effectiveTimePeriod!= null));
}
{
Reference thePractitioner;
thePractitioner = this.getPractitioner();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "practitioner", thePractitioner), currentHashCode, thePractitioner, (this.practitioner!= null));
}
{
Reference thePrescription;
thePrescription = this.getPrescription();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "prescription", thePrescription), currentHashCode, thePrescription, (this.prescription!= null));
}
{
Boolean theWasNotGiven;
theWasNotGiven = this.getWasNotGiven();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "wasNotGiven", theWasNotGiven), currentHashCode, theWasNotGiven, (this.wasNotGiven!= null));
}
{
List theReasonNotGiven;
theReasonNotGiven = (((this.reasonNotGiven!= null)&&(!this.reasonNotGiven.isEmpty()))?this.getReasonNotGiven():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reasonNotGiven", theReasonNotGiven), currentHashCode, theReasonNotGiven, ((this.reasonNotGiven!= null)&&(!this.reasonNotGiven.isEmpty())));
}
{
List theReasonGiven;
theReasonGiven = (((this.reasonGiven!= null)&&(!this.reasonGiven.isEmpty()))?this.getReasonGiven():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reasonGiven", theReasonGiven), currentHashCode, theReasonGiven, ((this.reasonGiven!= null)&&(!this.reasonGiven.isEmpty())));
}
{
List theDevice;
theDevice = (((this.device!= null)&&(!this.device.isEmpty()))?this.getDevice():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "device", theDevice), currentHashCode, theDevice, ((this.device!= null)&&(!this.device.isEmpty())));
}
{
List theNote;
theNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "note", theNote), currentHashCode, theNote, ((this.note!= null)&&(!this.note.isEmpty())));
}
{
MedicationAdministrationDosage theDosage;
theDosage = this.getDosage();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "dosage", theDosage), currentHashCode, theDosage, (this.dosage!= 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())));
}
{
MedicationAdministrationStatus theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus, (this.status!= null));
}
{
CodeableConcept theMedicationCodeableConcept;
theMedicationCodeableConcept = this.getMedicationCodeableConcept();
strategy.appendField(locator, this, "medicationCodeableConcept", buffer, theMedicationCodeableConcept, (this.medicationCodeableConcept!= null));
}
{
Reference theMedicationReference;
theMedicationReference = this.getMedicationReference();
strategy.appendField(locator, this, "medicationReference", buffer, theMedicationReference, (this.medicationReference!= null));
}
{
Reference thePatient;
thePatient = this.getPatient();
strategy.appendField(locator, this, "patient", buffer, thePatient, (this.patient!= null));
}
{
Reference theEncounter;
theEncounter = this.getEncounter();
strategy.appendField(locator, this, "encounter", buffer, theEncounter, (this.encounter!= null));
}
{
DateTime theEffectiveTimeDateTime;
theEffectiveTimeDateTime = this.getEffectiveTimeDateTime();
strategy.appendField(locator, this, "effectiveTimeDateTime", buffer, theEffectiveTimeDateTime, (this.effectiveTimeDateTime!= null));
}
{
Period theEffectiveTimePeriod;
theEffectiveTimePeriod = this.getEffectiveTimePeriod();
strategy.appendField(locator, this, "effectiveTimePeriod", buffer, theEffectiveTimePeriod, (this.effectiveTimePeriod!= null));
}
{
Reference thePractitioner;
thePractitioner = this.getPractitioner();
strategy.appendField(locator, this, "practitioner", buffer, thePractitioner, (this.practitioner!= null));
}
{
Reference thePrescription;
thePrescription = this.getPrescription();
strategy.appendField(locator, this, "prescription", buffer, thePrescription, (this.prescription!= null));
}
{
Boolean theWasNotGiven;
theWasNotGiven = this.getWasNotGiven();
strategy.appendField(locator, this, "wasNotGiven", buffer, theWasNotGiven, (this.wasNotGiven!= null));
}
{
List theReasonNotGiven;
theReasonNotGiven = (((this.reasonNotGiven!= null)&&(!this.reasonNotGiven.isEmpty()))?this.getReasonNotGiven():null);
strategy.appendField(locator, this, "reasonNotGiven", buffer, theReasonNotGiven, ((this.reasonNotGiven!= null)&&(!this.reasonNotGiven.isEmpty())));
}
{
List theReasonGiven;
theReasonGiven = (((this.reasonGiven!= null)&&(!this.reasonGiven.isEmpty()))?this.getReasonGiven():null);
strategy.appendField(locator, this, "reasonGiven", buffer, theReasonGiven, ((this.reasonGiven!= null)&&(!this.reasonGiven.isEmpty())));
}
{
List theDevice;
theDevice = (((this.device!= null)&&(!this.device.isEmpty()))?this.getDevice():null);
strategy.appendField(locator, this, "device", buffer, theDevice, ((this.device!= null)&&(!this.device.isEmpty())));
}
{
List theNote;
theNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null);
strategy.appendField(locator, this, "note", buffer, theNote, ((this.note!= null)&&(!this.note.isEmpty())));
}
{
MedicationAdministrationDosage theDosage;
theDosage = this.getDosage();
strategy.appendField(locator, this, "dosage", buffer, theDosage, (this.dosage!= null));
}
return buffer;
}
public void setIdentifier(List value) {
this.identifier = value;
}
public void setReasonNotGiven(List value) {
this.reasonNotGiven = value;
}
public void setReasonGiven(List value) {
this.reasonGiven = value;
}
public void setDevice(List value) {
this.device = value;
}
public void setNote(List value) {
this.note = value;
}
}