Skip to content

Commit 64b6b74

Browse files
maggiedorrAmy Chenivan-c
authored
Fill PDMP Med Columns (#56)
* modified dashboard to display plain risk factor language. Also added one overlooked section to summary.json * Added in FHIR references to include quantity data for EHR meds. It does not appear to break anything for patients that don't have quantity data, but needs to be checked in our server with a patient that does have quantity data. * fix cql code to retrieve quantity, pharmacy and dispensed date * add prescriber information * Update src/cql/r4/Factors_to_Consider_in_Managing_Chronic_Pain_FHIRv400.cql Remove trailing whitespace Co-authored-by: Amy Chen <[email protected]> Co-authored-by: Ivan Cvitkovic <[email protected]>
1 parent 603ea14 commit 64b6b74

4 files changed

+807
-76
lines changed

src/components/summary.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@
137137
{
138138
"headers": {
139139
"Drug Description": "Name",
140-
"Quantity": { "key": "Quantity", "formatter": "stringSubstitutionFormat", "formatterArguments": [""], "sortable": false},
140+
"Quantity": { "key": "Quantity", "sortable": true},
141141
"Written Date": { "key": "Start", "formatter": "datishFormat" },
142142
"Dispensed": { "key": "End", "formatter": "datishFormat" },
143-
"Prescriber": { "key": "Prescriber", "formatter": "stringSubstitutionFormat", "formatterArguments": [""], "sortable": false},
144-
"Pharmacy": { "key": "Pharmacy", "formatter": "stringSubstitutionFormat", "formatterArguments": [""], "sortable": false}
143+
"Prescriber": { "key": "Prescriber", "sortable": true},
144+
"Pharmacy": { "key": "Pharmacy", "sortable": true}
145145
}
146146
}
147147
]
@@ -174,11 +174,11 @@
174174
{
175175
"headers": {
176176
"Drug Description": "Name",
177-
"Quantity": { "key": "Quantity", "formatter": "stringSubstitutionFormat", "formatterArguments": [""], "sortable": false},
177+
"Quantity": { "key": "Quantity", "sortable": true},
178178
"Written Date": { "key": "Start", "formatter": "datishFormat" },
179179
"Dispensed": { "key": "End", "formatter": "datishFormat" },
180-
"Prescriber": { "key": "Prescriber", "formatter": "stringSubstitutionFormat", "formatterArguments": [""], "sortable": false},
181-
"Pharmacy": { "key": "Pharmacy", "formatter": "stringSubstitutionFormat", "formatterArguments": [""], "sortable": false}
180+
"Prescriber": { "key": "Prescriber", "sortable": true},
181+
"Pharmacy": { "key": "Pharmacy", "sortable": true}
182182
},
183183
"flags": [
184184
{

src/cql/r4/Factors_to_Consider_in_Managing_Chronic_Pain_FHIRv400.cql

+16-2
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,14 @@ define ReportOpioidMedicationRequests:
810810
Type: 'Request',
811811
Name: ConceptText(O.medication as FHIR.CodeableConcept),
812812
Start: DateTimeText(O.authoredOn),
813-
End: null as String, // MedicationRequest end date not supported in R4,
813+
//provided by the extension dateValue, may not always be there
814+
End: DateText(O.dispenseRequest.extension[1].value),
815+
//End: null as String, // MedicationRequest end date not supported in R4,
816+
//Amount: QuantityText(O.value as FHIR.Quantity),
817+
//provided by the extension valueString, may not always be there
818+
Quantity: QuantityText(O.dispenseRequest.quantity as FHIR.Quantity),
819+
Prescriber: O.requester.display.value,
820+
Pharmacy: (O.dispenseRequest.extension[0].value as FHIR.string).value,
814821
Status: O.status.value
815822
}
816823
sort by Start desc, End desc
@@ -822,6 +829,7 @@ define ReportOpioidMedicationStatements:
822829
Name: ConceptText(S.medication as FHIR.CodeableConcept),
823830
Start: MedicationStatementDate(S),
824831
End: DateTimeText((S.effective as FHIR.Period)."end"),
832+
//Amount: QuantityText(S.value as FHIR.Quantity),
825833
Status: S.status.value
826834
}
827835
sort by Start desc, End desc
@@ -850,7 +858,12 @@ define ReportNonOpioidMedicationRequests:
850858
Type: 'Request',
851859
Name: ConceptText(O.medication as FHIR.CodeableConcept),
852860
Start: DateTimeText(O.authoredOn),
853-
End: null as String, // MedicationRequest end date not supported in R4,
861+
//End: null as String, // MedicationRequest end date not supported in R4,
862+
End: DateText(O.dispenseRequest.extension[1].value),
863+
//Amount: QuantityText(O.value as FHIR.Quantity),
864+
Quantity: QuantityText(O.dispenseRequest.quantity as FHIR.Quantity),
865+
Prescriber: O.requester.display.value,
866+
Pharmacy: (O.dispenseRequest.extension[0].value as FHIR.string).value,
854867
Status: O.status.value
855868
}
856869
sort by Start desc, End desc
@@ -862,6 +875,7 @@ define ReportNonOpioidMedicationStatements:
862875
Name: ConceptText(S.medication as FHIR.CodeableConcept),
863876
Start: MedicationStatementDate(S),
864877
End: DateTimeText((S.effective as FHIR.Period)."end"),
878+
//Quantity: QuantityText(S.value as FHIR.Quantity),
865879
Status: S.status.value
866880
}
867881
sort by Start desc, End desc

0 commit comments

Comments
 (0)