org.hl7.fhir.DiagnosticOrderItem 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.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;
/**
* A record of a request for a diagnostic investigation service to be performed.
*
* Java class for DiagnosticOrder.Item complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="DiagnosticOrder.Item">
* <complexContent>
* <extension base="{http://hl7.org/fhir}BackboneElement">
* <sequence>
* <element name="code" type="{http://hl7.org/fhir}CodeableConcept"/>
* <element name="specimen" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
* <element name="bodySite" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="status" type="{http://hl7.org/fhir}DiagnosticOrderStatus" minOccurs="0"/>
* <element name="event" type="{http://hl7.org/fhir}DiagnosticOrder.Event" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DiagnosticOrder.Item", propOrder = {
"code",
"specimen",
"bodySite",
"status",
"event"
})
public class DiagnosticOrderItem
extends BackboneElement
implements Equals2, HashCode2, ToString2
{
@XmlElement(required = true)
protected CodeableConcept code;
protected List specimen;
protected CodeableConcept bodySite;
protected DiagnosticOrderStatus status;
protected List event;
/**
* Gets the value of the code property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getCode() {
return code;
}
/**
* Sets the value of the code property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setCode(CodeableConcept value) {
this.code = value;
}
/**
* Gets the value of the specimen 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 specimen property.
*
*
* For example, to add a new item, do as follows:
*
* getSpecimen().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getSpecimen() {
if (specimen == null) {
specimen = new ArrayList();
}
return this.specimen;
}
/**
* Gets the value of the bodySite property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getBodySite() {
return bodySite;
}
/**
* Sets the value of the bodySite property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setBodySite(CodeableConcept value) {
this.bodySite = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link DiagnosticOrderStatus }
*
*/
public DiagnosticOrderStatus getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link DiagnosticOrderStatus }
*
*/
public void setStatus(DiagnosticOrderStatus value) {
this.status = value;
}
/**
* Gets the value of the event 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 event property.
*
*
* For example, to add a new item, do as follows:
*
* getEvent().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link DiagnosticOrderEvent }
*
*
*/
public List getEvent() {
if (event == null) {
event = new ArrayList();
}
return this.event;
}
public DiagnosticOrderItem withCode(CodeableConcept value) {
setCode(value);
return this;
}
public DiagnosticOrderItem withSpecimen(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getSpecimen().add(value);
}
}
return this;
}
public DiagnosticOrderItem withSpecimen(Collection values) {
if (values!= null) {
getSpecimen().addAll(values);
}
return this;
}
public DiagnosticOrderItem withBodySite(CodeableConcept value) {
setBodySite(value);
return this;
}
public DiagnosticOrderItem withStatus(DiagnosticOrderStatus value) {
setStatus(value);
return this;
}
public DiagnosticOrderItem withEvent(DiagnosticOrderEvent... values) {
if (values!= null) {
for (DiagnosticOrderEvent value: values) {
getEvent().add(value);
}
}
return this;
}
public DiagnosticOrderItem withEvent(Collection values) {
if (values!= null) {
getEvent().addAll(values);
}
return this;
}
@Override
public DiagnosticOrderItem withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public DiagnosticOrderItem withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public DiagnosticOrderItem withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public DiagnosticOrderItem withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public DiagnosticOrderItem withId(java.lang.String value) {
setId(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 DiagnosticOrderItem that = ((DiagnosticOrderItem) object);
{
CodeableConcept lhsCode;
lhsCode = this.getCode();
CodeableConcept rhsCode;
rhsCode = that.getCode();
if (!strategy.equals(LocatorUtils.property(thisLocator, "code", lhsCode), LocatorUtils.property(thatLocator, "code", rhsCode), lhsCode, rhsCode, (this.code!= null), (that.code!= null))) {
return false;
}
}
{
List lhsSpecimen;
lhsSpecimen = (((this.specimen!= null)&&(!this.specimen.isEmpty()))?this.getSpecimen():null);
List rhsSpecimen;
rhsSpecimen = (((that.specimen!= null)&&(!that.specimen.isEmpty()))?that.getSpecimen():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "specimen", lhsSpecimen), LocatorUtils.property(thatLocator, "specimen", rhsSpecimen), lhsSpecimen, rhsSpecimen, ((this.specimen!= null)&&(!this.specimen.isEmpty())), ((that.specimen!= null)&&(!that.specimen.isEmpty())))) {
return false;
}
}
{
CodeableConcept lhsBodySite;
lhsBodySite = this.getBodySite();
CodeableConcept rhsBodySite;
rhsBodySite = that.getBodySite();
if (!strategy.equals(LocatorUtils.property(thisLocator, "bodySite", lhsBodySite), LocatorUtils.property(thatLocator, "bodySite", rhsBodySite), lhsBodySite, rhsBodySite, (this.bodySite!= null), (that.bodySite!= null))) {
return false;
}
}
{
DiagnosticOrderStatus lhsStatus;
lhsStatus = this.getStatus();
DiagnosticOrderStatus 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;
}
}
{
List lhsEvent;
lhsEvent = (((this.event!= null)&&(!this.event.isEmpty()))?this.getEvent():null);
List rhsEvent;
rhsEvent = (((that.event!= null)&&(!that.event.isEmpty()))?that.getEvent():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "event", lhsEvent), LocatorUtils.property(thatLocator, "event", rhsEvent), lhsEvent, rhsEvent, ((this.event!= null)&&(!this.event.isEmpty())), ((that.event!= null)&&(!that.event.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);
{
CodeableConcept theCode;
theCode = this.getCode();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "code", theCode), currentHashCode, theCode, (this.code!= null));
}
{
List theSpecimen;
theSpecimen = (((this.specimen!= null)&&(!this.specimen.isEmpty()))?this.getSpecimen():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "specimen", theSpecimen), currentHashCode, theSpecimen, ((this.specimen!= null)&&(!this.specimen.isEmpty())));
}
{
CodeableConcept theBodySite;
theBodySite = this.getBodySite();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "bodySite", theBodySite), currentHashCode, theBodySite, (this.bodySite!= null));
}
{
DiagnosticOrderStatus theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus, (this.status!= null));
}
{
List theEvent;
theEvent = (((this.event!= null)&&(!this.event.isEmpty()))?this.getEvent():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "event", theEvent), currentHashCode, theEvent, ((this.event!= null)&&(!this.event.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);
{
CodeableConcept theCode;
theCode = this.getCode();
strategy.appendField(locator, this, "code", buffer, theCode, (this.code!= null));
}
{
List theSpecimen;
theSpecimen = (((this.specimen!= null)&&(!this.specimen.isEmpty()))?this.getSpecimen():null);
strategy.appendField(locator, this, "specimen", buffer, theSpecimen, ((this.specimen!= null)&&(!this.specimen.isEmpty())));
}
{
CodeableConcept theBodySite;
theBodySite = this.getBodySite();
strategy.appendField(locator, this, "bodySite", buffer, theBodySite, (this.bodySite!= null));
}
{
DiagnosticOrderStatus theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus, (this.status!= null));
}
{
List theEvent;
theEvent = (((this.event!= null)&&(!this.event.isEmpty()))?this.getEvent():null);
strategy.appendField(locator, this, "event", buffer, theEvent, ((this.event!= null)&&(!this.event.isEmpty())));
}
return buffer;
}
}