-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial cql and library for patient status prepopulation
- Loading branch information
Ariel Virgulto
committed
Aug 30, 2023
1 parent
5311f16
commit 06e9ef2
Showing
3 changed files
with
174 additions
and
10 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/cds-library/CRD-DTR/Turalio/R4/files/TuralioProgressNotePrepopulation-0.1.0.cql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
library TuralioProgressNotePrepopulation version '0.1.0' | ||
using FHIR version '4.0.0' | ||
include FHIRHelpers version '4.0.0' called FHIRHelpers | ||
|
||
context Patient | ||
|
||
define "AllDiagnoses": ActiveConfirmedDiagnoses([Condition]) | ||
|
||
define function ActiveConfirmedDiagnoses(CondList List<FHIR.Condition>): | ||
distinct( | ||
flatten( | ||
CondList C | ||
let DiagnosesCodings: | ||
(C.code.coding) CODING where CODING.system.value in { | ||
'http://hl7.org/fhir/sid/icd-10', | ||
'http://hl7.org/fhir/sid/icd-10-cm', | ||
'http://snomed.info/sct' | ||
} | ||
return FHIRHelpers.ToCode(CODING) | ||
where C.verificationStatus.coding.code = 'confirmed' | ||
and C.clinicalStatus.coding.code in {'active', 'relapse'} | ||
and exists(DiagnosesCodings) | ||
return DiagnosesCodings | ||
) | ||
) |
44 changes: 44 additions & 0 deletions
44
...-library/CRD-DTR/Turalio/R4/resources/Library-R4-Turalio-Progress-Note-prepopulation.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"resourceType": "Library", | ||
"id": "TuralioProgressNote-prepopulation", | ||
"url": "http://hl7.org/fhir/us/davinci-dtr/Library/TuralioProgressNote-prepopulation", | ||
"name": "TuralioProgressNote-prepopulation", | ||
"version": "0.1.0", | ||
"title": "TuralioProgressNote Prepopulation", | ||
"status": "draft", | ||
"type": { | ||
"coding": [ | ||
{ | ||
"code": "logic-library" | ||
} | ||
] | ||
}, | ||
"relatedArtifact": [ | ||
{ | ||
"type": "depends-on", | ||
"resource": "Library/FHIRHelpers-4.0.0" | ||
}, | ||
{ | ||
"type": "depends-on", | ||
"resource": "Library/CDS_Connect_Commons_for_FHIRv400" | ||
}, | ||
{ | ||
"type": "depends-on", | ||
"resource": "Library/DTRHelpers" | ||
} | ||
], | ||
"dataRequirement": | ||
[ | ||
{ "type": "TODO"} | ||
], | ||
"content": [ | ||
{ | ||
"contentType": "text/cql", | ||
"data": "TODO" | ||
}, | ||
{ | ||
"contentType": "application/elm+json", | ||
"data": "TODO" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters