-
Notifications
You must be signed in to change notification settings - Fork 3
Client Instructions
This document provides a step-by-step guide for using the Da Vinci CRD Client v2.0.1 Test Suite to test a CRD client system, including instructions for a demonstration execution against a public CRD client reference implementation.
To execute a simple set of tests targeting a single hook using Inferno's mocked response, follow these steps:
- Create a "Da Vinci CRD Client v2.0.1 Test Suite" session using the default "SMART App Launch Version", which will not be used.
- Select the "1.1 Client Registration" group from the list at the left and and click the "RUN TESTS" button in the upper right.
- Provide the CRD JWT Issuer input, which will be used by Inferno to identify CDS Hook invocation requests coming from the client under test. You can also provide the CRD JSON Web Key Set (JWKS) input as a URL or raw key set, which is required for Inferno to perform complete JWT verification, but is not required for execution.
- Click the "SUBMIT" button to verify the registration details. You can continue even if the tests fail, e.g., because no JWKS was provided.
- Select the sub-group under "1.2 Hooks" that corresponds to a hook implemented by the tested client and click the "RUN TESTS" button in the upper right.
- Select the response types Inferno should respond with under the Response types to return from [hook name] hook requests input (the options depend on which hook was chosen).
- Click the "SUBMIT" button and a "User Action Required" dialog will be appear asking for hook invocations to be made against the Inferno's simulated service endpoint.
- Make one or more hook invocations of the target hook against Inferno's simulated service
endpoint, including in the request a JWT with the
issfield equal to the value provided in the CRD JWT Issuer input. If you make a request with a differentissvalue, Inferno will not be able to link the request to the test session and will not respond or analyze the request. - Once all requests have been made, click the link in the "User Action Required" dialog and Inferno will analyze the requests to determine whether they were conformant.
- Assuming that at least one request was successfully made, a second "User Action Required" dialog will appear asking for confirmation that the returned cards were displayed to the user within the tested system. Respond using the appropriate link to complete the tests.
The following groups and inputs can be used to expand the process described in the Quick Start section into a complete set of tests.
Additional hooks can be tested in the same manner by selecting and running the associated group as described in Quick Start.
The "Custom response template for [hook name] hook requests" input can be used to customize the hook responses to better fit the configuration of the tested client system. When this input is populated, the corresponding "Response types to return from [hook name] hook requests" input is ignored. See the documentation on controlling Inferno's simulated CRD responses for complete details on how to use these inputs.
After running one or more hook groups, run group "1.3 Card Must Support" to check if the client has received and attested to support for all of the required cards (External Reference and Instructions) and demonstrated the display of all of the must support elements in the coverage-information extension when returned on Coverage Information actions.
Re-run these tests to re-evaluate after making additional requests with adjusted responses (see Customizing Responses) so that the requisite support is demonstrated.
Group "2 FHIR API" focuses on the FHIR API of the tested client outside of the context of a CDS Hook invocation. It focuses on API requirements that go beyond the base US Core API requirements that are included in CRD STU 2.
When starting the CRD client suite session, choose the appropriate version of the SMART specification in the "SMART App Launch Version" suite option.
Running the tests require 4 types of inputs:
- FHIR Endpoint (required): the base FHIR url
- EHR Launch Credentials: SMART client details corresponding to the version of SMART chosen when starting the session.
-
[ResourceType] Resources: FHIR resource of the [ResourceType] that Inferno will use to
perform an
updateinteraction. -
[ResourceType] IDs: comma-separated lists of FHIR resource ids of the [ResourceType] that
Inferno will use to perform a
readinteraction.
NOTE: the resources and resource IDs for testing reads and updates are not required, but if no details or provided, those tests will be skipped.
To run them, follow these steps:
- Choose group "2 FHIR API" and click the "RUN ALL TESTS" button in the upper right.
- Provide the inputs as detailed above and click the "SUBMIT" button to start the test execution.
- A "User Action Required" dialog will appear asking for the tested client system to perform an EHR launch sequence for Inferno. Perform the launch using the indicated details.
- A second "User Action Required" dialog will appear asking for the tested client system to authorize access. Click the link and perform the authorization for the configured scopes.
- Once authorization is complete, Inferno will submit FHIR API requests and verify the responses.
Once the test execution completes, review the test results for feedback on the tested system's support for the required APIs.
If you would like to try out the order-sign hook invocation tests against the public CRD reference client, you can do so using the following steps:
- Create a Da Vinci CRD Client v2.0.1 Test Suite session using the default "SMART App Launch Version", which will not be used.
- Select the CRD Request Generator RI option from the Preset dropdown in the upper left.
- Select the "1.2.6 order-sign" hook group on the left menu and click on the RUN TESTS button in the upper right.
- Select the response types Inferno should respond with under the "Response types to return from order-sign hook requests" input and click the "SUBMIT" button.
- A "User Action Required" dialog will appear asking for order-sign hook invocations to be made against Inferno's simulated CRD server.
- Open the reference client in another tab/browser.
- Click the gear button in the upper right to open the configuration screen and update
the following fields:
-
CRD Server: Inferno's CDS server discovery endpoint, which will be everything before the
last slash in the endpoint displayed in the "User Action Required" dialog,
e.g.,
https://inferno.healthit.gov/suites/custom/crd_client/cds-services. -
Order Sign Rest End Point: the location of the
order-signhook endpoint relative to the CRD Server, which will be everything after the last slash in the endpoint displayed in the "User Action Required" dialog, e.g.,order-sign-service.
-
CRD Server: Inferno's CDS server discovery endpoint, which will be everything before the
last slash in the endpoint displayed in the "User Action Required" dialog,
e.g.,
- Click the gear button in the upper right again to close the configuration screen.
- Click the "Patient Select" button to open patient and order selection.
- In the first row, click the "Request" drop down on the right side and select "E0250 (Device Request)" and then click the box to the left with "Name William Oster" to select the patient and order.
- Click the "Submit to CRD and Display Cards" button and cards will display on the right side of the screen where you can interact with them.
- Back in Inferno, click the link in the "User Action Required" dialog to continue the tests. A second "User Action Required" dialog will appear asking for confirmation that the returned cards were displayed properly. Click the appropriate link based on your interactions with the client in the previous step. NOTE: the client currently will not display the "coverage-information" systemAction.
- The Inferno tests will complete. NOTE: the tests may not completely pass.
For another way to demonstrate test execution without an accompanying UI, see the instructions for running the Inferno client and server suites against each other.
Test kit documentation is stored within the ./docs folder of
this repository and is automatically synchronized to this wiki with each update
to the main branch using the Publish Docs Wiki
workflow. Do not change content
within this wiki directly as changes will be overwritten.
Using this Test Kit
Client Suites
- Client Testing Details
- Client v2.0.1 Testing Instructions
- Client v2.2.1 Testing Instructions
- Simulated CRD Server Responses
Server Suites
Contributing to this Test Kit
Reference Documents & External Links
- CRD Requirements Spreadsheets
- CDS Hooks Requirements Spreadsheets
- CDS Hooks Library Requirements Spreadsheet
- Da Vinci CRD IG
- Inferno Framework
- Report an Issue