Skip to content

CQL Services 3.2.0

Latest
Compare
Choose a tag to compare
@cmoesel cmoesel released this 09 Aug 21:01
· 2 commits to master since this release

CQL Services 3.2.0 adds support for configuring prefetch templates for CDS Hooks services. This allows implementers to add, remove, or override prefetch keys in the prefetch template generated from a service's CQL. To do this, implementers specify a prefetch object in the service's CQL Hooks configuration. For each key in that prefetch configuration object:

  • If the key does not exist in the prefetch template generated from the CQL, it will be added to the generated prefetch template.
  • If the key matches a key in the generated prefetch template, then...
    • If the key's value is a non-empty string, it will override the generated prefetch value for that key in the prefetch template.
    • If the key's value is null or an empty string (""), then that prefetch key will be removed from the prefetch template.

Any keys in the generated prefetch template that are not in the prefetch configuration object will remain in the prefetch template as-is.

For example, the following configuration specifies that although the CQL contains a Retrieve for the Medication resource, the prefetch template should not include a query for Medication. This will result in the CQL being executed without any Medication resource data. In this specific case, this avoids an unfiltered query for all Medication resources, but also means that MedicationRequest resources must specify the medication using medicationCodeableConcept rather than medicationReference. Implementers are responsible for ensuring that overridden and removed prefetch keys do not adversely impact the validity of the CQL logic execution.

{
  "id": "statin-use",
  "hook": "patient-view",
  "title": "Statin Use for the Primary Prevention of CVD in Adults",
  "description": "Presents a United States Preventive Services Task Force (USPSTF) statin therapy recommendation for adults aged 40 to 75 years without a history of cardiovascular disease (CVD) who have 1 or more CVD risk factors (i.e., dyslipidemia, diabetes, hypertension, or smoking) and a calculated 10-year CVD event risk score of 7.5% or greater.",
  "usageRequirements": "NOTE: This service requires a pre-calculated CVD 10-year risk score stored as an Observation w/ code: LOINC 79423-0",
  "prefetch": {
    "Medication": null
  },
  "_config": {
    "cards": [{
      "conditionExpression": "InPopulation",
      "card": {
        "summary": "Statin Use for the Primary Prevention of CVD in Adults",
        "indicator": "info",
        "detail": "${Recommendation}",
        "source": {
          "label": "CDS Connect: Statin Use for the Primary Prevention of CVD in Adults",
          "url": "https://cds.ahrq.gov/cdsconnect/artifact/statin-use-primary-prevention-cvd-adults"
        },
        "extension": {
          "grade": "${RecommendationGrade}",
          "rationale": "${Rationale}"
        }
      }
    }],
    "cql": {
      "library": {
        "id": "USPSTFStatinUseForPrimaryPreventionOfCVDInAdultsFHIRv401",
        "version": "2.0.0"
      }
    }
  }
}

Full Changelog: v3.1.0...v3.2.0