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 }
tgt.addParticipant(convertEncounterParticipantComponent(t)); tgt.setAppointment(convertReference(src.getAppointment())); tgt.setPeriod(convertPeriod(src.getPeriod())); tgt.setLength(convertDuration(src.getLength())); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason())
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 }
case -892481550: return getStatusElement(); case -986695614: return addStatusHistory(); case 94742904: return getClass_(); case 962575356: return addClassHistory(); case 3575610: return addType(); case -1165461084: return getPriority(); case -1867885268: return getSubject(); case -1892140189: return addEpisodeOfCare(); case -1258204701: return addIncomingReferral(); case 767422259: return addParticipant(); case -1474995297: return getAppointment(); case -991726143: return getPeriod(); case -1106363674: return getLength(); case -934964668: return addReason(); case 1196993265: return addDiagnosis(); case -1177318867: return addAccount(); case 1057894634: return getHospitalization(); case 1901043637: return addLocation(); case 243182534: return getServiceProvider(); case -995410646: return getPartOf(); default: return super.makeProperty(hash, name); } } @Override public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { case -1618432855: /*identifier*/ return new String[] {"Identifier"};
tgt.addParticipant(convertEncounterParticipantComponent(t)); tgt.setAppointment(convertReference(src.getAppointment())); tgt.setPeriod(convertPeriod(src.getPeriod())); tgt.setLength(convertDuration(src.getLength())); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason())