Hello everyone,
I have been trying to figure out a way to include a list of medications in the returned card. I basically defined an expression as shown below (see FIG.1) and then referenced it in the card's SUGGESTIONS property (see FIG. 2 for details of hook config).
To make sure the change is in affect, I restarted the CDS service.
When invoking my CDS Service, the CARD was successfully returned. However, when looking at the content of the CARD, the SUGGESTIONS property and its content was not included as expected (see FIG.3)
I would appreciate your help if you could point out anything that I could have missed.
FIG. 1
--------------------
define ActiveFRIDsMeds:
[MedicationRequest: medication in "Fall Risk Increasing Drugs (FRIDs) VS"] A
return{
medcode: A.medication.coding.code.value
}
---------------------
FIG. 2
---------------------
{
"id": "fall-prevention-risk-factors-r4",
"hook": "medication-prescribe",
"title": "Fall Prevention Risk Factors",
"description": "CDS Service that provides guidance to the prescriber if the patient is at least 65 years of age and is on FRIDs medication.",
"_config": {
"cards": [{
"conditionExpression": "InPopulation",
"card": {
"summary": "Fall Prevention Risk Factors for Patient 65 Years of Age and Older",
"indicator": "info",
"detail": "Returned Recommendation: ${Recommendation}",
"source": {
"label": "CDS Connect: Fall Prevention Risk Factor - Medication Service",
},
"extension": {
"grade": "${RecommendationGrade}",
"rationale": "${Rationale}"
},
"error":"Error: ${Error}"
}
}],
"suggestions": "Returned Suggestions: ${ActiveFRIDsMeds}",
"cql": {
"library": {
"id": "Fall-Prevention-Medication-Risk-Factors",
"version": "1"
}
}
}
}
---------------------------
FIG 3
C:\CQL_Proj\temp>curl -X POST -d @testrequest.json -H "Content-Type: application/json" "localhost:3000/cds-services/fall-prevention-risk-factors-r4"
{"cards":[{"summary":"Fall Prevention Risk Factors for Patient 65 Years of Age and Older","indicator":"info","detail":"Returned Recommendation: Considering 18-week tapering protocol, provide patient education brochure.","source":{"label":"CDS Connect: Fall Prevention Risk Factor - Medication Service","url":"
https://cds.ahrq.gov/cdsconnect/artifact/fall-prevention-risk-factors-r4"},"extension":{"grade":"","rationale":""},"error":"Error: "}]}
C:\CQL_Proj\temp>