library-executable-rule-filters
type: Library
node role: treeRoot
id:
  v: library-executable-rule-filters
meta:
  profile:
    v: http://hl7.org/fhir/uv/cql/StructureDefinition/elm-json-library|2.0.0
    link: 2.0
    link: .0
  profile:
    v: http://hl7.org/fhir/uv/cql/StructureDefinition/elm-xml-library|2.0.0
    link: 2.0
    link: .0
  profile:
    v: http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library|2.0.0
    link: 2.0
    link: .0
text:
  status:
    v: extensions
  div: Title: Rule Filters Id: library-executable-rule-filters Version: 3.0.0-ballot Url: Rule Filters urn:oid:2.16.840.1.113883.4.642.40.46.28.2 Experimental: true Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2025-10-23 09:29:23+0000 Publisher: HL7 International / Public Health Description: An example logic library for eRSD - Chlamydia example. Jurisdiction: US Related Artifacts: Dependencies CQL Model Infoversion: null2.0.0) http://hl7.org/fhir/uv/cql/Library/FHIRHelpers Logical Observation Identifiers, Names and Codes (LOINC) US Public Health Usage Context Typeversion: null3.0.0-ballot) eRSD Jurisdictions Exampleversion: null0.1.0) Example Diagnosis Problem Triggers for Public Health Reportingversion: null3.0.0-ballot) Example Medications Triggers for Public Health Reportingversion: null3.0.0-ballot) Example Lab Order Test Triggers for Public Health Reportingversion: null3.0.0-ballot) Example Lab Obs Test Name Triggers for Public Health Reportingversion: null3.0.0-ballot) Example Organism Substance Triggers for Public Health Reportingversion: null3.0.0-ballot) Example Procedure Triggers for Public Health Reportingversion: null3.0.0-ballot) Example Suspected Disorder Triggers for Public Health Reportingversion: null3.0.0-ballot) Example Chlamydia Lab Obs Test Name Triggers for Public Health Reportingversion: null3.0.0-ballot) Indeterminate or Equivocal Lab Result Valueversion: null20230124) Negative or Undetected Lab Result Valueversion: null20220602) 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 Jur…
url:
  v: http://hl7.org/fhir/us/ecr/Library/library-executable-rule-filters
identifier:
  system:
    v: urn:ietf:rfc:3986
  value:
    v: urn:oid:2.16.840.1.113883.4.642.40.46.28.2
version:
  v: 3.0.0-ballot
name:
  v: library-executable-rule-filters
title:
  v: Rule Filters
status:
  v: active
experimental:
  v: true
type:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/library-type
    code:
      v: logic-library
date:
  v: 2025-10-23T09:29:23+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
    code:
      v: US
related artifact:
  type:
    v: depends-on
  display:
    v: FHIR model information
  resource:
    v: http://hl7.org/fhir/uv/cql/StructureDefinition/cql-modelinfo|2.0.0
    link: 2.0
    link: .0
related artifact:
  type:
    v: depends-on
  display:
    v: Library FHIRHelpers
  resource:
    v: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers
    link: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers
related artifact:
  type:
    v: depends-on
  display:
    v: Code system LOINC
  resource:
    v: http://loinc.org
    link: http://loinc.org
related artifact:
  type:
    v: depends-on
  display:
    v: Code system UsageContext
  resource:
    v: http://hl7.org/fhir/us/ecr/CodeSystem/us-ph-usage-context-type|3.0.0-ballot
    link: 3.0
    link: .0
related artifact:
  type:
    v: depends-on
  display:
    v: Code system JurisdictionsList
  resource:
    v: http://hl7.org/fhir/us/ecr/CodeSystem/ersd-jurisdictions-example|0.1.0
    link: 0.1
    link: .0
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Diagnosis Trigger Codes
  resource:
    v: http://hl7.org/fhir/us/ecr/ValueSet/valueset-dxtc-example|3.0.0-ballot
    link: 3.0
    link: .0
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Medication Trigger Codes
  resource:
    v: http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example|3.0.0-ballot
    link: 3.0
    link: .0
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Laboratory Order Trigger Codes
  resource:
    v: http://hl7.org/fhir/us/ecr/ValueSet/valueset-lotc-example|3.0.0-ballot
    link: 3.0
    link: .0
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Laboratory Result Trigger Codes
  resource:
    v: http://hl7.org/fhir/us/ecr/ValueSet/valueset-lrtc-example|3.0.0-ballot
    link: 3.0
    link: .0
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Organism Substance Trigger Codes
  resource:
    v: http://hl7.org/fhir/us/ecr/ValueSet/valueset-ostc-example|3.0.0-ballot
    link: 3.0
    link: .0
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Procedure Trigger Codes
  resource:
    v: http://hl7.org/fhir/us/ecr/ValueSet/valueset-pctc-example|3.0.0-ballot
    link: 3.0
    link: .0
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Suspected Disorder Trigger Codes
  resource:
    v: http://hl7.org/fhir/us/ecr/ValueSet/valueset-sdtc-example|3.0.0-ballot
    link: 3.0
    link: .0
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Chlamydia Laboratory Result Trigger Codes
  resource:
    v: http://hl7.org/fhir/us/ecr/ValueSet/valueset-chlamydia-example|3.0.0-ballot
    link: 3.0
    link: .0
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|20230124
    link: 2.16
    link: .840
    link: .1
    link: .113762
    link: .4
    link: .1146
    link: .1035
    link: 20230124
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Negative or Undetected Lab Result Value

