minha_1268
02/13/2025, 9:14 AMstructureMapTransform function from Medplum.
We are having a problem with creating array with structureMap.
Tried this:
https://github.com/ahdis/fhir-mapping-tutorial/blob/master/maptutorial/step7/map/step7.json
Expected to:
https://github.com/ahdis/fhir-mapping-tutorial/blob/master/maptutorial/step7/result/step7.source7.json
However, we got object instead. The function executed well without error....
{
"type": "TRight",
"value": {
"aa": {
"ab": "6789"
}
}
}
We also have looked at
- [FHIR](https://www.hl7.org/fhir/mapping-tutorial.html)
Would this be a Medplum error or any syntax error we have missed?
Thanks for your help in advance.two4zero_63114
02/13/2025, 9:16 AMtwo4zero_63114
02/13/2025, 9:21 AMts
const input: TypedValue[] = [
{
type: "ToFHIR",
value: {
"resourceType": "TLeft",
"aa": [
{
"ab": "12345"
},
{
"ab": "6789"
}
]
} // from source7.json,
},
];
const result = structureMapTransform(structureMap /* from step7.json */, input);
console.log(result);minha_1268
02/14/2025, 1:02 AMid and cp shows an error that is unsupported. Is it still in development?
transform?: 'create' | 'copy' | 'truncate' | 'escape' | 'cast' | 'append' | 'translate' | 'reference' | 'dateOp' |
'uuid' | 'pointer' | 'evaluate' | 'cc' | 'c' | 'qty' | 'id' | 'cp';reshma
02/15/2025, 6:10 PMminha_1268
02/21/2025, 2:01 AM