org.hl7.fhir.DocumentReference Maven / Gradle / Ivy
Show all versions of quick Show documentation
//
// 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.08.16 at 09:36:55 AM MDT
//
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;
/**
* If the element is present, it must have either a @value, an @id, or extensions
*
* Java class for DocumentReference complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="DocumentReference">
* <complexContent>
* <extension base="{http://hl7.org/fhir}DomainResource">
* <sequence>
* <element name="masterIdentifier" type="{http://hl7.org/fhir}Identifier" minOccurs="0"/>
* <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
* <element name="subject" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="type" type="{http://hl7.org/fhir}CodeableConcept"/>
* <element name="class" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="author" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
* <element name="custodian" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="authenticator" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="created" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
* <element name="indexed" type="{http://hl7.org/fhir}instant"/>
* <element name="status" type="{http://hl7.org/fhir}DocumentReferenceStatus"/>
* <element name="docStatus" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="relatesTo" type="{http://hl7.org/fhir}DocumentReference.RelatesTo" maxOccurs="unbounded" minOccurs="0"/>
* <element name="description" type="{http://hl7.org/fhir}string" minOccurs="0"/>
* <element name="securityLabel" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
* <element name="content" type="{http://hl7.org/fhir}DocumentReference.Content" maxOccurs="unbounded"/>
* <element name="context" type="{http://hl7.org/fhir}DocumentReference.Context" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DocumentReference", propOrder = {
"masterIdentifier",
"identifier",
"subject",
"type",
"clazz",
"author",
"custodian",
"authenticator",
"created",
"indexed",
"status",
"docStatus",
"relatesTo",
"description",
"securityLabel",
"content",
"context"
})
public class DocumentReference
extends DomainResource
implements Equals2, HashCode2, ToString2
{
protected Identifier masterIdentifier;
protected List identifier;
protected Reference subject;
@XmlElement(required = true)
protected CodeableConcept type;
@XmlElement(name = "class")
protected CodeableConcept clazz;
protected List author;
protected Reference custodian;
protected Reference authenticator;
protected DateTime created;
@XmlElement(required = true)
protected Instant indexed;
@XmlElement(required = true)
protected DocumentReferenceStatus status;
protected CodeableConcept docStatus;
protected List relatesTo;
protected org.hl7.fhir.String description;
protected List securityLabel;
@XmlElement(required = true)
protected List content;
protected DocumentReferenceContext context;
/**
* Gets the value of the masterIdentifier property.
*
* @return
* possible object is
* {@link Identifier }
*
*/
public Identifier getMasterIdentifier() {
return masterIdentifier;
}
/**
* Sets the value of the masterIdentifier property.
*
* @param value
* allowed object is
* {@link Identifier }
*
*/
public void setMasterIdentifier(Identifier value) {
this.masterIdentifier = value;
}
/**
* 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 Jakarta XML Binding 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 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 type property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setType(CodeableConcept value) {
this.type = value;
}
/**
* Gets the value of the clazz property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getClazz() {
return clazz;
}
/**
* Sets the value of the clazz property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setClazz(CodeableConcept value) {
this.clazz = value;
}
/**
* Gets the value of the author 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 author property.
*
*
* For example, to add a new item, do as follows:
*
* getAuthor().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getAuthor() {
if (author == null) {
author = new ArrayList();
}
return this.author;
}
/**
* Gets the value of the custodian property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getCustodian() {
return custodian;
}
/**
* Sets the value of the custodian property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setCustodian(Reference value) {
this.custodian = value;
}
/**
* Gets the value of the authenticator property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getAuthenticator() {
return authenticator;
}
/**
* Sets the value of the authenticator property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setAuthenticator(Reference value) {
this.authenticator = value;
}
/**
* Gets the value of the created property.
*
* @return
* possible object is
* {@link DateTime }
*
*/
public DateTime getCreated() {
return created;
}
/**
* Sets the value of the created property.
*
* @param value
* allowed object is
* {@link DateTime }
*
*/
public void setCreated(DateTime value) {
this.created = value;
}
/**
* Gets the value of the indexed property.
*
* @return
* possible object is
* {@link Instant }
*
*/
public Instant getIndexed() {
return indexed;
}
/**
* Sets the value of the indexed property.
*
* @param value
* allowed object is
* {@link Instant }
*
*/
public void setIndexed(Instant value) {
this.indexed = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link DocumentReferenceStatus }
*
*/
public DocumentReferenceStatus getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link DocumentReferenceStatus }
*
*/
public void setStatus(DocumentReferenceStatus value) {
this.status = value;
}
/**
* Gets the value of the docStatus property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getDocStatus() {
return docStatus;
}
/**
* Sets the value of the docStatus property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setDocStatus(CodeableConcept value) {
this.docStatus = value;
}
/**
* Gets the value of the relatesTo 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 relatesTo property.
*
*
* For example, to add a new item, do as follows:
*
* getRelatesTo().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link DocumentReferenceRelatesTo }
*
*
*/
public List getRelatesTo() {
if (relatesTo == null) {
relatesTo = new ArrayList();
}
return this.relatesTo;
}
/**
* 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 securityLabel 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 securityLabel property.
*
*
* For example, to add a new item, do as follows:
*
* getSecurityLabel().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link CodeableConcept }
*
*
*/
public List getSecurityLabel() {
if (securityLabel == null) {
securityLabel = new ArrayList();
}
return this.securityLabel;
}
/**
* Gets the value of the content 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 content property.
*
*
* For example, to add a new item, do as follows:
*
* getContent().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link DocumentReferenceContent }
*
*
*/
public List getContent() {
if (content == null) {
content = new ArrayList();
}
return this.content;
}
/**
* Gets the value of the context property.
*
* @return
* possible object is
* {@link DocumentReferenceContext }
*
*/
public DocumentReferenceContext getContext() {
return context;
}
/**
* Sets the value of the context property.
*
* @param value
* allowed object is
* {@link DocumentReferenceContext }
*
*/
public void setContext(DocumentReferenceContext value) {
this.context = value;
}
public DocumentReference withMasterIdentifier(Identifier value) {
setMasterIdentifier(value);
return this;
}
public DocumentReference withIdentifier(Identifier... values) {
if (values!= null) {
for (Identifier value: values) {
getIdentifier().add(value);
}
}
return this;
}
public DocumentReference withIdentifier(Collection values) {
if (values!= null) {
getIdentifier().addAll(values);
}
return this;
}
public DocumentReference withSubject(Reference value) {
setSubject(value);
return this;
}
public DocumentReference withType(CodeableConcept value) {
setType(value);
return this;
}
public DocumentReference withClazz(CodeableConcept value) {
setClazz(value);
return this;
}
public DocumentReference withAuthor(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getAuthor().add(value);
}
}
return this;
}
public DocumentReference withAuthor(Collection values) {
if (values!= null) {
getAuthor().addAll(values);
}
return this;
}
public DocumentReference withCustodian(Reference value) {
setCustodian(value);
return this;
}
public DocumentReference withAuthenticator(Reference value) {
setAuthenticator(value);
return this;
}
public DocumentReference withCreated(DateTime value) {
setCreated(value);
return this;
}
public DocumentReference withIndexed(Instant value) {
setIndexed(value);
return this;
}
public DocumentReference withStatus(DocumentReferenceStatus value) {
setStatus(value);
return this;
}
public DocumentReference withDocStatus(CodeableConcept value) {
setDocStatus(value);
return this;
}
public DocumentReference withRelatesTo(DocumentReferenceRelatesTo... values) {
if (values!= null) {
for (DocumentReferenceRelatesTo value: values) {
getRelatesTo().add(value);
}
}
return this;
}
public DocumentReference withRelatesTo(Collection values) {
if (values!= null) {
getRelatesTo().addAll(values);
}
return this;
}
public DocumentReference withDescription(org.hl7.fhir.String value) {
setDescription(value);
return this;
}
public DocumentReference withSecurityLabel(CodeableConcept... values) {
if (values!= null) {
for (CodeableConcept value: values) {
getSecurityLabel().add(value);
}
}
return this;
}
public DocumentReference withSecurityLabel(Collection values) {
if (values!= null) {
getSecurityLabel().addAll(values);
}
return this;
}
public DocumentReference withContent(DocumentReferenceContent... values) {
if (values!= null) {
for (DocumentReferenceContent value: values) {
getContent().add(value);
}
}
return this;
}
public DocumentReference withContent(Collection values) {
if (values!= null) {
getContent().addAll(values);
}
return this;
}
public DocumentReference withContext(DocumentReferenceContext value) {
setContext(value);
return this;
}
@Override
public DocumentReference withText(Narrative value) {
setText(value);
return this;
}
@Override
public DocumentReference withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public DocumentReference withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public DocumentReference withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public DocumentReference withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public DocumentReference withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public DocumentReference withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public DocumentReference withId(Id value) {
setId(value);
return this;
}
@Override
public DocumentReference withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public DocumentReference withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public DocumentReference withLanguage(Code value) {
setLanguage(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 DocumentReference that = ((DocumentReference) object);
{
Identifier lhsMasterIdentifier;
lhsMasterIdentifier = this.getMasterIdentifier();
Identifier rhsMasterIdentifier;
rhsMasterIdentifier = that.getMasterIdentifier();
if (!strategy.equals(LocatorUtils.property(thisLocator, "masterIdentifier", lhsMasterIdentifier), LocatorUtils.property(thatLocator, "masterIdentifier", rhsMasterIdentifier), lhsMasterIdentifier, rhsMasterIdentifier, (this.masterIdentifier!= null), (that.masterIdentifier!= null))) {
return false;
}
}
{
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, ((this.identifier!= null)&&(!this.identifier.isEmpty())), ((that.identifier!= null)&&(!that.identifier.isEmpty())))) {
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, (this.subject!= null), (that.subject!= null))) {
return false;
}
}
{
CodeableConcept lhsType;
lhsType = this.getType();
CodeableConcept rhsType;
rhsType = that.getType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, (this.type!= null), (that.type!= null))) {
return false;
}
}
{
CodeableConcept lhsClazz;
lhsClazz = this.getClazz();
CodeableConcept rhsClazz;
rhsClazz = that.getClazz();
if (!strategy.equals(LocatorUtils.property(thisLocator, "clazz", lhsClazz), LocatorUtils.property(thatLocator, "clazz", rhsClazz), lhsClazz, rhsClazz, (this.clazz!= null), (that.clazz!= null))) {
return false;
}
}
{
List lhsAuthor;
lhsAuthor = (((this.author!= null)&&(!this.author.isEmpty()))?this.getAuthor():null);
List rhsAuthor;
rhsAuthor = (((that.author!= null)&&(!that.author.isEmpty()))?that.getAuthor():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "author", lhsAuthor), LocatorUtils.property(thatLocator, "author", rhsAuthor), lhsAuthor, rhsAuthor, ((this.author!= null)&&(!this.author.isEmpty())), ((that.author!= null)&&(!that.author.isEmpty())))) {
return false;
}
}
{
Reference lhsCustodian;
lhsCustodian = this.getCustodian();
Reference rhsCustodian;
rhsCustodian = that.getCustodian();
if (!strategy.equals(LocatorUtils.property(thisLocator, "custodian", lhsCustodian), LocatorUtils.property(thatLocator, "custodian", rhsCustodian), lhsCustodian, rhsCustodian, (this.custodian!= null), (that.custodian!= null))) {
return false;
}
}
{
Reference lhsAuthenticator;
lhsAuthenticator = this.getAuthenticator();
Reference rhsAuthenticator;
rhsAuthenticator = that.getAuthenticator();
if (!strategy.equals(LocatorUtils.property(thisLocator, "authenticator", lhsAuthenticator), LocatorUtils.property(thatLocator, "authenticator", rhsAuthenticator), lhsAuthenticator, rhsAuthenticator, (this.authenticator!= null), (that.authenticator!= null))) {
return false;
}
}
{
DateTime lhsCreated;
lhsCreated = this.getCreated();
DateTime rhsCreated;
rhsCreated = that.getCreated();
if (!strategy.equals(LocatorUtils.property(thisLocator, "created", lhsCreated), LocatorUtils.property(thatLocator, "created", rhsCreated), lhsCreated, rhsCreated, (this.created!= null), (that.created!= null))) {
return false;
}
}
{
Instant lhsIndexed;
lhsIndexed = this.getIndexed();
Instant rhsIndexed;
rhsIndexed = that.getIndexed();
if (!strategy.equals(LocatorUtils.property(thisLocator, "indexed", lhsIndexed), LocatorUtils.property(thatLocator, "indexed", rhsIndexed), lhsIndexed, rhsIndexed, (this.indexed!= null), (that.indexed!= null))) {
return false;
}
}
{
DocumentReferenceStatus lhsStatus;
lhsStatus = this.getStatus();
DocumentReferenceStatus rhsStatus;
rhsStatus = that.getStatus();
if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus, (this.status!= null), (that.status!= null))) {
return false;
}
}
{
CodeableConcept lhsDocStatus;
lhsDocStatus = this.getDocStatus();
CodeableConcept rhsDocStatus;
rhsDocStatus = that.getDocStatus();
if (!strategy.equals(LocatorUtils.property(thisLocator, "docStatus", lhsDocStatus), LocatorUtils.property(thatLocator, "docStatus", rhsDocStatus), lhsDocStatus, rhsDocStatus, (this.docStatus!= null), (that.docStatus!= null))) {
return false;
}
}
{
List lhsRelatesTo;
lhsRelatesTo = (((this.relatesTo!= null)&&(!this.relatesTo.isEmpty()))?this.getRelatesTo():null);
List rhsRelatesTo;
rhsRelatesTo = (((that.relatesTo!= null)&&(!that.relatesTo.isEmpty()))?that.getRelatesTo():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "relatesTo", lhsRelatesTo), LocatorUtils.property(thatLocator, "relatesTo", rhsRelatesTo), lhsRelatesTo, rhsRelatesTo, ((this.relatesTo!= null)&&(!this.relatesTo.isEmpty())), ((that.relatesTo!= null)&&(!that.relatesTo.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;
}
}
{
List lhsSecurityLabel;
lhsSecurityLabel = (((this.securityLabel!= null)&&(!this.securityLabel.isEmpty()))?this.getSecurityLabel():null);
List rhsSecurityLabel;
rhsSecurityLabel = (((that.securityLabel!= null)&&(!that.securityLabel.isEmpty()))?that.getSecurityLabel():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "securityLabel", lhsSecurityLabel), LocatorUtils.property(thatLocator, "securityLabel", rhsSecurityLabel), lhsSecurityLabel, rhsSecurityLabel, ((this.securityLabel!= null)&&(!this.securityLabel.isEmpty())), ((that.securityLabel!= null)&&(!that.securityLabel.isEmpty())))) {
return false;
}
}
{
List lhsContent;
lhsContent = (((this.content!= null)&&(!this.content.isEmpty()))?this.getContent():null);
List rhsContent;
rhsContent = (((that.content!= null)&&(!that.content.isEmpty()))?that.getContent():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "content", lhsContent), LocatorUtils.property(thatLocator, "content", rhsContent), lhsContent, rhsContent, ((this.content!= null)&&(!this.content.isEmpty())), ((that.content!= null)&&(!that.content.isEmpty())))) {
return false;
}
}
{
DocumentReferenceContext lhsContext;
lhsContext = this.getContext();
DocumentReferenceContext rhsContext;
rhsContext = that.getContext();
if (!strategy.equals(LocatorUtils.property(thisLocator, "context", lhsContext), LocatorUtils.property(thatLocator, "context", rhsContext), lhsContext, rhsContext, (this.context!= null), (that.context!= null))) {
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);
{
Identifier theMasterIdentifier;
theMasterIdentifier = this.getMasterIdentifier();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "masterIdentifier", theMasterIdentifier), currentHashCode, theMasterIdentifier, (this.masterIdentifier!= null));
}
{
List theIdentifier;
theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier, ((this.identifier!= null)&&(!this.identifier.isEmpty())));
}
{
Reference theSubject;
theSubject = this.getSubject();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "subject", theSubject), currentHashCode, theSubject, (this.subject!= null));
}
{
CodeableConcept theType;
theType = this.getType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, (this.type!= null));
}
{
CodeableConcept theClazz;
theClazz = this.getClazz();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "clazz", theClazz), currentHashCode, theClazz, (this.clazz!= null));
}
{
List theAuthor;
theAuthor = (((this.author!= null)&&(!this.author.isEmpty()))?this.getAuthor():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "author", theAuthor), currentHashCode, theAuthor, ((this.author!= null)&&(!this.author.isEmpty())));
}
{
Reference theCustodian;
theCustodian = this.getCustodian();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "custodian", theCustodian), currentHashCode, theCustodian, (this.custodian!= null));
}
{
Reference theAuthenticator;
theAuthenticator = this.getAuthenticator();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "authenticator", theAuthenticator), currentHashCode, theAuthenticator, (this.authenticator!= null));
}
{
DateTime theCreated;
theCreated = this.getCreated();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "created", theCreated), currentHashCode, theCreated, (this.created!= null));
}
{
Instant theIndexed;
theIndexed = this.getIndexed();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "indexed", theIndexed), currentHashCode, theIndexed, (this.indexed!= null));
}
{
DocumentReferenceStatus theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus, (this.status!= null));
}
{
CodeableConcept theDocStatus;
theDocStatus = this.getDocStatus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "docStatus", theDocStatus), currentHashCode, theDocStatus, (this.docStatus!= null));
}
{
List theRelatesTo;
theRelatesTo = (((this.relatesTo!= null)&&(!this.relatesTo.isEmpty()))?this.getRelatesTo():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "relatesTo", theRelatesTo), currentHashCode, theRelatesTo, ((this.relatesTo!= null)&&(!this.relatesTo.isEmpty())));
}
{
org.hl7.fhir.String theDescription;
theDescription = this.getDescription();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "description", theDescription), currentHashCode, theDescription, (this.description!= null));
}
{
List theSecurityLabel;
theSecurityLabel = (((this.securityLabel!= null)&&(!this.securityLabel.isEmpty()))?this.getSecurityLabel():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "securityLabel", theSecurityLabel), currentHashCode, theSecurityLabel, ((this.securityLabel!= null)&&(!this.securityLabel.isEmpty())));
}
{
List theContent;
theContent = (((this.content!= null)&&(!this.content.isEmpty()))?this.getContent():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "content", theContent), currentHashCode, theContent, ((this.content!= null)&&(!this.content.isEmpty())));
}
{
DocumentReferenceContext theContext;
theContext = this.getContext();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "context", theContext), currentHashCode, theContext, (this.context!= null));
}
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);
{
Identifier theMasterIdentifier;
theMasterIdentifier = this.getMasterIdentifier();
strategy.appendField(locator, this, "masterIdentifier", buffer, theMasterIdentifier, (this.masterIdentifier!= null));
}
{
List theIdentifier;
theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null);
strategy.appendField(locator, this, "identifier", buffer, theIdentifier, ((this.identifier!= null)&&(!this.identifier.isEmpty())));
}
{
Reference theSubject;
theSubject = this.getSubject();
strategy.appendField(locator, this, "subject", buffer, theSubject, (this.subject!= null));
}
{
CodeableConcept theType;
theType = this.getType();
strategy.appendField(locator, this, "type", buffer, theType, (this.type!= null));
}
{
CodeableConcept theClazz;
theClazz = this.getClazz();
strategy.appendField(locator, this, "clazz", buffer, theClazz, (this.clazz!= null));
}
{
List theAuthor;
theAuthor = (((this.author!= null)&&(!this.author.isEmpty()))?this.getAuthor():null);
strategy.appendField(locator, this, "author", buffer, theAuthor, ((this.author!= null)&&(!this.author.isEmpty())));
}
{
Reference theCustodian;
theCustodian = this.getCustodian();
strategy.appendField(locator, this, "custodian", buffer, theCustodian, (this.custodian!= null));
}
{
Reference theAuthenticator;
theAuthenticator = this.getAuthenticator();
strategy.appendField(locator, this, "authenticator", buffer, theAuthenticator, (this.authenticator!= null));
}
{
DateTime theCreated;
theCreated = this.getCreated();
strategy.appendField(locator, this, "created", buffer, theCreated, (this.created!= null));
}
{
Instant theIndexed;
theIndexed = this.getIndexed();
strategy.appendField(locator, this, "indexed", buffer, theIndexed, (this.indexed!= null));
}
{
DocumentReferenceStatus theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus, (this.status!= null));
}
{
CodeableConcept theDocStatus;
theDocStatus = this.getDocStatus();
strategy.appendField(locator, this, "docStatus", buffer, theDocStatus, (this.docStatus!= null));
}
{
List theRelatesTo;
theRelatesTo = (((this.relatesTo!= null)&&(!this.relatesTo.isEmpty()))?this.getRelatesTo():null);
strategy.appendField(locator, this, "relatesTo", buffer, theRelatesTo, ((this.relatesTo!= null)&&(!this.relatesTo.isEmpty())));
}
{
org.hl7.fhir.String theDescription;
theDescription = this.getDescription();
strategy.appendField(locator, this, "description", buffer, theDescription, (this.description!= null));
}
{
List theSecurityLabel;
theSecurityLabel = (((this.securityLabel!= null)&&(!this.securityLabel.isEmpty()))?this.getSecurityLabel():null);
strategy.appendField(locator, this, "securityLabel", buffer, theSecurityLabel, ((this.securityLabel!= null)&&(!this.securityLabel.isEmpty())));
}
{
List theContent;
theContent = (((this.content!= null)&&(!this.content.isEmpty()))?this.getContent():null);
strategy.appendField(locator, this, "content", buffer, theContent, ((this.content!= null)&&(!this.content.isEmpty())));
}
{
DocumentReferenceContext theContext;
theContext = this.getContext();
strategy.appendField(locator, this, "context", buffer, theContext, (this.context!= null));
}
return buffer;
}
public void setIdentifier(List value) {
this.identifier = value;
}
public void setAuthor(List value) {
this.author = value;
}
public void setRelatesTo(List value) {
this.relatesTo = value;
}
public void setSecurityLabel(List value) {
this.securityLabel = value;
}
public void setContent(List value) {
this.content = value;
}
}