ID-23: Client Prefetch Queried Data Check #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a client test for each hook that verifies that any data provided in the prefetch key is equal to the data returned when Inferno executes the prefetch query separately.
Notable design decisions:
Testing Guidance
Test by running the CRD Client (using SMART 2.0) and Server tests against each other using the wiki instructions and updating inputs to test different scenarios. Note that by default this preset refers back to the public inferno reference server. the
fhirServervalue in the requests entered in the server tests to point to a local instance or another server, but that isn't necessary because you can create mismatches by changing the prefetched data provided in the requests.Run each hook type once using the server test requests provided in the preset, which don't have any prefetch data. The "Prefetched data is equivalent to queried data" test should always pass with a message indicating no prefetch data was provided.
Test matches - test the case where the prefetched data matches what gets queried, both in the case of a search (coverage) and a read (user or patient). For example, you can use the following request for the order-dispatch hook (put in the "Request body or bodies for invoking the
order-dispatchhook" input in the server test).order-signhook" input in the server test). The "coverage" prefetch key has an extra Coverage resource in the Bundle and the "user" prefetch key has a Practitioner that isn't on the reference server.- run test 2.1.3 (or 2.1.1 if used SMART 1). You may need to provide the requested scopes - use "launch openid fhirUser offline_access patient/*.rs"
- run test 2.1.4 (or 2.1.2 if used SMART 1). When asked to launch Inferno from the EHR, navigate to https://inferno.healthit.gov/reference-server/app/app-launch and copy the local launch url from the user action dialog into the "App Launch URL" input and click the "Launch App" button. Inferno will then ask you to authorize the scopes before completing.
- pull the "ehr_access_token" output from test 2.1.4.08 (or the corresponding 2.1.2.X test for SMART v1) for use in the next step.