-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
Description
Summary
$translate never includes the message parameter in its output because the code reads map.comments (plural) but the R4 ConceptMap field is comment (singular).
Root cause
In tx/workers/translate.js line ~287, the code checks:
if (map.comments) { ... }But the ConceptMap target element field is comment (singular) per the R4 spec.
Repro
curl -s -H 'Content-Type: application/fhir+json' -H 'Accept: application/fhir+json' \
-X POST 'https://tx-dev.fhir.org/r4/ConceptMap/$translate' \
-d '{"resourceType":"Parameters","parameter":[{"name":"sourceCode","valueCode":"active"},{"name":"sourceSystem","valueUri":"http://example.org/cs1"},{"name":"targetSystem","valueUri":"http://example.org/cs2"},{"name":"tx-resource","resource":{"resourceType":"ConceptMap","url":"http://example.org/cm-comment","status":"active","group":[{"source":"http://example.org/cs1","target":"http://example.org/cs2","element":[{"code":"active","target":[{"code":"A","equivalence":"equivalent","comment":"Test comment for translation"}]}]}]}}]}'Prod: Match includes message: "Test comment for translation"
Dev: Match omits message entirely
Reactions are currently unavailable