Conversation
enola-dkfz
left a comment
There was a problem hiding this comment.
I haven't checked the CQL against MIABIS profiles. I can confirm that the PR doesn't interfere with existing Focus functions. It also doesn't seem to introduce any security issues.
| else 'Unknown' | ||
| end | ||
|
|
||
| define StorageTemperature: |
There was a problem hiding this comment.
Is a storage temperature stratifier needed? The frontend is not displaying it.
There was a problem hiding this comment.
Good point — the BBMRI.de flavour doesn't include a storage temperature stratifier either. I'll remove the StorageTemperature define from template.cql and the corresponding stratifier entry from body.json.
| Flavour::Miabis, | ||
| ) | ||
| .unwrap(); | ||
| assert!(cql.contains("'whole-blood'")); |
There was a problem hiding this comment.
Those should fail because in MIABIS BBMRI.de codes get replaced with MIABIS codes.
Always run the tests locally: cargo test
There was a problem hiding this comment.
The tests do pass — cargo test confirms all 7.
'whole-blood' appears in template.cql unconditionally, in the SampleType stratifier function which maps MIABIS codes back to Lens labels for the MeasureReport output:
when Code 'WholeBlood' from MiabisDetailedSampleType then 'whole-blood'
That line is always present in the generated CQL regardless of the query criteria, so cql.contains("'whole-blood'") was trivially true and didn't test the workaround at all. The assertion that actually
verifies the workaround ran is cql.contains("'WholeBlood'") — that checks the MIABIS code was substituted into the filter criteria.
I've removed the misleading 'whole-blood' assertions and updated the Specimen.processing assertion to S.processing to match the filter snippet.
There was a problem hiding this comment.
Then my code is wrong! I'm gonna clone your repo and fix it.
There was a problem hiding this comment.
It is OK, BBMRI codes are only present in the template (in the stratifier mapping), will write specific negative tests for the conditions.
…e wait samply/focus#342 merged 2026-04-09; develop tag updated 2026-04-13 includes MIABIS CQL.
MIABIS CQL