MIABIS diagnosis on Observation - #373
Conversation
|
@a-tuerk could you please upload a sample snippet of FHIR with Observation, Specimen etc. filled as expected by MIABIS? It isn't clear to me how the link from Specimen to Observation to Condition functions, is this via references? Or am I completely misunderstanding how this works? |
|
Sorry for the slow reply, and thanks for looking at this. There is no Specimen → Observation → Condition chain — that is the part that is confusing, A diagnosis linked to a sample lives on {
"resourceType": "Observation",
"meta": { "profile": ["https://fhir.bbmri-eric.eu/StructureDefinition/miabis-observation"] },
"status": "final",
"code": { "coding": [{ "system": "http://loinc.org", "code": "52797-8" }] },
"subject": { "reference": "Patient/DIEBBNMCNNYKG4DA" },
"valueCodeableConcept": {
"coding": [{ "system": "http://hl7.org/fhir/sid/icd-10", "code": "C50.9" }]
},
"specimen": { "reference": "Specimen/DIEBBNMERG6R2P5K" }
}
{
"resourceType": "Condition",
"meta": { "profile": ["https://fhir.bbmri-eric.eu/StructureDefinition/miabis-condition"] },
"subject": { "reference": "Patient/DIEBBNMCNNYKG4DA" }
}That is not a bug in the ETL. The Specimen for completeness — the link is {
"resourceType": "Specimen",
"id": "DIEBBNMERG6R2P5K",
"meta": { "profile": ["https://fhir.bbmri-eric.eu/StructureDefinition/miabis-sample"] },
"type": { "coding": [{
"system": "https://fhir.bbmri-eric.eu/CodeSystem/miabis-detailed-samply-type-cs",
"code": "Serum" }] },
"subject": { "reference": "Patient/DIEBBNMCNNYKG4DA" }
}Why the PR exists: the current MIABIS flavour queries Why it matches both placements rather than moving to Observation: a coded Happy to add these as a fixture in the PR if that would help review. (The |
f52f4c9 to
e088182
Compare
|
One more thing that may help review: the MIABIS E2E bundle in It's a draft because it asserts what this PR adds — it fails against today's |
MIABIS diagnosis on Observation.
The MIABIS-on-FHIR IG puts sample-linked diagnoses on
Observation(
miabis-observation,value[x].coding[icd-10-who]) and reservesConditionfor diagnoses of the patient the biobank holds no specimen for.
Condition.codeis
0..1and the reference implementation (BBMRI-cz/MoF-library, used byBBMRI-cz/fhir-module) leaves it empty, sodiagnosis,date_of_diagnosisanddiagnosis_age_donorreturned zero against MIABIS data. Both placements arevalid, so the snippets now match either, the same way the bbmri flavour matches
its three ICD-10 code systems.
The
Diagnosisdefine and the stratifier basis move toObservation, since astratifier takes one population basis and the sample-linked diagnosis is the one
worth breaking down.
Verified against a Blaze store written by
fhir-module: diagnosis queries nowreturn the expected donors where they returned zero, a coded
Conditionisstill matched, an absent code still returns zero, and the stratifier reports the
ICD-10 codes present.