Cumuluz Translate Implementation Guide
0.1.0 - ci-build
Cumuluz Translate Implementation Guide - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
Use the experimental laboratory adapter only for the registered GLIMS OUL^R21/HL7 V2 2.4 and OUL^R22/HL7 V2 2.5 contracts. It produces an EU Lab 2.1.0 R4 document through explicit technical-edge, logical and target StructureMaps. It does not register generic V2 conversion or additional FHIR profile pairs.
| Need | Endpoint or value |
|---|---|
| Transform | POST /fhir/r4/$transform |
| Lab alias | POST /fhir/hl7v2-r4/$transform |
| CapabilityStatement | GET /fhir/hl7v2-r4/metadata |
| OperationDefinition | GET /fhir/hl7v2-r4/OperationDefinition/glims-lab-transform |
| Source contracts | urn:cumuluz:hl7v2:GLIMS:OUL-R21:2.4, urn:cumuluz:hl7v2:GLIMS:OUL-R22:2.5 |
| Target profile | http://hl7.eu/fhir/laboratory/StructureDefinition/Bundle-eu-lab\|2.1.0 |
JSON requests use R4 Parameters with a source Binary of content type x-application/hl7-v2+er7 and base64-encoded original ER7 bytes. Supply the target canonical with valueCanonical. An omitted sourceProfile selects the exact registered contract from MSH. An explicit source canonical must match the header; R21/2.5 and R22/2.4 are not registered. Optional timeZone is a string, defaulting to Europe/Amsterdam for timestamps without an offset. validationMode accepts report or enforce; returnLogical is a Boolean.
Alternatively send a multipart source file on either lab-capable endpoint:
curl -sS \
-H 'Accept: application/fhir+json' \
-F 'source=@input.hl7;type=x-application/hl7-v2+er7' \
-F 'targetProfile=http://hl7.eu/fhir/laboratory/StructureDefinition/Bundle-eu-lab|2.1.0' \
-F 'validationMode=enforce' \
'http://localhost:8080/fhir/r4/$transform'
The alias can omit targetProfile because it has a single target; /fhir/r4/$transform requires it. Multipart primitive fields use their parameter names and plain values. Duplicate or unknown fields, unsupported transfer encodings, non-file sources and wrong part media types fail with HTTP 400. The complete request limit includes multipart overhead; oversized requests fail with 413. This is an alternative representation of the same operation.
Retain the supplied bytes and MSH-18 character set. The adapter supports ASCII, UTF-8 and ISO-8859-15 according to the source contract. Re-encoding a file before submission can change its meaning and source identity.
HTTP 200 returns R4 Parameters with:
| Parameter | Meaning |
|---|---|
result |
R4 document Bundle with EU Lab Composition, report and structured entries |
targetProfile |
selected EU Lab Bundle canonical |
outcome |
mapping/validation diagnostics; inspect all error and fatal issues |
source |
Binary retaining the original message bytes |
profileAssessment |
independent extra-profile assessment for each applicable resource |
mappingEvidence |
source/target maps and edge/logical validation; optional Binary intermediates with returnLogical=true |
This edge response uses mappingEvidence, rather than the FHIR profile-pair translationReport. A returned resource does not establish successful validation in report mode. Extra NL Core/GBB claims require successful unrelaxed validation; the adapter does not copy claims from examples.
DiagnosticReport.presentedForm includes a generated text Attachment alongside the structured results. Its contentType is text/plain; charset=utf-8; decode data as base64 and then UTF-8. The title and text identify it as generated from the supplied message. It is not an original laboratory document. Report issue time is retained when supplied; no current clinical timestamp is invented.
The header selects one of two registered GLIMS contracts. R21 and R22 are message structures; 2.4 and 2.5 are HL7 standard versions. These are exact GLIMS source subsets, not a generic converter for all laboratory messages.
| Field or behavior | R21 / 2.4 | R22 / 2.5 |
|---|---|---|
| Result values | Numeric NM and simple scalar SN, with a nonempty value | Same numeric values plus literal scalar ST, including blood group and rhesus text |
| OBX-11 status | F, C, P, R | F, C, P, R, plus I without a value |
| Pending results | Rejected by this contract | I becomes registered with temp-unknown dataAbsentReason; value[x] is absent |
| Specimens | Separate OBR occurrences; no inferred shared specimen identity | Namespace-qualified SPM-2 identities; a specimen can be shared by multiple orders in its SPM group |
| Order control and timing | ORC precedes OBR; OBR-27 or ORC-7 timing | ORC and optional scalar TQ1 follow their own OBR and precede its results |
| Clinical dates | Second precision, with source offset or configured zone | Also preserves day-only dates without inventing a midnight timestamp |
| Result producer | OBX-15 required | If absent, the required EU Lab performer Reference carries standard unknown data-absent-reason |
| Additional patient context | Registered PID subset | Also PD1-4 general practitioners; PV1 is retained in Binary with field-locator warnings |
Source identifiers, demographics, contacts, ordering providers, orders, transaction actors, reference ranges, notes, instruments and analysis dates pass through explicit technical-edge, logical and EU Lab maps. R22 has separate glims-r22-to-logical source maps that import shared normalization groups; this is reuse, not profile inheritance. Both contracts use the same registered EU Lab 2.1.0 target maps.
R22 pending units are retained as explicit notes, not as a fabricated result quantity. ST values remain strings without inferred ABO/Rh codes. A sending facility can identify the document author when there is no result producer; this does not make it the result-producing laboratory. The Dutch CX-5 label NNNLD maps explicitly to the broader NI identifier type, with NNNLD kept in type.text and the source authority/value preserved. No BSN identifier system or verification is inferred. Unconfirmed identifier-type labels remain source-local.
The GLIMS variant permits historical OBR records before the first SPM. This does not establish generic OUL_R22 conformance. Contradictory repeated specimen identities, SPM/OBR type/time/volume conflicts, mismatched order identifiers, displaced/duplicate controls and incompatible value/status combinations fail explicitly. Unsupported precision, complex/repeated values, cancellation/deletion messages, microbiology and unregistered version/message combinations remain outside these contracts.
Local laboratory and alternate code systems stay as supplied unless an explicit confirmed mapping exists. A valid EU Lab document does not establish equivalence to LOINC/SNOMED or earn a Dutch lab-profile claim. Extra source fields and unsupported composite qualifiers remain authoritative in the retained Binary; warning messages identify the field locators without repeating patient values.
A synthetic message with five OBR orders, two final ST results, eight pending results, two SPM specimens, post-OBR ORC/TQ1 and day-precision historical dates passes technical-edge, logical and official EU Lab validation. Its source bytes are retained unchanged; the two orders under the second SPM reference the same specimen. A text-only variant also validates with explicit missing-performer reasons. R21 maximal/collision/legacy cases remain covered, including byte-identical output for the deployed R21 reference case.
The repository's docs/HL7V2_LAB.md maintains the detailed field matrix, CLI commands and maximal, collision and legacy cases. FHIR profile-pair integration remains described in Transform; C-CDA uses its separate collection contract.