{
"description": "This library is used as an example module definition in the FHIR Quality Measure Implementation Guide",
"_filename": "Library-EXMLogic-ModuleDefinitionDirectReference.json",
"package_name": "hl7.fhir.us.cqfmeasures",
"date": "2019-09-03",
"dataRequirement": [ {
"type": "Patient",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Patient" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Patient?_id={{context.patientId}}"
} ]
}, {
"type": "Encounter",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Encounter?subject=Patient/{{context.patientId}}"
} ],
"mustSupport": [ "period" ]
}, {
"type": "Encounter",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Encounter?subject=Patient/{{context.patientId}}"
} ],
"mustSupport": [ "period" ]
}, {
"type": "Encounter",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Encounter?subject=Patient/{{context.patientId}}&type:in=http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
} ],
"codeFilter": [ {
"path": "type",
"valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
} ],
"mustSupport": [ "type", "status", "period" ]
}, {
"type": "Condition",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Condition" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Condition?subject=Patient/{{context.patientId}}"
} ],
"codeFilter": [ {
"path": "id"
} ],
"mustSupport": [ "id" ]
}, {
"type": "Encounter",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Encounter?subject=Patient/{{context.patientId}}"
} ],
"mustSupport": [ "period" ]
}, {
"type": "Encounter",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Encounter?subject=Patient/{{context.patientId}}"
} ],
"mustSupport": [ "period" ]
}, {
"type": "Encounter",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Encounter?subject=Patient/{{context.patientId}}"
} ],
"mustSupport": [ "period" ]
}, {
"type": "Encounter",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Encounter?subject=Patient/{{context.patientId}}"
} ],
"mustSupport": [ "period" ]
}, {
"type": "Patient",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Patient" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Patient?_id={{context.patientId}}"
} ],
"mustSupport": [ "url", "extension", "value" ]
}, {
"type": "Patient",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Patient" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Patient?_id={{context.patientId}}"
} ],
"mustSupport": [ "url", "extension", "value" ]
}, {
"type": "Coverage",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Coverage" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Coverage?beneficiary=Patient/{{context.patientId}}&type:in=http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
} ],
"codeFilter": [ {
"path": "type",
"valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
} ],
"mustSupport": [ "type", "period" ]
}, {
"type": "Patient",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Patient" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Patient?_id={{context.patientId}}"
} ],
"mustSupport": [ "url", "extension", "value" ]
}, {
"type": "Patient",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Patient" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Patient?_id={{context.patientId}}"
} ],
"mustSupport": [ "url", "extension", "value" ]
}, {
"type": "Encounter",
"profile": [ "http://hl7.org/fhir/StructureDefinition/Encounter" ],
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-fhirQueryPattern",
"valueString": "Encounter?subject=Patient/{{context.patientId}}"
} ],
"mustSupport": [ "period" ]
} ],
"meta": {
"profile": [ "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-moduledefinitionlibrary" ]
},
"publisher": "HL7 International / Clinical Quality Information",
"jurisdiction": [ {
"coding": [ {
"code": "US",
"system": "urn:iso:std:iso:3166"
} ]
} ],
"name": "EXMLogicModuleDefinitionDirectReference",
"type": "{:coding [{:system \\\"http://terminology.hl7.org/CodeSystem/library-type\\\", :code \\\"module-definition\\\"}]}",
"experimental": "true",
"resourceType": "Library",
"title": "Example Logic Library - Module Definition Direct Reference",
"package_version": "5.0.0-ballot2",
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
"valueCoding": {
"code": "billing",
"system": "http://terminology.hl7.org/CodeSystem/diagnosis-role",
"display": "Billing"
}
}, {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
"extension": [ {
"url": "libraryName",
"valueString": "EXMLogic"
}, {
"url": "name",
"valueString": "Inpatient Encounter"
}, {
"url": "statement",
"valueString" : "define \"Inpatient Encounter\":\n [\"Encounter\"] Encounter\n where LengthInDays(Encounter.period) <= 120\n and Encounter.period ends during \"Measurement Period\""
}, {
"url": "displaySequence",
"valueInteger": 0
} ]
}, {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
"extension": [ {
"url": "libraryName",
"valueString": "EXMLogic"
}, {
"url": "name",
"valueString": "Initial Population"
}, {
"url": "statement",
"valueString" : "define \"Initial Population\":\n \"Inpatient Encounter\" Encounter"
}, {
"url": "displaySequence",
"valueInteger": 1
} ]
}, {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
"extension": [ {
"url": "libraryName",
"valueString": "EXMLogic"
}, {
"url": "name",
"valueString": "Measure Population"
}, {
"url": "statement",
"valueString" : "define \"Measure Population\":\n \"Initial Population\""
}, {
"url": "displaySequence",
"valueInteger": 2
} ]
}, {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
"extension": [ {
"url": "libraryName",
"valueString": "EXMLogic"
}, {
"url": "name",
"valueString": "Stratifier 1"
}, {
"url": "statement",
"valueString" : "define \"Stratifier 1\":\n \"Inpatient Encounter\" Encounter\n where not (PrincipalDiagnosis(Encounter).code in \"Psychiatric/Mental Health Patient\")"
}, {
"url": "displaySequence",
"valueInteger": 3
} ]
}, {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
"extension": [ {
"url": "libraryName",
"valueString": "EXMLogic"
}, {
"url": "name",
"valueString": "Stratifier 2"
}, {
"url": "statement",
"valueString" : "define \"Stratifier 2\":\n \"Inpatient Encounter\" Encounter\n where PrincipalDiagnosis(Encounter).code in \"Psychiatric/Mental Health Patient\""
}, {
"url": "displaySequence",
"valueInteger": 4
} ]
}, {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
"extension": [ {
"url": "libraryName",
"valueString": "EXMLogic"
}, {
"url": "name",
"valueString": "Stratifier 3"
}, {
"url": "statement",
"valueString" : "define \"Stratifier 3\":\n \"Inpatient Encounter\" Encounter\n where PrincipalDiagnosis(Encounter) is null"
}, {
"url": "displaySequence",
"valueInteger": 5
} ]
}, {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
"extension": [ {
"url": "libraryName",
"valueString": "EXMLogic"
}, {
"url": "name",
"valueString": "Stratifier 4"
}, {
"url": "statement",
"valueString" : "define \"Stratifier 4\":\n \"Inpatient Encounter\" Encounter\n where PrincipalDiagnosis(Encounter) is null"
}, {
"url": "displaySequence",
"valueInteger": 6
} ]
}, {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
"extension": [ {
"url": "libraryName",
"valueString": "EXMLogic"
}, {
"url": "name",
"valueString": "SDE Ethnicity"
}, {
"url": "statement",
"valueString": "define \"SDE Ethnicity\":\n (flatten (\n Patient.extension Extension\n where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'\n return Extension.extension\n )) E\n where E.url = 'ombCategory'\n or E.url = 'detailed'\n return E.value as Coding"
}, {
"url": "displaySequence",
"valueInteger": 7
} ]
}, {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
"extension": [ {
"url": "libraryName",
"valueString": "EXMLogic"
}, {
"url": "name",
"valueString": "SDE Payer"
}, {
"url": "statement",
"valueString": "define \"SDE Payer\":\n [Coverage: type in \"Payer\"] Payer\n return {\n code: Payer.type,\n period: Payer.period\n }"
}, {
"url": "displaySequence",
"valueInteger": 8
} ]
}, {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
"extension": [ {
"url": "libraryName",
"valueString": "EXMLogic"
}, {
"url": "name",
"valueString": "SDE Race"
}, {
"url": "statement",
"valueString": "define \"SDE Race\":\n (flatten (\n Patient.extension Extension\n where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'\n return Extension.extension\n )) E\n where E.url = 'ombCategory'\n or E.url = 'detailed'\n return E.value as Coding"
}, {
"url": "displaySequence",
"valueInteger": 9
} ]
}, {
"url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
"extension": [ {
"url": "libraryName",
"valueString": "EXMLogic"
}, {
"url": "name",
"valueString": "SDE Sex"
}, {
"url": "statement",
"valueString": "define \"SDE Sex\":\n case\n when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }\n when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }\n else null\n end"
}, {
"url": "displaySequence",
"valueInteger": 10
} ]
}, {
"url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
"valueCode": "cqi"
} ],
"status": "active",
"id": "cd637098-d40c-46cd-aa42-073286a346f6",
"kind": null,
"url": "http://hl7.org/fhir/us/cqfmeasures/Library/EXMLogic-ModuleDefinitionDirectReference",
"identifier": [ {
"use": "official",
"value": "EXMLogic-ModuleDefinitionDirectReference",
"system": "http://example.org/fhir/cqi/ecqm/Library/Identifier"
} ],
"version": "1.0.0",
"relatedArtifact": [ {
"type": "depends-on",
"display": "FHIR model information",
"resource": "http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1"
}, {
"type": "depends-on",
"display": "Library FHIRHelpers",
"resource": "http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1"
}, {
"type": "depends-on",
"display": "Code system Diagnosis Role",
"resource": "http://terminology.hl7.org/CodeSystem/diagnosis-role"
}, {
"type": "depends-on",
"display": "Value set Emergency Department Visit",
"resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
}, {
"type": "depends-on",
"display": "Value set Psychiatric/Mental Health Patient",
"resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.299"
}, {
"type": "depends-on",
"display": "Value set Hospital Settings",
"resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.126"
}, {
"type": "depends-on",
"display": "Value set Chronic Liver Disease Legacy Example",
"resource": "http://hl7.org/fhir/us/cqfmeasures/ValueSet/chronic-liver-disease-legacy-example"
}, {
"type": "depends-on",
"display": "Value set ONC Administrative Sex",
"resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1"
}, {
"type": "depends-on",
"display": "Value set Race",
"resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.836"
}, {
"type": "depends-on",
"display": "Value set Ethnicity",
"resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.837"
}, {
"type": "depends-on",
"display": "Value set Payer",
"resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
} ],
"contact": [ {
"telecom": [ {
"value": "http://www.hl7.org/Special/committees/cqi",
"system": "url"
} ]
} ],
"parameter": [ {
"max": "1",
"min": 0,
"use": "in",
"name": "Measurement Period",
"type": "Period"
}, {
"max": "1",
"min": 0,
"use": "out",
"name": "Patient",
"type": "Patient"
}, {
"max": "*",
"min": 0,
"use": "out",
"name": "Inpatient Encounter",
"type": "Encounter"
}, {
"max": "*",
"min": 0,
"use": "out",
"name": "Initial Population",
"type": "Encounter"
}, {
"max": "*",
"min": 0,
"use": "out",
"name": "Measure Population",
"type": "Encounter"
}, {
"max": "*",
"min": 0,
"use": "out",
"name": "Stratifier 1",
"type": "Encounter"
}, {
"max": "*",
"min": 0,
"use": "out",
"name": "Stratifier 2",
"type": "Encounter"
}, {
"max": "*",
"min": 0,
"use": "out",
"name": "Stratifier 3",
"type": "Encounter"
}, {
"max": "*",
"min": 0,
"use": "out",
"name": "Stratifier 4",
"type": "Encounter"
}, {
"max": "*",
"min": 0,
"use": "out",
"name": "SDE Ethnicity",
"type": "Coding"
}, {
"max": "*",
"min": 0,
"use": "out",
"name": "SDE Payer",
"type": "Resource"
}, {
"max": "*",
"min": 0,
"use": "out",
"name": "SDE Race",
"type": "Coding"
}, {
"max": "1",
"min": 0,
"use": "out",
"name": "SDE Sex",
"type": "Coding"
} ]
}