Skip to content

Commit

Permalink
Initial cql and library for patient status prepopulation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariel Virgulto committed Aug 30, 2023
1 parent 5311f16 commit 06e9ef2
Show file tree
Hide file tree
Showing 3 changed files with 174 additions and 10 deletions.
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
)
)
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"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/cqf-library",
"valueCanonical": "http://hl7.org/fhir/us/davinci-dtr/Library/BasicClinicalInfo-prepopulation"
"valueCanonical": "http://hl7.org/fhir/us/davinci-dtr/Library/TuralioProgressNote-prepopulation"
}
],
"title": "Turalio Rems Patient Status",
Expand Down Expand Up @@ -61,7 +61,16 @@
"type": "open-choice",
"repeats": true,
"required": true,
"answerOption": []
"answerOption": [],
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/cql",
"expression": "\"TuralioProgressNotePrepopulation\".AllDiagnoses"
}
}
]
},
{
"linkId": "5",
Expand All @@ -74,18 +83,45 @@
"text": "Transplants for Order",
"type": "open-choice",
"repeats": true,
"answerOption": []
"answerOption": [],
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/cql",
"expression": "\"TuralioProgressNotePrepopulation\".<TODO>"
}
}
]
},
{
"linkId": "5.2",
"text": "Date of transplant",
"type": "date",
"required": true
"required": true,
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/cql",
"expression": "\"TuralioProgressNotePrepopulation\".<TODO>"
}
}
]
},
{
"linkId": "5.3",
"text": "Institution where transplant was performed",
"type": "string"
"type": "string",
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/cql",
"expression": "\"TuralioProgressNotePrepopulation\".<TODO>"
}
}
]
},
{
"linkId": "5.4",
Expand All @@ -94,6 +130,13 @@
"required": true,
"answerValueSet": "http://terminology.hl7.org/ValueSet/yes-no-unknown-not-asked",
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/cql",
"expression": "\"TuralioProgressNotePrepopulation\".<TODO>"
}
},
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
Expand All @@ -114,6 +157,13 @@
"required": "true",
"answerValueSet": "http://terminology.hl7.org/ValueSet/yes-no-unknown-not-asked",
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/cql",
"expression": "\"TuralioProgressNotePrepopulation\".<TODO>"
}
},
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
Expand Down Expand Up @@ -223,27 +273,72 @@
{
"linkId": "9.1",
"type": "text",
"text": "RxNorm Code"
"text": "RxNorm Code",
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/cql",
"expression": "\"TuralioProgressNotePrepopulation\".<TODO>"
}
}
]
},
{
"linkId": "9.2",
"type": "text",
"text": "Drug"
"text": "Drug",
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/cql",
"expression": "\"TuralioProgressNotePrepopulation\".<TODO>"
}
}
]
},
{
"linkId": "9.3",
"type": "text",
"text": "Route"
"text": "Route",
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/cql",
"expression": "\"TuralioProgressNotePrepopulation\".<TODO>"
}
}
]
},
{
"linkId": "9.4",
"type": "text",
"text": "Dose"
"text": "Dose",
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/cql",
"expression": "\"TuralioProgressNotePrepopulation\".<TODO>"
}
}
]
},
{
"linkId": "9.5",
"type": "text",
"text": "Frequency"
"text": "Frequency",
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/cql",
"expression": "\"TuralioProgressNotePrepopulation\".<TODO>"
}
}
]
}
]
},
Expand Down

0 comments on commit 06e9ef2

Please sign in to comment.