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); } }
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; }