org.hl7.fhir.SupplyRequest 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.09.27 at 11:16:19 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 SupplyRequest complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="SupplyRequest">
* <complexContent>
* <extension base="{http://hl7.org/fhir}DomainResource">
* <sequence>
* <element name="patient" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="source" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="date" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
* <element name="identifier" type="{http://hl7.org/fhir}Identifier" minOccurs="0"/>
* <element name="status" type="{http://hl7.org/fhir}SupplyRequestStatus" minOccurs="0"/>
* <element name="kind" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="orderedItem" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="supplier" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
* <choice minOccurs="0">
* <element name="reasonCodeableConcept" type="{http://hl7.org/fhir}CodeableConcept"/>
* <element name="reasonReference" type="{http://hl7.org/fhir}Reference"/>
* </choice>
* <element name="when" type="{http://hl7.org/fhir}SupplyRequest.When" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SupplyRequest", propOrder = {
"patient",
"source",
"date",
"identifier",
"status",
"kind",
"orderedItem",
"supplier",
"reasonCodeableConcept",
"reasonReference",
"when"
})
public class SupplyRequest
extends DomainResource
implements Equals2, HashCode2, ToString2
{
protected Reference patient;
protected Reference source;
protected DateTime date;
protected Identifier identifier;
protected SupplyRequestStatus status;
protected CodeableConcept kind;
protected Reference orderedItem;
protected List supplier;
protected CodeableConcept reasonCodeableConcept;
protected Reference reasonReference;
protected SupplyRequestWhen when;
/**
* 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 source property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getSource() {
return source;
}
/**
* Sets the value of the source property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setSource(Reference value) {
this.source = value;
}
/**
* Gets the value of the date property.
*
* @return
* possible object is
* {@link DateTime }
*
*/
public DateTime getDate() {
return date;
}
/**
* Sets the value of the date property.
*
* @param value
* allowed object is
* {@link DateTime }
*
*/
public void setDate(DateTime value) {
this.date = value;
}
/**
* 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 SupplyRequestStatus }
*
*/
public SupplyRequestStatus getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link SupplyRequestStatus }
*
*/
public void setStatus(SupplyRequestStatus value) {
this.status = value;
}
/**
* Gets the value of the kind property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getKind() {
return kind;
}
/**
* Sets the value of the kind property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setKind(CodeableConcept value) {
this.kind = value;
}
/**
* Gets the value of the orderedItem property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getOrderedItem() {
return orderedItem;
}
/**
* Sets the value of the orderedItem property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setOrderedItem(Reference value) {
this.orderedItem = value;
}
/**
* Gets the value of the supplier 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 supplier property.
*
*
* For example, to add a new item, do as follows:
*
* getSupplier().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getSupplier() {
if (supplier == null) {
supplier = new ArrayList();
}
return this.supplier;
}
/**
* Gets the value of the reasonCodeableConcept property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getReasonCodeableConcept() {
return reasonCodeableConcept;
}
/**
* Sets the value of the reasonCodeableConcept property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setReasonCodeableConcept(CodeableConcept value) {
this.reasonCodeableConcept = value;
}
/**
* Gets the value of the reasonReference property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getReasonReference() {
return reasonReference;
}
/**
* Sets the value of the reasonReference property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setReasonReference(Reference value) {
this.reasonReference = value;
}
/**
* Gets the value of the when property.
*
* @return
* possible object is
* {@link SupplyRequestWhen }
*
*/
public SupplyRequestWhen getWhen() {
return when;
}
/**
* Sets the value of the when property.
*
* @param value
* allowed object is
* {@link SupplyRequestWhen }
*
*/
public void setWhen(SupplyRequestWhen value) {
this.when = value;
}
public SupplyRequest withPatient(Reference value) {
setPatient(value);
return this;
}
public SupplyRequest withSource(Reference value) {
setSource(value);
return this;
}
public SupplyRequest withDate(DateTime value) {
setDate(value);
return this;
}
public SupplyRequest withIdentifier(Identifier value) {
setIdentifier(value);
return this;
}
public SupplyRequest withStatus(SupplyRequestStatus value) {
setStatus(value);
return this;
}
public SupplyRequest withKind(CodeableConcept value) {
setKind(value);
return this;
}
public SupplyRequest withOrderedItem(Reference value) {
setOrderedItem(value);
return this;
}
public SupplyRequest withSupplier(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getSupplier().add(value);
}
}
return this;
}
public SupplyRequest withSupplier(Collection values) {
if (values!= null) {
getSupplier().addAll(values);
}
return this;
}
public SupplyRequest withReasonCodeableConcept(CodeableConcept value) {
setReasonCodeableConcept(value);
return this;
}
public SupplyRequest withReasonReference(Reference value) {
setReasonReference(value);
return this;
}
public SupplyRequest withWhen(SupplyRequestWhen value) {
setWhen(value);
return this;
}
@Override
public SupplyRequest withText(Narrative value) {
setText(value);
return this;
}
@Override
public SupplyRequest withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public SupplyRequest withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public SupplyRequest withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public SupplyRequest withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public SupplyRequest withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public SupplyRequest withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public SupplyRequest withId(Id value) {
setId(value);
return this;
}
@Override
public SupplyRequest withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public SupplyRequest withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public SupplyRequest 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 SupplyRequest that = ((SupplyRequest) object);
{
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 lhsSource;
lhsSource = this.getSource();
Reference rhsSource;
rhsSource = that.getSource();
if (!strategy.equals(LocatorUtils.property(thisLocator, "source", lhsSource), LocatorUtils.property(thatLocator, "source", rhsSource), lhsSource, rhsSource, (this.source!= null), (that.source!= null))) {
return false;
}
}
{
DateTime lhsDate;
lhsDate = this.getDate();
DateTime rhsDate;
rhsDate = that.getDate();
if (!strategy.equals(LocatorUtils.property(thisLocator, "date", lhsDate), LocatorUtils.property(thatLocator, "date", rhsDate), lhsDate, rhsDate, (this.date!= null), (that.date!= null))) {
return false;
}
}
{
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;
}
}
{
SupplyRequestStatus lhsStatus;
lhsStatus = this.getStatus();
SupplyRequestStatus 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 lhsKind;
lhsKind = this.getKind();
CodeableConcept rhsKind;
rhsKind = that.getKind();
if (!strategy.equals(LocatorUtils.property(thisLocator, "kind", lhsKind), LocatorUtils.property(thatLocator, "kind", rhsKind), lhsKind, rhsKind, (this.kind!= null), (that.kind!= null))) {
return false;
}
}
{
Reference lhsOrderedItem;
lhsOrderedItem = this.getOrderedItem();
Reference rhsOrderedItem;
rhsOrderedItem = that.getOrderedItem();
if (!strategy.equals(LocatorUtils.property(thisLocator, "orderedItem", lhsOrderedItem), LocatorUtils.property(thatLocator, "orderedItem", rhsOrderedItem), lhsOrderedItem, rhsOrderedItem, (this.orderedItem!= null), (that.orderedItem!= null))) {
return false;
}
}
{
List lhsSupplier;
lhsSupplier = (((this.supplier!= null)&&(!this.supplier.isEmpty()))?this.getSupplier():null);
List rhsSupplier;
rhsSupplier = (((that.supplier!= null)&&(!that.supplier.isEmpty()))?that.getSupplier():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "supplier", lhsSupplier), LocatorUtils.property(thatLocator, "supplier", rhsSupplier), lhsSupplier, rhsSupplier, ((this.supplier!= null)&&(!this.supplier.isEmpty())), ((that.supplier!= null)&&(!that.supplier.isEmpty())))) {
return false;
}
}
{
CodeableConcept lhsReasonCodeableConcept;
lhsReasonCodeableConcept = this.getReasonCodeableConcept();
CodeableConcept rhsReasonCodeableConcept;
rhsReasonCodeableConcept = that.getReasonCodeableConcept();
if (!strategy.equals(LocatorUtils.property(thisLocator, "reasonCodeableConcept", lhsReasonCodeableConcept), LocatorUtils.property(thatLocator, "reasonCodeableConcept", rhsReasonCodeableConcept), lhsReasonCodeableConcept, rhsReasonCodeableConcept, (this.reasonCodeableConcept!= null), (that.reasonCodeableConcept!= null))) {
return false;
}
}
{
Reference lhsReasonReference;
lhsReasonReference = this.getReasonReference();
Reference rhsReasonReference;
rhsReasonReference = that.getReasonReference();
if (!strategy.equals(LocatorUtils.property(thisLocator, "reasonReference", lhsReasonReference), LocatorUtils.property(thatLocator, "reasonReference", rhsReasonReference), lhsReasonReference, rhsReasonReference, (this.reasonReference!= null), (that.reasonReference!= null))) {
return false;
}
}
{
SupplyRequestWhen lhsWhen;
lhsWhen = this.getWhen();
SupplyRequestWhen rhsWhen;
rhsWhen = that.getWhen();
if (!strategy.equals(LocatorUtils.property(thisLocator, "when", lhsWhen), LocatorUtils.property(thatLocator, "when", rhsWhen), lhsWhen, rhsWhen, (this.when!= null), (that.when!= 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);
{
Reference thePatient;
thePatient = this.getPatient();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "patient", thePatient), currentHashCode, thePatient, (this.patient!= null));
}
{
Reference theSource;
theSource = this.getSource();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "source", theSource), currentHashCode, theSource, (this.source!= null));
}
{
DateTime theDate;
theDate = this.getDate();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "date", theDate), currentHashCode, theDate, (this.date!= null));
}
{
Identifier theIdentifier;
theIdentifier = this.getIdentifier();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier, (this.identifier!= null));
}
{
SupplyRequestStatus theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus, (this.status!= null));
}
{
CodeableConcept theKind;
theKind = this.getKind();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "kind", theKind), currentHashCode, theKind, (this.kind!= null));
}
{
Reference theOrderedItem;
theOrderedItem = this.getOrderedItem();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "orderedItem", theOrderedItem), currentHashCode, theOrderedItem, (this.orderedItem!= null));
}
{
List theSupplier;
theSupplier = (((this.supplier!= null)&&(!this.supplier.isEmpty()))?this.getSupplier():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "supplier", theSupplier), currentHashCode, theSupplier, ((this.supplier!= null)&&(!this.supplier.isEmpty())));
}
{
CodeableConcept theReasonCodeableConcept;
theReasonCodeableConcept = this.getReasonCodeableConcept();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reasonCodeableConcept", theReasonCodeableConcept), currentHashCode, theReasonCodeableConcept, (this.reasonCodeableConcept!= null));
}
{
Reference theReasonReference;
theReasonReference = this.getReasonReference();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reasonReference", theReasonReference), currentHashCode, theReasonReference, (this.reasonReference!= null));
}
{
SupplyRequestWhen theWhen;
theWhen = this.getWhen();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "when", theWhen), currentHashCode, theWhen, (this.when!= 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);
{
Reference thePatient;
thePatient = this.getPatient();
strategy.appendField(locator, this, "patient", buffer, thePatient, (this.patient!= null));
}
{
Reference theSource;
theSource = this.getSource();
strategy.appendField(locator, this, "source", buffer, theSource, (this.source!= null));
}
{
DateTime theDate;
theDate = this.getDate();
strategy.appendField(locator, this, "date", buffer, theDate, (this.date!= null));
}
{
Identifier theIdentifier;
theIdentifier = this.getIdentifier();
strategy.appendField(locator, this, "identifier", buffer, theIdentifier, (this.identifier!= null));
}
{
SupplyRequestStatus theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus, (this.status!= null));
}
{
CodeableConcept theKind;
theKind = this.getKind();
strategy.appendField(locator, this, "kind", buffer, theKind, (this.kind!= null));
}
{
Reference theOrderedItem;
theOrderedItem = this.getOrderedItem();
strategy.appendField(locator, this, "orderedItem", buffer, theOrderedItem, (this.orderedItem!= null));
}
{
List theSupplier;
theSupplier = (((this.supplier!= null)&&(!this.supplier.isEmpty()))?this.getSupplier():null);
strategy.appendField(locator, this, "supplier", buffer, theSupplier, ((this.supplier!= null)&&(!this.supplier.isEmpty())));
}
{
CodeableConcept theReasonCodeableConcept;
theReasonCodeableConcept = this.getReasonCodeableConcept();
strategy.appendField(locator, this, "reasonCodeableConcept", buffer, theReasonCodeableConcept, (this.reasonCodeableConcept!= null));
}
{
Reference theReasonReference;
theReasonReference = this.getReasonReference();
strategy.appendField(locator, this, "reasonReference", buffer, theReasonReference, (this.reasonReference!= null));
}
{
SupplyRequestWhen theWhen;
theWhen = this.getWhen();
strategy.appendField(locator, this, "when", buffer, theWhen, (this.when!= null));
}
return buffer;
}
public void setSupplier(List value) {
this.supplier = value;
}
}