public org.hl7.fhir.dstu3.model.Media convertMedia(org.hl7.fhir.instance.model.Media src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Media tgt = new org.hl7.fhir.dstu3.model.Media(); copyDomainResource(src, tgt); for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); tgt.setType(convertDigitalMediaType(src.getType())); tgt.setSubtype(convertCodeableConcept(src.getSubtype())); tgt.setView(convertCodeableConcept(src.getView())); tgt.setSubject(convertReference(src.getSubject())); tgt.setOperator(convertReference(src.getOperator())); tgt.getDevice().setDisplay(src.getDeviceName()); tgt.setHeight(src.getHeight()); tgt.setWidth(src.getWidth()); tgt.setFrames(src.getFrames()); tgt.setDuration(src.getDuration()); tgt.setContent(convertAttachment(src.getContent())); return tgt; }
public org.hl7.fhir.instance.model.Media convertMedia(org.hl7.fhir.dstu3.model.Media src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Media tgt = new org.hl7.fhir.instance.model.Media(); copyDomainResource(src, tgt); for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); tgt.setType(convertDigitalMediaType(src.getType())); tgt.setSubtype(convertCodeableConcept(src.getSubtype())); tgt.setView(convertCodeableConcept(src.getView())); tgt.setSubject(convertReference(src.getSubject())); tgt.setOperator(convertReference(src.getOperator())); tgt.setDeviceName(src.getDevice().getDisplay()); tgt.setHeight(src.getHeight()); tgt.setWidth(src.getWidth()); tgt.setFrames(src.getFrames()); tgt.setDuration(src.getDuration()); tgt.setContent(convertAttachment(src.getContent())); return tgt; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -1618432855: return addIdentifier(); case -332612366: return addBasedOn(); case 3575610: return getTypeElement(); case -1867567750: return getSubtype(); case 3619493: return getView(); case -1867885268: return getSubject(); case 951530927: return getContext(); case -2022646513: return getOccurrence(); case 1687874001: return getOccurrence(); case -500553564: return getOperator(); case 722137681: return addReasonCode(); case 1702620169: return getBodySite(); case -1335157162: return getDevice(); case -1221029593: return getHeightElement(); case 113126854: return getWidthElement(); case -1266514778: return getFramesElement(); case -1992012396: return getDurationElement(); case 951530617: return getContent(); case 3387378: return addNote(); default: return super.makeProperty(hash, name); } }
switch (hash) { case -1618432855: // identifier this.getIdentifier().add(castToIdentifier(value)); // Identifier return value; case -332612366: // basedOn this.getBasedOn().add(castToReference(value)); // Reference return value; case 3575610: // type value = new DigitalMediaTypeEnumFactory().fromType(castToCode(value)); this.type = (Enumeration) value; // Enumeration<DigitalMediaType> return value; case -1867567750: // subtype this.subtype = castToCodeableConcept(value); // CodeableConcept return value; case 3619493: // view this.view = castToCodeableConcept(value); // CodeableConcept return value; case -1867885268: // subject this.subject = castToReference(value); // Reference return value; case 951530927: // context this.context = castToReference(value); // Reference return value; case 1687874001: // occurrence this.occurrence = castToType(value); // Type return value; case -500553564: // operator this.operator = castToReference(value); // Reference return value;
/** * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist */ public Identifier getIdentifierFirstRep() { if (getIdentifier().isEmpty()) { addIdentifier(); } return getIdentifier().get(0); }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("identifier")) { return addIdentifier(); return addBasedOn(); return addReasonCode(); return addNote();
/** * @return {@link #link} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the image source.) */ public Media getLinkTarget() { if (this.linkTarget == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create DiagnosticReportImageComponent.link"); else if (Configuration.doAutoCreate()) this.linkTarget = new Media(); // aa return this.linkTarget; }
public Media copy() { Media dst = new Media(); copyValues(dst); if (identifier != null) { dst.identifier = new ArrayList<Identifier>();
/** * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist */ public Reference getBasedOnFirstRep() { if (getBasedOn().isEmpty()) { addBasedOn(); } return getBasedOn().get(0); }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("identifier")) { this.getIdentifier().add(castToIdentifier(value)); } else if (name.equals("basedOn")) { this.getBasedOn().add(castToReference(value)); } else if (name.equals("type")) { value = new DigitalMediaTypeEnumFactory().fromType(castToCode(value)); this.type = (Enumeration) value; // Enumeration<DigitalMediaType> } else if (name.equals("subtype")) { this.subtype = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("view")) { this.view = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("subject")) { this.subject = castToReference(value); // Reference } else if (name.equals("context")) { this.context = castToReference(value); // Reference } else if (name.equals("occurrence[x]")) { this.occurrence = castToType(value); // Type } else if (name.equals("operator")) { this.operator = castToReference(value); // Reference } else if (name.equals("reasonCode")) { this.getReasonCode().add(castToCodeableConcept(value)); } else if (name.equals("bodySite")) { this.bodySite = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("device")) { this.device = castToReference(value); // Reference } else if (name.equals("height")) { this.height = castToPositiveInt(value); // PositiveIntType } else if (name.equals("width")) {
return new VisionPrescription(); if ("Media".equals(name)) return new Media(); if ("ProcedureRequest".equals(name)) return new ProcedureRequest();
public org.hl7.fhir.instance.model.Media convertMedia(org.hl7.fhir.dstu3.model.Media src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Media tgt = new org.hl7.fhir.instance.model.Media(); copyDomainResource(src, tgt); for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); tgt.setType(convertDigitalMediaType(src.getType())); tgt.setSubtype(convertCodeableConcept(src.getSubtype())); tgt.setView(convertCodeableConcept(src.getView())); tgt.setSubject(convertReference(src.getSubject())); tgt.setOperator(convertReference(src.getOperator())); tgt.setDeviceName(src.getDevice().getDisplay()); tgt.setHeight(src.getHeight()); tgt.setWidth(src.getWidth()); tgt.setFrames(src.getFrames()); tgt.setDuration(src.getDuration()); tgt.setContent(convertAttachment(src.getContent())); return tgt; }
public org.hl7.fhir.dstu3.model.Media convertMedia(org.hl7.fhir.instance.model.Media src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Media tgt = new org.hl7.fhir.dstu3.model.Media(); copyDomainResource(src, tgt); for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); tgt.setType(convertDigitalMediaType(src.getType())); tgt.setSubtype(convertCodeableConcept(src.getSubtype())); tgt.setView(convertCodeableConcept(src.getView())); tgt.setSubject(convertReference(src.getSubject())); tgt.setOperator(convertReference(src.getOperator())); tgt.getDevice().setDisplay(src.getDeviceName()); tgt.setHeight(src.getHeight()); tgt.setWidth(src.getWidth()); tgt.setFrames(src.getFrames()); tgt.setDuration(src.getDuration()); tgt.setContent(convertAttachment(src.getContent())); return tgt; }
case -1691992770: return new Measure(); case 1681397778: return new MeasureReport(); case 74219460: return new Media(); case -302536977: return new Medication(); case -342579923: return new MedicationAdministration();