cql-library-rule-filters
type: Library
node role: treeRoot
id:
  v: cql-library-rule-filters
meta:
  profile:
    v: http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library
    l: cql-library
  profile:
    v: http://hl7.org/fhir/uv/cql/StructureDefinition/elm-json-library
    l: elm-json-library
language:
  v: en
text:
  status:
    v: extensions
  div:
    v: Title: Rule Filters Id: cql-library-rule-filters Version: 2.0.0 Url: Rule Filters urn:oid:2.16.840.1.113883.4.642.40.58.28.1 Experimental: true Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2025-12-20 17:29:49+0000 Publisher: HL7 International / Public Health Description: An example logic library for eRSD - Chlamydia example. Jurisdiction: US Related Artifacts: Dependencies Logical Observation Identifiers, Names and Codes (LOINC) US Public Health CodeSystem - Usage Context Type US Public Health CodeSystem - Jurisdictions Example US Public Health ValueSet - Triggering Chlamydia Example Indeterminate or Equivocal Lab Result Value Negative or Undetected Lab Result Value Parameters: Name Type Min Max In/Out Triggering Encounter Encounter 0 1 In normalReportingDuration Quantity 0 1 In Patient Patient 0 1 Out Chlamydia Test Results Observation 0 * Out Triggering Encounters Encounter 0 * Out Encounter Location References Reference 0 * Out Locations Matching Encounter Location References Location 0 * Out Encounter Location Address Resource 0 * Out Patient Address Resource 0 * Out Jurisdictions Resource 0 * Out Encounter Address Postal Code is in Jurisdiction Codes Resource 0 * Out Encounter Address State is in Jurisdiction Codes Resource 0 * Out Patient Address Postal Code is in Jurisdiction Codes Resource 0 * Out Patient Address State is in Jurisdiction Codes Resource 0 * Out Address Exists in Jurisdiction Codes boolean 0 1 Out Jurisdiction Codes Relevant to Encounter Addresses Resource 0 * Out Jurisdiction Codes Relevant to Patient Addresses Resource 0 * Out Indeterminate Chlamydia Test Results Observation 0 * Out Negative Chlamydia Test Results Observation 0 * Out Reportable Triggering Codes Coding 0 * Out Encounter In Context Encounter 0 1 Out Is Encounter Within Normal Reporting Duration? boolean 0 1 Out eICR Compositions Composition 0 * Out Existing Reportable Triggering Codes Coding 0 * Out Is Encounter Reportable and With…
url:
  v: http://hl7.org/fhir/us/ph-library/Library/cql-library-rule-filters
  l: cql-library-rule-filters
identifier:
  system:
    v: urn:ietf:rfc:3986
    l: 3986
  value:
    v: urn:oid:2.16.840.1.113883.4.642.40.58.28.1
version:
  v: 2.0.0
name:
  v: RuleFilters
title:
  v: Rule Filters
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: 2025-12-20T17:29:49+00:00
publisher:
  v: HL7 International / Public Health
contact:
  name:
    v: HL7 International / Public Health
  telecom:
    system:
      v: url
    value:
      v: http://www.hl7.org/Special/committees/pher
  telecom:
    system:
      v: email
description:
  v: An example logic library for eRSD - Chlamydia example.
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
      l: 3166
    code:
      v: US
related artifact:
  type:
    v: depends-on
  display:
    v: Code system LOINC
  resource:
    v: http://loinc.org
    l: loinc.org
related artifact:
  type:
    v: depends-on
  display:
    v: Code system UsageContext
  resource:
    v: http://hl7.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-usage-context-type
    l: us-ph-codesystem-usage-context-type
related artifact:
  type:
    v: depends-on
  display:
    v: Code system JurisdictionsList
  resource:
    v: http://example.org/fhir/us/ph-library/CodeSystem/us-ph-codesystem-jurisdictions-example
    l: us-ph-codesystem-jurisdictions-example
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Chlamydia Laboratory Result Trigger Codes
  resource:
    v: http://hl7.org/fhir/us/ph-library/ValueSet/us-ph-valueset-triggering-chlamydia-example
    l: us-ph-valueset-triggering-chlamydia-example
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Indeterminate or Equivocal Lab Result Value
  resource:
    v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.1035
    l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.1035
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Negative or Undetected Lab Result Value
  resource:
    v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.1034
    l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.1034
