use of org.hl7.fhir.r4.model.Procedure.ProcedureStatus in project odm2fhir by num-codex.
the class RespiratoryTherapies method createProcedure.
private Procedure createProcedure(ItemData generalCoding, ItemData answerCoding) {
var procedure = (Procedure) new Procedure().addIdentifier(createIdentifier(PROCEDURE, generalCoding)).setPerformed(// TODO Set actual DateTime value
UNKNOWN_DATE_TIME).setCategory(createCodeableConcept(createCoding(SNOMED_CT, "277132007", "Therapeutic procedure (procedure)"))).setMeta(createMeta(RESPIRATORY_THERAPIES));
createCodings(answerCoding).stream().map(Coding::getCode).filter(code -> equalsAny(code, INPROGRESS.toCode(), NOTDONE.toCode(), ProcedureStatus.UNKNOWN.toCode())).map(ProcedureStatus::fromCode).forEach(procedure::setStatus);
var codeableConcept = createCodeableConcept(generalCoding);
return codeableConcept.isEmpty() ? new Procedure() : procedure.setCode(codeableConcept);
}
Aggregations