Skip to content

Commit

Permalink
Fixed map to only find observations matching the given patient in cas…
Browse files Browse the repository at this point in the history
…e there is more than one.
  • Loading branch information
lukeaduncan committed May 6, 2024
1 parent dc022af commit cf9dfce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion input/maps/HIVObservationHIVCondition.map
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ group HIVObservationHIVCondition(
src.entry as entry -> tgt.entry as tentry then {
entry.resource : Patient as patient -> tentry.resource = patient then {

src.entry as obsentry where resource.is(Observation) and resource.code.exists(coding.exists(system='https://openconceptlab.org/orgs/CIEL/sources/CIEL' and code='160540'))
src.entry as obsentry where resource.is(Observation) and resource.subject.exists(reference=("Patient/" & patient.id)) and resource.code.exists(coding.exists(system='https://openconceptlab.org/orgs/CIEL/sources/CIEL' and code='160540'))
-> tgt.entry as newentry, newentry.resource = create("Condition") as cond, uuid() as cid then {
obsentry.resource as obs -> newentry.fullUrl = ( "urn:uuid:" & cid ) then {
//obsentry -> newentry.resource = cond, cond.id = cid "setConditionRes";
Expand Down

0 comments on commit cf9dfce

Please sign in to comment.