Comments (10)
I also get the same error with:
{
"hook": "medication-prescribe",
"hookInstance": "5bacb720-f493-4fe7-8750-c02595cbb72b",
"fhirServer": "http://localhost:8081/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": "1791566",
"display": "Abuse-Deterrent 12 HR oxyCODONE 18 MG Extended Release Oral Capsule"
}
]
},
"subject": {
"reference": "Patient/Patient-1121",
"display": "Jerry Phillip Goodwall [80]"
},
"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": "Take one capsule twice daily",
"timing": {
"repeat": {
"count": 1,
"durationUnit": "d",
"frequency": 2,
"period": 1
}
},
"asNeededBoolean": false,
"doseQuantity": {
"value": 18,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
],
"dispenseRequest": {
"quantity": {
"value": 30,
"unit": "day",
"system": "http://unitsofmeasure.org",
"code": "d"
}
}
}
]
}
from cqf-ruler.
These are with the latest cqf-ruler built today
from cqf-ruler.
Offhand, it looks like the prefetch is required for some reason, because all the tests with them like this work:
{
"hook": "medication-prescribe",
"hookInstance": "5bacb720-f493-4fe7-8750-c02595cbb72b",
"fhirServer": "http://localhost:8081/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"
}
]
},
"subject": {
"reference": "Patient/Patient-1121",
"display": "Jerry Phillip Goodwall [80]"
},
"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,
"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"
}
]
},
"subject": {
"reference": "Patient/Patient-1121",
"display": "Jerry Phillip Goodwall [80]"
},
"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,
"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"
}
}
}
}
]
}
}
}
}
from cqf-ruler.
And patient Jerry Goodwall has only 1 non-opioid Rx in the database (histories 15, I think). And that Rx doesn't have a dosageInstruction. So perhaps this is the issue?
{
"resourceType": "Bundle",
"id": "4ef72cd1-3466-4b19-97b5-98aa84657a54",
"meta": {
"lastUpdated": "2018-01-17T13:32:48.972-05:00"
},
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "http://localhost:8081/cqf-ruler/baseDstu3/MedicationRequest?_pretty=true&patient=Patient%2FPatient-1121"
}
],
"entry": [
{
"fullUrl": "http://localhost:8081/cqf-ruler/baseDstu3/MedicationRequest/MedicationRequest-667190",
"resource": {
"resourceType": "MedicationRequest",
"id": "MedicationRequest-667190",
"meta": {
"versionId": "1",
"lastUpdated": "2018-01-17T12:28:45.877-05:00",
"profile": [
"http://hl7.org/fhir/us/hedis/StructureDefinition/hedis-medicationrequest"
]
},
"extension": [
{
"url": "http://mihin.org/extension/copyright",
"valueString": "Copyright 2014-2017 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
}
],
"status": "active",
"intent": "order",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://test",
"code": "Antidepressant.Medication",
"display": "Antidepressant Medication"
}
]
},
"subject": {
"reference": "Patient/Patient-1121",
"display": "Jerry Phillip Goodwall"
},
"context": {
"reference": "Encounter/Encounter-3607",
"display": "DMS_Followup_Encounter"
},
"authoredOn": "2017-03-20T01:00:00-04:00",
"reasonCode": [
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "310495003",
"display": "Mild depression (disorder)"
}
]
}
]
},
"search": {
"mode": "match"
}
}
]
}
from cqf-ruler.
Once I modified the above MedicationRequest with proper coding and with a dosageInstruction, all of the Hook tests for Jerry passed. Seems like the code might be a little more forgiving because dosageInstruction is an optional field in the resource.
So leaving this open.
from cqf-ruler.
Although dosageInstruction is an optional field in the base FHIR MedicationRequest resource, it is required when using the opioidcds MedicationRequest profile, which is what the Ruler is expecting. So there is a limitation when not including the prefetch data in the response: all other active medications in the FHIR server for the patient must conform to the opioidcds profile. An optional approach would be for the Ruler to ensure that the fetched medications reference the opioidcds profile before including them for evaluation. While that is probably a more desirable approach, it gets a little sticky when DSTU2 MedicationOrders, which is still the standard for most EHR's, are used as the opioidcds profiles are STU3.
from cqf-ruler.
For curated test data, the limitation can be worked around. For a practical database, however, the optional approach would be the only way forward since the dosageInstruction is optional.
DosageInstructions are optional in DSTU2 as well.
from cqf-ruler.
Agreed. I will add a check that only includes medications with a reference to the opioidcds profile for evaluation. I will try to resolve this issue before the connectathon this weekend. Thanks Jeff.
from cqf-ruler.
Let me know when the fix is in. I can easily test it.
from cqf-ruler.
Closing as wontfix, due to us only supporting >=DSTU3
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.