Stream: implementers
Topic: Bi-Directional Resource Referencing
Tim Berezny (Jul 09 2019 at 17:52):
I want to submit a ServiceRequest with an attachment in a DocumentReference.
Using DocumentReference.supportingInfo I can reference the DocumentReference
AND/OR
Using DocumentReference.context.related I can reference the ServiceRequest
This kind of thing comes up in a couple of places where the same connection can be represented by a reference from both resources to each other. Is there a general philosophy on how to approach this? In this particular case I'm included to use just DocumentReference.supportingInfo and ignore DocumentReference.context.related ... but I am unsure if that's the generally accepted or better approach.
John Moehrke (Jul 09 2019 at 18:45):
best to think about it from the which Resource is created first? If you do that then the second one will point at the first. The first will not point at the second. Yes a Resource can be updated... just outlining the theory... that later Resources will point at earlier Resources. also, all links can be traversed both directions anyway
Tim Berezny (Jul 09 2019 at 19:52):
Ok, interesting. I'll try to apply that general philosophy. thanks.
Last updated: Apr 12 2022 at 19:14 UTC