Skip to content

Hydrate prefetch#30

Merged
smalho01 merged 3 commits intodevfrom
hydrate-prefetch
Jan 5, 2023
Merged

Hydrate prefetch#30
smalho01 merged 3 commits intodevfrom
hydrate-prefetch

Conversation

@KeeyanGhoreshi
Copy link
Copy Markdown

@KeeyanGhoreshi KeeyanGhoreshi commented Dec 10, 2022

Describe your changes

In support of REMS-260, this PR removes the request element from the prefetch in order to comply with the CDS hooks specification. You can read about prefetch tokens here:

https://cds-hooks.hl7.org/1.0/#prefetch-tokens

The request prefetch token is not valid due to the following rule:

Only root-level fields with a primitive value within the context object are eligible to be used as prefetch tokens. For example, {{context.medication.id}} is not a valid prefetch token because it attempts to access the id field of the medication field.

In order to use the MedicationRequest id as a prefetch token, it would need to be a top-level element of the context so that it could be accessed with context.medicationRequestId.

Since we do not know what the prefetch will look like for our purposes, I've removed this part of the prefetch entirely for now. Once the REMS CRD app starts requiring information in the prefetch, we will have a better understanding of what belongs in our prefetch and can make the appropriate changes at that time.

Issue ticket number and Jira link

REMS-260

Checklist before requesting a review

  • I have performed a self-review of my code
  • Ensure the target / base branch for any feature PR is set to dev not main (the only exception to this is releases from dev and hotfix branches)

Checklist for conducting a review

  • Review the code changes and make sure they all make sense and are necessary.
  • Pull the PR branch locally and test by running through workflow and making sure everything works as it is supposed to.

Workflow

Owner of the Pull Request will be responsible for merge after all requirements are met, including approval from at least one reviewer. Additional changes made after a review will dismiss any approvals and require re-review of the additional updates. Auto merging can be enabled below if additional changes are likely not to be needed. The bot will auto assign reviewers to your Pull Request for you.

@smalho01 smalho01 merged commit 315107f into dev Jan 5, 2023
@smalho01 smalho01 deleted the hydrate-prefetch branch January 5, 2023 15:59
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