org.hl7.fhir.SupplyDelivery 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: 2023.12.06 at 03:09:41 PM 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.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 SupplyDelivery complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="SupplyDelivery">
* <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}SupplyDeliveryStatus" minOccurs="0"/>
* <element name="patient" type="{http://hl7.org/fhir}Reference" 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="suppliedItem" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="supplier" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="whenPrepared" type="{http://hl7.org/fhir}Period" minOccurs="0"/>
* <element name="time" 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"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SupplyDelivery", propOrder = {
"identifier",
"status",
"patient",
"type",
"quantity",
"suppliedItem",
"supplier",
"whenPrepared",
"time",
"destination",
"receiver"
})
public class SupplyDelivery
extends DomainResource
implements Equals2, HashCode2, ToString2
{
protected Identifier identifier;
protected SupplyDeliveryStatus status;
protected Reference patient;
protected CodeableConcept type;
protected SimpleQuantity quantity;
protected Reference suppliedItem;
protected Reference supplier;
protected Period whenPrepared;
protected DateTime time;
protected Reference destination;
protected List receiver;
/**
* 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 SupplyDeliveryStatus }
*
*/
public SupplyDeliveryStatus getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link SupplyDeliveryStatus }
*
*/
public void setStatus(SupplyDeliveryStatus value) {
this.status = 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 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 suppliedItem property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getSuppliedItem() {
return suppliedItem;
}
/**
* Sets the value of the suppliedItem property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setSuppliedItem(Reference value) {
this.suppliedItem = value;
}
/**
* Gets the value of the supplier property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getSupplier() {
return supplier;
}
/**
* Sets the value of the supplier property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setSupplier(Reference value) {
this.supplier = value;
}
/**
* Gets the value of the whenPrepared property.
*
* @return
* possible object is
* {@link Period }
*
*/
public Period getWhenPrepared() {
return whenPrepared;
}
/**
* Sets the value of the whenPrepared property.
*
* @param value
* allowed object is
* {@link Period }
*
*/
public void setWhenPrepared(Period value) {
this.whenPrepared = value;
}
/**
* Gets the value of the time property.
*
* @return
* possible object is
* {@link DateTime }
*
*/
public DateTime getTime() {
return time;
}
/**
* Sets the value of the time property.
*
* @param value
* allowed object is
* {@link DateTime }
*
*/
public void setTime(DateTime value) {
this.time = 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;
}
public SupplyDelivery withIdentifier(Identifier value) {
setIdentifier(value);
return this;
}
public SupplyDelivery withStatus(SupplyDeliveryStatus value) {
setStatus(value);
return this;
}
public SupplyDelivery withPatient(Reference value) {
setPatient(value);
return this;
}
public SupplyDelivery withType(CodeableConcept value) {
setType(value);
return this;
}
public SupplyDelivery withQuantity(SimpleQuantity value) {
setQuantity(value);
return this;
}
public SupplyDelivery withSuppliedItem(Reference value) {
setSuppliedItem(value);
return this;
}
public SupplyDelivery withSupplier(Reference value) {
setSupplier(value);
return this;
}
public SupplyDelivery withWhenPrepared(Period value) {
setWhenPrepared(value);
return this;
}
public SupplyDelivery withTime(DateTime value) {
setTime(value);
return this;
}
public SupplyDelivery withDestination(Reference value) {
setDestination(value);
return this;
}
public SupplyDelivery withReceiver(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getReceiver().add(value);
}
}
return this;
}
public SupplyDelivery withReceiver(Collection values) {
if (values!= null) {
getReceiver().addAll(values);
}
return this;
}
@Override
public SupplyDelivery withText(Narrative value) {
setText(value);
return this;
}
@Override
public SupplyDelivery withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public SupplyDelivery withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public SupplyDelivery withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public SupplyDelivery withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public SupplyDelivery withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public SupplyDelivery withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public SupplyDelivery withId(Id value) {
setId(value);
return this;
}
@Override
public SupplyDelivery withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public SupplyDelivery withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public SupplyDelivery 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 SupplyDelivery that = ((SupplyDelivery) 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;
}
}
{
SupplyDeliveryStatus lhsStatus;
lhsStatus = this.getStatus();
SupplyDeliveryStatus 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;
}
}
{
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;
}
}
{
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;
}
}
{
Reference lhsSuppliedItem;
lhsSuppliedItem = this.getSuppliedItem();
Reference rhsSuppliedItem;
rhsSuppliedItem = that.getSuppliedItem();
if (!strategy.equals(LocatorUtils.property(thisLocator, "suppliedItem", lhsSuppliedItem), LocatorUtils.property(thatLocator, "suppliedItem", rhsSuppliedItem), lhsSuppliedItem, rhsSuppliedItem, (this.suppliedItem!= null), (that.suppliedItem!= null))) {
return false;
}
}
{
Reference lhsSupplier;
lhsSupplier = this.getSupplier();
Reference rhsSupplier;
rhsSupplier = that.getSupplier();
if (!strategy.equals(LocatorUtils.property(thisLocator, "supplier", lhsSupplier), LocatorUtils.property(thatLocator, "supplier", rhsSupplier), lhsSupplier, rhsSupplier, (this.supplier!= null), (that.supplier!= null))) {
return false;
}
}
{
Period lhsWhenPrepared;
lhsWhenPrepared = this.getWhenPrepared();
Period 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 lhsTime;
lhsTime = this.getTime();
DateTime rhsTime;
rhsTime = that.getTime();
if (!strategy.equals(LocatorUtils.property(thisLocator, "time", lhsTime), LocatorUtils.property(thatLocator, "time", rhsTime), lhsTime, rhsTime, (this.time!= null), (that.time!= 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;
}
}
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));
}
{
SupplyDeliveryStatus theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus, (this.status!= null));
}
{
Reference thePatient;
thePatient = this.getPatient();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "patient", thePatient), currentHashCode, thePatient, (this.patient!= null));
}
{
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));
}
{
Reference theSuppliedItem;
theSuppliedItem = this.getSuppliedItem();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "suppliedItem", theSuppliedItem), currentHashCode, theSuppliedItem, (this.suppliedItem!= null));
}
{
Reference theSupplier;
theSupplier = this.getSupplier();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "supplier", theSupplier), currentHashCode, theSupplier, (this.supplier!= null));
}
{
Period theWhenPrepared;
theWhenPrepared = this.getWhenPrepared();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "whenPrepared", theWhenPrepared), currentHashCode, theWhenPrepared, (this.whenPrepared!= null));
}
{
DateTime theTime;
theTime = this.getTime();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "time", theTime), currentHashCode, theTime, (this.time!= 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())));
}
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));
}
{
SupplyDeliveryStatus theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus, (this.status!= null));
}
{
Reference thePatient;
thePatient = this.getPatient();
strategy.appendField(locator, this, "patient", buffer, thePatient, (this.patient!= null));
}
{
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));
}
{
Reference theSuppliedItem;
theSuppliedItem = this.getSuppliedItem();
strategy.appendField(locator, this, "suppliedItem", buffer, theSuppliedItem, (this.suppliedItem!= null));
}
{
Reference theSupplier;
theSupplier = this.getSupplier();
strategy.appendField(locator, this, "supplier", buffer, theSupplier, (this.supplier!= null));
}
{
Period theWhenPrepared;
theWhenPrepared = this.getWhenPrepared();
strategy.appendField(locator, this, "whenPrepared", buffer, theWhenPrepared, (this.whenPrepared!= null));
}
{
DateTime theTime;
theTime = this.getTime();
strategy.appendField(locator, this, "time", buffer, theTime, (this.time!= 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())));
}
return buffer;
}
}