
org.hl7.fhir.Communication Maven / Gradle / Ivy
Show all versions of quick Show documentation
//
// 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.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 Communication complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Communication">
* <complexContent>
* <extension base="{http://hl7.org/fhir}DomainResource">
* <sequence>
* <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
* <element name="category" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="sender" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="recipient" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
* <element name="payload" type="{http://hl7.org/fhir}Communication.Payload" maxOccurs="unbounded" minOccurs="0"/>
* <element name="medium" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
* <element name="status" type="{http://hl7.org/fhir}CommunicationStatus" minOccurs="0"/>
* <element name="encounter" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="sent" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
* <element name="received" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
* <element name="reason" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
* <element name="subject" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="requestDetail" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Communication", propOrder = {
"identifier",
"category",
"sender",
"recipient",
"payload",
"medium",
"status",
"encounter",
"sent",
"received",
"reason",
"subject",
"requestDetail"
})
public class Communication
extends DomainResource
implements Equals, HashCode, ToString
{
protected List identifier;
protected CodeableConcept category;
protected Reference sender;
protected List recipient;
protected List payload;
protected List medium;
protected CommunicationStatus status;
protected Reference encounter;
protected DateTime sent;
protected DateTime received;
protected List reason;
protected Reference subject;
protected Reference requestDetail;
/**
* 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 category property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getCategory() {
return category;
}
/**
* Sets the value of the category property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setCategory(CodeableConcept value) {
this.category = value;
}
/**
* Gets the value of the sender property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getSender() {
return sender;
}
/**
* Sets the value of the sender property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setSender(Reference value) {
this.sender = value;
}
/**
* Gets the value of the recipient 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 recipient property.
*
*
* For example, to add a new item, do as follows:
*
* getRecipient().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getRecipient() {
if (recipient == null) {
recipient = new ArrayList();
}
return this.recipient;
}
/**
* Gets the value of the payload 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 payload property.
*
*
* For example, to add a new item, do as follows:
*
* getPayload().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link CommunicationPayload }
*
*
*/
public List getPayload() {
if (payload == null) {
payload = new ArrayList();
}
return this.payload;
}
/**
* Gets the value of the medium 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 medium property.
*
*
* For example, to add a new item, do as follows:
*
* getMedium().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link CodeableConcept }
*
*
*/
public List getMedium() {
if (medium == null) {
medium = new ArrayList();
}
return this.medium;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link CommunicationStatus }
*
*/
public CommunicationStatus getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link CommunicationStatus }
*
*/
public void setStatus(CommunicationStatus value) {
this.status = value;
}
/**
* 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 sent property.
*
* @return
* possible object is
* {@link DateTime }
*
*/
public DateTime getSent() {
return sent;
}
/**
* Sets the value of the sent property.
*
* @param value
* allowed object is
* {@link DateTime }
*
*/
public void setSent(DateTime value) {
this.sent = value;
}
/**
* Gets the value of the received property.
*
* @return
* possible object is
* {@link DateTime }
*
*/
public DateTime getReceived() {
return received;
}
/**
* Sets the value of the received property.
*
* @param value
* allowed object is
* {@link DateTime }
*
*/
public void setReceived(DateTime value) {
this.received = value;
}
/**
* Gets the value of the reason 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 reason property.
*
*
* For example, to add a new item, do as follows:
*
* getReason().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link CodeableConcept }
*
*
*/
public List getReason() {
if (reason == null) {
reason = new ArrayList();
}
return this.reason;
}
/**
* Gets the value of the subject property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getSubject() {
return subject;
}
/**
* Sets the value of the subject property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setSubject(Reference value) {
this.subject = value;
}
/**
* Gets the value of the requestDetail property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getRequestDetail() {
return requestDetail;
}
/**
* Sets the value of the requestDetail property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setRequestDetail(Reference value) {
this.requestDetail = value;
}
public Communication withIdentifier(Identifier... values) {
if (values!= null) {
for (Identifier value: values) {
getIdentifier().add(value);
}
}
return this;
}
public Communication withIdentifier(Collection values) {
if (values!= null) {
getIdentifier().addAll(values);
}
return this;
}
public Communication withCategory(CodeableConcept value) {
setCategory(value);
return this;
}
public Communication withSender(Reference value) {
setSender(value);
return this;
}
public Communication withRecipient(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getRecipient().add(value);
}
}
return this;
}
public Communication withRecipient(Collection values) {
if (values!= null) {
getRecipient().addAll(values);
}
return this;
}
public Communication withPayload(CommunicationPayload... values) {
if (values!= null) {
for (CommunicationPayload value: values) {
getPayload().add(value);
}
}
return this;
}
public Communication withPayload(Collection values) {
if (values!= null) {
getPayload().addAll(values);
}
return this;
}
public Communication withMedium(CodeableConcept... values) {
if (values!= null) {
for (CodeableConcept value: values) {
getMedium().add(value);
}
}
return this;
}
public Communication withMedium(Collection values) {
if (values!= null) {
getMedium().addAll(values);
}
return this;
}
public Communication withStatus(CommunicationStatus value) {
setStatus(value);
return this;
}
public Communication withEncounter(Reference value) {
setEncounter(value);
return this;
}
public Communication withSent(DateTime value) {
setSent(value);
return this;
}
public Communication withReceived(DateTime value) {
setReceived(value);
return this;
}
public Communication withReason(CodeableConcept... values) {
if (values!= null) {
for (CodeableConcept value: values) {
getReason().add(value);
}
}
return this;
}
public Communication withReason(Collection values) {
if (values!= null) {
getReason().addAll(values);
}
return this;
}
public Communication withSubject(Reference value) {
setSubject(value);
return this;
}
public Communication withRequestDetail(Reference value) {
setRequestDetail(value);
return this;
}
@Override
public Communication withText(Narrative value) {
setText(value);
return this;
}
@Override
public Communication withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public Communication withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public Communication withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public Communication withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public Communication withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public Communication withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public Communication withId(Id value) {
setId(value);
return this;
}
@Override
public Communication withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public Communication withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public Communication withLanguage(Code value) {
setLanguage(value);
return this;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof Communication)) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final Communication that = ((Communication) 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;
}
}
{
CodeableConcept lhsCategory;
lhsCategory = this.getCategory();
CodeableConcept rhsCategory;
rhsCategory = that.getCategory();
if (!strategy.equals(LocatorUtils.property(thisLocator, "category", lhsCategory), LocatorUtils.property(thatLocator, "category", rhsCategory), lhsCategory, rhsCategory)) {
return false;
}
}
{
Reference lhsSender;
lhsSender = this.getSender();
Reference rhsSender;
rhsSender = that.getSender();
if (!strategy.equals(LocatorUtils.property(thisLocator, "sender", lhsSender), LocatorUtils.property(thatLocator, "sender", rhsSender), lhsSender, rhsSender)) {
return false;
}
}
{
List lhsRecipient;
lhsRecipient = (((this.recipient!= null)&&(!this.recipient.isEmpty()))?this.getRecipient():null);
List rhsRecipient;
rhsRecipient = (((that.recipient!= null)&&(!that.recipient.isEmpty()))?that.getRecipient():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "recipient", lhsRecipient), LocatorUtils.property(thatLocator, "recipient", rhsRecipient), lhsRecipient, rhsRecipient)) {
return false;
}
}
{
List lhsPayload;
lhsPayload = (((this.payload!= null)&&(!this.payload.isEmpty()))?this.getPayload():null);
List rhsPayload;
rhsPayload = (((that.payload!= null)&&(!that.payload.isEmpty()))?that.getPayload():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "payload", lhsPayload), LocatorUtils.property(thatLocator, "payload", rhsPayload), lhsPayload, rhsPayload)) {
return false;
}
}
{
List lhsMedium;
lhsMedium = (((this.medium!= null)&&(!this.medium.isEmpty()))?this.getMedium():null);
List rhsMedium;
rhsMedium = (((that.medium!= null)&&(!that.medium.isEmpty()))?that.getMedium():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "medium", lhsMedium), LocatorUtils.property(thatLocator, "medium", rhsMedium), lhsMedium, rhsMedium)) {
return false;
}
}
{
CommunicationStatus lhsStatus;
lhsStatus = this.getStatus();
CommunicationStatus rhsStatus;
rhsStatus = that.getStatus();
if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus)) {
return false;
}
}
{
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)) {
return false;
}
}
{
DateTime lhsSent;
lhsSent = this.getSent();
DateTime rhsSent;
rhsSent = that.getSent();
if (!strategy.equals(LocatorUtils.property(thisLocator, "sent", lhsSent), LocatorUtils.property(thatLocator, "sent", rhsSent), lhsSent, rhsSent)) {
return false;
}
}
{
DateTime lhsReceived;
lhsReceived = this.getReceived();
DateTime rhsReceived;
rhsReceived = that.getReceived();
if (!strategy.equals(LocatorUtils.property(thisLocator, "received", lhsReceived), LocatorUtils.property(thatLocator, "received", rhsReceived), lhsReceived, rhsReceived)) {
return false;
}
}
{
List lhsReason;
lhsReason = (((this.reason!= null)&&(!this.reason.isEmpty()))?this.getReason():null);
List rhsReason;
rhsReason = (((that.reason!= null)&&(!that.reason.isEmpty()))?that.getReason():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "reason", lhsReason), LocatorUtils.property(thatLocator, "reason", rhsReason), lhsReason, rhsReason)) {
return false;
}
}
{
Reference lhsSubject;
lhsSubject = this.getSubject();
Reference rhsSubject;
rhsSubject = that.getSubject();
if (!strategy.equals(LocatorUtils.property(thisLocator, "subject", lhsSubject), LocatorUtils.property(thatLocator, "subject", rhsSubject), lhsSubject, rhsSubject)) {
return false;
}
}
{
Reference lhsRequestDetail;
lhsRequestDetail = this.getRequestDetail();
Reference rhsRequestDetail;
rhsRequestDetail = that.getRequestDetail();
if (!strategy.equals(LocatorUtils.property(thisLocator, "requestDetail", lhsRequestDetail), LocatorUtils.property(thatLocator, "requestDetail", rhsRequestDetail), lhsRequestDetail, rhsRequestDetail)) {
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);
}
{
CodeableConcept theCategory;
theCategory = this.getCategory();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "category", theCategory), currentHashCode, theCategory);
}
{
Reference theSender;
theSender = this.getSender();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "sender", theSender), currentHashCode, theSender);
}
{
List theRecipient;
theRecipient = (((this.recipient!= null)&&(!this.recipient.isEmpty()))?this.getRecipient():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "recipient", theRecipient), currentHashCode, theRecipient);
}
{
List thePayload;
thePayload = (((this.payload!= null)&&(!this.payload.isEmpty()))?this.getPayload():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "payload", thePayload), currentHashCode, thePayload);
}
{
List theMedium;
theMedium = (((this.medium!= null)&&(!this.medium.isEmpty()))?this.getMedium():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "medium", theMedium), currentHashCode, theMedium);
}
{
CommunicationStatus theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus);
}
{
Reference theEncounter;
theEncounter = this.getEncounter();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "encounter", theEncounter), currentHashCode, theEncounter);
}
{
DateTime theSent;
theSent = this.getSent();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "sent", theSent), currentHashCode, theSent);
}
{
DateTime theReceived;
theReceived = this.getReceived();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "received", theReceived), currentHashCode, theReceived);
}
{
List theReason;
theReason = (((this.reason!= null)&&(!this.reason.isEmpty()))?this.getReason():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reason", theReason), currentHashCode, theReason);
}
{
Reference theSubject;
theSubject = this.getSubject();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "subject", theSubject), currentHashCode, theSubject);
}
{
Reference theRequestDetail;
theRequestDetail = this.getRequestDetail();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "requestDetail", theRequestDetail), currentHashCode, theRequestDetail);
}
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);
}
{
CodeableConcept theCategory;
theCategory = this.getCategory();
strategy.appendField(locator, this, "category", buffer, theCategory);
}
{
Reference theSender;
theSender = this.getSender();
strategy.appendField(locator, this, "sender", buffer, theSender);
}
{
List theRecipient;
theRecipient = (((this.recipient!= null)&&(!this.recipient.isEmpty()))?this.getRecipient():null);
strategy.appendField(locator, this, "recipient", buffer, theRecipient);
}
{
List thePayload;
thePayload = (((this.payload!= null)&&(!this.payload.isEmpty()))?this.getPayload():null);
strategy.appendField(locator, this, "payload", buffer, thePayload);
}
{
List theMedium;
theMedium = (((this.medium!= null)&&(!this.medium.isEmpty()))?this.getMedium():null);
strategy.appendField(locator, this, "medium", buffer, theMedium);
}
{
CommunicationStatus theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus);
}
{
Reference theEncounter;
theEncounter = this.getEncounter();
strategy.appendField(locator, this, "encounter", buffer, theEncounter);
}
{
DateTime theSent;
theSent = this.getSent();
strategy.appendField(locator, this, "sent", buffer, theSent);
}
{
DateTime theReceived;
theReceived = this.getReceived();
strategy.appendField(locator, this, "received", buffer, theReceived);
}
{
List theReason;
theReason = (((this.reason!= null)&&(!this.reason.isEmpty()))?this.getReason():null);
strategy.appendField(locator, this, "reason", buffer, theReason);
}
{
Reference theSubject;
theSubject = this.getSubject();
strategy.appendField(locator, this, "subject", buffer, theSubject);
}
{
Reference theRequestDetail;
theRequestDetail = this.getRequestDetail();
strategy.appendField(locator, this, "requestDetail", buffer, theRequestDetail);
}
return buffer;
}
}