HIVCommon
type: Library
node role: treeRoot
id:
  v: HIVCommon
text:
  status:
    v: extensions
  div: Title: CQL - HIV Common Id: HIVCommon Version: 1.0.1 Url: CQL - HIV Common Experimental: true Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2025-09-26 07:23:41+0000 Publisher: Jembi Health Systems Description: Common CQL for HIV calculations. Jurisdiction: 001 Related Artifacts: Dependencies Observation Category Codes SNOMED CT (all versions) Logical Observation Identifiers, Names and Codes (LOINC) HIV Test Types ARV Drugs Parameters: Name Type Min Max In/Out Patient Patient 0 1 Out Data Requirements: Type Profile MS Code Filter Observation http://hl7.org/fhir/StructureDefinition/Observation code filter: path: code system: http://snomed.info/sct code: 315124004 Observation http://hl7.org/fhir/StructureDefinition/Observation code filter: path: code value set: http://jembi.org/fhir/ValueSet/hiv-test-type-value-set Observation http://hl7.org/fhir/StructureDefinition/Observation code filter: path: code system: http://loinc.org code: 47248-0 Content: text/cql library HIVCommon using FHIR version '4.0.1' include FHIRHelpers version '4.0.1' //include fhir.cqf.common.FHIRCommon valueset "HIV Test Types": 'http://jembi.org/fhir/ValueSet/hiv-test-type-value-set' valueset "ARV Drugs": 'http://jembi.org/fhir/ValueSet/arv-treatment-value-set' codesystem "Observation Category Codes": 'http://terminology.hl7.org/CodeSystem/observation-category' codesystem "SNOMED CT Codes": 'http://snomed.info/sct' codesystem "LOINC Codes": 'http://loinc.org' code "Laboratory Observation Category": 'laboratory' from "Observation Category Codes" code "HIV Viral Load Observation Code": '315124004' from "SNOMED CT Codes" code "HIV+ Code": 'LA24955-9' from "LOINC Codes" code "Initiated ART Code": '63936-9' from "LOINC Codes" code "ART Status Code": '47248-0' from "LOINC Codes" context Patient define function ViralLoadResult(period Interval<DateTime>): [Observation: "HIV Viral Load Observation Code"] O where exists ( O.category C where C = "Laboratory Observ…
url:
  v: http://jembi.org/fhir/Library/HIVCommon
version:
  v: 1.0.1
name:
  v: HIVCommon
title:
  v: CQL - HIV Common
status:
  v: active
experimental:
  v: true
type:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/library-type
    code:
      v: logic-library
date:
  v: 2025-09-26T07:23:41+00:00
publisher:
  v: Jembi Health Systems
contact:
  name:
    v: Jembi Health Systems
  telecom:
    system:
      v: url
    value:
      v: https://www.jembi.org/
  telecom:
    system:
      v: email
contact:
  name:
    v: Richard Langford
  telecom:
    system:
      v: email
    use:
      v: work
description:
  v: Common CQL for HIV calculations.
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
    code:
      v: 001
    display:
      v: World
related artifact:
  type:
    v: depends-on
  display:
    v: Code System Observation Category Codes
  resource:
    v: http://terminology.hl7.org/CodeSystem/observation-category
    link: http://terminology.hl7.org/CodeSystem/observation-category
related artifact:
  type:
    v: depends-on
  display:
    v: Code System SNOMED CT Codes
  resource:
    v: http://snomed.info/sct
    link: http://snomed.info/sct
related artifact:
  type:
    v: depends-on
  display:
    v: Code System LOINC Codes
  resource:
    v: http://loinc.org
    link: http://loinc.org
related artifact:
  type:
    v: depends-on
  display:
    v: Value Set HIV Test Types
  resource:
    v: http://jembi.org/fhir/ValueSet/hiv-test-type-value-set
    link: http://jembi.org/fhir/ValueSet/hiv-test-type-value-set
related artifact:
  type:
    v: depends-on
  display:
    v: Value Set ARV Drugs
  resource:
    v: http://jembi.org/fhir/ValueSet/arv-treatment-value-set
    link: http://jembi.org/fhir/ValueSet/arv-treatment-value-set
parameter:
  name:
    v: Patient
  use:
    v: out
  min:
    v: 0
  max:
    v: 1
  type:
    v: Patient
data requirement:
  type:
    v: Observation
  profile:
    v: http://hl7.org/fhir/StructureDefinition/Observation
    link: http://hl7.org/fhir/StructureDefinition/Observation
  code filter:
    path:
      v: code
    code: http://snomed.info/id/315124004
      system:
        v: http://snomed.info/sct
      code:
        v: 315124004
data requirement:
  type:
    v: Observation
  profile:
    v: http://hl7.org/fhir/StructureDefinition/Observation
    link: http://hl7.org/fhir/StructureDefinition/Observation
  code filter:
    path:
      v: code
    value set:
      v: http://jembi.org/fhir/ValueSet/hiv-test-type-value-set
      link: http://jembi.org/fhir/ValueSet/hiv-test-type-value-set
data requirement:
  type:
    v: Observation
  profile:
    v: http://hl7.org/fhir/StructureDefinition/Observation
    link: http://hl7.org/fhir/StructureDefinition/Observation
  code filter:
    path:
      v: code
    code: https://loinc.org/rdf/47248-0
      system:
        v: http://loinc.org
      code:
        v: 47248-0
content:
  content type:
    v: text/cql
content:
  content type:
    v: application/elm+xml
content:
  content type:
    v: application/elm+json