Skip to content
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

Fix to prefetch example, for userId #453

Merged
merged 1 commit into from
Dec 21, 2018

Conversation

isaacvetter
Copy link
Member

Fixes #410

The context.userId field is (somewhat recently) defined to contains the FHIR resource name and identifier. For example, this field should contain: Practitioner/123. This was done to explicitly support scenarios other than provider-facing, for example, the user could be Patient/456' or Person/789` (following the user-to-FHIR mapping) that SMART negotiated.

Because of this change, the prefetch example of Practitioner/{{context.userId}} would translate into Practitioner/Practitioner/123 as issue #410 points out.

This PR simply removes the "Practitioner/" string from the example, in lieu of the alternative, breaking changes suggested in #410.

Fixes #410 

The `context.userId` field is (somewhat recently) defined to contains the FHIR resource name and identifier. For example, this field should contain: `Practitioner/123`. This was done to explicitly support scenarios other than provider-facing, for example, the user could be `Patient/456' or `Person/789` (following the [user-to-FHIR mapping](smart-on-fhir/smart-on-fhir.github.io#148)) that SMART negotiated.

Because of this change, the prefetch example of `Practitioner/{{context.userId}}` would translate into `Practitioner/Practitioner/123` as issue #410 points out. 

This PR simply removes the "Practitioner/" string from the example, in lieu of the alternative, breaking changes suggested in #410.
@mattvarghese
Copy link
Contributor

Aren't both the options "breaking" changes though?
That was my thinking when I suggested instead to rename to practitionerId, since then, the resource type is implied.

@mattvarghese
Copy link
Contributor

Isaac explained this to me - I'm okay with going ahead with this plan.

@isaacvetter isaacvetter merged commit cbf18b9 into master Dec 21, 2018
@isaacvetter isaacvetter deleted the iss410-userId-resourcename-prefix branch December 21, 2018 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants