org.hl7.fhir.MedicationDispense 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.08.16 at 09:36:55 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.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 MedicationDispense complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="MedicationDispense">
* <complexContent>
* <extension base="{http://hl7.org/fhir}DomainResource">
* <sequence>
* <element name="identifier" type="{http://hl7.org/fhir}Identifier" minOccurs="0"/>
* <element name="status" type="{http://hl7.org/fhir}MedicationDispenseStatus" minOccurs="0"/>
* <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" minOccurs="0"/>
* <element name="dispenser" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="authorizingPrescription" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
* <element name="type" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="quantity" type="{http://hl7.org/fhir}SimpleQuantity" minOccurs="0"/>
* <element name="daysSupply" type="{http://hl7.org/fhir}SimpleQuantity" minOccurs="0"/>
* <element name="whenPrepared" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
* <element name="whenHandedOver" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
* <element name="destination" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="receiver" 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="dosageInstruction" type="{http://hl7.org/fhir}MedicationDispense.DosageInstruction" maxOccurs="unbounded" minOccurs="0"/>
* <element name="substitution" type="{http://hl7.org/fhir}MedicationDispense.Substitution" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MedicationDispense", propOrder = {
"identifier",
"status",
"medicationCodeableConcept",
"medicationReference",
"patient",
"dispenser",
"authorizingPrescription",
"type",
"quantity",
"daysSupply",
"whenPrepared",
"whenHandedOver",
"destination",
"receiver",
"note",
"dosageInstruction",
"substitution"
})
public class MedicationDispense
extends DomainResource
implements Equals2, HashCode2, ToString2
{
protected Identifier identifier;
protected MedicationDispenseStatus status;
protected CodeableConcept medicationCodeableConcept;
protected Reference medicationReference;
protected Reference patient;
protected Reference dispenser;
protected List authorizingPrescription;
protected CodeableConcept type;
protected SimpleQuantity quantity;
protected SimpleQuantity daysSupply;
protected DateTime whenPrepared;
protected DateTime whenHandedOver;
protected Reference destination;
protected List receiver;
protected List note;
protected List dosageInstruction;
protected MedicationDispenseSubstitution substitution;
/**
* Gets the value of the identifier property.
*
* @return
* possible object is
* {@link Identifier }
*
*/
public Identifier getIdentifier() {
return identifier;
}
/**
* Sets the value of the identifier property.
*
* @param value
* allowed object is
* {@link Identifier }
*
*/
public void setIdentifier(Identifier value) {
this.identifier = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link MedicationDispenseStatus }
*
*/
public MedicationDispenseStatus getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link MedicationDispenseStatus }
*
*/
public void setStatus(MedicationDispenseStatus 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 dispenser property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getDispenser() {
return dispenser;
}
/**
* Sets the value of the dispenser property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setDispenser(Reference value) {
this.dispenser = value;
}
/**
* Gets the value of the authorizingPrescription 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 authorizingPrescription property.
*
*
* For example, to add a new item, do as follows:
*
* getAuthorizingPrescription().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getAuthorizingPrescription() {
if (authorizingPrescription == null) {
authorizingPrescription = new ArrayList();
}
return this.authorizingPrescription;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setType(CodeableConcept value) {
this.type = value;
}
/**
* Gets the value of the quantity property.
*
* @return
* possible object is
* {@link SimpleQuantity }
*
*/
public SimpleQuantity getQuantity() {
return quantity;
}
/**
* Sets the value of the quantity property.
*
* @param value
* allowed object is
* {@link SimpleQuantity }
*
*/
public void setQuantity(SimpleQuantity value) {
this.quantity = value;
}
/**
* Gets the value of the daysSupply property.
*
* @return
* possible object is
* {@link SimpleQuantity }
*
*/
public SimpleQuantity getDaysSupply() {
return daysSupply;
}
/**
* Sets the value of the daysSupply property.
*
* @param value
* allowed object is
* {@link SimpleQuantity }
*
*/
public void setDaysSupply(SimpleQuantity value) {
this.daysSupply = value;
}
/**
* Gets the value of the whenPrepared property.
*
* @return
* possible object is
* {@link DateTime }
*
*/
public DateTime getWhenPrepared() {
return whenPrepared;
}
/**
* Sets the value of the whenPrepared property.
*
* @param value
* allowed object is
* {@link DateTime }
*
*/
public void setWhenPrepared(DateTime value) {
this.whenPrepared = value;
}
/**
* Gets the value of the whenHandedOver property.
*
* @return
* possible object is
* {@link DateTime }
*
*/
public DateTime getWhenHandedOver() {
return whenHandedOver;
}
/**
* Sets the value of the whenHandedOver property.
*
* @param value
* allowed object is
* {@link DateTime }
*
*/
public void setWhenHandedOver(DateTime value) {
this.whenHandedOver = value;
}
/**
* Gets the value of the destination property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getDestination() {
return destination;
}
/**
* Sets the value of the destination property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setDestination(Reference value) {
this.destination = value;
}
/**
* Gets the value of the receiver 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 receiver property.
*
*
* For example, to add a new item, do as follows:
*
* getReceiver().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getReceiver() {
if (receiver == null) {
receiver = new ArrayList();
}
return this.receiver;
}
/**
* 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 dosageInstruction 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 dosageInstruction property.
*
*
* For example, to add a new item, do as follows:
*
* getDosageInstruction().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link MedicationDispenseDosageInstruction }
*
*
*/
public List getDosageInstruction() {
if (dosageInstruction == null) {
dosageInstruction = new ArrayList();
}
return this.dosageInstruction;
}
/**
* Gets the value of the substitution property.
*
* @return
* possible object is
* {@link MedicationDispenseSubstitution }
*
*/
public MedicationDispenseSubstitution getSubstitution() {
return substitution;
}
/**
* Sets the value of the substitution property.
*
* @param value
* allowed object is
* {@link MedicationDispenseSubstitution }
*
*/
public void setSubstitution(MedicationDispenseSubstitution value) {
this.substitution = value;
}
public MedicationDispense withIdentifier(Identifier value) {
setIdentifier(value);
return this;
}
public MedicationDispense withStatus(MedicationDispenseStatus value) {
setStatus(value);
return this;
}
public MedicationDispense withMedicationCodeableConcept(CodeableConcept value) {
setMedicationCodeableConcept(value);
return this;
}
public MedicationDispense withMedicationReference(Reference value) {
setMedicationReference(value);
return this;
}
public MedicationDispense withPatient(Reference value) {
setPatient(value);
return this;
}
public MedicationDispense withDispenser(Reference value) {
setDispenser(value);
return this;
}
public MedicationDispense withAuthorizingPrescription(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getAuthorizingPrescription().add(value);
}
}
return this;
}
public MedicationDispense withAuthorizingPrescription(Collection values) {
if (values!= null) {
getAuthorizingPrescription().addAll(values);
}
return this;
}
public MedicationDispense withType(CodeableConcept value) {
setType(value);
return this;
}
public MedicationDispense withQuantity(SimpleQuantity value) {
setQuantity(value);
return this;
}
public MedicationDispense withDaysSupply(SimpleQuantity value) {
setDaysSupply(value);
return this;
}
public MedicationDispense withWhenPrepared(DateTime value) {
setWhenPrepared(value);
return this;
}
public MedicationDispense withWhenHandedOver(DateTime value) {
setWhenHandedOver(value);
return this;
}
public MedicationDispense withDestination(Reference value) {
setDestination(value);
return this;
}
public MedicationDispense withReceiver(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getReceiver().add(value);
}
}
return this;
}
public MedicationDispense withReceiver(Collection values) {
if (values!= null) {
getReceiver().addAll(values);
}
return this;
}
public MedicationDispense withNote(Annotation... values) {
if (values!= null) {
for (Annotation value: values) {
getNote().add(value);
}
}
return this;
}
public MedicationDispense withNote(Collection values) {
if (values!= null) {
getNote().addAll(values);
}
return this;
}
public MedicationDispense withDosageInstruction(MedicationDispenseDosageInstruction... values) {
if (values!= null) {
for (MedicationDispenseDosageInstruction value: values) {
getDosageInstruction().add(value);
}
}
return this;
}
public MedicationDispense withDosageInstruction(Collection values) {
if (values!= null) {
getDosageInstruction().addAll(values);
}
return this;
}
public MedicationDispense withSubstitution(MedicationDispenseSubstitution value) {
setSubstitution(value);
return this;
}
@Override
public MedicationDispense withText(Narrative value) {
setText(value);
return this;
}
@Override
public MedicationDispense withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public MedicationDispense withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public MedicationDispense withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public MedicationDispense withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public MedicationDispense withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public MedicationDispense withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public MedicationDispense withId(Id value) {
setId(value);
return this;
}
@Override
public MedicationDispense withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public MedicationDispense withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public MedicationDispense 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 MedicationDispense that = ((MedicationDispense) object);
{
Identifier lhsIdentifier;
lhsIdentifier = this.getIdentifier();
Identifier rhsIdentifier;
rhsIdentifier = that.getIdentifier();
if (!strategy.equals(LocatorUtils.property(thisLocator, "identifier", lhsIdentifier), LocatorUtils.property(thatLocator, "identifier", rhsIdentifier), lhsIdentifier, rhsIdentifier, (this.identifier!= null), (that.identifier!= null))) {
return false;
}
}
{
MedicationDispenseStatus lhsStatus;
lhsStatus = this.getStatus();
MedicationDispenseStatus 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 lhsDispenser;
lhsDispenser = this.getDispenser();
Reference rhsDispenser;
rhsDispenser = that.getDispenser();
if (!strategy.equals(LocatorUtils.property(thisLocator, "dispenser", lhsDispenser), LocatorUtils.property(thatLocator, "dispenser", rhsDispenser), lhsDispenser, rhsDispenser, (this.dispenser!= null), (that.dispenser!= null))) {
return false;
}
}
{
List lhsAuthorizingPrescription;
lhsAuthorizingPrescription = (((this.authorizingPrescription!= null)&&(!this.authorizingPrescription.isEmpty()))?this.getAuthorizingPrescription():null);
List rhsAuthorizingPrescription;
rhsAuthorizingPrescription = (((that.authorizingPrescription!= null)&&(!that.authorizingPrescription.isEmpty()))?that.getAuthorizingPrescription():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "authorizingPrescription", lhsAuthorizingPrescription), LocatorUtils.property(thatLocator, "authorizingPrescription", rhsAuthorizingPrescription), lhsAuthorizingPrescription, rhsAuthorizingPrescription, ((this.authorizingPrescription!= null)&&(!this.authorizingPrescription.isEmpty())), ((that.authorizingPrescription!= null)&&(!that.authorizingPrescription.isEmpty())))) {
return false;
}
}
{
CodeableConcept lhsType;
lhsType = this.getType();
CodeableConcept rhsType;
rhsType = that.getType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, (this.type!= null), (that.type!= null))) {
return false;
}
}
{
SimpleQuantity lhsQuantity;
lhsQuantity = this.getQuantity();
SimpleQuantity rhsQuantity;
rhsQuantity = that.getQuantity();
if (!strategy.equals(LocatorUtils.property(thisLocator, "quantity", lhsQuantity), LocatorUtils.property(thatLocator, "quantity", rhsQuantity), lhsQuantity, rhsQuantity, (this.quantity!= null), (that.quantity!= null))) {
return false;
}
}
{
SimpleQuantity lhsDaysSupply;
lhsDaysSupply = this.getDaysSupply();
SimpleQuantity rhsDaysSupply;
rhsDaysSupply = that.getDaysSupply();
if (!strategy.equals(LocatorUtils.property(thisLocator, "daysSupply", lhsDaysSupply), LocatorUtils.property(thatLocator, "daysSupply", rhsDaysSupply), lhsDaysSupply, rhsDaysSupply, (this.daysSupply!= null), (that.daysSupply!= null))) {
return false;
}
}
{
DateTime lhsWhenPrepared;
lhsWhenPrepared = this.getWhenPrepared();
DateTime rhsWhenPrepared;
rhsWhenPrepared = that.getWhenPrepared();
if (!strategy.equals(LocatorUtils.property(thisLocator, "whenPrepared", lhsWhenPrepared), LocatorUtils.property(thatLocator, "whenPrepared", rhsWhenPrepared), lhsWhenPrepared, rhsWhenPrepared, (this.whenPrepared!= null), (that.whenPrepared!= null))) {
return false;
}
}
{
DateTime lhsWhenHandedOver;
lhsWhenHandedOver = this.getWhenHandedOver();
DateTime rhsWhenHandedOver;
rhsWhenHandedOver = that.getWhenHandedOver();
if (!strategy.equals(LocatorUtils.property(thisLocator, "whenHandedOver", lhsWhenHandedOver), LocatorUtils.property(thatLocator, "whenHandedOver", rhsWhenHandedOver), lhsWhenHandedOver, rhsWhenHandedOver, (this.whenHandedOver!= null), (that.whenHandedOver!= null))) {
return false;
}
}
{
Reference lhsDestination;
lhsDestination = this.getDestination();
Reference rhsDestination;
rhsDestination = that.getDestination();
if (!strategy.equals(LocatorUtils.property(thisLocator, "destination", lhsDestination), LocatorUtils.property(thatLocator, "destination", rhsDestination), lhsDestination, rhsDestination, (this.destination!= null), (that.destination!= null))) {
return false;
}
}
{
List lhsReceiver;
lhsReceiver = (((this.receiver!= null)&&(!this.receiver.isEmpty()))?this.getReceiver():null);
List rhsReceiver;
rhsReceiver = (((that.receiver!= null)&&(!that.receiver.isEmpty()))?that.getReceiver():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "receiver", lhsReceiver), LocatorUtils.property(thatLocator, "receiver", rhsReceiver), lhsReceiver, rhsReceiver, ((this.receiver!= null)&&(!this.receiver.isEmpty())), ((that.receiver!= null)&&(!that.receiver.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;
}
}
{
List lhsDosageInstruction;
lhsDosageInstruction = (((this.dosageInstruction!= null)&&(!this.dosageInstruction.isEmpty()))?this.getDosageInstruction():null);
List rhsDosageInstruction;
rhsDosageInstruction = (((that.dosageInstruction!= null)&&(!that.dosageInstruction.isEmpty()))?that.getDosageInstruction():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "dosageInstruction", lhsDosageInstruction), LocatorUtils.property(thatLocator, "dosageInstruction", rhsDosageInstruction), lhsDosageInstruction, rhsDosageInstruction, ((this.dosageInstruction!= null)&&(!this.dosageInstruction.isEmpty())), ((that.dosageInstruction!= null)&&(!that.dosageInstruction.isEmpty())))) {
return false;
}
}
{
MedicationDispenseSubstitution lhsSubstitution;
lhsSubstitution = this.getSubstitution();
MedicationDispenseSubstitution rhsSubstitution;
rhsSubstitution = that.getSubstitution();
if (!strategy.equals(LocatorUtils.property(thisLocator, "substitution", lhsSubstitution), LocatorUtils.property(thatLocator, "substitution", rhsSubstitution), lhsSubstitution, rhsSubstitution, (this.substitution!= null), (that.substitution!= 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);
{
Identifier theIdentifier;
theIdentifier = this.getIdentifier();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier, (this.identifier!= null));
}
{
MedicationDispenseStatus 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 theDispenser;
theDispenser = this.getDispenser();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "dispenser", theDispenser), currentHashCode, theDispenser, (this.dispenser!= null));
}
{
List theAuthorizingPrescription;
theAuthorizingPrescription = (((this.authorizingPrescription!= null)&&(!this.authorizingPrescription.isEmpty()))?this.getAuthorizingPrescription():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "authorizingPrescription", theAuthorizingPrescription), currentHashCode, theAuthorizingPrescription, ((this.authorizingPrescription!= null)&&(!this.authorizingPrescription.isEmpty())));
}
{
CodeableConcept theType;
theType = this.getType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, (this.type!= null));
}
{
SimpleQuantity theQuantity;
theQuantity = this.getQuantity();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "quantity", theQuantity), currentHashCode, theQuantity, (this.quantity!= null));
}
{
SimpleQuantity theDaysSupply;
theDaysSupply = this.getDaysSupply();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "daysSupply", theDaysSupply), currentHashCode, theDaysSupply, (this.daysSupply!= null));
}
{
DateTime theWhenPrepared;
theWhenPrepared = this.getWhenPrepared();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "whenPrepared", theWhenPrepared), currentHashCode, theWhenPrepared, (this.whenPrepared!= null));
}
{
DateTime theWhenHandedOver;
theWhenHandedOver = this.getWhenHandedOver();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "whenHandedOver", theWhenHandedOver), currentHashCode, theWhenHandedOver, (this.whenHandedOver!= null));
}
{
Reference theDestination;
theDestination = this.getDestination();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "destination", theDestination), currentHashCode, theDestination, (this.destination!= null));
}
{
List theReceiver;
theReceiver = (((this.receiver!= null)&&(!this.receiver.isEmpty()))?this.getReceiver():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "receiver", theReceiver), currentHashCode, theReceiver, ((this.receiver!= null)&&(!this.receiver.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())));
}
{
List theDosageInstruction;
theDosageInstruction = (((this.dosageInstruction!= null)&&(!this.dosageInstruction.isEmpty()))?this.getDosageInstruction():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "dosageInstruction", theDosageInstruction), currentHashCode, theDosageInstruction, ((this.dosageInstruction!= null)&&(!this.dosageInstruction.isEmpty())));
}
{
MedicationDispenseSubstitution theSubstitution;
theSubstitution = this.getSubstitution();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "substitution", theSubstitution), currentHashCode, theSubstitution, (this.substitution!= 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);
{
Identifier theIdentifier;
theIdentifier = this.getIdentifier();
strategy.appendField(locator, this, "identifier", buffer, theIdentifier, (this.identifier!= null));
}
{
MedicationDispenseStatus 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 theDispenser;
theDispenser = this.getDispenser();
strategy.appendField(locator, this, "dispenser", buffer, theDispenser, (this.dispenser!= null));
}
{
List theAuthorizingPrescription;
theAuthorizingPrescription = (((this.authorizingPrescription!= null)&&(!this.authorizingPrescription.isEmpty()))?this.getAuthorizingPrescription():null);
strategy.appendField(locator, this, "authorizingPrescription", buffer, theAuthorizingPrescription, ((this.authorizingPrescription!= null)&&(!this.authorizingPrescription.isEmpty())));
}
{
CodeableConcept theType;
theType = this.getType();
strategy.appendField(locator, this, "type", buffer, theType, (this.type!= null));
}
{
SimpleQuantity theQuantity;
theQuantity = this.getQuantity();
strategy.appendField(locator, this, "quantity", buffer, theQuantity, (this.quantity!= null));
}
{
SimpleQuantity theDaysSupply;
theDaysSupply = this.getDaysSupply();
strategy.appendField(locator, this, "daysSupply", buffer, theDaysSupply, (this.daysSupply!= null));
}
{
DateTime theWhenPrepared;
theWhenPrepared = this.getWhenPrepared();
strategy.appendField(locator, this, "whenPrepared", buffer, theWhenPrepared, (this.whenPrepared!= null));
}
{
DateTime theWhenHandedOver;
theWhenHandedOver = this.getWhenHandedOver();
strategy.appendField(locator, this, "whenHandedOver", buffer, theWhenHandedOver, (this.whenHandedOver!= null));
}
{
Reference theDestination;
theDestination = this.getDestination();
strategy.appendField(locator, this, "destination", buffer, theDestination, (this.destination!= null));
}
{
List theReceiver;
theReceiver = (((this.receiver!= null)&&(!this.receiver.isEmpty()))?this.getReceiver():null);
strategy.appendField(locator, this, "receiver", buffer, theReceiver, ((this.receiver!= null)&&(!this.receiver.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())));
}
{
List theDosageInstruction;
theDosageInstruction = (((this.dosageInstruction!= null)&&(!this.dosageInstruction.isEmpty()))?this.getDosageInstruction():null);
strategy.appendField(locator, this, "dosageInstruction", buffer, theDosageInstruction, ((this.dosageInstruction!= null)&&(!this.dosageInstruction.isEmpty())));
}
{
MedicationDispenseSubstitution theSubstitution;
theSubstitution = this.getSubstitution();
strategy.appendField(locator, this, "substitution", buffer, theSubstitution, (this.substitution!= null));
}
return buffer;
}
public void setAuthorizingPrescription(List value) {
this.authorizingPrescription = value;
}
public void setReceiver(List value) {
this.receiver = value;
}
public void setNote(List value) {
this.note = value;
}
public void setDosageInstruction(List value) {
this.dosageInstruction = value;
}
}