$to-format
Debug conversion between Aidbox and FHIR formats
Aidbox converts FHIR and AIdbox formats on the fly. To debug this transformation, you can use POST /$to-format/fhir and POST /$to-format/aidbox endpoints, which can show you the result of your transformation with some additional info:
1
POST /$to-format/aidbox
2
3
resourceType: Observation
4
valueString: test
5
6
# 200
7
8
# result of transformation
9
resource:
10
resourceType: Observation
11
value: {string: test}
12
# dsl which is used for transformation
13
transform:
14
hasMember: {tr/reference: true, tr/ref: Reference, tr/isCollection: true}
15
derivedFrom: {tr/reference: true, tr/ref: Reference, tr/isCollection: true}
16
...
Copied!
And back:
1
POST /$to-format/fhir
2
3
resourceType: Observation
4
value:
5
string: test
6
7
# 200
8
resource:
9
resourceType: Observation
10
valueString: test
11
transform:
12
hasMember: {tr/reference: true, tr/ref: Reference, tr/isCollection: true}
13
derivedFrom: {tr/reference: true, tr/ref: Reference, tr/isCollection: true}
14
encounter: {tr/reference: true, tr/ref: Reference}
Copied!

Notes:

How to read transform DSL
  • tr/reference - instruction to transform references
  • tr/ref - recursively go to type definition or follow content-ref
  • tr/union - translate union / choice types
  • tr/ext - translate known extensions
Copy link
Contents