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

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

Go to download

The quick library for the Clinical Quality Language Java reference implementation

There is a newer version: 3.22.0
Show newest version
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
// See http://java.sun.com/xml/jaxb 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2018.01.12 at 11:04:27 AM MST 
//


package org.hl7.fhir;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
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.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
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 AllergyIntolerance complex type. * *

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

 * <complexType name="AllergyIntolerance">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}DomainResource">
 *       <sequence>
 *         <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="status" type="{http://hl7.org/fhir}AllergyIntoleranceStatus" minOccurs="0"/>
 *         <element name="type" type="{http://hl7.org/fhir}AllergyIntoleranceType" minOccurs="0"/>
 *         <element name="category" type="{http://hl7.org/fhir}AllergyIntoleranceCategory" minOccurs="0"/>
 *         <element name="criticality" type="{http://hl7.org/fhir}AllergyIntoleranceCriticality" minOccurs="0"/>
 *         <element name="substance" type="{http://hl7.org/fhir}CodeableConcept"/>
 *         <element name="patient" type="{http://hl7.org/fhir}Reference"/>
 *         <element name="recordedDate" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
 *         <element name="recorder" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="reporter" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="onset" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
 *         <element name="lastOccurence" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
 *         <element name="note" type="{http://hl7.org/fhir}Annotation" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="reaction" type="{http://hl7.org/fhir}AllergyIntolerance.Reaction" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AllergyIntolerance", propOrder = { "identifier", "status", "type", "category", "criticality", "substance", "patient", "recordedDate", "recorder", "reporter", "onset", "lastOccurence", "note", "reaction" }) public class AllergyIntolerance extends DomainResource implements Equals, HashCode, ToString { protected List identifier; protected AllergyIntoleranceStatus status; protected AllergyIntoleranceType type; protected AllergyIntoleranceCategory category; protected AllergyIntoleranceCriticality criticality; @XmlElement(required = true) protected CodeableConcept substance; @XmlElement(required = true) protected Reference patient; protected DateTime recordedDate; protected Reference recorder; protected Reference reporter; protected DateTime onset; protected DateTime lastOccurence; protected List note; protected List reaction; /** * 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 JAXB 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 status property. * * @return * possible object is * {@link AllergyIntoleranceStatus } * */ public AllergyIntoleranceStatus getStatus() { return status; } /** * Sets the value of the status property. * * @param value * allowed object is * {@link AllergyIntoleranceStatus } * */ public void setStatus(AllergyIntoleranceStatus value) { this.status = value; } /** * Gets the value of the type property. * * @return * possible object is * {@link AllergyIntoleranceType } * */ public AllergyIntoleranceType getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link AllergyIntoleranceType } * */ public void setType(AllergyIntoleranceType value) { this.type = value; } /** * Gets the value of the category property. * * @return * possible object is * {@link AllergyIntoleranceCategory } * */ public AllergyIntoleranceCategory getCategory() { return category; } /** * Sets the value of the category property. * * @param value * allowed object is * {@link AllergyIntoleranceCategory } * */ public void setCategory(AllergyIntoleranceCategory value) { this.category = value; } /** * Gets the value of the criticality property. * * @return * possible object is * {@link AllergyIntoleranceCriticality } * */ public AllergyIntoleranceCriticality getCriticality() { return criticality; } /** * Sets the value of the criticality property. * * @param value * allowed object is * {@link AllergyIntoleranceCriticality } * */ public void setCriticality(AllergyIntoleranceCriticality value) { this.criticality = value; } /** * Gets the value of the substance property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getSubstance() { return substance; } /** * Sets the value of the substance property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setSubstance(CodeableConcept value) { this.substance = 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 recordedDate property. * * @return * possible object is * {@link DateTime } * */ public DateTime getRecordedDate() { return recordedDate; } /** * Sets the value of the recordedDate property. * * @param value * allowed object is * {@link DateTime } * */ public void setRecordedDate(DateTime value) { this.recordedDate = value; } /** * Gets the value of the recorder property. * * @return * possible object is * {@link Reference } * */ public Reference getRecorder() { return recorder; } /** * Sets the value of the recorder property. * * @param value * allowed object is * {@link Reference } * */ public void setRecorder(Reference value) { this.recorder = value; } /** * Gets the value of the reporter property. * * @return * possible object is * {@link Reference } * */ public Reference getReporter() { return reporter; } /** * Sets the value of the reporter property. * * @param value * allowed object is * {@link Reference } * */ public void setReporter(Reference value) { this.reporter = value; } /** * Gets the value of the onset property. * * @return * possible object is * {@link DateTime } * */ public DateTime getOnset() { return onset; } /** * Sets the value of the onset property. * * @param value * allowed object is * {@link DateTime } * */ public void setOnset(DateTime value) { this.onset = value; } /** * Gets the value of the lastOccurence property. * * @return * possible object is * {@link DateTime } * */ public DateTime getLastOccurence() { return lastOccurence; } /** * Sets the value of the lastOccurence property. * * @param value * allowed object is * {@link DateTime } * */ public void setLastOccurence(DateTime value) { this.lastOccurence = value; } /** * Gets the value of the note 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 JAXB object. * This is why there is not a set method for the note property. * *

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

     *    getNote().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Annotation } * * */ public List getNote() { if (note == null) { note = new ArrayList(); } return this.note; } /** * Gets the value of the reaction 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 JAXB object. * This is why there is not a set method for the reaction property. * *

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

     *    getReaction().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link AllergyIntoleranceReaction } * * */ public List getReaction() { if (reaction == null) { reaction = new ArrayList(); } return this.reaction; } public AllergyIntolerance withIdentifier(Identifier... values) { if (values!= null) { for (Identifier value: values) { getIdentifier().add(value); } } return this; } public AllergyIntolerance withIdentifier(Collection values) { if (values!= null) { getIdentifier().addAll(values); } return this; } public AllergyIntolerance withStatus(AllergyIntoleranceStatus value) { setStatus(value); return this; } public AllergyIntolerance withType(AllergyIntoleranceType value) { setType(value); return this; } public AllergyIntolerance withCategory(AllergyIntoleranceCategory value) { setCategory(value); return this; } public AllergyIntolerance withCriticality(AllergyIntoleranceCriticality value) { setCriticality(value); return this; } public AllergyIntolerance withSubstance(CodeableConcept value) { setSubstance(value); return this; } public AllergyIntolerance withPatient(Reference value) { setPatient(value); return this; } public AllergyIntolerance withRecordedDate(DateTime value) { setRecordedDate(value); return this; } public AllergyIntolerance withRecorder(Reference value) { setRecorder(value); return this; } public AllergyIntolerance withReporter(Reference value) { setReporter(value); return this; } public AllergyIntolerance withOnset(DateTime value) { setOnset(value); return this; } public AllergyIntolerance withLastOccurence(DateTime value) { setLastOccurence(value); return this; } public AllergyIntolerance withNote(Annotation... values) { if (values!= null) { for (Annotation value: values) { getNote().add(value); } } return this; } public AllergyIntolerance withNote(Collection values) { if (values!= null) { getNote().addAll(values); } return this; } public AllergyIntolerance withReaction(AllergyIntoleranceReaction... values) { if (values!= null) { for (AllergyIntoleranceReaction value: values) { getReaction().add(value); } } return this; } public AllergyIntolerance withReaction(Collection values) { if (values!= null) { getReaction().addAll(values); } return this; } @Override public AllergyIntolerance withText(Narrative value) { setText(value); return this; } @Override public AllergyIntolerance withContained(ResourceContainer... values) { if (values!= null) { for (ResourceContainer value: values) { getContained().add(value); } } return this; } @Override public AllergyIntolerance withContained(Collection values) { if (values!= null) { getContained().addAll(values); } return this; } @Override public AllergyIntolerance withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public AllergyIntolerance withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public AllergyIntolerance withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public AllergyIntolerance withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public AllergyIntolerance withId(Id value) { setId(value); return this; } @Override public AllergyIntolerance withMeta(Meta value) { setMeta(value); return this; } @Override public AllergyIntolerance withImplicitRules(Uri value) { setImplicitRules(value); return this; } @Override public AllergyIntolerance withLanguage(Code value) { setLanguage(value); return this; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof AllergyIntolerance)) { return false; } if (this == object) { return true; } if (!super.equals(thisLocator, thatLocator, object, strategy)) { return false; } final AllergyIntolerance that = ((AllergyIntolerance) 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)) { return false; } } { AllergyIntoleranceStatus lhsStatus; lhsStatus = this.getStatus(); AllergyIntoleranceStatus rhsStatus; rhsStatus = that.getStatus(); if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus)) { return false; } } { AllergyIntoleranceType lhsType; lhsType = this.getType(); AllergyIntoleranceType rhsType; rhsType = that.getType(); if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType)) { return false; } } { AllergyIntoleranceCategory lhsCategory; lhsCategory = this.getCategory(); AllergyIntoleranceCategory rhsCategory; rhsCategory = that.getCategory(); if (!strategy.equals(LocatorUtils.property(thisLocator, "category", lhsCategory), LocatorUtils.property(thatLocator, "category", rhsCategory), lhsCategory, rhsCategory)) { return false; } } { AllergyIntoleranceCriticality lhsCriticality; lhsCriticality = this.getCriticality(); AllergyIntoleranceCriticality rhsCriticality; rhsCriticality = that.getCriticality(); if (!strategy.equals(LocatorUtils.property(thisLocator, "criticality", lhsCriticality), LocatorUtils.property(thatLocator, "criticality", rhsCriticality), lhsCriticality, rhsCriticality)) { return false; } } { CodeableConcept lhsSubstance; lhsSubstance = this.getSubstance(); CodeableConcept rhsSubstance; rhsSubstance = that.getSubstance(); if (!strategy.equals(LocatorUtils.property(thisLocator, "substance", lhsSubstance), LocatorUtils.property(thatLocator, "substance", rhsSubstance), lhsSubstance, rhsSubstance)) { 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)) { return false; } } { DateTime lhsRecordedDate; lhsRecordedDate = this.getRecordedDate(); DateTime rhsRecordedDate; rhsRecordedDate = that.getRecordedDate(); if (!strategy.equals(LocatorUtils.property(thisLocator, "recordedDate", lhsRecordedDate), LocatorUtils.property(thatLocator, "recordedDate", rhsRecordedDate), lhsRecordedDate, rhsRecordedDate)) { return false; } } { Reference lhsRecorder; lhsRecorder = this.getRecorder(); Reference rhsRecorder; rhsRecorder = that.getRecorder(); if (!strategy.equals(LocatorUtils.property(thisLocator, "recorder", lhsRecorder), LocatorUtils.property(thatLocator, "recorder", rhsRecorder), lhsRecorder, rhsRecorder)) { return false; } } { Reference lhsReporter; lhsReporter = this.getReporter(); Reference rhsReporter; rhsReporter = that.getReporter(); if (!strategy.equals(LocatorUtils.property(thisLocator, "reporter", lhsReporter), LocatorUtils.property(thatLocator, "reporter", rhsReporter), lhsReporter, rhsReporter)) { return false; } } { DateTime lhsOnset; lhsOnset = this.getOnset(); DateTime rhsOnset; rhsOnset = that.getOnset(); if (!strategy.equals(LocatorUtils.property(thisLocator, "onset", lhsOnset), LocatorUtils.property(thatLocator, "onset", rhsOnset), lhsOnset, rhsOnset)) { return false; } } { DateTime lhsLastOccurence; lhsLastOccurence = this.getLastOccurence(); DateTime rhsLastOccurence; rhsLastOccurence = that.getLastOccurence(); if (!strategy.equals(LocatorUtils.property(thisLocator, "lastOccurence", lhsLastOccurence), LocatorUtils.property(thatLocator, "lastOccurence", rhsLastOccurence), lhsLastOccurence, rhsLastOccurence)) { return false; } } { List lhsNote; lhsNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null); List rhsNote; rhsNote = (((that.note!= null)&&(!that.note.isEmpty()))?that.getNote():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "note", lhsNote), LocatorUtils.property(thatLocator, "note", rhsNote), lhsNote, rhsNote)) { return false; } } { List lhsReaction; lhsReaction = (((this.reaction!= null)&&(!this.reaction.isEmpty()))?this.getReaction():null); List rhsReaction; rhsReaction = (((that.reaction!= null)&&(!that.reaction.isEmpty()))?that.getReaction():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "reaction", lhsReaction), LocatorUtils.property(thatLocator, "reaction", rhsReaction), lhsReaction, rhsReaction)) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy 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); } { AllergyIntoleranceStatus theStatus; theStatus = this.getStatus(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus); } { AllergyIntoleranceType theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType); } { AllergyIntoleranceCategory theCategory; theCategory = this.getCategory(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "category", theCategory), currentHashCode, theCategory); } { AllergyIntoleranceCriticality theCriticality; theCriticality = this.getCriticality(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "criticality", theCriticality), currentHashCode, theCriticality); } { CodeableConcept theSubstance; theSubstance = this.getSubstance(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "substance", theSubstance), currentHashCode, theSubstance); } { Reference thePatient; thePatient = this.getPatient(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "patient", thePatient), currentHashCode, thePatient); } { DateTime theRecordedDate; theRecordedDate = this.getRecordedDate(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "recordedDate", theRecordedDate), currentHashCode, theRecordedDate); } { Reference theRecorder; theRecorder = this.getRecorder(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "recorder", theRecorder), currentHashCode, theRecorder); } { Reference theReporter; theReporter = this.getReporter(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reporter", theReporter), currentHashCode, theReporter); } { DateTime theOnset; theOnset = this.getOnset(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "onset", theOnset), currentHashCode, theOnset); } { DateTime theLastOccurence; theLastOccurence = this.getLastOccurence(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "lastOccurence", theLastOccurence), currentHashCode, theLastOccurence); } { List theNote; theNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "note", theNote), currentHashCode, theNote); } { List theReaction; theReaction = (((this.reaction!= null)&&(!this.reaction.isEmpty()))?this.getReaction():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reaction", theReaction), currentHashCode, theReaction); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public java.lang.String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy 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); } { AllergyIntoleranceStatus theStatus; theStatus = this.getStatus(); strategy.appendField(locator, this, "status", buffer, theStatus); } { AllergyIntoleranceType theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType); } { AllergyIntoleranceCategory theCategory; theCategory = this.getCategory(); strategy.appendField(locator, this, "category", buffer, theCategory); } { AllergyIntoleranceCriticality theCriticality; theCriticality = this.getCriticality(); strategy.appendField(locator, this, "criticality", buffer, theCriticality); } { CodeableConcept theSubstance; theSubstance = this.getSubstance(); strategy.appendField(locator, this, "substance", buffer, theSubstance); } { Reference thePatient; thePatient = this.getPatient(); strategy.appendField(locator, this, "patient", buffer, thePatient); } { DateTime theRecordedDate; theRecordedDate = this.getRecordedDate(); strategy.appendField(locator, this, "recordedDate", buffer, theRecordedDate); } { Reference theRecorder; theRecorder = this.getRecorder(); strategy.appendField(locator, this, "recorder", buffer, theRecorder); } { Reference theReporter; theReporter = this.getReporter(); strategy.appendField(locator, this, "reporter", buffer, theReporter); } { DateTime theOnset; theOnset = this.getOnset(); strategy.appendField(locator, this, "onset", buffer, theOnset); } { DateTime theLastOccurence; theLastOccurence = this.getLastOccurence(); strategy.appendField(locator, this, "lastOccurence", buffer, theLastOccurence); } { List theNote; theNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null); strategy.appendField(locator, this, "note", buffer, theNote); } { List theReaction; theReaction = (((this.reaction!= null)&&(!this.reaction.isEmpty()))?this.getReaction():null); strategy.appendField(locator, this, "reaction", buffer, theReaction); } return buffer; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy