use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeClaimProcedureComponent.
protected void composeClaimProcedureComponent(Complex parent, String parentType, String name, Claim.ProcedureComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "procedure", name, element, index);
if (element.hasSequenceElement())
composePositiveInt(t, "Claim", "sequence", element.getSequenceElement(), -1);
if (element.hasDateElement())
composeDateTime(t, "Claim", "date", element.getDateElement(), -1);
if (element.hasProcedure())
composeType(t, "Claim", "procedure", element.getProcedure(), -1);
}
use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeExplanationOfBenefitProcedureComponent.
protected void composeExplanationOfBenefitProcedureComponent(Complex parent, String parentType, String name, ExplanationOfBenefit.ProcedureComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "procedure", name, element, index);
if (element.hasSequenceElement())
composePositiveInt(t, "ExplanationOfBenefit", "sequence", element.getSequenceElement(), -1);
for (int i = 0; i < element.getType().size(); i++) composeCodeableConcept(t, "ExplanationOfBenefit", "type", element.getType().get(i), i);
if (element.hasDateElement())
composeDateTime(t, "ExplanationOfBenefit", "date", element.getDateElement(), -1);
if (element.hasProcedure())
composeType(t, "ExplanationOfBenefit", "procedure", element.getProcedure(), -1);
for (int i = 0; i < element.getUdi().size(); i++) composeReference(t, "ExplanationOfBenefit", "udi", element.getUdi().get(i), i);
}
use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent.
protected void composeMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent(Complex parent, String parentType, String name, MedicinalProductAuthorization.MedicinalProductAuthorizationProcedureComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "procedure", name, element, index);
if (element.hasIdentifier())
composeIdentifier(t, "MedicinalProductAuthorization", "identifier", element.getIdentifier(), -1);
if (element.hasType())
composeCodeableConcept(t, "MedicinalProductAuthorization", "type", element.getType(), -1);
if (element.hasDate())
composeType(t, "MedicinalProductAuthorization", "date", element.getDate(), -1);
for (int i = 0; i < element.getApplication().size(); i++) composeMedicinalProductAuthorizationMedicinalProductAuthorizationProcedureComponent(t, "MedicinalProductAuthorization", "application", element.getApplication().get(i), i);
}
use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project org.hl7.fhir.core by hapifhir.
the class ArgonautConverter method processProcedureSection.
private void processProcedureSection(CDAUtilities cda, Convert convert, Element sect, Context context) throws Exception {
scanSection("Procedures", sect);
ListResource list = new ListResource();
list.setId(context.getBaseId() + "-list-procedures");
// list.setUserData("profile", "") none?
list.setSubject(context.getSubjectRef());
list.setCode(inspectCode(convert.makeCodeableConceptFromCD(cda.getChild(sect, "code")), null));
list.setTitle(cda.getChild(sect, "title").getTextContent());
list.setStatus(ListStatus.CURRENT);
list.setMode(ListMode.SNAPSHOT);
list.setDateElement(context.getNow());
list.setSource(context.getAuthorRef());
buildNarrative(list, cda.getChild(sect, "text"));
int i = 0;
for (Element c : cda.getChildren(sect, "entry")) {
Element p = cda.getChild(c, "procedure");
Procedure proc = new Procedure();
proc.setId(context.getBaseId() + "-procedure-" + i);
proc.setUserData("profile", "http://hl7.org/fhir/StructureDefinition/procedure-daf-dafprocedure");
i++;
proc.setSubject(context.getSubjectRef());
proc.setContext(new Reference().setReference("Encounter/" + context.getEncounter().getId()));
list.addEntry().setItem(new Reference().setReference("Procedure/" + proc.getId()));
proc.setCode(inspectCode(convert.makeCodeableConceptFromCD(cda.getChild(p, "code")), null));
recordProcedureCode(proc.getCode());
for (Element e : cda.getChildren(p, "id")) proc.getIdentifier().add(convert.makeIdentifierFromII(e));
proc.setStatus(determineProcedureStatus(cda.getChild(p, "statusCode")));
buildNarrative(proc, cda.getChild(p, "text"));
proc.setPerformed(convert.makeDateTimeFromTS(cda.getChild(p, "effectiveTime")));
for (Element e : cda.getChildren(p, "performer")) {
ProcedurePerformerComponent part = proc.addPerformer();
Practitioner pp = processPerformer(cda, convert, context, e, "assignedEntity", "assignedPerson");
Reference ref = new Reference().setReference("Practitioner/" + pp.getId()).setDisplay(pp.getUserString("display"));
part.setActor(ref);
}
saveResource(proc);
}
saveResource(list);
}
use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project org.hl7.fhir.core by hapifhir.
the class CCDAConverter method processProceduresSection.
protected SectionComponent processProceduresSection(Element section) throws Exception {
ListResource list = new ListResource();
for (Element entry : cda.getChildren(section, "entry")) {
Element procedure = cda.getlastChild(entry);
if (cda.hasTemplateId(procedure, "2.16.840.1.113883.10.20.22.4.14")) {
processProcedure(list, procedure, ProcedureType.Procedure);
} else if (cda.hasTemplateId(procedure, "2.16.840.1.113883.10.20.22.4.13")) {
processProcedure(list, procedure, ProcedureType.Observation);
} else if (cda.hasTemplateId(procedure, "2.16.840.1.113883.10.20.22.4.12")) {
processProcedure(list, procedure, ProcedureType.Act);
} else
throw new Exception("Unhandled Section template ids: " + cda.showTemplateIds(procedure));
}
// todo: text
SectionComponent s = new Composition.SectionComponent();
s.setCode(convert.makeCodeableConceptFromCD(cda.getChild(section, "code")));
// todo: check subject
s.addEntry(Factory.makeReference(addReference(list, "Procedures", makeUUIDReference())));
return s;
}
Aggregations