protected void makeDocument() throws Exception { composition = (Composition) ResourceFactory.createResource("Composition"); addReference(composition, "Composition", makeUUIDReference()); Element title = cda.getChild(doc, "title"); composition.setTitle(title.getTextContent()); if (cda.getChild(doc, "setId") != null) { feed.setId(convert.makeURIfromII(cda.getChild(doc, "id"))); composition.setIdentifier(convert.makeIdentifierFromII(cda.getChild(doc, "setId"))); } else composition.setIdentifier(convert.makeIdentifierFromII(cda.getChild(doc, "id"))); // well, we fall back to id composition.setDateElement(convert.makeDateTimeFromTS(cda.getChild(doc, "effectiveTime"))); composition.setType(convert.makeCodeableConceptFromCD(cda.getChild(doc, "code"))); composition.setConfidentiality(convertConfidentiality(cda.getChild(doc, "confidentialityCode"))); if (cda.getChild(doc, "confidentialityCode") != null) composition.setLanguage(cda.getChild(doc, "confidentialityCode").getAttribute("value")); // todo - fix streaming for this Element ee = cda.getChild(doc, "componentOf"); if (ee != null) ee = cda.getChild(ee, "encompassingEncounter"); if (ee != null) { Encounter visit = new Encounter(); for (Element e : cda.getChildren(ee, "id")) visit.getIdentifier().add(convert.makeIdentifierFromII(e)); visit.setPeriod(convert.makePeriodFromIVL(cda.getChild(ee, "effectiveTime"))); composition.getEvent().add(new Composition.CompositionEventComponent()); composition.getEvent().get(0).getCode().add(convert.makeCodeableConceptFromCD(cda.getChild(ee, "code"))); composition.getEvent().get(0).setPeriod(visit.getPeriod()); composition.getEvent().get(0).getDetail().add(Factory.makeReference(addReference(visit, "Encounter", makeUUIDReference()))); } // main todo: fill out the narrative, but before we can do that, we have to convert everything else }
if (getIdentifier().isEmpty()) { addIdentifier(); } return getIdentifier().get(0); } /** * @return {@link #status} (planned | arrived | triaged | in-progress | onleave | finished | cancelled +.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ public Enumeration<EncounterStatus> getStatusElement() {
} else if (name.equals("status")) { value = new EncounterStatusEnumFactory().fromType(castToCode(value)); this.status = (Enumeration) value; // Enumeration<EncounterStatus> } else if (name.equals("statusHistory")) { this.getStatusHistory().add((StatusHistoryComponent) value); } else if (name.equals("class")) {
org.hl7.fhir.instance.model.Encounter tgt = new org.hl7.fhir.instance.model.Encounter(); copyDomainResource(src, tgt); for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); tgt.setStatus(convertEncounterState(src.getStatus()));
case -892481550: // status value = new EncounterStatusEnumFactory().fromType(castToCode(value)); this.status = (Enumeration) value; // Enumeration<EncounterStatus> return value; case -986695614: // statusHistory
protected void makeDocument() throws Exception { composition = (Composition) ResourceFactory.createResource("Composition"); addReference(composition, "Composition", makeUUIDReference()); Element title = cda.getChild(doc, "title"); composition.setTitle(title.getTextContent()); if (cda.getChild(doc, "setId") != null) { feed.setId(convert.makeURIfromII(cda.getChild(doc, "id"))); composition.setIdentifier(convert.makeIdentifierFromII(cda.getChild(doc, "setId"))); } else composition.setIdentifier(convert.makeIdentifierFromII(cda.getChild(doc, "id"))); // well, we fall back to id composition.setDateElement(convert.makeDateTimeFromTS(cda.getChild(doc, "effectiveTime"))); composition.setType(convert.makeCodeableConceptFromCD(cda.getChild(doc, "code"))); composition.setConfidentiality(convertConfidentiality(cda.getChild(doc, "confidentialityCode"))); if (cda.getChild(doc, "confidentialityCode") != null) composition.setLanguage(cda.getChild(doc, "confidentialityCode").getAttribute("value")); // todo - fix streaming for this Element ee = cda.getChild(doc, "componentOf"); if (ee != null) ee = cda.getChild(ee, "encompassingEncounter"); if (ee != null) { Encounter visit = new Encounter(); for (Element e : cda.getChildren(ee, "id")) visit.getIdentifier().add(convert.makeIdentifierFromII(e)); visit.setPeriod(convert.makePeriodFromIVL(cda.getChild(ee, "effectiveTime"))); composition.getEvent().add(new Composition.CompositionEventComponent()); composition.getEvent().get(0).getCode().add(convert.makeCodeableConceptFromCD(cda.getChild(ee, "code"))); composition.getEvent().get(0).setPeriod(visit.getPeriod()); composition.getEvent().get(0).getDetail().add(Factory.makeReference(addReference(visit, "Encounter", makeUUIDReference()))); } // main todo: fill out the narrative, but before we can do that, we have to convert everything else }
org.hl7.fhir.instance.model.Encounter tgt = new org.hl7.fhir.instance.model.Encounter(); copyDomainResource(src, tgt); for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); tgt.setStatus(convertEncounterState(src.getStatus()));