cds-hooks / docs

CDS Hooks website & specification
http://cds-hooks.org
Apache License 2.0
166 stars 61 forks source link

`context.userId` is inconsistent and should almost always be `PractitionerRole` #514

Closed isaacvetter closed 4 years ago

isaacvetter commented 4 years ago

The PractitonerRole resource identifies a clinical user acting within a specific organization with given credentials, specialties, authorizations and role.

It seems like the userId field in context SHOULD be valued with a PractitionerRole resources, if the hook is fired during a provider-facing workflow. In the case where a PractitionerRole isn't supported (e.g. DSTU2), Practitioner should be sent.

For patient-facing workflows, userId SHOULD be Patient or, in proxy-scenarios, RelatedPerson.

isaacvetter commented 4 years ago

We should update each hook to clarify when Patient/RelatedPerson may be used and that PractitionerRole is appropriate.

jmandel commented 4 years ago

Makes sense to allow; can you point me toward the discussion or documentation that leads you to prefer?

ETA: I should clarify that I'm not disputing the recommendation, but I feel like I'm probably missing context.