Stream: cds hooks/github
Topic: docs / Issue #151 Prefetch variables and context key/valu...
Github Notifications (Jan 27 2018 at 21:46):
robs16 opened Issue #151
#119 is moving some top-level fields into the context (patient, encounter). The prefetch definitions provided in discovery need to reference user, patient, encounter, and potentially other elements which may be defined in the context of the given hook. These two needs should have a clear relationship. After discussing with @kpshek, I would propose the following for prefetch definition replacements:
- Continue to use the same delimiters. ie '{{', '}}'
- Reference the user via 'user'
- Reference context entries via prefix 'context.' to the name of the context field. For example 'context.patientid'
Note that this does not support structures in the context values. Rather than provide some form of structure support (ie the id field of a MedicationOrder), define a separate field for that id in the context to make it usable in prefetch.
Github Notifications (Jan 28 2018 at 03:41):
olbrich commented on Issue #151
For consistency, I would also suggest that references to FHIR resources be named like
context.patient_ref
(with a value ofPatient/123
orcontext.user_ref
(Provider/456
).
Github Notifications (Jan 28 2018 at 12:08):
robs16 commented on Issue #151
While naming of context parameters is a separate issue, I agree with having naming conventions for ids vs resource references. So using your example, should the user identified at the request level be be
user_ref
(it is not part of the context)?
Github Notifications (Jan 28 2018 at 20:59):
kpshek milestoned Issue #151
Github Notifications (Jan 29 2018 at 15:30):
kpshek commented on Issue #151
Note for myself -- more generally, we also need to update all of our prefetch documentation and examples now based upon #109
Github Notifications (Jan 29 2018 at 15:43):
kpshek assigned Issue #151
Github Notifications (Mar 26 2018 at 17:48):
kpshek closed Issue #151
Last updated: Apr 12 2022 at 19:14 UTC