Comments (8)
Evidently not required in the prefetch either:
Sending 'POST' request to URL: http://54.165.182.195:8080/cqf-ruler/cds-services/cdc-opioid-guidance
{
"hook": "medication-prescribe",
"hookInstance": "5bacb720-f493-4fe7-8750-c02595cbb72b",
"fhirServer": "http://localhost:8080/cqf-ruler/baseDstu3",
"user": "Practitioner-2516",
"patient": "Patient-1121",
"context": [
{
"resourceType": "MedicationRequest",
"status": "active",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "197696",
"display": "fentaNYL 75 MCG/HR 3 Day Transdermal Patch"
}
]
},
"authoredOn": "2017-01-01T00:00:00-05:00",
"reasonCode": [
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "82423001",
"display": "Chronic pain"
}
],
"text": "Chronic pain"
}
],
"dosageInstruction": [
{
"text": "Apply once every three days for pain.",
"timing": {
"repeat": {
"count": 1,
"durationUnit": "d",
"frequency": 1,
"frequencyMax": 1,
"period": 3
}
},
"asNeededBoolean": false,
"doseQuantity": {
"value": 1,
"unit": "tbl",
"system": "http://unitsofmeasure.org",
"code": "tbl"
}
}
],
"dispenseRequest": {
"quantity": {
"value": 30,
"unit": "day",
"system": "http://unitsofmeasure.org",
"code": "d"
}
}
}],
"prefetch": {
"medication": {
"resource":
{
"resourceType": "Bundle",
"entry": [
{
"resource": {
"resourceType": "MedicationRequest",
"status": "active",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "197696",
"display": "fentaNYL 75 MCG/HR 3 Day Transdermal Patch"
}
]
},
"authoredOn": "2017-01-01T00:00:00-05:00",
"reasonCode": [
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "82423001",
"display": "Chronic pain"
}
],
"text": "Chronic pain"
}
],
"dosageInstruction": [
{
"text": "Apply once every three days for pain.",
"timing": {
"repeat": {
"count": 1,
"durationUnit": "d",
"frequency": 1,
"frequencyMax": 1,
"period": 3
}
},
"asNeededBoolean": false,
"doseQuantity": {
"value": 1,
"unit": "tbl",
"system": "http://unitsofmeasure.org",
"code": "tbl"
}
}
],
"dispenseRequest": {
"quantity": {
"value": 30,
"unit": "day",
"system": "http://unitsofmeasure.org",
"code": "d"
}
}
}
}
]
}
}
}
}
Response = 200
{
"cards": [
{},
{
"summary": "High risk for opioid overdose.",
"detail": "Total morphine milligram equivalent (MME) exceeds recommended amount. Taper to less than 50."
}
]
}
from cqf-ruler.
I don't believe this is an issue, especially for prefetch. Normally the prefetch is populated using the query string specified in the discovery response (see this example), which would require the subject to be specified for the specified resources.
I could add a check to validate the subject for the context resource, but I am not sure how valuable that would be.
from cqf-ruler.
If the prefetch is empty then the patient in the hook request needs to be a valid PatientId, otherwise you have no way to search for other Rxs. Or, it might instead be required in the context Rx (it isn't currently).
from cqf-ruler.
If the workflow is to first query all the Rx of the patient that are active (how is this computed? from the authoredOn date? This does not seem to be happening), then putting the active Rxs into the prefetch, it would seem the subject should be set in all of them.
But checking? Not helpful for testing but I can do it if necessary.
from cqf-ruler.
Well, subject is required by the MedicationRequest resource... I could add validation, but I am still unsure how valuable it would be.
Active medications are determined using the status property - see the query string for prefetch I referenced above.
from cqf-ruler.
I wouldn't suggest validating the subject in any of the Rxs since they're not well formed without it and they would appear in the usual workflow (above). But if the prefetch is empty, where do you get the Patient.id from in the prefetch query?
Is this coming from the hook.patient field? I can't find it in the code.
from cqf-ruler.
Yes, it is coming from the request. Here is the code where the query string is built for medication-prescribe prefetch.
from cqf-ruler.
I'm happy with the current implementation. Closing this issue now that my understanding is improved. Thanks
from cqf-ruler.
Related Issues (20)
- Implement the $ra.resolve-coding-gaps operation (replace existing) HOT 4
- Release 0.7.1 Ruler
- Ruler Release 0.8.0
- Ruler Release 0.8.1
- Tag the generated Docker image with the commit hash that was used to generate it
- RA Report spec updates HOT 1
- RA Remediate spec updates HOT 1
- Implement the RA $approve operation HOT 2
- error compiling latest at Use evaluator utilities (#666) HOT 2
- $ra.resolve should error if approve has not been called first
- Implement the RA Assisted MeasureReport (CSV) operation
- ValueSets not expanded in queries to EHR HOT 1
- CDS Service Request fhirAuthorization broken in 0.5.1 and above HOT 2
- Ruler Release 0.10.0
- cds service giving missing type id exception
- Translation of library expression failed with the following message: Syntax error at meno HOT 1
- Data format parsing exception HOT 2
- CQFRuler sandbox issue
- updating for 2023 CQMs
- Is it possible to isolate $apply operation from cqf-ruler and run it with fhir server.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cqf-ruler.