fhir-fuel / fhir-fuel.github.io

Place to prepare proposal to FHIR about JSON, JSON-Schema, Swagger/OpenAPI, JSON native databases and other JSON-frendly formats (yaml, edn, avro, protobuf etc) and technologies
Other
21 stars 0 forks source link

References #4

Open niquola opened 7 years ago

niquola commented 7 years ago

Problem

All implementers parse strings to work with references. There is no clear distinction between local & external refs. It would be nice to have refs more structured:


// for local refs
{
   "subject": {"resourceType": "Patient", "id": "pt-1"}
}
// for external

{
   "subject": {"uri": "http://otherserver/Patient/pt-1"}
}

This apprach also play well with inlining resolved references:

{ "subject": {"resourceType": "Patient", "id": "pt-1"} }

// after inline

{ "subject": {"resourceType": "Patient", "id": "pt-1", "name": [{....}], ....} }