Skip to content

A stratifier for sample storage temperature #23

@enola-dkfz

Description

@enola-dkfz

Prism sends Blaze a query with no criteria selected and parses the measure report Blaze returns in order to get the expected number of results when a certain criterion is selected on its own (combinations of criteria are not supported yet).

It would be nice to have another stratifier for storage temperature, like the one we have for sample type. It would need to be added to the CQL library and to the Measure for BBMRI and GBN.

Storage temperature is an extension in the Specimen FHIR resource:
https://simplifier.net/bbmri.de/specimen

This is the code list that BBMRI/GBN uses:
https://simplifier.net/bbmri.de/storagetemperature

In this directory there are CQL libraries containing placeholders (to prevent CQL injection) as well as the task bodies containing measure reports:
https://github.com/samply/prism/tree/main/resources

In Focus, a Bridgehead component doing the replacement, there are files with names equal to the placeholders, containing the code they are to be replaced with. By convention BBMRI/GBN placeholders should start with "BBMRI_". So the placeholder should be added to the CQL library here and to this Focus directory:
https://github.com/samply/focus/tree/develop/resources/cql

Implemented in samply/focus#250

Sample type stratifier can serve as an orientation, but in it we are grouping level 2 sample types into level 1 types, so the code for storage temperature should be less complicated:
https://github.com/samply/focus/blob/develop/resources/cql/BBMRI_STRAT_SAMPLE_TYPE_STRATIFIER

In Measure Report the expression from the CQL is referenced in the Stratifier:
https://github.com/samply/prism/blob/main/resources/body_bbmri.json

(Focus already has a conversion from AST to CQL implemented for BBMRI/GBN, but not switched on yet, so at first the storage temperature stratifier should be implemented using CQL placeholders as explained above.)

Full CQL query, from Focus (for tests):
https://github.com/samply/focus/blob/develop/resources/test/query_bbmri.cql

Specifically, the lines below.
(Both CustodianRecord and Storage are extensions.)
https://github.com/samply/focus/blob/3e7471d6ae74893812749b9bd1c0b70dfe273811/resources/test/query_bbmri.cql#L22

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions