Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A stratifier for sample storage temperature #23

Open
enola-dkfz opened this issue Sep 24, 2024 · 0 comments
Open

A stratifier for sample storage temperature #23

enola-dkfz opened this issue Sep 24, 2024 · 0 comments
Assignees

Comments

@enola-dkfz
Copy link
Member

enola-dkfz commented Sep 24, 2024

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

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

@allentiak allentiak self-assigned this Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants