-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Reference fields that can be equijoined #6
Comments
We use following reference structure: {id: "pt-1", resourceType: "Patient"} There was idea unified with union type: { Patient: 'pt-id' [, resourceType: "Patient" ] / * optional */ } See discussion here fhir-fuel/fhir-fuel.github.io#4 |
What nice about {id: .., resourceType:... } - that you can replace ref with resource and have same id and rt attrs (actual for graphql like results) |
Something like {id: .., resourceType:.. } makes sense to me. I think we might need to make it {resourceId: .., resourceType:.. }, since the "id" field is reserved for the ancestor Element. [1] If {resourceId: .., resourceType:.. } seems okay, I'll create a PR with that change. |
This is incorporated into PR #9 |
FHIR References store a relative URL to the item they are referencing. This is often of the form Patient/<patient_id_here>. The downside to this is that the reference field cannot be used in simple equality-based joins, since the relative prefix (like "Patient/" or "Encounter/" is present in the reference string.
Therefore, the we should consider additional fields in the Reference structure -- perhaps "reference_id" and "reference_type" -- where the former can be used for equality-based joins and the later defines the type of resource being referenced.
The text was updated successfully, but these errors were encountered: