CPG Example
0.1.0 - CI Build International flag

CPG Example, published by Clinical Quality Framework. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/cpg-example/ and changes regularly. See the Directory of published versions

Library: Daily Apple Logic

Official URL: http://fhir.org/guides/cqf/cpg/example/Library/DailyAppleLogic Version: 0.1.0
Active as of 2020-11-29 Computable Name: DailyAppleLogic

This library defines logic for representing the Daily Apple Recommendation.

Title: Daily Apple Logic
Id: DailyAppleLogic
Version: 0.1.0
Url: Daily Apple Logic
Type:

system: http://terminology.hl7.org/CodeSystem/library-type

code: logic-library

Date: 2020-11-29 15:54:22-0700
Publisher: Clinical Quality Framework
Description:

This library defines logic for representing the Daily Apple Recommendation.

Jurisdiction: 001
Topic:
Related Artifacts:

Dependencies

  • http://fhir.org/guides/cqf/cpg/example/ValueSet/Apple
Parameters:
NameTypeMinMaxIn/Out
PatientPatient01Out
Inclusion Criteriaboolean01Out
Active Daily Apple OrderMedicationRequest0*Out
Prohibitions For Daily Apple OrderMedicationRequest0*Out
No Daily Apple Orderboolean01Out
Data Requirements:
TypeProfileMSCode Filter
MedicationRequest http://hl7.org/fhir/StructureDefinition/MedicationRequest code filter:
path: medication
value set: http://fhir.org/guides/cqf/cpg/example/ValueSet/Apple
MedicationRequest http://hl7.org/fhir/StructureDefinition/MedicationRequest
Medication http://hl7.org/fhir/StructureDefinition/Medication
MedicationRequest http://hl7.org/fhir/StructureDefinition/MedicationRequest code filter:
path: medication
value set: http://fhir.org/guides/cqf/cpg/example/ValueSet/Apple
MedicationRequest http://hl7.org/fhir/StructureDefinition/MedicationRequest
Medication http://hl7.org/fhir/StructureDefinition/Medication
Content: text/cql
library DailyAppleLogic

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1' called FHIRHelpers

valueset "Apple": 'http://fhir.org/guides/cqf/cpg/example/ValueSet/Apple'

context Patient

define "Inclusion Criteria":
  Patient.active

define "Active Daily Apple Order":
  [MedicationRequest: "Apple"] M
    where M.intent = 'order'
      and M.status = 'active'
      and M.doNotPerform is not true

define "Prohibitions For Daily Apple Order":
  [MedicationRequest: "Apple"] M
    where M.intent = 'order'
      and M.status = 'active'
      and M.doNotPerform is true

define "No Daily Apple Order":
  "Inclusion Criteria"
    and not exists ("Active Daily Apple Order")
    and not exists ("Prohibitions For Daily Apple Order")
Content: application/elm+xml
Encoded data (30044 characters)
Content: application/elm+json
Encoded data (55284 characters)