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

org.hl7.fhir.DocumentReferenceContext 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: 2024.06.14 at 01:52:11 PM 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;


/**
 * A reference to a document .
 * 
 * 

Java class for DocumentReference.Context complex type. * *

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

 * <complexType name="DocumentReference.Context">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}BackboneElement">
 *       <sequence>
 *         <element name="encounter" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="event" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="period" type="{http://hl7.org/fhir}Period" minOccurs="0"/>
 *         <element name="facilityType" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="practiceSetting" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="sourcePatientInfo" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="related" type="{http://hl7.org/fhir}DocumentReference.Related" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DocumentReference.Context", propOrder = { "encounter", "event", "period", "facilityType", "practiceSetting", "sourcePatientInfo", "related" }) public class DocumentReferenceContext extends BackboneElement implements Equals2, HashCode2, ToString2 { protected Reference encounter; protected List event; protected Period period; protected CodeableConcept facilityType; protected CodeableConcept practiceSetting; protected Reference sourcePatientInfo; protected List related; /** * Gets the value of the encounter property. * * @return * possible object is * {@link Reference } * */ public Reference getEncounter() { return encounter; } /** * Sets the value of the encounter property. * * @param value * allowed object is * {@link Reference } * */ public void setEncounter(Reference value) { this.encounter = 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 CodeableConcept } * * */ public List getEvent() { if (event == null) { event = new ArrayList(); } return this.event; } /** * Gets the value of the period property. * * @return * possible object is * {@link Period } * */ public Period getPeriod() { return period; } /** * Sets the value of the period property. * * @param value * allowed object is * {@link Period } * */ public void setPeriod(Period value) { this.period = value; } /** * Gets the value of the facilityType property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getFacilityType() { return facilityType; } /** * Sets the value of the facilityType property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setFacilityType(CodeableConcept value) { this.facilityType = value; } /** * Gets the value of the practiceSetting property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getPracticeSetting() { return practiceSetting; } /** * Sets the value of the practiceSetting property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setPracticeSetting(CodeableConcept value) { this.practiceSetting = value; } /** * Gets the value of the sourcePatientInfo property. * * @return * possible object is * {@link Reference } * */ public Reference getSourcePatientInfo() { return sourcePatientInfo; } /** * Sets the value of the sourcePatientInfo property. * * @param value * allowed object is * {@link Reference } * */ public void setSourcePatientInfo(Reference value) { this.sourcePatientInfo = value; } /** * Gets the value of the related 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 related property. * *

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

     *    getRelated().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link DocumentReferenceRelated } * * */ public List getRelated() { if (related == null) { related = new ArrayList(); } return this.related; } public DocumentReferenceContext withEncounter(Reference value) { setEncounter(value); return this; } public DocumentReferenceContext withEvent(CodeableConcept... values) { if (values!= null) { for (CodeableConcept value: values) { getEvent().add(value); } } return this; } public DocumentReferenceContext withEvent(Collection values) { if (values!= null) { getEvent().addAll(values); } return this; } public DocumentReferenceContext withPeriod(Period value) { setPeriod(value); return this; } public DocumentReferenceContext withFacilityType(CodeableConcept value) { setFacilityType(value); return this; } public DocumentReferenceContext withPracticeSetting(CodeableConcept value) { setPracticeSetting(value); return this; } public DocumentReferenceContext withSourcePatientInfo(Reference value) { setSourcePatientInfo(value); return this; } public DocumentReferenceContext withRelated(DocumentReferenceRelated... values) { if (values!= null) { for (DocumentReferenceRelated value: values) { getRelated().add(value); } } return this; } public DocumentReferenceContext withRelated(Collection values) { if (values!= null) { getRelated().addAll(values); } return this; } @Override public DocumentReferenceContext withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public DocumentReferenceContext withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public DocumentReferenceContext withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public DocumentReferenceContext withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public DocumentReferenceContext 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 DocumentReferenceContext that = ((DocumentReferenceContext) object); { Reference lhsEncounter; lhsEncounter = this.getEncounter(); Reference rhsEncounter; rhsEncounter = that.getEncounter(); if (!strategy.equals(LocatorUtils.property(thisLocator, "encounter", lhsEncounter), LocatorUtils.property(thatLocator, "encounter", rhsEncounter), lhsEncounter, rhsEncounter, (this.encounter!= null), (that.encounter!= 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; } } { Period lhsPeriod; lhsPeriod = this.getPeriod(); Period rhsPeriod; rhsPeriod = that.getPeriod(); if (!strategy.equals(LocatorUtils.property(thisLocator, "period", lhsPeriod), LocatorUtils.property(thatLocator, "period", rhsPeriod), lhsPeriod, rhsPeriod, (this.period!= null), (that.period!= null))) { return false; } } { CodeableConcept lhsFacilityType; lhsFacilityType = this.getFacilityType(); CodeableConcept rhsFacilityType; rhsFacilityType = that.getFacilityType(); if (!strategy.equals(LocatorUtils.property(thisLocator, "facilityType", lhsFacilityType), LocatorUtils.property(thatLocator, "facilityType", rhsFacilityType), lhsFacilityType, rhsFacilityType, (this.facilityType!= null), (that.facilityType!= null))) { return false; } } { CodeableConcept lhsPracticeSetting; lhsPracticeSetting = this.getPracticeSetting(); CodeableConcept rhsPracticeSetting; rhsPracticeSetting = that.getPracticeSetting(); if (!strategy.equals(LocatorUtils.property(thisLocator, "practiceSetting", lhsPracticeSetting), LocatorUtils.property(thatLocator, "practiceSetting", rhsPracticeSetting), lhsPracticeSetting, rhsPracticeSetting, (this.practiceSetting!= null), (that.practiceSetting!= null))) { return false; } } { Reference lhsSourcePatientInfo; lhsSourcePatientInfo = this.getSourcePatientInfo(); Reference rhsSourcePatientInfo; rhsSourcePatientInfo = that.getSourcePatientInfo(); if (!strategy.equals(LocatorUtils.property(thisLocator, "sourcePatientInfo", lhsSourcePatientInfo), LocatorUtils.property(thatLocator, "sourcePatientInfo", rhsSourcePatientInfo), lhsSourcePatientInfo, rhsSourcePatientInfo, (this.sourcePatientInfo!= null), (that.sourcePatientInfo!= null))) { return false; } } { List lhsRelated; lhsRelated = (((this.related!= null)&&(!this.related.isEmpty()))?this.getRelated():null); List rhsRelated; rhsRelated = (((that.related!= null)&&(!that.related.isEmpty()))?that.getRelated():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "related", lhsRelated), LocatorUtils.property(thatLocator, "related", rhsRelated), lhsRelated, rhsRelated, ((this.related!= null)&&(!this.related.isEmpty())), ((that.related!= null)&&(!that.related.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); { Reference theEncounter; theEncounter = this.getEncounter(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "encounter", theEncounter), currentHashCode, theEncounter, (this.encounter!= 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()))); } { Period thePeriod; thePeriod = this.getPeriod(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "period", thePeriod), currentHashCode, thePeriod, (this.period!= null)); } { CodeableConcept theFacilityType; theFacilityType = this.getFacilityType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "facilityType", theFacilityType), currentHashCode, theFacilityType, (this.facilityType!= null)); } { CodeableConcept thePracticeSetting; thePracticeSetting = this.getPracticeSetting(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "practiceSetting", thePracticeSetting), currentHashCode, thePracticeSetting, (this.practiceSetting!= null)); } { Reference theSourcePatientInfo; theSourcePatientInfo = this.getSourcePatientInfo(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "sourcePatientInfo", theSourcePatientInfo), currentHashCode, theSourcePatientInfo, (this.sourcePatientInfo!= null)); } { List theRelated; theRelated = (((this.related!= null)&&(!this.related.isEmpty()))?this.getRelated():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "related", theRelated), currentHashCode, theRelated, ((this.related!= null)&&(!this.related.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); { Reference theEncounter; theEncounter = this.getEncounter(); strategy.appendField(locator, this, "encounter", buffer, theEncounter, (this.encounter!= 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()))); } { Period thePeriod; thePeriod = this.getPeriod(); strategy.appendField(locator, this, "period", buffer, thePeriod, (this.period!= null)); } { CodeableConcept theFacilityType; theFacilityType = this.getFacilityType(); strategy.appendField(locator, this, "facilityType", buffer, theFacilityType, (this.facilityType!= null)); } { CodeableConcept thePracticeSetting; thePracticeSetting = this.getPracticeSetting(); strategy.appendField(locator, this, "practiceSetting", buffer, thePracticeSetting, (this.practiceSetting!= null)); } { Reference theSourcePatientInfo; theSourcePatientInfo = this.getSourcePatientInfo(); strategy.appendField(locator, this, "sourcePatientInfo", buffer, theSourcePatientInfo, (this.sourcePatientInfo!= null)); } { List theRelated; theRelated = (((this.related!= null)&&(!this.related.isEmpty()))?this.getRelated():null); strategy.appendField(locator, this, "related", buffer, theRelated, ((this.related!= null)&&(!this.related.isEmpty()))); } return buffer; } public void setEvent(List value) { this.event = value; } public void setRelated(List value) { this.related = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy