You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In FHIR you could extend primitive types with additional attributes.
This encoded in JSON with "_" prefix and has similar to variable type elements problems
with collections, schema, databases etc:
{
value: 42'
_value { extension: [....]}
}
Solution 1
We could apply the json-ld approach and encode primitives with objects:
But we simplify typed parsing of JSON because of type information is in the document
and does not require lookup in meta-data.
We also allow collections of extended primitives.
We could go farther and add $type annotation attribute to other elements
(i.e. complex elements or datatypes):
// in simple case{"attribute": "primitiveValue"}// in case with extensions{"attribute": {"value": ....,"extensions": .....}}// or{"attribute": {"<type>": ....,"extensions": .....}}{"attribute": {"string": ....,"extensions": .....}}
Problem
In FHIR you could extend primitive types with additional attributes.
This encoded in JSON with "_" prefix and has similar to variable type elements problems
with collections, schema, databases etc:
Solution 1
We could apply the json-ld approach and encode primitives with objects:
Additionally, we fix weak typed JSON by embedding type labels into object
We pay by deeper paths and some size of Resource (because of additional $type labels):
But we simplify typed parsing of JSON because of type information is in the document
and does not require lookup in meta-data.
We also allow collections of extended primitives.
We could go farther and add $type annotation attribute to other elements
(i.e. complex elements or datatypes):
The text was updated successfully, but these errors were encountered: