public ObservationComponentComponent copy() { ObservationComponentComponent dst = new ObservationComponentComponent(); copyValues(dst); dst.code = code == null ? null : code.copy(); dst.value = value == null ? null : value.copy(); dst.dataAbsentReason = dataAbsentReason == null ? null : dataAbsentReason.copy(); dst.interpretation = interpretation == null ? null : interpretation.copy(); if (referenceRange != null) { dst.referenceRange = new ArrayList<ObservationReferenceRangeComponent>(); for (ObservationReferenceRangeComponent i : referenceRange) dst.referenceRange.add(i.copy()); }; return dst; }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("code")) { this.code = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("value[x]")) { this.value = castToType(value); // Type } else if (name.equals("dataAbsentReason")) { this.dataAbsentReason = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("interpretation")) { this.interpretation = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("referenceRange")) { this.getReferenceRange().add((ObservationReferenceRangeComponent) value); } else return super.setProperty(name, value); return value; }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case 3059181: // code this.code = castToCodeableConcept(value); // CodeableConcept return value; case 111972721: // value this.value = castToType(value); // Type return value; case 1034315687: // dataAbsentReason this.dataAbsentReason = castToCodeableConcept(value); // CodeableConcept return value; case -297950712: // interpretation this.interpretation = castToCodeableConcept(value); // CodeableConcept return value; case -1912545102: // referenceRange this.getReferenceRange().add((ObservationReferenceRangeComponent) value); // ObservationReferenceRangeComponent return value; default: return super.setProperty(hash, name, value); } }
public ObservationComponentComponent addComponent() { //3 ObservationComponentComponent t = new ObservationComponentComponent(); if (this.component == null) this.component = new ArrayList<ObservationComponentComponent>(); this.component.add(t); return t; }
public boolean hasComponent() { if (this.component == null) return false; for (ObservationComponentComponent item : this.component) if (!item.isEmpty()) return true; return false; }
@Override public boolean equalsDeep(Base other_) { if (!super.equalsDeep(other_)) return false; if (!(other_ instanceof ObservationComponentComponent)) return false; ObservationComponentComponent o = (ObservationComponentComponent) other_; return compareDeep(code, o.code, true) && compareDeep(value, o.value, true) && compareDeep(dataAbsentReason, o.dataAbsentReason, true) && compareDeep(interpretation, o.interpretation, true) && compareDeep(referenceRange, o.referenceRange, true) ; }
public org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.instance.model.Observation.ObservationComponentComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent tgt = new org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent(); copyElement(src, tgt); tgt.setCode(convertCodeableConcept(src.getCode())); tgt.setValue(convertType(src.getValue())); tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); for (org.hl7.fhir.instance.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); return tgt; }
/** * @return The first repetition of repeating field {@link #referenceRange}, creating it if it does not already exist */ public ObservationReferenceRangeComponent getReferenceRangeFirstRep() { if (getReferenceRange().isEmpty()) { addReferenceRange(); } return getReferenceRange().get(0); }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 3059181: return getCode(); case -1410166417: return getValue(); case 111972721: return getValue(); case 1034315687: return getDataAbsentReason(); case -297950712: return getInterpretation(); case -1912545102: return addReferenceRange(); default: return super.makeProperty(hash, name); } }
public org.hl7.fhir.instance.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Observation.ObservationComponentComponent tgt = new org.hl7.fhir.instance.model.Observation.ObservationComponentComponent(); copyElement(src, tgt); tgt.setCode(convertCodeableConcept(src.getCode())); tgt.setValue(convertType(src.getValue())); tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); for (org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); return tgt; }
public org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.instance.model.Observation.ObservationComponentComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent tgt = new org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent(); copyElement(src, tgt); tgt.setCode(convertCodeableConcept(src.getCode())); tgt.setValue(convertType(src.getValue())); tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); for (org.hl7.fhir.instance.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); return tgt; }
public org.hl7.fhir.instance.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Observation.ObservationComponentComponent tgt = new org.hl7.fhir.instance.model.Observation.ObservationComponentComponent(); copyElement(src, tgt); tgt.setCode(convertCodeableConcept(src.getCode())); tgt.setValue(convertType(src.getValue())); tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason())); for (org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) tgt.addReferenceRange(convertObservationReferenceRangeComponent(t)); return tgt; }