BBMRI.de/GBA Implementation Guide
1.2.0 - CI Build
BBMRI.de/GBA Implementation Guide - Local Development build (v1.2.0). See the Directory of published versions
Official URL: https://fhir.bbmri.de/Library/SpecimenQualityReports | Version: 1.2.0 | |||
Active as of 2023-09-01 | Computable Name: SpecimenQualityReports |
This library contains various expressions used in different specimen related quality reports.
depends-on | http://hl7.org/fhir/Library/FHIR-ModelInfo|4.0.0 |
depends-on | http://hl7.org/fhir/Library/FHIRHelpers|4.0.0 |
Specimen | out | 0 | 1 | Specimen |
InInitialPopulation | out | 0 | 1 | boolean |
FirstSampleMaterialType | out | 0 | 1 | code |
NumberOfSampleMaterialTypes | out | 0 | 1 | integer |
CollectedYear | out | 0 | 1 | integer |
CollectedMonth | out | 0 | 1 | integer |
CollectedDay | out | 0 | 1 | integer |
CollectedHour | out | 0 | 1 | integer |
StorageTemperatureCodings | out | 0 | * | Coding |
StorageTemperatureCodes | out | 0 | 1 | string |
NumberOfStorageTemperatureCodes | out | 0 | 1 | integer |
SampleDiagnosisCodings | out | 0 | * | Coding |
SampleDiagnosisICD10Codes | out | 0 | 1 | string |
NumberOfSampleDiagnosesICD10Codes | out | 0 | 1 | integer |
SampleDiagnosisICD10GMCodes | out | 0 | 1 | string |
NumberOfSampleDiagnosesICD10GMCodes | out | 0 | 1 | integer |
BodySiteCodes | out | 0 | 1 | string |
NumberOfBodySiteCodes | out | 0 | 1 | integer |
text/cql
library Retrieve
using FHIR version '4.0.0'
include FHIRHelpers version '4.0.0'
context Specimen
define InInitialPopulation:
true
define FirstSampleMaterialType:
First(from Specimen.type.coding C
where C.system = 'https://fhir.bbmri.de/CodeSystem/SampleMaterialType'
return C.code)
define NumberOfSampleMaterialTypes:
Count(from Specimen.type.coding C
where C.system = 'https://fhir.bbmri.de/CodeSystem/SampleMaterialType'
return C.code)
define CollectedYear:
year from FHIRHelpers.ToDateTime(Specimen.collection.collected)
define CollectedMonth:
month from FHIRHelpers.ToDateTime(Specimen.collection.collected)
define CollectedDay:
day from FHIRHelpers.ToDateTime(Specimen.collection.collected)
define CollectedHour:
hour from FHIRHelpers.ToDateTime(Specimen.collection.collected)
define StorageTemperatureCodings:
flatten
from Specimen.extension E
where E.url = 'https://fhir.bbmri.de/StructureDefinition/StorageTemperature'
return E.value.coding
define StorageTemperatureCodes:
Combine(from StorageTemperatureCodings C
where C.system = 'https://fhir.bbmri.de/CodeSystem/StorageTemperature'
return C.code, ', ')
define NumberOfStorageTemperatureCodes:
Count(from StorageTemperatureCodings C
where C.system = 'https://fhir.bbmri.de/CodeSystem/StorageTemperature')
define SampleDiagnosisCodings:
flatten
from Specimen.extension E
where E.url = 'https://fhir.bbmri.de/StructureDefinition/SampleDiagnosis'
return E.value.coding
define SampleDiagnosisICD10Codes:
Combine(from SampleDiagnosisCodings C
where C.system = 'http://hl7.org/fhir/sid/icd-10'
return C.code, ', ')
define NumberOfSampleDiagnosesICD10Codes:
Count(from SampleDiagnosisCodings C
where C.system = 'http://hl7.org/fhir/sid/icd-10')
define SampleDiagnosisICD10GMCodes:
Combine(from SampleDiagnosisCodings C
where C.system = 'http://fhir.de/CodeSystem/dimdi/icd-10-gm'
return C.code, ', ')
define NumberOfSampleDiagnosesICD10GMCodes:
Count(from SampleDiagnosisCodings C
where C.system = 'http://fhir.de/CodeSystem/dimdi/icd-10-gm')
define BodySiteCodes:
Combine(from Specimen.collection.bodySite.coding C
where C.system = 'urn:oid:1.3.6.1.4.1.19376.1.3.11.36'
return C.code, ', ')
define NumberOfBodySiteCodes:
Count(from Specimen.collection.bodySite.coding C
where C.system = 'urn:oid:1.3.6.1.4.1.19376.1.3.11.36')
Content not shown - (
application/elm+xml
, size = 50Kb)