v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1146.1034|20220602
link: 2.16
link: .840
link: .1
link: .113762
link: .4
link: .1146
link: .1034
link: 20220602

name:
  v: Triggering Encounter
use:
  v: in
min:
  v: 0
max:
  v: 1
type:
  v: Encounter

name:
  v: normalReportingDuration
use:
  v: in
min:
  v: 0
max:
  v: 1
type:
  v: Quantity

name:
  v: Patient
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: Patient

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

name:
  v: Triggering Encounters
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Encounter

name:
  v: Encounter Location References
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Reference

name:
  v: Locations Matching Encounter Location References
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Location

name:
  v: Encounter Location Address
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  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|4.0.1
  link: 4.0
  link: .1

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

type:
  v: Encounter
profile:
  v: http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1
  link: 4.0
  link: .1
must support:
  v: reference
must support:
  v: location

type:
  v: Patient
profile:
  v: http://hl7.org/fhir/StructureDefinition/Patient|4.0.1
  link: 4.0
  link: .1
must support:
  v: postalCode
must support:
  v: state
must support:
  v: state.value

type:
  v: Encounter
profile:
  v: http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1
  link: 4.0
  link: .1
must support:
  v: reference
must support:
  v: location

type:
  v: Location
profile:
  v: http://hl7.org/fhir/StructureDefinition/Location|4.0.1
  link: 4.0
  link: .1
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|4.0.1
  link: 4.0
  link: .1
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|4.0.1
  link: 4.0
  link: .1

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation|4.0.1
  link: 4.0
  link: .1
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/ecr/ValueSet/valueset-chlamydia-example|3.0.0-ballot
    link: 3.0
    link: .0

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation|4.0.1
  link: 4.0
  link: .1
must support:
  v: value
must support:
  v: status

type:
  v: Location
profile:
  v: http://hl7.org/fhir/StructureDefinition/Location|4.0.1
  link: 4.0
  link: .1
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|4.0.1
  link: 4.0
  link: .1
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|4.0.1
  link: 4.0
  link: .1
must support:
  v: postalCode
must support:
  v: state
must support:
  v: state.value

type:
  v: CodeSystem
profile:
  v: http://hl7.org/fhir/StructureDefinition/CodeSystem|4.0.1
  link: 4.0
  link: .1
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|4.0.1
  link: 4.0
  link: .1
must support:
  v: postalCode
must support:
  v: state
must support:
  v: state.value

type:
  v: CodeSystem
profile:
  v: http://hl7.org/fhir/StructureDefinition/CodeSystem|4.0.1
  link: 4.0
  link: .1
must support:
  v: jurisdictionType
must support:
  v: postalCode
must support:
  v: concept
must support:
  v: stateCode

type:
  v: Condition
profile:
  v: http://hl7.org/fhir/StructureDefinition/Condition|4.0.1
  link: 4.0
  link: .1
must support:
  v: code
code filter:
  path:
    v: code
  value set:
    v: http://hl7.org/fhir/us/ecr/ValueSet/valueset-sdtc-example|3.0.0-ballot
    link: 3.0
    link: .0

type:
  v: MedicationRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationRequest|4.0.1
  link: 4.0
  link: .1
must support:
  v: medication
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/us/ecr/ValueSet/valueset-mrtc-example|3.0.0-ballot
    link: 3.0
    link: .0

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

type:
  v: Composition
profile:
  v: http://hl7.org/fhir/StructureDefinition/Composition|4.0.1
  link: 4.0
  link: .1
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
    code:
      v: 55751-2

type:
  v: Location
profile:
  v: http://hl7.org/fhir/StructureDefinition/Location|4.0.1
  link: 4.0
  link: .1
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|4.0.1
  link: 4.0
  link: .1

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation|4.0.1
  link: 4.0
  link: .1
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/ecr/ValueSet/valueset-chlamydia-example|3.0.0-ballot
    link: 3.0
    link: .0

type:
  v: Encounter
profile:
  v: http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1
  link: 4.0
  link: .1
must support:
  v: period
must support:
  v: end

type:
  v: Encounter
profile:
  v: http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1
  link: 4.0
  link: .1
must support:
  v: period
must support:
  v: end

type:
  v: Location
profile:
  v: http://hl7.org/fhir/StructureDefinition/Location|4.0.1
  link: 4.0
  link: .1
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|4.0.1
  link: 4.0
  link: .1

type:
  v: CodeSystem
profile:
  v: http://hl7.org/fhir/StructureDefinition/CodeSystem|4.0.1
  link: 4.0
  link: .1
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|4.0.1
  link: 4.0
  link: .1
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/ecr/ValueSet/valueset-chlamydia-example|3.0.0-ballot
    link: 3.0
    link: .0

content type:
  v: text/cql

content type:
  v: application/elm+xml