FHIR Chat · CDS hook not generating from PlanDefinition · cql

Stream: cql

Topic: CDS hook not generating from PlanDefinition


view this post on Zulip Alex Goel (Aug 10 2021 at 19:23):

Hi, we wrote a PlanDefinition, Library and ValueSet which can be found here: https://github.com/PuraJuniper/Ontario-Lung-Cancer-Screening-CCG
and posted the PlanDefinition, Library and ValueSet to the CQF-Ruler.

        {
            "hook": "patient-view",
            "name": "LungCancerScreening",
            "title": "LungCancerScreening",
            "description": "This PlanDefinition identifies eligibility for lung cancer screening",
            "id": "103"
        }

We're hoping for something like this:

{
"hook": "patient-view",
"name": "Example",
"title": "Example",
"description": "Example",
"id": "plandefinition-Example",
"prefetch": {
"item1": "Patient?_id={{context.patientId}}",
"item2": "Observation?subject=Patient/{{context.patientId}}&code=http://loinc.org|55284-4",

Is this something related to the valueset or is this completely generated from the PlanDefinition? We tried to follow what was here: https://github.com/DBCG/cqf-ruler/wiki/CDS-Hooks-Request-Processing

The CQL tests correctly in Atom

view this post on Zulip Alex Goel (Aug 11 2021 at 13:28):

We figured it out. We needed to add the valueset references correctly to the library.

view this post on Zulip Alex Goel (Aug 13 2021 at 20:45):

We are having an issue with our Hook where the PD is generating a patient request as items 1 and 2. Duplication results in an error for the CQF-Ruler. The request works if we submit Items 1, 3, 4, 5. But we're curious why this duplication might of happened.

{
            "hook": "patient-view",
            "name": "LungCancerScreening",
            "title": "LungCancerScreening",
            "description": "This PlanDefinition identifies eligibility for lung cancer screening",
            "id": "plandefinition-LungCancerScreening",
            "prefetch": {
                "item1": "Patient?_id={{context.patientId}}",
                "item2": "Patient?_id=Patient/{{context.patientId}}",
                "item3": "Observation?subject=Patient/{{context.patientId}}&code=http://loinc.org|72166-2",
                "item4": "Condition?patient=Patient/{{context.patientId}}&code=http://snomed.info/sct|363358000",
                "item5": "Observation?subject=Patient/{{context.patientId}}&code=http://loinc.org|8663-7"
            }

Link to our PD: https://github.com/PuraJuniper/Ontario-Lung-Cancer-Screening-CCG/blob/main/input/resources/plandefinition/plandefinition-LungCancerScreening.json
Link to our CQL: https://github.com/PuraJuniper/Ontario-Lung-Cancer-Screening-CCG/blob/main/input/cql/LungCancerScreening.cql


Last updated: Apr 12 2022 at 19:14 UTC