Your User Friendly Name for MyContentIG Here
0.5.1-cibuild - CI Build International flag

Your User Friendly Name for MyContentIG Here, published by HL7 International - [Some] Work Group. This guide is not an authorized publication; it is the continuous build for version 0.5.1-cibuild built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/sample-content-ig/ and changes regularly. See the Directory of published versions

Library: DailyAppleLogic

Official URL: http://somewhere.org/fhir/uv/mycontentig/Library/DailyAppleLogic Version: 0.5.1-cibuild
Draft as of 2025-09-07 Computable Name: DailyAppleLogic
Metadata
Version 0.5.1-cibuild
Status Draft
Jurisdiction 001 from http://unstats.un.org/unsd/methods/m49/m49.htm
Steward (Publisher) HL7 International - [Some] Work Group
Type logic-library from http://terminology.hl7.org/CodeSystem/library-type
Parameter Name: Patient
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: Patient
Parameter Name: Inclusion Criteria
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
Parameter Name: Active Daily Apple Order
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: MedicationRequest
Parameter Name: Prohibitions For Daily Apple Order
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: MedicationRequest
Parameter Name: No Daily Apple Order
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
Data Requirement Type: Patient
Profile(s): Patient
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: medication, intent, status, doNotPerform
Code Filter(s):
Path: medication
ValueSet: http://fhir.org/guides/cqf/cpg/example/ValueSet/Apple
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: medication.reference, intent, status, doNotPerform
Data Requirement Type: Medication
Profile(s): Medication
Must Support Elements: id, code
Library Content
CQL Content
library DailyAppleLogic version '0.4.1'

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")
ELM XML Content
Encoded data (32332 characters)
ELM JSON Content
Encoded data (65788 characters)
Generated using version 0.5.1-cibuild of the sample-content-ig Liquid templates