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.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.01.18 at 08:26:13 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;


/**
 * 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 Equals2, HashCode2, ToString2 { 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 Jakarta XML Binding 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 Jakarta XML Binding 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; } @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 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, (this.substance!= null), (that.substance!= null))) { 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, (this.certainty!= null), (that.certainty!= null))) { 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, ((this.manifestation!= null)&&(!this.manifestation.isEmpty())), ((that.manifestation!= null)&&(!that.manifestation.isEmpty())))) { 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, (this.description!= null), (that.description!= null))) { 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, (this.onset!= null), (that.onset!= null))) { 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, (this.severity!= null), (that.severity!= null))) { 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, (this.exposureRoute!= null), (that.exposureRoute!= null))) { 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, ((this.note!= null)&&(!this.note.isEmpty())), ((that.note!= null)&&(!that.note.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 theSubstance; theSubstance = this.getSubstance(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "substance", theSubstance), currentHashCode, theSubstance, (this.substance!= null)); } { AllergyIntoleranceCertainty theCertainty; theCertainty = this.getCertainty(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "certainty", theCertainty), currentHashCode, theCertainty, (this.certainty!= null)); } { List theManifestation; theManifestation = (((this.manifestation!= null)&&(!this.manifestation.isEmpty()))?this.getManifestation():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "manifestation", theManifestation), currentHashCode, theManifestation, ((this.manifestation!= null)&&(!this.manifestation.isEmpty()))); } { org.hl7.fhir.String theDescription; theDescription = this.getDescription(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "description", theDescription), currentHashCode, theDescription, (this.description!= null)); } { DateTime theOnset; theOnset = this.getOnset(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "onset", theOnset), currentHashCode, theOnset, (this.onset!= null)); } { AllergyIntoleranceSeverity theSeverity; theSeverity = this.getSeverity(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "severity", theSeverity), currentHashCode, theSeverity, (this.severity!= null)); } { CodeableConcept theExposureRoute; theExposureRoute = this.getExposureRoute(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "exposureRoute", theExposureRoute), currentHashCode, theExposureRoute, (this.exposureRoute!= null)); } { List theNote; theNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "note", theNote), currentHashCode, theNote, ((this.note!= null)&&(!this.note.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 theSubstance; theSubstance = this.getSubstance(); strategy.appendField(locator, this, "substance", buffer, theSubstance, (this.substance!= null)); } { AllergyIntoleranceCertainty theCertainty; theCertainty = this.getCertainty(); strategy.appendField(locator, this, "certainty", buffer, theCertainty, (this.certainty!= null)); } { List theManifestation; theManifestation = (((this.manifestation!= null)&&(!this.manifestation.isEmpty()))?this.getManifestation():null); strategy.appendField(locator, this, "manifestation", buffer, theManifestation, ((this.manifestation!= null)&&(!this.manifestation.isEmpty()))); } { org.hl7.fhir.String theDescription; theDescription = this.getDescription(); strategy.appendField(locator, this, "description", buffer, theDescription, (this.description!= null)); } { DateTime theOnset; theOnset = this.getOnset(); strategy.appendField(locator, this, "onset", buffer, theOnset, (this.onset!= null)); } { AllergyIntoleranceSeverity theSeverity; theSeverity = this.getSeverity(); strategy.appendField(locator, this, "severity", buffer, theSeverity, (this.severity!= null)); } { CodeableConcept theExposureRoute; theExposureRoute = this.getExposureRoute(); strategy.appendField(locator, this, "exposureRoute", buffer, theExposureRoute, (this.exposureRoute!= null)); } { List theNote; theNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null); strategy.appendField(locator, this, "note", buffer, theNote, ((this.note!= null)&&(!this.note.isEmpty()))); } return buffer; } public void setManifestation(List value) { this.manifestation = value; } public void setNote(List value) { this.note = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy