All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hl7.fhir.Order Maven / Gradle / Ivy

Go to download

The quick library for the Clinical Quality Language Java reference implementation

There is a newer version: 3.18.0
Show newest version
//
// 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.08 at 08:47:56 AM MST 
//


package org.hl7.fhir;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;


/**
 * If the element is present, it must have either a @value, an @id, or extensions
 * 
 * 

Java class for Order complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="Order">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}DomainResource">
 *       <sequence>
 *         <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="date" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
 *         <element name="subject" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="source" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="target" type="{http://hl7.org/fhir}Reference" 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}Order.When" minOccurs="0"/>
 *         <element name="detail" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Order", propOrder = { "identifier", "date", "subject", "source", "target", "reasonCodeableConcept", "reasonReference", "when", "detail" }) public class Order extends DomainResource implements Equals2, HashCode2, ToString2 { protected List identifier; protected DateTime date; protected Reference subject; protected Reference source; protected Reference target; protected CodeableConcept reasonCodeableConcept; protected Reference reasonReference; protected OrderWhen when; @XmlElement(required = true) protected List detail; /** * 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 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 subject property. * * @return * possible object is * {@link Reference } * */ public Reference getSubject() { return subject; } /** * Sets the value of the subject property. * * @param value * allowed object is * {@link Reference } * */ public void setSubject(Reference value) { this.subject = 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 target property. * * @return * possible object is * {@link Reference } * */ public Reference getTarget() { return target; } /** * Sets the value of the target property. * * @param value * allowed object is * {@link Reference } * */ public void setTarget(Reference value) { this.target = value; } /** * 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 OrderWhen } * */ public OrderWhen getWhen() { return when; } /** * Sets the value of the when property. * * @param value * allowed object is * {@link OrderWhen } * */ public void setWhen(OrderWhen value) { this.when = value; } /** * Gets the value of the detail 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 detail property. * *

* For example, to add a new item, do as follows: *

     *    getDetail().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Reference } * * */ public List getDetail() { if (detail == null) { detail = new ArrayList(); } return this.detail; } public Order withIdentifier(Identifier... values) { if (values!= null) { for (Identifier value: values) { getIdentifier().add(value); } } return this; } public Order withIdentifier(Collection values) { if (values!= null) { getIdentifier().addAll(values); } return this; } public Order withDate(DateTime value) { setDate(value); return this; } public Order withSubject(Reference value) { setSubject(value); return this; } public Order withSource(Reference value) { setSource(value); return this; } public Order withTarget(Reference value) { setTarget(value); return this; } public Order withReasonCodeableConcept(CodeableConcept value) { setReasonCodeableConcept(value); return this; } public Order withReasonReference(Reference value) { setReasonReference(value); return this; } public Order withWhen(OrderWhen value) { setWhen(value); return this; } public Order withDetail(Reference... values) { if (values!= null) { for (Reference value: values) { getDetail().add(value); } } return this; } public Order withDetail(Collection values) { if (values!= null) { getDetail().addAll(values); } return this; } @Override public Order withText(Narrative value) { setText(value); return this; } @Override public Order withContained(ResourceContainer... values) { if (values!= null) { for (ResourceContainer value: values) { getContained().add(value); } } return this; } @Override public Order withContained(Collection values) { if (values!= null) { getContained().addAll(values); } return this; } @Override public Order withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public Order withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public Order withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public Order withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public Order withId(Id value) { setId(value); return this; } @Override public Order withMeta(Meta value) { setMeta(value); return this; } @Override public Order withImplicitRules(Uri value) { setImplicitRules(value); return this; } @Override public Order 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 Order that = ((Order) 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; } } { 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; } } { Reference lhsSubject; lhsSubject = this.getSubject(); Reference rhsSubject; rhsSubject = that.getSubject(); if (!strategy.equals(LocatorUtils.property(thisLocator, "subject", lhsSubject), LocatorUtils.property(thatLocator, "subject", rhsSubject), lhsSubject, rhsSubject, (this.subject!= null), (that.subject!= 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; } } { Reference lhsTarget; lhsTarget = this.getTarget(); Reference rhsTarget; rhsTarget = that.getTarget(); if (!strategy.equals(LocatorUtils.property(thisLocator, "target", lhsTarget), LocatorUtils.property(thatLocator, "target", rhsTarget), lhsTarget, rhsTarget, (this.target!= null), (that.target!= null))) { 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; } } { OrderWhen lhsWhen; lhsWhen = this.getWhen(); OrderWhen 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; } } { List lhsDetail; lhsDetail = (((this.detail!= null)&&(!this.detail.isEmpty()))?this.getDetail():null); List rhsDetail; rhsDetail = (((that.detail!= null)&&(!that.detail.isEmpty()))?that.getDetail():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "detail", lhsDetail), LocatorUtils.property(thatLocator, "detail", rhsDetail), lhsDetail, rhsDetail, ((this.detail!= null)&&(!this.detail.isEmpty())), ((that.detail!= null)&&(!that.detail.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); { 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()))); } { DateTime theDate; theDate = this.getDate(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "date", theDate), currentHashCode, theDate, (this.date!= null)); } { Reference theSubject; theSubject = this.getSubject(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "subject", theSubject), currentHashCode, theSubject, (this.subject!= null)); } { Reference theSource; theSource = this.getSource(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "source", theSource), currentHashCode, theSource, (this.source!= null)); } { Reference theTarget; theTarget = this.getTarget(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "target", theTarget), currentHashCode, theTarget, (this.target!= null)); } { 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)); } { OrderWhen theWhen; theWhen = this.getWhen(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "when", theWhen), currentHashCode, theWhen, (this.when!= null)); } { List theDetail; theDetail = (((this.detail!= null)&&(!this.detail.isEmpty()))?this.getDetail():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "detail", theDetail), currentHashCode, theDetail, ((this.detail!= null)&&(!this.detail.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); { 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()))); } { DateTime theDate; theDate = this.getDate(); strategy.appendField(locator, this, "date", buffer, theDate, (this.date!= null)); } { Reference theSubject; theSubject = this.getSubject(); strategy.appendField(locator, this, "subject", buffer, theSubject, (this.subject!= null)); } { Reference theSource; theSource = this.getSource(); strategy.appendField(locator, this, "source", buffer, theSource, (this.source!= null)); } { Reference theTarget; theTarget = this.getTarget(); strategy.appendField(locator, this, "target", buffer, theTarget, (this.target!= null)); } { 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)); } { OrderWhen theWhen; theWhen = this.getWhen(); strategy.appendField(locator, this, "when", buffer, theWhen, (this.when!= null)); } { List theDetail; theDetail = (((this.detail!= null)&&(!this.detail.isEmpty()))?this.getDetail():null); strategy.appendField(locator, this, "detail", buffer, theDetail, ((this.detail!= null)&&(!this.detail.isEmpty()))); } return buffer; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy