The ability to ‘push’ term mappings has actually been in the Better Ehrscape /composition POST for some time but I think ti only works on LOCATABLEname/value and
It is applied at run-time per-composition, not in the template.
and generates somethinh like this
{
"@class": "ELEMENT",
"name": {
"@class": "DV_TEXT",
"value": "Systolic",
"mappings": [
{
"@class": "TERM_MAPPING",
"match": "=",
"target": {
"@class": "CODE_PHRASE",
"terminology_id": {
"@class": "TERMINOLOGY_ID",
"value": "SNOMED-CT"
},
"code_string": "271649006"
}
}
]
}
}
which was what I was suggesting in the other thread. I think it many only work on name/value.
What is new in Better CDR 4.0 is the ability to query an ELEMENT for one of these terms , regardless of the parent archetype context.
This uses a code
predicate. Not how I might have done it but I guess it aligns with the FHIR approach.
SELECT
sys/value as Systolic,
dia/value as Diastolic
FROM COMPOSITION c
CONTAINS (ELEMENT sys[code='SNOMED-CT::271649006'] AND ELEMENT dia[code='SNOMED-CT::271650006'])