ordermedication-library
type: Library
node role: treeRoot
id:
  v: ordermedication-library
language:
  v: en
text:
  status:
    v: extensions
  div:
    v: Metadata Title Order Medication Library Version 2.0.0 Identifier urn:oid:2.16.840.1.113883.4.642.40.48.28.12 Experimental true Jurisdiction World Steward (Publisher) HL7 International / Clinical Decision Support Steward Contact HL7 International / Clinical Decision Support Description Logic for an example recommendation to order a medication Type logic-library from http://terminology.hl7.org/CodeSystem/library-type Dependency Description: Code System Task Codes Resource: Task Codes Canonical URL: http://hl7.org/fhir/CodeSystem/task-code Data Requirement Type: MedicationStatement Profile(s): MedicationStatement Data Requirement Type: MedicationAdministration Profile(s): MedicationAdministration Data Requirement Type: MedicationDispense Profile(s): MedicationDispense Data Requirement Type: Task Profile(s): Task Data Requirement Type: MedicationRequest Profile(s): MedicationRequest Parameters Name Use Card. Type Documentation Patient Out 0..1 Patient Inclusion Criteria Out 0..1 boolean Active or Completed Medication Statement Out 0..* MedicationStatement Medication Statement Not Taken Out 0..* MedicationStatement Active or Completed Medication Administration Out 0..* MedicationAdministration Medication Administration Not Done Out 0..* MedicationAdministration Active or Completed Medication Dispense Out 0..* MedicationDispense Medication Dispense Not Done Out 0..* MedicationDispense Rejected Task Out 0..* Task Medication Proposal Out 0..* MedicationRequest Medication Prohibited Out 0..* MedicationRequest Medication Rejected Out 0..* MedicationRequest Is Recommendation Applicable Out 0..1 boolean Library Content CQL Content library OrderMedication using FHIR version '4.0.1' include FHIRHelpers version '4.0.1' codesystem "Task Codes": 'http://hl7.org/fhir/CodeSystem/task-code' code "fulfill": 'fulfill' from "Task Codes" display 'Fulfill' context Patient /* Recommendation to order a medication */ /* Positive recommendation: If the medication is not being taken (i.e. dispen…
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability
    l: cqf-knowledgeCapability
  value: Code
    v: shareable
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability
    l: cqf-knowledgeCapability
  value: Code
    v: computable
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability
    l: cqf-knowledgeCapability
  value: Code
    v: publishable
url:
  v: http://hl7.org/fhir/uv/cpg/Library/ordermedication-library
  l: ordermedication-library
identifier:
  system:
    v: urn:ietf:rfc:3986
    l: 3986
  value:
    v: urn:oid:2.16.840.1.113883.4.642.40.48.28.12
version:
  v: 2.0.0
name:
  v: OrderMedication
title:
  v: Order Medication Library
status:
  v: active
experimental:
  v: true
type:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/library-type
      l: library-type
    code:
      v: logic-library
date:
  v: 2026-04-29T15:06:55+00:00
publisher:
  v: HL7 International / Clinical Decision Support
contact:
  name:
    v: HL7 International / Clinical Decision Support
  telecom:
    system:
      v: url
    value:
      v: http://www.hl7.org/Special/committees/dss
description:
  v: Logic for an example recommendation to order a medication
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
      l: m49.htm
    code:
      v: 001
    display:
      v: World
related artifact:
  type:
    v: depends-on
  display:
    v: Code System Task Codes
  resource:
    v: http://hl7.org/fhir/CodeSystem/task-code
    l: task-code
parameter:
  name:
    v: Patient
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: Patient
parameter:
  name:
    v: Inclusion Criteria
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: boolean
parameter:
  name:
    v: Active or Completed Medication Statement
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: MedicationStatement
parameter:
  name:
    v: Medication Statement Not Taken
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: MedicationStatement
parameter:
  name:
    v: Active or Completed Medication Administration
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: MedicationAdministration
parameter:
  name:
    v: Medication Administration Not Done
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: MedicationAdministration
parameter:
  name:
    v: Active or Completed Medication Dispense
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: MedicationDispense
parameter:
  name:
    v: Medication Dispense Not Done
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: MedicationDispense
parameter:
  name:
    v: Rejected Task
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: Task
parameter:
  name:
    v: Medication Proposal
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: MedicationRequest
parameter:
  name:
    v: Medication Prohibited
  use:
    v: out

v: 0

v: *

v: MedicationRequest

name:
  v: Medication Rejected
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: MedicationRequest

name:
  v: Is Recommendation Applicable
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

type:
  v: MedicationStatement
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationStatement
  l: MedicationStatement

type:
  v: MedicationStatement
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationStatement
  l: MedicationStatement

type:
  v: MedicationAdministration
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationAdministration
  l: MedicationAdministration

type:
  v: MedicationAdministration
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationAdministration
  l: MedicationAdministration

type:
  v: MedicationDispense
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationDispense
  l: MedicationDispense

type:
  v: MedicationDispense
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationDispense
  l: MedicationDispense

type:
  v: Task
profile:
  v: http://hl7.org/fhir/StructureDefinition/Task
  l: Task

type:
  v: MedicationRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  l: MedicationRequest

type:
  v: MedicationRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  l: MedicationRequest

type:
  v: MedicationRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  l: MedicationRequest

content type:
  v: text/cql

content type:
  v: application/elm+xml

content type:
  v: application/elm+json