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

org.hl7.fhir.AllergyIntoleranceReaction 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;


/**
 * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
 * 
 * 

Java class for AllergyIntolerance.Reaction complex type. * *

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

 * <complexType name="AllergyIntolerance.Reaction">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}BackboneElement">
 *       <sequence>
 *         <element name="substance" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="certainty" type="{http://hl7.org/fhir}AllergyIntoleranceCertainty" minOccurs="0"/>
 *         <element name="manifestation" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded"/>
 *         <element name="description" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="onset" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
 *         <element name="severity" type="{http://hl7.org/fhir}AllergyIntoleranceSeverity" minOccurs="0"/>
 *         <element name="exposureRoute" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="note" type="{http://hl7.org/fhir}Annotation" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AllergyIntolerance.Reaction", propOrder = { "substance", "certainty", "manifestation", "description", "onset", "severity", "exposureRoute", "note" }) public class AllergyIntoleranceReaction extends BackboneElement implements Equals, HashCode, ToString { protected CodeableConcept substance; protected AllergyIntoleranceCertainty certainty; @XmlElement(required = true) protected List manifestation; protected org.hl7.fhir.String description; protected DateTime onset; protected AllergyIntoleranceSeverity severity; protected CodeableConcept exposureRoute; protected List note; /** * 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 certainty property. * * @return * possible object is * {@link AllergyIntoleranceCertainty } * */ public AllergyIntoleranceCertainty getCertainty() { return certainty; } /** * Sets the value of the certainty property. * * @param value * allowed object is * {@link AllergyIntoleranceCertainty } * */ public void setCertainty(AllergyIntoleranceCertainty value) { this.certainty = value; } /** * Gets the value of the manifestation 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 manifestation property. * *

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

     *    getManifestation().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link CodeableConcept } * * */ public List getManifestation() { if (manifestation == null) { manifestation = new ArrayList(); } return this.manifestation; } /** * Gets the value of the description property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getDescription() { return description; } /** * Sets the value of the description property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setDescription(org.hl7.fhir.String value) { this.description = 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 severity property. * * @return * possible object is * {@link AllergyIntoleranceSeverity } * */ public AllergyIntoleranceSeverity getSeverity() { return severity; } /** * Sets the value of the severity property. * * @param value * allowed object is * {@link AllergyIntoleranceSeverity } * */ public void setSeverity(AllergyIntoleranceSeverity value) { this.severity = value; } /** * Gets the value of the exposureRoute property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getExposureRoute() { return exposureRoute; } /** * Sets the value of the exposureRoute property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setExposureRoute(CodeableConcept value) { this.exposureRoute = 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; } public AllergyIntoleranceReaction withSubstance(CodeableConcept value) { setSubstance(value); return this; } public AllergyIntoleranceReaction withCertainty(AllergyIntoleranceCertainty value) { setCertainty(value); return this; } public AllergyIntoleranceReaction withManifestation(CodeableConcept... values) { if (values!= null) { for (CodeableConcept value: values) { getManifestation().add(value); } } return this; } public AllergyIntoleranceReaction withManifestation(Collection values) { if (values!= null) { getManifestation().addAll(values); } return this; } public AllergyIntoleranceReaction withDescription(org.hl7.fhir.String value) { setDescription(value); return this; } public AllergyIntoleranceReaction withOnset(DateTime value) { setOnset(value); return this; } public AllergyIntoleranceReaction withSeverity(AllergyIntoleranceSeverity value) { setSeverity(value); return this; } public AllergyIntoleranceReaction withExposureRoute(CodeableConcept value) { setExposureRoute(value); return this; } public AllergyIntoleranceReaction withNote(Annotation... values) { if (values!= null) { for (Annotation value: values) { getNote().add(value); } } return this; } public AllergyIntoleranceReaction withNote(Collection values) { if (values!= null) { getNote().addAll(values); } return this; } @Override public AllergyIntoleranceReaction withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public AllergyIntoleranceReaction withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public AllergyIntoleranceReaction withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public AllergyIntoleranceReaction withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public AllergyIntoleranceReaction withId(java.lang.String value) { setId(value); return this; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof AllergyIntoleranceReaction)) { return false; } if (this == object) { return true; } if (!super.equals(thisLocator, thatLocator, object, strategy)) { return false; } final AllergyIntoleranceReaction that = ((AllergyIntoleranceReaction) object); { 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; } } { AllergyIntoleranceCertainty lhsCertainty; lhsCertainty = this.getCertainty(); AllergyIntoleranceCertainty rhsCertainty; rhsCertainty = that.getCertainty(); if (!strategy.equals(LocatorUtils.property(thisLocator, "certainty", lhsCertainty), LocatorUtils.property(thatLocator, "certainty", rhsCertainty), lhsCertainty, rhsCertainty)) { return false; } } { List lhsManifestation; lhsManifestation = (((this.manifestation!= null)&&(!this.manifestation.isEmpty()))?this.getManifestation():null); List rhsManifestation; rhsManifestation = (((that.manifestation!= null)&&(!that.manifestation.isEmpty()))?that.getManifestation():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "manifestation", lhsManifestation), LocatorUtils.property(thatLocator, "manifestation", rhsManifestation), lhsManifestation, rhsManifestation)) { return false; } } { org.hl7.fhir.String lhsDescription; lhsDescription = this.getDescription(); org.hl7.fhir.String rhsDescription; rhsDescription = that.getDescription(); if (!strategy.equals(LocatorUtils.property(thisLocator, "description", lhsDescription), LocatorUtils.property(thatLocator, "description", rhsDescription), lhsDescription, rhsDescription)) { 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; } } { AllergyIntoleranceSeverity lhsSeverity; lhsSeverity = this.getSeverity(); AllergyIntoleranceSeverity rhsSeverity; rhsSeverity = that.getSeverity(); if (!strategy.equals(LocatorUtils.property(thisLocator, "severity", lhsSeverity), LocatorUtils.property(thatLocator, "severity", rhsSeverity), lhsSeverity, rhsSeverity)) { return false; } } { CodeableConcept lhsExposureRoute; lhsExposureRoute = this.getExposureRoute(); CodeableConcept rhsExposureRoute; rhsExposureRoute = that.getExposureRoute(); if (!strategy.equals(LocatorUtils.property(thisLocator, "exposureRoute", lhsExposureRoute), LocatorUtils.property(thatLocator, "exposureRoute", rhsExposureRoute), lhsExposureRoute, rhsExposureRoute)) { 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; } } 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); { CodeableConcept theSubstance; theSubstance = this.getSubstance(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "substance", theSubstance), currentHashCode, theSubstance); } { AllergyIntoleranceCertainty theCertainty; theCertainty = this.getCertainty(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "certainty", theCertainty), currentHashCode, theCertainty); } { List theManifestation; theManifestation = (((this.manifestation!= null)&&(!this.manifestation.isEmpty()))?this.getManifestation():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "manifestation", theManifestation), currentHashCode, theManifestation); } { org.hl7.fhir.String theDescription; theDescription = this.getDescription(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "description", theDescription), currentHashCode, theDescription); } { DateTime theOnset; theOnset = this.getOnset(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "onset", theOnset), currentHashCode, theOnset); } { AllergyIntoleranceSeverity theSeverity; theSeverity = this.getSeverity(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "severity", theSeverity), currentHashCode, theSeverity); } { CodeableConcept theExposureRoute; theExposureRoute = this.getExposureRoute(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "exposureRoute", theExposureRoute), currentHashCode, theExposureRoute); } { List theNote; theNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "note", theNote), currentHashCode, theNote); } 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); { CodeableConcept theSubstance; theSubstance = this.getSubstance(); strategy.appendField(locator, this, "substance", buffer, theSubstance); } { AllergyIntoleranceCertainty theCertainty; theCertainty = this.getCertainty(); strategy.appendField(locator, this, "certainty", buffer, theCertainty); } { List theManifestation; theManifestation = (((this.manifestation!= null)&&(!this.manifestation.isEmpty()))?this.getManifestation():null); strategy.appendField(locator, this, "manifestation", buffer, theManifestation); } { org.hl7.fhir.String theDescription; theDescription = this.getDescription(); strategy.appendField(locator, this, "description", buffer, theDescription); } { DateTime theOnset; theOnset = this.getOnset(); strategy.appendField(locator, this, "onset", buffer, theOnset); } { AllergyIntoleranceSeverity theSeverity; theSeverity = this.getSeverity(); strategy.appendField(locator, this, "severity", buffer, theSeverity); } { CodeableConcept theExposureRoute; theExposureRoute = this.getExposureRoute(); strategy.appendField(locator, this, "exposureRoute", buffer, theExposureRoute); } { List theNote; theNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null); strategy.appendField(locator, this, "note", buffer, theNote); } return buffer; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy