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

#335 update quick start documentation #336

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 64 additions & 77 deletions input/pagecontent/quick-start.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@

<div class="example">
<pre class="http">
GET http://localhost:8080/cqf-ruler-r4/fhir/Library
GET http://localhost:8080/fhir/Library

GET http://localhost:8080/cqf-ruler-r4/fhir/PlanDefinition
GET http://localhost:8080/fhir/PlanDefinition
</pre>
</div>

Expand All @@ -49,7 +49,7 @@

<div class="example">
<pre class="http">
GET http://localhost:8080/cqf-ruler-r4/cds-services
GET http://localhost:8080/cds-services
</pre>
</div>

Expand All @@ -69,7 +69,7 @@

<p>The next step is to load the content, i.e., the artifacts published in this implementation guide that
define the recommendation. For convenience, the resources for recommendation #10, patient-view
have all been added to the 'opioidcds-rec10-patientview-bundle'. The test data for this particular
have all been added to the 'opioidcds-10-patient-view-bundle' (see below). The test data for this particular
quick start test case consists of two Medication resources that also need to be posted to the FHIR server.
These represent the patient's Medication history, the 'quickstart-medications-bundle' contains those resources. These
two bundles should be POSTed to the base URL of the server:</p>
Expand All @@ -79,13 +79,14 @@
<tr><th>Resource</th><th>Type</th><th>Description</th></tr>
</thead>
<tbody>
<tr><td><a href="Bundle-opioidcds-10-patient-view-bundle.html">opioidcds-10-patient-view-bundle</a></td><td>Bundle</td><td>All Required Content for Recommendation #10</td></tr>
</tbody>
<tr><td><a href="requests/QuickStart/opioidcds-10-patient-view-bundle.json">opioidcds-10-patient-view-bundle</a></td><td>Bundle</td><td>All Required Content for Recommendation #10</td></tr>
<tr><td><a href="requests/QuickStart/quickstart-medications-bundle.json">quickstart-medications-bundle</a></td><td>Bundle</td><td>Test data for Quick Start test case</td></tr>
</tbody>
</table>

<div class="example">
<pre class="http">
POST http://localhost:8080/cqf-ruler-r4/fhir
POST http://localhost:8080/fhir
</pre>
</div>

Expand Down Expand Up @@ -117,7 +118,7 @@

<div class="example">
<pre class="http">
PUT http://localhost:8080/cqf-ruler-r4/fhir/PlanDefinition/opioidcds-10-patient-view
PUT http://localhost:8080/fhir/PlanDefinition/opioidcds-10-patient-view
</pre>
</div>

Expand All @@ -128,27 +129,31 @@

<div class="example">
<pre class="http">
GET http://localhost:8080/cqf-ruler-r4/cds-services
GET http://localhost:8080/cds-services
</pre>
</div>

<div class="example">
<pre class="json">
{
"services": [
{
"hook": "patient-view",
"name": "PlanDefinition_Recommendation_10_Patient_View",
"title": "PlanDefinition - 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain: Recommendation #10 (patient-view)",
"description": "When prescribing opioids for subacute or chronic pain, providers should use urine drug testing before starting opioid therapy and consider urine drug testing at least annually to assess for prescribed medications as well as other controlled prescription drugs and illicit drugs.",
"id": "opioidcds-10-patient-view",
"prefetch": {
"item1": "Patient?_id={{context.patientId}}",
"item2": "MedicationRequest?patient={{context.patientId}}&amp;medication=http%3A%2F%2Fwww.nlm.nih.gov%2Fresearch%2Fumls%2Frxnorm|994277,snipped for brevity",
"item3": "Observation?patient={{context.patientId}}&amp;code=http%3A%2F%2Floinc.org|12478-4,snipped for brevity",
"item4": "Observation?patient={{context.patientId}}&amp;code=http%3A%2F%2Floinc.org|50542-0,snipped for brevity"
{
"hook": "patient-view",
"name": "PlanDefinition_Recommendation_10_Patient_View",
"title": "PlanDefinition - 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain: Recommendation #10 (patient-view)",
"description": "When prescribing opioids for subacute or chronic pain, providers should use urine drug testing before starting opioid therapy and consider urine drug testing at least annually to assess for prescribed medications as well as other controlled prescription drugs and illicit drugs.",
"id": "opioidcds-10-patient-view",
"prefetch": {
"item1": "Patient?_id=Patient/{{context.patientId}}",
"item2": "Condition?patient=Patient/{{context.patientId}}&amp;category=http://terminology.hl7.org/CodeSystem/condition-category|encounter-diagnosis",
"item3": "Condition?patient=Patient/{{context.patientId}}&amp;category=http://terminology.hl7.org/CodeSystem/condition-category|problem-list-item",
"item4": "Condition?patient=Patient/{{context.patientId}}&amp;category=http://hl7.org/fhir/us/core/CodeSystem/condition-category|health-concern",
"item5": "ServiceRequest?patient=Patient/{{context.patientId}}",
"item6": "Observation?subject=Patient/{{context.patientId}}&amp;category=http://terminology.hl7.org/CodeSystem/observation-category|laboratory",
"item7": "Procedure?patient=Patient/{{context.patientId}}&amp;code=http://snomed.info/sct|306205009,http://snomed.info/sct|305336008,http://snomed.info/sct|183919006,http://snomed.info/sct|428371000124100,http://snomed.info/sct|183920000,http://snomed.info/sct|183921001",
"item8": "Encounter?patient=Patient/{{context.patientId}}"
}
}
}
]
}
</pre>
Expand All @@ -161,7 +166,7 @@

<div class="example">
<pre class="http">
POST http://localhost:8080/cqf-ruler-r4/cds-services/opioidcds-10-patient-view
POST http://localhost:8080/cds-services/opioidcds-10-patient-view
</pre>
</div>

Expand All @@ -171,13 +176,12 @@
<pre class="json">
{
"hookInstance": "a172a2ce-38e7-4a21-a411-522cf481d5d1",
"fhirServer": "http://localhost:8080/cqf-ruler-r4/fhir",
"fhirServer": "http://localhost:8080/fhir",
"hook": "patient-view",
"applyCql": true,
"context": {
"userId": "Practitioner/example",
"patientId": "Patient/example-rec-10-no-screenings",
"encounterId": "Encounter/example-rec-10-no-screenings-context"
"patientId": "Patient/example-rec-10-patient-view-no-screenings",
"encounterId": "Encounter/example-rec-10-patient-view-no-screenings-context"
},
"prefetch": {
"item1": "snipped for brevity, see the full example at the above link",
Expand All @@ -191,72 +195,55 @@
<div class="example">
<pre class="json">
{
"cards": [
{
"summary": "Annual Urine Screening Check",
"indicator": "warning",
"detail": "Patients on opioid therapy should have a urine drug test performed every 12 months.",
"source": {
"label": "2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain",
"url": "https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm"
},
"suggestions": [
{
"label": "Order Urine Screening",
"actions": [
{
"type": "create",
"description": "Patients on opioid therapy should have a urine drug test performed every 12 months.",
"resource": {
"resourceType": "ProcedureRequest",
"id": "29c794f0-b3e3-47d1-975c-ff0cd6de494b",
"status": "draft",
"intent": "order",
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "310627008",
"display": "Urine drug screening (procedure)"
}
]
},
"subject": {
"reference": "Patient/example-rec-10-no-screenings"
}
}
}
]
}
]
}
]
} </pre>
"cards": [
{
"summary": "Annual Urine Screening Check",
"detail": "Patients on opioid therapy should have a urine drug test performed every 12 months. For guidance on counseling patients regarding the purpose of urine toxicology test, review the draft CDC 2022 Opioid Prescribing Guideline Recommendation 10 page 140 lines 3441 – 3446.",
"indicator": "warning",
"source": {
"label": "2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain",
"uri": "https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm",
"icon": "https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm"
},
"links": []
}
]
}
</pre>
</div>

<a name="api-request-and-response-cds-hooks-client"> </a>
<h4>CDS Hooks Sandbox</h4>

<p>The <a href="http://sandbox.cds-hooks.org" target="_blank">CDS Hooks Sandbox</a> is a web application that provides a user-friendly GUI for constructing, viewing and submitting CDS Hooks requests and viewing the responses both in raw JSON format and also in an html representation that is meant to be representative of how it might be presented in a consuming EHR system. The sandbox can be configured to run against the local CDS Hooks service instance created above.</p>
<p>To configure the sandbox to work with this local CDS Hooks service instance, the following settings need to be set:</p>
<p>Set the <code>FHIR Server URL</code> to <code>http://localhost:8080/cqf-ruler-r4/fhir</code>. If you're not prompted for this at startup, then in Settings go to <code>Change FHIR Server</code> and set the <code>FHIR Server URL</code> there.</p>
<p>Set the <code>Discovery Endpoint URL</code> to <code>http://localhost:8080/cqf-ruler-r4/cds-services</code>. If you're not prompted for this at startups, then in Settings go to <code>Add CDS Services</code> and set the <code>Discovery Endpoint URL</code> there.</p>
<p>Now the sandbox is configured to use the CDS Hooks service that you created above. The next step is to push a Patient resource to that service that we can then use to query via the Sandbox. To do this, you're going to want to copy the JSON representation of a Patient resource from the request-example-rec-10-patient-view-illicit-drugs.json file above and then PUT that to the FHIR server created above. </p>
<p>Set the <code>Discovery Endpoint URL</code> to <code>http://localhost:8080/cds-services</code>. If you're not prompted for this at startups, then in Settings go to <code>Add CDS Services</code> and set the <code>Discovery Endpoint URL</code> there. Now the sandbox is configured to use the CDS Hooks service that you created above.</p>
<p>Set the <code>FHIR Server URL</code> to <code>http://localhost:8080/fhir</code>. If you're not prompted for this at startup, then in Settings go to <code>Change FHIR Server</code> and set the <code>FHIR Server URL</code> there.</p>
<p>The next step is to push a Patient resource to that service that we can then use to query via the Sandbox. To do this, you're going to want to copy the JSON representation of a Patient resource from the request-example-rec-10-patient-view-no-screenings.json file above and then PUT that to the FHIR server created above. </p>
<div class="example">
<pre class="http">
PUT http://localhost:8080/cqf-ruler-r4/fhir/Patient/example-rec-10-no-screenings
PUT http://localhost:8080/fhir/Patient/example-rec-10-patient-view-no-screenings
</pre>
</div>
<p>The patient resource JSON:</p>
<div class="example">
<pre class="json">
{
"resourceType": "Patient",
"id": "example-rec-10-no-screenings",
"gender": "female",
"birthDate": "1982-01-07"
}
"resourceType": "Patient",
"id": "example-rec-10-patient-view-no-screenings",
"name": [
{
"family": "Smith",
"given": [
"Jane"
]
}
],
"gender": "female",
"birthDate": "1983-01-10"
}
</pre>
</div>
<p>Now set the Patient context in the sandbox to this new patient. To set the Patient context in the CDS Hooks Sandbox go to Settings and then select "Change Patient" and set the ID to "example-rec-10-illicit-drugs". </p>
<p>Now set the Patient context in the sandbox to this new patient. If not prompted as part of adding the FHIR server, go to Settings and then select "Change Patient" and set the ID to "example-rec-10-patient-view-no-screenings". </p>
<p>Please note, that for a basic set up of local servers, the window to the CDS sandbox might need to be opened with CORS disabled for all functions to work properly.</p>
</div>
Loading