parameter:
  name:
    v: Triggering Encounter
  use:
    v: in
  min:
    v: 0
  max:
    v: 1
  type:
    v: Encounter
parameter:
  name:
    v: normalReportingDuration
  use:
    v: in
  min:
    v: 0
  max:
    v: 1
  type:
    v: Quantity
parameter:
  name:
    v: Patient
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: Patient
parameter:
  name:
    v: Chlamydia Test Results
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: Observation
parameter:
  name:
    v: Triggering Encounters
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: Encounter
parameter:
  name:
    v: Encounter Location References
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: Reference
parameter:
  name:
    v: Locations Matching Encounter Location References
  use:
    v: out
  min:
    v: 0
  max:
    v: *
  type:
    v: Location
parameter:
  name:
    v: Encounter Location Address
  use:
    v: out
  min:
    v: 0
  max:
    v: *

v: Resource

name:
  v: Patient Address
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Resource

name:
  v: Jurisdictions
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Resource

name:
  v: Encounter Address Postal Code is in Jurisdiction Codes
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Resource

name:
  v: Encounter Address State is in Jurisdiction Codes
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Resource

name:
  v: Patient Address Postal Code is in Jurisdiction Codes
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Resource

name:
  v: Patient Address State is in Jurisdiction Codes
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Resource

name:
  v: Address Exists in Jurisdiction Codes
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Jurisdiction Codes Relevant to Encounter Addresses
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Resource

name:
  v: Jurisdiction Codes Relevant to Patient Addresses
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Resource

name:
  v: Indeterminate Chlamydia Test Results
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Observation

name:
  v: Negative Chlamydia Test Results
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Observation

name:
  v: Reportable Triggering Codes
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Coding

name:
  v: Encounter In Context
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: Encounter

name:
  v: Is Encounter Within Normal Reporting Duration?
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: eICR Compositions
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Composition

name:
  v: Existing Reportable Triggering Codes
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Coding

name:
  v: Is Encounter Reportable and Within Normal Reporting Duration?
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Is Encounter Longer Than Normal Reporting Duration?
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Is Encounter In Progress
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Is Encounter Complete
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Is Encounter In Progress and Within Normal Reporting Duration or 72h or less after end of encounter?
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Most recent eICR
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: Composition

name:
  v: Most recent eICR sent over 72 hours ago?
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Suspected Disorder Test Results
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Observation

name:
  v: Suspected Disorders
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Resource

name:
  v: Is Suspected Disorder?
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

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

type:
  v: Composition
profile:
  v: http://hl7.org/fhir/StructureDefinition/Composition
  l: Composition
must support:
  v: type
code filter:
  path:
    v: type
  code: https://loinc.org/rdf/55751-2
    system:
      v: http://loinc.org
      l: loinc.org
    code:
      v: 55751-2

type:
  v: Encounter
profile:
  v: http://hl7.org/fhir/StructureDefinition/Encounter
  l: Encounter
must support:
  v: reference
must support:
  v: location

type:
  v: Patient
profile:
  v: http://hl7.org/fhir/StructureDefinition/Patient
  l: Patient
must support:
  v: postalCode
must support:
  v: state
must support:
  v: state.value

type:
  v: Encounter
profile:
  v: http://hl7.org/fhir/StructureDefinition/Encounter
  l: Encounter
must support:
  v: reference
must support:
  v: location

type:
  v: Location
profile:
  v: http://hl7.org/fhir/StructureDefinition/Location
  l: Location
must support:
  v: address.postalCode
must support:
  v: address
must support:
  v: address.state
must support:
  v: postalCode
must support:
  v: state
must support:
  v: id

type:
  v: CodeSystem
profile:
  v: http://hl7.org/fhir/StructureDefinition/CodeSystem
  l: CodeSystem
must support:
  v: jurisdictionType
must support:
  v: postalCode
must support:
  v: concept
must support:
  v: stateCode

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

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
must support:
  v: interpretation
must support:
  v: value
must support:
  v: status
