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 $transform to translate one registered source resource to one registered target profile. A source Bundle uses the same STU3-to-R4 endpoint but follows Bundle Translation. The EPS Bundle target adds the EPS Document Output contract. A completed form uses QuestionnaireResponse Extraction.
| Direction | Endpoint | HTTP request body | HTTP 200 body |
HTTP 400 body |
|---|---|---|---|---|
| STU3 to R4 | POST /fhir/stu3-r4/$transform |
R4-style Parameters containing a STU3 source resource |
R4 Parameters containing an R4 result |
R4 OperationOutcome |
| STU3 to STU3 | POST /fhir/stu3/$transform |
STU3 Parameters containing a STU3 source |
STU3 Parameters containing a STU3 result |
STU3 OperationOutcome |
| R4 to STU3 | POST /fhir/r4-stu3/$transform |
R4 Parameters containing an R4 source |
STU3 Parameters containing a STU3 result |
STU3 OperationOutcome |
| R4 to R4 | POST /fhir/r4/$transform |
R4 Parameters containing an R4 source |
R4 Parameters containing an R4 result |
R4 OperationOutcome |
The endpoint fixes both FHIR versions. sourceProfile + targetProfile must identify one route in that endpoint's translation index.
All transform endpoints accept one UTF-8 JSON resource in the HTTP request body and return one UTF-8 JSON resource. Use:
Content-Type: application/fhir+json
Accept: application/fhir+json
FHIR XML, multipart input, form fields and a JSON-encoded string are not operation input formats. Place the source resource directly in Parameters.parameter.resource:
{
"resourceType": "Parameters",
"parameter": [
{ "name": "source", "resource": { "resourceType": "Patient" } },
{ "name": "sourceProfile", "valueCanonical": "<source canonical>" },
{ "name": "targetProfile", "valueCanonical": "<target canonical>" },
{ "name": "validationMode", "valueCode": "enforce" }
]
}
The example above uses the R4-style parameter datatypes used by STU3-to-R4, R4-to-STU3 and R4-to-R4 requests. A STU3-to-STU3 request is a STU3 Parameters resource and uses valueUri for sourceProfile and targetProfile.
For STU3-to-R4, the server reads the outer parameter structure using R4-style fields but parses only the nested source object as STU3. This is why the request uses valueCanonical while the source resource itself follows STU3.
On success, parameter[result].resource contains the target resource directly. Only parameter[logical].resource, when requested, is a FHIR Binary whose data follows normal base64 Binary encoding.
| Parameter | Cardinality | Meaning |
|---|---|---|
source |
1..1 |
Source FHIR resource. STU3-to-R4 also accepts a Bundle. |
sourceProfile |
0..1 |
Exact source canonical. It may be omitted only when source.meta.profile selects one unique supported profile. |
targetProfile |
usually 1..1 |
Exact target canonical. Bundle entries can select their own targets. |
validationMode |
0..1 |
report (default), enforce, or gated none. |
returnLogical |
0..1 |
Include the serialized logical intermediate as Binary; valid only for a single resource. |
Bundle sources cannot be combined with returnLogical.
| documentContext | 0..1 | R4 Composition used only for EPS document assembly on STU3-to-R4. |
canonical|version is accepted only when the installed top-level StructureDefinition has that version. Unsupported and ambiguous pairs fail; the service never falls back to another route with the same resource type. The obsolete validate transform parameter is rejected; use validationMode.
Complete synthetic request: Patient transform request.
curl -sS \
-H 'Accept: application/fhir+json' \
-H 'Content-Type: application/fhir+json' \
--data @ig/input/examples/patient-transform-request.json \
'http://localhost:8080/fhir/stu3-r4/$transform'
source validation -> source-to-logical map -> logical validation
-> governance/loss policy -> logical-to-target map -> target validation
| Mode | Behavior | Conformance status |
|---|---|---|
report |
Runs all stages and returns materialized output with diagnostics. | always non-conformant |
enforce |
Blocks unrelaxed errors, fatal issues and blocked governance decisions. | conformant only when all gates pass |
none |
Skips validation; available only when explicitly enabled by the operator. | always non-conformant |
Terminology translation occurs only when the selected StructureMap invokes a ConceptMap.
All success envelopes are FHIR Parameters resources in the target FHIR version.
| Parameter | R4 target | STU3 target | Client use |
|---|---|---|---|
result |
required | required | translated target resource |
targetProfile |
valueCanonical |
valueUri |
confirm selected route |
logical |
optional R4 Binary | optional STU3 Binary | diagnostics when requested |
outcome |
report/enforce | required | stage and validation issues |
translationReport |
required | evidence is carried in outcome |
route, artifacts, stages and loss decisions |
See the complete Patient transform response. A client should accept a result only after checking the expected target profile, conformance mode, blocking issue severities and applicable loss decision.
The report's mapped, changed, added, and deleted groups compare source and target payload values. They are not semantic-loss classifications.
Malformed Parameters, unknown parameters, invalid source JSON, missing profiles, unsupported or ambiguous pairs, and blocked enforce stages return HTTP 400 with a version-correct OperationOutcome.
Profile-specific mapping preconditions also fail explicitly. For PZP 2017 TreatmentDirective to PZP 1.0 or nl-core-TreatmentDirective2, supply the verified source version with its latest positive verification, linked parties, and health-professional author. Negative verification history is ignored; missing or ambiguous positive evidence fails. Known coded contact parties become role-only contained RelatedPersons without invented identity. Native R4 directives are not required to repeat legacy verification evidence. The transform never substitutes BeginDatum for the review date.
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "not-supported",
"diagnostics": "Unsupported translation route from '<source>' to '<target>'"
}
]
}
Do not retry the same request against another direction or target automatically. Refresh Discovery, correct the profile pair or route the failure to an operator.
application/fhir+json.report or none result as technically conformant.