Id: SupplementalDataElementsFHIR4 Version: 0.1.0 Url: SupplementalDataElementsFHIR4 Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2021-01-28 23:14:24+0000 Publisher: Clinical Quality Framework Description: SupplementalDataElementsFHIR4 Jurisdiction: 001 Related Artifacts: Dependencies http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRHelpers|4.1.000 Ethnicity ONC Administrative Sex Payer Race Parameters: Name Type Min Max In/Out Patient Patient 0 1 Out SDE Ethnicity Coding 0 * Out SDE Payer Resource 0 * Out SDE Race Coding 0 * Out SDE Sex Coding 0 1 Out Data Requirements: Type Profile MS Code Filter Patient http://hl7.org/fhir/StructureDefinition/Patient ;;; Coverage http://hl7.org/fhir/StructureDefinition/Coverage ;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591 Content: text/cql library SupplementalDataElementsFHIR4 version '2.0.000'#xD; #xD; /*@update: @@BTR 2020-03-31 ->#xD; Incremented version to 2.0.0#xD; Updated FHIR version to 4.0.1#xD; @@@*/#xD; #xD; using FHIR version '4.0.1'#xD; #xD; include FHIRHelpers version '4.1.000' called FHIRHelpers#xD; #xD; valueset "Ethnicity": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.837'#xD; valueset "ONC Administrative Sex": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1'#xD; valueset "Payer": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591'#xD; valueset "Race": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.836'#xD; #xD; context Patient#xD; #xD; define "SDE Ethnicity":#xD; (flatten (#xD; Patient.extension Extension#xD; where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'#xD; return Extension.extension#xD; )) E#xD; where E.url = 'ombCategory'#xD; or E.url = 'detailed'#xD; return E.value as Coding#xD; #xD; define "SDE Payer":#xD; [Coverage: type in "Payer"] Payer#xD; return {#xD; code: Payer.type,#xD; period: Payer.period#xD; }#xD; #xD; define "SDE Race":#xD; (flatten (#xD; Patient.extension Extension#xD; where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'#xD; return Extension.extension#xD; )) E#xD; where E.url = 'ombCategory'#xD; or E.url = 'detailed'#xD; return E.value as Coding#xD; #xD; define "SDE Sex":#xD; case#xD; when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }#xD; when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }#xD; else null#xD; end#xD; Content: application/elm+xml Encoded data (48656 characters) Content: application/elm+json Encoded data (86380 characters)