code filter:
  path:
    v: code
  value set:
    v: http://hl7.org/fhir/us/ph-library/ValueSet/us-ph-valueset-triggering-chlamydia-example
    l: us-ph-valueset-triggering-chlamydia-example

type:
  v: Location
profile:
  v: http://hl7.org/fhir/StructureDefinition/Location
  l: Location
must support:
  v: address.postalCode
must support:
  v: address
must support:
  v: address.state
must support:
  v: postalCode
must support:
  v: state
must support:
  v: id

type:
  v: CodeSystem
profile:
  v: http://hl7.org/fhir/StructureDefinition/CodeSystem
  l: CodeSystem
must support:
  v: jurisdictionType
must support:
  v: postalCode
must support:
  v: concept
must support:
  v: stateCode

type:
  v: CodeSystem
profile:
  v: http://hl7.org/fhir/StructureDefinition/CodeSystem
  l: CodeSystem
must support:
  v: jurisdictionType
must support:
  v: postalCode
must support:
  v: concept
must support:
  v: stateCode

type:
  v: Patient
profile:
  v: http://hl7.org/fhir/StructureDefinition/Patient
  l: Patient
must support:
  v: postalCode
must support:
  v: state
must support:
  v: state.value

type:
  v: CodeSystem
profile:
  v: http://hl7.org/fhir/StructureDefinition/CodeSystem
  l: CodeSystem
must support:
  v: jurisdictionType
must support:
  v: postalCode
must support:
  v: concept
must support:
  v: stateCode

type:
  v: Patient
profile:
  v: http://hl7.org/fhir/StructureDefinition/Patient
  l: Patient
must support:
  v: postalCode
must support:
  v: state
must support:
  v: state.value

type:
  v: Composition
profile:
  v: http://hl7.org/fhir/StructureDefinition/Composition
  l: Composition
must support:
  v: type
code filter:
  path:
    v: type
  code: https://loinc.org/rdf/55751-2
    system:
      v: http://loinc.org
      l: loinc.org
    code:
      v: 55751-2

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: value
must support:
  v: status

type:
  v: Composition
profile:
  v: http://hl7.org/fhir/StructureDefinition/Composition
  l: Composition
must support:
  v: section
must support:
  v: type
code filter:
  path:
    v: type
  code: https://loinc.org/rdf/55751-2
    system:
      v: http://loinc.org
      l: loinc.org
    code:
      v: 55751-2

type:
  v: Location
profile:
  v: http://hl7.org/fhir/StructureDefinition/Location
  l: Location
must support:
  v: address.postalCode
must support:
  v: address
must support:
  v: address.state
must support:
  v: postalCode
must support:
  v: state
must support:
  v: id

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

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
must support:
  v: interpretation
must support:
  v: value
must support:
  v: status
code filter:
  path:
    v: code
  value set:
    v: http://hl7.org/fhir/us/ph-library/ValueSet/us-ph-valueset-triggering-chlamydia-example
    l: us-ph-valueset-triggering-chlamydia-example

type:
  v: Encounter
profile:
  v: http://hl7.org/fhir/StructureDefinition/Encounter
  l: Encounter
must support:
  v: period
must support:
  v: end

type:
  v: Encounter
profile:
  v: http://hl7.org/fhir/StructureDefinition/Encounter
  l: Encounter
must support:
  v: period
must support:
  v: end

type:
  v: Location
profile:
  v: http://hl7.org/fhir/StructureDefinition/Location
  l: Location
must support:
  v: address.postalCode
must support:
  v: address
must support:
  v: address.state
must support:
  v: postalCode
must support:
  v: state
must support:
  v: id

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

type:
  v: CodeSystem
profile:
  v: http://hl7.org/fhir/StructureDefinition/CodeSystem
  l: CodeSystem
must support:
  v: jurisdictionType
must support:
  v: postalCode
must support:
  v: concept
must support:
  v: stateCode

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
must support:
  v: interpretation
must support:
  v: value
must support:
  v: status
code filter:
  path:
    v: code
  value set:
    v: http://hl7.org/fhir/us/ph-library/ValueSet/us-ph-valueset-triggering-chlamydia-example
    l: us-ph-valueset-triggering-chlamydia-example

content type:
  v: text/cql

content type:
  v: application/elm+json