org.somda.sdc.biceps.model.participant.ClinicalInfo Maven / Gradle / Ivy
Show all versions of biceps-model Show documentation
package org.somda.sdc.biceps.model.participant;
import java.util.ArrayList;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlEnum;
import jakarta.xml.bind.annotation.XmlEnumValue;
import jakarta.xml.bind.annotation.XmlType;
import org.jetbrains.annotations.Nullable;
import org.jvnet.jaxb.lang.CopyStrategy;
import org.jvnet.jaxb.lang.CopyTo;
import org.jvnet.jaxb.lang.JAXBCopyStrategy;
import org.jvnet.jaxb.lang.JAXBToStringStrategy;
import org.jvnet.jaxb.lang.ToString;
import org.jvnet.jaxb.lang.ToStringStrategy;
import org.jvnet.jaxb.locator.ObjectLocator;
import org.jvnet.jaxb.locator.util.LocatorUtils;
import org.somda.sdc.biceps.model.extension.ExtensionType;
/**
* This type describes a minimal clinical observation.
*
* Java class for ClinicalInfo complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ClinicalInfo", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = {
"extension",
"type",
"code",
"criticality",
"description",
"relatedMeasurement"
})
public class ClinicalInfo implements Cloneable, CopyTo, ToString
{
@XmlElement(name = "Extension", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/extension")
protected ExtensionType extension;
/**
* Type of clinical information, e.g., allergy, intolerance, clinical condition, diagnosis, problem, etc.
*
*/
@XmlElement(name = "Type", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
protected CodedValue type;
/**
* Code that specifies the kind of the type of observation, e.g., a specific allergy or a specific diagnosis.
*
*/
@XmlElement(name = "Code", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
protected CodedValue code;
/**
* Potential clinical harm if this clinical information is not considered while treating the patient. The implied value SHALL be "Lo".
*
*/
@XmlElement(name = "Criticality", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
protected ClinicalInfo.Criticality criticality;
/**
* List of possible (localized) free text descriptions of the clinical information.
*
* If a pm:CodedValue for this clinical information is available, it is encouraged to be set as pm:ClinicalInfo/pm:Code.
*
*/
@XmlElement(name = "Description", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
protected List description;
/**
* Related measurements for this clinical observation if applicable.
*
*/
@XmlElement(name = "RelatedMeasurement", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
protected List relatedMeasurement;
/**
* Gets the value of the extension property.
*
* @return
* possible object is
* {@link ExtensionType }
*
*/
@Nullable
public ExtensionType getExtension() {
return extension;
}
/**
* Sets the value of the extension property.
*
* @param value
* allowed object is
* {@link ExtensionType }
*
*/
public void setExtension(
@Nullable
ExtensionType value) {
this.extension = value;
}
/**
* Type of clinical information, e.g., allergy, intolerance, clinical condition, diagnosis, problem, etc.
*
* @return
* possible object is
* {@link CodedValue }
*
*/
@Nullable
public CodedValue getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link CodedValue }
*
* @see #getType()
*/
public void setType(
@Nullable
CodedValue value) {
this.type = value;
}
/**
* Code that specifies the kind of the type of observation, e.g., a specific allergy or a specific diagnosis.
*
* @return
* possible object is
* {@link CodedValue }
*
*/
@Nullable
public CodedValue getCode() {
return code;
}
/**
* Sets the value of the code property.
*
* @param value
* allowed object is
* {@link CodedValue }
*
* @see #getCode()
*/
public void setCode(
@Nullable
CodedValue value) {
this.code = value;
}
/**
* Potential clinical harm if this clinical information is not considered while treating the patient. The implied value SHALL be "Lo".
*
* @return
* possible object is
* {@link ClinicalInfo.Criticality }
*
*/
@Nullable
public ClinicalInfo.Criticality getCriticality() {
return criticality;
}
/**
* Sets the value of the criticality property.
*
* @param value
* allowed object is
* {@link ClinicalInfo.Criticality }
*
* @see #getCriticality()
*/
public void setCriticality(
@Nullable
ClinicalInfo.Criticality value) {
this.criticality = value;
}
/**
* List of possible (localized) free text descriptions of the clinical information.
*
* If a pm:CodedValue for this clinical information is available, it is encouraged to be set as pm:ClinicalInfo/pm:Code.
*
* Gets the value of the description 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 description property.
*
*
* For example, to add a new item, do as follows:
*
*
* getDescription().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link LocalizedText }
*
*
*
* @return
* The value of the description property.
*/
public List getDescription() {
if (description == null) {
description = new ArrayList<>();
}
return this.description;
}
/**
* Related measurements for this clinical observation if applicable.
*
* Gets the value of the relatedMeasurement 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 relatedMeasurement property.
*
*
* For example, to add a new item, do as follows:
*
*
* getRelatedMeasurement().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link ClinicalInfo.RelatedMeasurement }
*
*
*
* @return
* The value of the relatedMeasurement property.
*/
public List getRelatedMeasurement() {
if (relatedMeasurement == null) {
relatedMeasurement = new ArrayList<>();
}
return this.relatedMeasurement;
}
public void setDescription(
@Nullable
List value) {
this.description = null;
if (value!= null) {
List draftl = this.getDescription();
draftl.addAll(value);
}
}
public void setRelatedMeasurement(
@Nullable
List value) {
this.relatedMeasurement = null;
if (value!= null) {
List draftl = this.getRelatedMeasurement();
draftl.addAll(value);
}
}
@Override
public boolean equals(Object object) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final ClinicalInfo that = ((ClinicalInfo) object);
{
ExtensionType leftExtension;
leftExtension = this.getExtension();
ExtensionType rightExtension;
rightExtension = that.getExtension();
if (this.extension!= null) {
if (that.extension!= null) {
if (!leftExtension.equals(rightExtension)) {
return false;
}
} else {
return false;
}
} else {
if (that.extension!= null) {
return false;
}
}
}
{
CodedValue leftType;
leftType = this.getType();
CodedValue rightType;
rightType = that.getType();
if (this.type!= null) {
if (that.type!= null) {
if (!leftType.equals(rightType)) {
return false;
}
} else {
return false;
}
} else {
if (that.type!= null) {
return false;
}
}
}
{
CodedValue leftCode;
leftCode = this.getCode();
CodedValue rightCode;
rightCode = that.getCode();
if (this.code!= null) {
if (that.code!= null) {
if (!leftCode.equals(rightCode)) {
return false;
}
} else {
return false;
}
} else {
if (that.code!= null) {
return false;
}
}
}
{
ClinicalInfo.Criticality leftCriticality;
leftCriticality = this.getCriticality();
ClinicalInfo.Criticality rightCriticality;
rightCriticality = that.getCriticality();
if (this.criticality!= null) {
if (that.criticality!= null) {
if (!leftCriticality.equals(rightCriticality)) {
return false;
}
} else {
return false;
}
} else {
if (that.criticality!= null) {
return false;
}
}
}
{
List leftDescription;
leftDescription = (((this.description!= null)&&(!this.description.isEmpty()))?this.getDescription():null);
List rightDescription;
rightDescription = (((that.description!= null)&&(!that.description.isEmpty()))?that.getDescription():null);
if ((this.description!= null)&&(!this.description.isEmpty())) {
if ((that.description!= null)&&(!that.description.isEmpty())) {
if (!leftDescription.equals(rightDescription)) {
return false;
}
} else {
return false;
}
} else {
if ((that.description!= null)&&(!that.description.isEmpty())) {
return false;
}
}
}
{
List leftRelatedMeasurement;
leftRelatedMeasurement = (((this.relatedMeasurement!= null)&&(!this.relatedMeasurement.isEmpty()))?this.getRelatedMeasurement():null);
List rightRelatedMeasurement;
rightRelatedMeasurement = (((that.relatedMeasurement!= null)&&(!that.relatedMeasurement.isEmpty()))?that.getRelatedMeasurement():null);
if ((this.relatedMeasurement!= null)&&(!this.relatedMeasurement.isEmpty())) {
if ((that.relatedMeasurement!= null)&&(!that.relatedMeasurement.isEmpty())) {
if (!leftRelatedMeasurement.equals(rightRelatedMeasurement)) {
return false;
}
} else {
return false;
}
} else {
if ((that.relatedMeasurement!= null)&&(!that.relatedMeasurement.isEmpty())) {
return false;
}
}
}
return true;
}
@Override
public int hashCode() {
int currentHashCode = 1;
{
currentHashCode = (currentHashCode* 31);
ExtensionType theExtension;
theExtension = this.getExtension();
if (this.extension!= null) {
currentHashCode += theExtension.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
CodedValue theType;
theType = this.getType();
if (this.type!= null) {
currentHashCode += theType.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
CodedValue theCode;
theCode = this.getCode();
if (this.code!= null) {
currentHashCode += theCode.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
ClinicalInfo.Criticality theCriticality;
theCriticality = this.getCriticality();
if (this.criticality!= null) {
currentHashCode += theCriticality.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
List theDescription;
theDescription = (((this.description!= null)&&(!this.description.isEmpty()))?this.getDescription():null);
if ((this.description!= null)&&(!this.description.isEmpty())) {
currentHashCode += theDescription.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
List theRelatedMeasurement;
theRelatedMeasurement = (((this.relatedMeasurement!= null)&&(!this.relatedMeasurement.isEmpty()))?this.getRelatedMeasurement():null);
if ((this.relatedMeasurement!= null)&&(!this.relatedMeasurement.isEmpty())) {
currentHashCode += theRelatedMeasurement.hashCode();
}
}
return currentHashCode;
}
@Override
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
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;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
{
ExtensionType theExtension;
theExtension = this.getExtension();
strategy.appendField(locator, this, "extension", buffer, theExtension, (this.extension!= null));
}
{
CodedValue theType;
theType = this.getType();
strategy.appendField(locator, this, "type", buffer, theType, (this.type!= null));
}
{
CodedValue theCode;
theCode = this.getCode();
strategy.appendField(locator, this, "code", buffer, theCode, (this.code!= null));
}
{
ClinicalInfo.Criticality theCriticality;
theCriticality = this.getCriticality();
strategy.appendField(locator, this, "criticality", buffer, theCriticality, (this.criticality!= null));
}
{
List theDescription;
theDescription = (((this.description!= null)&&(!this.description.isEmpty()))?this.getDescription():null);
strategy.appendField(locator, this, "description", buffer, theDescription, ((this.description!= null)&&(!this.description.isEmpty())));
}
{
List theRelatedMeasurement;
theRelatedMeasurement = (((this.relatedMeasurement!= null)&&(!this.relatedMeasurement.isEmpty()))?this.getRelatedMeasurement():null);
strategy.appendField(locator, this, "relatedMeasurement", buffer, theRelatedMeasurement, ((this.relatedMeasurement!= null)&&(!this.relatedMeasurement.isEmpty())));
}
return buffer;
}
@Override
public Object clone() {
return copyTo(createNewInstance());
}
@Override
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.getInstance();
return copyTo(null, target, strategy);
}
@Override
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof ClinicalInfo) {
final ClinicalInfo copy = ((ClinicalInfo) draftCopy);
{
Boolean extensionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.extension!= null));
if (extensionShouldBeCopiedAndSet == Boolean.TRUE) {
ExtensionType sourceExtension;
sourceExtension = this.getExtension();
ExtensionType copyExtension = ((ExtensionType) strategy.copy(LocatorUtils.property(locator, "extension", sourceExtension), sourceExtension, (this.extension!= null)));
copy.setExtension(copyExtension);
} else {
if (extensionShouldBeCopiedAndSet == Boolean.FALSE) {
copy.extension = null;
}
}
}
{
Boolean typeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.type!= null));
if (typeShouldBeCopiedAndSet == Boolean.TRUE) {
CodedValue sourceType;
sourceType = this.getType();
CodedValue copyType = ((CodedValue) strategy.copy(LocatorUtils.property(locator, "type", sourceType), sourceType, (this.type!= null)));
copy.setType(copyType);
} else {
if (typeShouldBeCopiedAndSet == Boolean.FALSE) {
copy.type = null;
}
}
}
{
Boolean codeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.code!= null));
if (codeShouldBeCopiedAndSet == Boolean.TRUE) {
CodedValue sourceCode;
sourceCode = this.getCode();
CodedValue copyCode = ((CodedValue) strategy.copy(LocatorUtils.property(locator, "code", sourceCode), sourceCode, (this.code!= null)));
copy.setCode(copyCode);
} else {
if (codeShouldBeCopiedAndSet == Boolean.FALSE) {
copy.code = null;
}
}
}
{
Boolean criticalityShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.criticality!= null));
if (criticalityShouldBeCopiedAndSet == Boolean.TRUE) {
ClinicalInfo.Criticality sourceCriticality;
sourceCriticality = this.getCriticality();
ClinicalInfo.Criticality copyCriticality = ((ClinicalInfo.Criticality) strategy.copy(LocatorUtils.property(locator, "criticality", sourceCriticality), sourceCriticality, (this.criticality!= null)));
copy.setCriticality(copyCriticality);
} else {
if (criticalityShouldBeCopiedAndSet == Boolean.FALSE) {
copy.criticality = null;
}
}
}
{
Boolean descriptionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.description!= null)&&(!this.description.isEmpty())));
if (descriptionShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceDescription;
sourceDescription = (((this.description!= null)&&(!this.description.isEmpty()))?this.getDescription():null);
@SuppressWarnings("unchecked")
List copyDescription = ((List ) strategy.copy(LocatorUtils.property(locator, "description", sourceDescription), sourceDescription, ((this.description!= null)&&(!this.description.isEmpty()))));
copy.setDescription(copyDescription);
} else {
if (descriptionShouldBeCopiedAndSet == Boolean.FALSE) {
copy.description = null;
}
}
}
{
Boolean relatedMeasurementShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.relatedMeasurement!= null)&&(!this.relatedMeasurement.isEmpty())));
if (relatedMeasurementShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceRelatedMeasurement;
sourceRelatedMeasurement = (((this.relatedMeasurement!= null)&&(!this.relatedMeasurement.isEmpty()))?this.getRelatedMeasurement():null);
@SuppressWarnings("unchecked")
List copyRelatedMeasurement = ((List ) strategy.copy(LocatorUtils.property(locator, "relatedMeasurement", sourceRelatedMeasurement), sourceRelatedMeasurement, ((this.relatedMeasurement!= null)&&(!this.relatedMeasurement.isEmpty()))));
copy.setRelatedMeasurement(copyRelatedMeasurement);
} else {
if (relatedMeasurementShouldBeCopiedAndSet == Boolean.FALSE) {
copy.relatedMeasurement = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new ClinicalInfo();
}
/**
* Java class for null
.
*
* The following schema fragment specifies the expected content contained within this class.
* {@code
*
*
*
*
*
*
* }
*
*/
@XmlType(name = "")
@XmlEnum
public enum Criticality {
/**
* Lo = Low. Non-compliance does not result in a severe, life-threatening, or fatal situation.
*
*/
@XmlEnumValue("Lo")
LO("Lo"),
/**
* Hi = High. Non-compliance might result in a severe, life-threatening, or fatal situation.
*
*/
@XmlEnumValue("Hi")
HI("Hi");
private final String value;
Criticality(String v) {
value = v;
}
/**
* Gets the value associated to the enum constant.
*
* @return
* The value linked to the enum.
*/
public String value() {
return value;
}
/**
* Gets the enum associated to the value passed as parameter.
*
* @param v
* The value to get the enum from.
* @return
* The enum which corresponds to the value, if it exists.
* @throws IllegalArgumentException
* If no value matches in the enum declaration.
*/
public static ClinicalInfo.Criticality fromValue(String v) {
for (ClinicalInfo.Criticality c: ClinicalInfo.Criticality.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
/**
* Java class for anonymous complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"value",
"referenceRange"
})
public static class RelatedMeasurement implements Cloneable, CopyTo, ToString
{
/**
* The related measurement's value.
*
*/
@XmlElement(name = "Value", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", required = true)
protected Measurement value;
/**
* Representation of the normal or abnormal reference range for the measurement.
*
*/
@XmlElement(name = "ReferenceRange", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
protected List referenceRange;
/**
* Validity of the related measurement. See also pm:MeasurementValidity.
*
*/
@XmlAttribute(name = "Validity")
protected MeasurementValidity validity;
/**
* The related measurement's value.
*
* @return
* possible object is
* {@link Measurement }
*
*/
public Measurement getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link Measurement }
*
* @see #getValue()
*/
public void setValue(Measurement value) {
this.value = value;
}
/**
* Representation of the normal or abnormal reference range for the measurement.
*
* Gets the value of the referenceRange 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 referenceRange property.
*
*
* For example, to add a new item, do as follows:
*
*
* getReferenceRange().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link ClinicalInfo.RelatedMeasurement.ReferenceRange }
*
*
*
* @return
* The value of the referenceRange property.
*/
public List getReferenceRange() {
if (referenceRange == null) {
referenceRange = new ArrayList<>();
}
return this.referenceRange;
}
/**
* Validity of the related measurement. See also pm:MeasurementValidity.
*
* @return
* possible object is
* {@link MeasurementValidity }
*
*/
@Nullable
public MeasurementValidity getValidity() {
return validity;
}
/**
* Sets the value of the validity property.
*
* @param value
* allowed object is
* {@link MeasurementValidity }
*
* @see #getValidity()
*/
public void setValidity(
@Nullable
MeasurementValidity value) {
this.validity = value;
}
public void setReferenceRange(
@Nullable
List value) {
this.referenceRange = null;
if (value!= null) {
List draftl = this.getReferenceRange();
draftl.addAll(value);
}
}
@Override
public boolean equals(Object object) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final ClinicalInfo.RelatedMeasurement that = ((ClinicalInfo.RelatedMeasurement) object);
{
Measurement leftValue;
leftValue = this.getValue();
Measurement rightValue;
rightValue = that.getValue();
if (this.value!= null) {
if (that.value!= null) {
if (!leftValue.equals(rightValue)) {
return false;
}
} else {
return false;
}
} else {
if (that.value!= null) {
return false;
}
}
}
{
List leftReferenceRange;
leftReferenceRange = (((this.referenceRange!= null)&&(!this.referenceRange.isEmpty()))?this.getReferenceRange():null);
List rightReferenceRange;
rightReferenceRange = (((that.referenceRange!= null)&&(!that.referenceRange.isEmpty()))?that.getReferenceRange():null);
if ((this.referenceRange!= null)&&(!this.referenceRange.isEmpty())) {
if ((that.referenceRange!= null)&&(!that.referenceRange.isEmpty())) {
if (!leftReferenceRange.equals(rightReferenceRange)) {
return false;
}
} else {
return false;
}
} else {
if ((that.referenceRange!= null)&&(!that.referenceRange.isEmpty())) {
return false;
}
}
}
{
MeasurementValidity leftValidity;
leftValidity = this.getValidity();
MeasurementValidity rightValidity;
rightValidity = that.getValidity();
if (this.validity!= null) {
if (that.validity!= null) {
if (!leftValidity.equals(rightValidity)) {
return false;
}
} else {
return false;
}
} else {
if (that.validity!= null) {
return false;
}
}
}
return true;
}
@Override
public int hashCode() {
int currentHashCode = 1;
{
currentHashCode = (currentHashCode* 31);
Measurement theValue;
theValue = this.getValue();
if (this.value!= null) {
currentHashCode += theValue.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
List theReferenceRange;
theReferenceRange = (((this.referenceRange!= null)&&(!this.referenceRange.isEmpty()))?this.getReferenceRange():null);
if ((this.referenceRange!= null)&&(!this.referenceRange.isEmpty())) {
currentHashCode += theReferenceRange.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
MeasurementValidity theValidity;
theValidity = this.getValidity();
if (this.validity!= null) {
currentHashCode += theValidity.hashCode();
}
}
return currentHashCode;
}
@Override
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
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;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
{
Measurement theValue;
theValue = this.getValue();
strategy.appendField(locator, this, "value", buffer, theValue, (this.value!= null));
}
{
List theReferenceRange;
theReferenceRange = (((this.referenceRange!= null)&&(!this.referenceRange.isEmpty()))?this.getReferenceRange():null);
strategy.appendField(locator, this, "referenceRange", buffer, theReferenceRange, ((this.referenceRange!= null)&&(!this.referenceRange.isEmpty())));
}
{
MeasurementValidity theValidity;
theValidity = this.getValidity();
strategy.appendField(locator, this, "validity", buffer, theValidity, (this.validity!= null));
}
return buffer;
}
@Override
public Object clone() {
return copyTo(createNewInstance());
}
@Override
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.getInstance();
return copyTo(null, target, strategy);
}
@Override
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof ClinicalInfo.RelatedMeasurement) {
final ClinicalInfo.RelatedMeasurement copy = ((ClinicalInfo.RelatedMeasurement) draftCopy);
{
Boolean valueShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.value!= null));
if (valueShouldBeCopiedAndSet == Boolean.TRUE) {
Measurement sourceValue;
sourceValue = this.getValue();
Measurement copyValue = ((Measurement) strategy.copy(LocatorUtils.property(locator, "value", sourceValue), sourceValue, (this.value!= null)));
copy.setValue(copyValue);
} else {
if (valueShouldBeCopiedAndSet == Boolean.FALSE) {
copy.value = null;
}
}
}
{
Boolean referenceRangeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.referenceRange!= null)&&(!this.referenceRange.isEmpty())));
if (referenceRangeShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceReferenceRange;
sourceReferenceRange = (((this.referenceRange!= null)&&(!this.referenceRange.isEmpty()))?this.getReferenceRange():null);
@SuppressWarnings("unchecked")
List copyReferenceRange = ((List ) strategy.copy(LocatorUtils.property(locator, "referenceRange", sourceReferenceRange), sourceReferenceRange, ((this.referenceRange!= null)&&(!this.referenceRange.isEmpty()))));
copy.setReferenceRange(copyReferenceRange);
} else {
if (referenceRangeShouldBeCopiedAndSet == Boolean.FALSE) {
copy.referenceRange = null;
}
}
}
{
Boolean validityShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.validity!= null));
if (validityShouldBeCopiedAndSet == Boolean.TRUE) {
MeasurementValidity sourceValidity;
sourceValidity = this.getValidity();
MeasurementValidity copyValidity = ((MeasurementValidity) strategy.copy(LocatorUtils.property(locator, "validity", sourceValidity), sourceValidity, (this.validity!= null)));
copy.setValidity(copyValidity);
} else {
if (validityShouldBeCopiedAndSet == Boolean.FALSE) {
copy.validity = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new ClinicalInfo.RelatedMeasurement();
}
/**
* Java class for anonymous complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"range",
"meaning"
})
public static class ReferenceRange implements Cloneable, CopyTo, ToString
{
/**
* Range that SHALL be populated at least with ./@Lower or ./@Upper.
*
*/
@XmlElement(name = "Range", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", required = true)
protected Range range;
/**
* Indicates the meaning of the reference range.
*
*/
@XmlElement(name = "Meaning", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
protected CodedValue meaning;
/**
* Range that SHALL be populated at least with ./@Lower or ./@Upper.
*
* @return
* possible object is
* {@link Range }
*
*/
public Range getRange() {
return range;
}
/**
* Sets the value of the range property.
*
* @param value
* allowed object is
* {@link Range }
*
* @see #getRange()
*/
public void setRange(Range value) {
this.range = value;
}
/**
* Indicates the meaning of the reference range.
*
* @return
* possible object is
* {@link CodedValue }
*
*/
@Nullable
public CodedValue getMeaning() {
return meaning;
}
/**
* Sets the value of the meaning property.
*
* @param value
* allowed object is
* {@link CodedValue }
*
* @see #getMeaning()
*/
public void setMeaning(
@Nullable
CodedValue value) {
this.meaning = value;
}
@Override
public boolean equals(Object object) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final ClinicalInfo.RelatedMeasurement.ReferenceRange that = ((ClinicalInfo.RelatedMeasurement.ReferenceRange) object);
{
Range leftRange;
leftRange = this.getRange();
Range rightRange;
rightRange = that.getRange();
if (this.range!= null) {
if (that.range!= null) {
if (!leftRange.equals(rightRange)) {
return false;
}
} else {
return false;
}
} else {
if (that.range!= null) {
return false;
}
}
}
{
CodedValue leftMeaning;
leftMeaning = this.getMeaning();
CodedValue rightMeaning;
rightMeaning = that.getMeaning();
if (this.meaning!= null) {
if (that.meaning!= null) {
if (!leftMeaning.equals(rightMeaning)) {
return false;
}
} else {
return false;
}
} else {
if (that.meaning!= null) {
return false;
}
}
}
return true;
}
@Override
public int hashCode() {
int currentHashCode = 1;
{
currentHashCode = (currentHashCode* 31);
Range theRange;
theRange = this.getRange();
if (this.range!= null) {
currentHashCode += theRange.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
CodedValue theMeaning;
theMeaning = this.getMeaning();
if (this.meaning!= null) {
currentHashCode += theMeaning.hashCode();
}
}
return currentHashCode;
}
@Override
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
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;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
{
Range theRange;
theRange = this.getRange();
strategy.appendField(locator, this, "range", buffer, theRange, (this.range!= null));
}
{
CodedValue theMeaning;
theMeaning = this.getMeaning();
strategy.appendField(locator, this, "meaning", buffer, theMeaning, (this.meaning!= null));
}
return buffer;
}
@Override
public Object clone() {
return copyTo(createNewInstance());
}
@Override
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.getInstance();
return copyTo(null, target, strategy);
}
@Override
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof ClinicalInfo.RelatedMeasurement.ReferenceRange) {
final ClinicalInfo.RelatedMeasurement.ReferenceRange copy = ((ClinicalInfo.RelatedMeasurement.ReferenceRange) draftCopy);
{
Boolean rangeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.range!= null));
if (rangeShouldBeCopiedAndSet == Boolean.TRUE) {
Range sourceRange;
sourceRange = this.getRange();
Range copyRange = ((Range) strategy.copy(LocatorUtils.property(locator, "range", sourceRange), sourceRange, (this.range!= null)));
copy.setRange(copyRange);
} else {
if (rangeShouldBeCopiedAndSet == Boolean.FALSE) {
copy.range = null;
}
}
}
{
Boolean meaningShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.meaning!= null));
if (meaningShouldBeCopiedAndSet == Boolean.TRUE) {
CodedValue sourceMeaning;
sourceMeaning = this.getMeaning();
CodedValue copyMeaning = ((CodedValue) strategy.copy(LocatorUtils.property(locator, "meaning", sourceMeaning), sourceMeaning, (this.meaning!= null)));
copy.setMeaning(copyMeaning);
} else {
if (meaningShouldBeCopiedAndSet == Boolean.FALSE) {
copy.meaning = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new ClinicalInfo.RelatedMeasurement.ReferenceRange();
}
}
}
}