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

org.hl7.fhir.CompositionEvent 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.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 set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained.
 * 
 * 

Java class for Composition.Event complex type. * *

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

 * <complexType name="Composition.Event">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}BackboneElement">
 *       <sequence>
 *         <element name="code" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="period" type="{http://hl7.org/fhir}Period" minOccurs="0"/>
 *         <element name="detail" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Composition.Event", propOrder = { "code", "period", "detail" }) public class CompositionEvent extends BackboneElement implements Equals2, HashCode2, ToString2 { protected List code; protected Period period; protected List detail; /** * Gets the value of the code 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 code property. * *

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

     *    getCode().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link CodeableConcept } * * */ public List getCode() { if (code == null) { code = new ArrayList(); } return this.code; } /** * 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 detail 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 detail property. * *

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

     *    getDetail().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Reference } * * */ public List getDetail() { if (detail == null) { detail = new ArrayList(); } return this.detail; } public CompositionEvent withCode(CodeableConcept... values) { if (values!= null) { for (CodeableConcept value: values) { getCode().add(value); } } return this; } public CompositionEvent withCode(Collection values) { if (values!= null) { getCode().addAll(values); } return this; } public CompositionEvent withPeriod(Period value) { setPeriod(value); return this; } public CompositionEvent withDetail(Reference... values) { if (values!= null) { for (Reference value: values) { getDetail().add(value); } } return this; } public CompositionEvent withDetail(Collection values) { if (values!= null) { getDetail().addAll(values); } return this; } @Override public CompositionEvent withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public CompositionEvent withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public CompositionEvent withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public CompositionEvent withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public CompositionEvent 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 CompositionEvent that = ((CompositionEvent) object); { List lhsCode; lhsCode = (((this.code!= null)&&(!this.code.isEmpty()))?this.getCode():null); List rhsCode; rhsCode = (((that.code!= null)&&(!that.code.isEmpty()))?that.getCode():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "code", lhsCode), LocatorUtils.property(thatLocator, "code", rhsCode), lhsCode, rhsCode, ((this.code!= null)&&(!this.code.isEmpty())), ((that.code!= null)&&(!that.code.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; } } { List lhsDetail; lhsDetail = (((this.detail!= null)&&(!this.detail.isEmpty()))?this.getDetail():null); List rhsDetail; rhsDetail = (((that.detail!= null)&&(!that.detail.isEmpty()))?that.getDetail():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "detail", lhsDetail), LocatorUtils.property(thatLocator, "detail", rhsDetail), lhsDetail, rhsDetail, ((this.detail!= null)&&(!this.detail.isEmpty())), ((that.detail!= null)&&(!that.detail.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); { List theCode; theCode = (((this.code!= null)&&(!this.code.isEmpty()))?this.getCode():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "code", theCode), currentHashCode, theCode, ((this.code!= null)&&(!this.code.isEmpty()))); } { Period thePeriod; thePeriod = this.getPeriod(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "period", thePeriod), currentHashCode, thePeriod, (this.period!= null)); } { List theDetail; theDetail = (((this.detail!= null)&&(!this.detail.isEmpty()))?this.getDetail():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "detail", theDetail), currentHashCode, theDetail, ((this.detail!= null)&&(!this.detail.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); { List theCode; theCode = (((this.code!= null)&&(!this.code.isEmpty()))?this.getCode():null); strategy.appendField(locator, this, "code", buffer, theCode, ((this.code!= null)&&(!this.code.isEmpty()))); } { Period thePeriod; thePeriod = this.getPeriod(); strategy.appendField(locator, this, "period", buffer, thePeriod, (this.period!= null)); } { List theDetail; theDetail = (((this.detail!= null)&&(!this.detail.isEmpty()))?this.getDetail():null); strategy.appendField(locator, this, "detail", buffer, theDetail, ((this.detail!= null)&&(!this.detail.isEmpty()))); } return buffer; } public void setCode(List value) { this.code = value; } public void setDetail(List value) { this.detail = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy