Comments (9)
When I substitute the 25 mcg/day patch in the hook request, it returns MME=144. This is not 1/3 of the 75 mcg/day calculated Mme and is 2.4 times higher than the CDC value above. Looks like the calculation is not taking the 2.4 multiplier into account, since 144 = 2.4 * 60.
from cqf-ruler.
Please provide the request JSON
from cqf-ruler.
{
"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"
}
]
},
"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.
There were a couple factors contributing to this issue:
- When I converted the Access db to SQLite, the decimal precision defaulted to 2 places. So 0.075 changed to 0.07 during the conversion.
- The GetDailyDosage function in the OMTK library wasn’t taking doses per day into account.
These two factors led to the following (incorrect) calculation:
MME = 70*1*7.2 = 504
I have updated the db and the OMTK library (sent to you via email) and am now getting the following calculation:
MME = 75*0.33333333*7.2 = 179.9999982
Let me know if you are getting the same results with the updates I sent.
from cqf-ruler.
I'm not getting that result with those updates in the latest cqf-ruler. I verified the .db and the OMTK libraries are the ones you sent:
Sending 'POST' request to URL: http://localhost:8081/cqf-ruler/cds-services/cdc-opioid-guidance
{
"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"
}
}
}]
}
Response = 200
{
"cards": [
{
"links": [
{
"label": "CDC guideline for prescribing opioids for chronic pain",
"url": "https://guidelines.gov/summaries/summary/50153/cdc-guideline-for-prescribing-opioids-for-chronic-pain---united-states-2016#420"
},
{
"label": "MME Conversion Tables",
"url": "https://www.cdc.gov/drugoverdose/pdf/calculating_total_daily_dose-a.pdf"
}
]
},
{
"summary": "High risk for opioid overdose - taper now",
"indicator": "warning",
"detail": "Total morphine milligram equivalent (MME) is 540.00000mg/d. Taper to less than 50."
}
]
}
from cqf-ruler.
It appears like the OMTK library I sent you wasn't updated with the new logic. Sorry about that! Please load the OMTKLogic library from this bundle and try again.
from cqf-ruler.
I'm still getting the same result with this. Can you take a look at the hook request? Might be the dosageInstruction??
testJerryFentaNYLNoPrefetch:
2018-01-22 12:58:45 INFO FhirContext:162 - Creating new FHIR context for FHIR version [DSTU3]
Sending 'POST' request to URL: http://localhost: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"
}
]
},
"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"
}
}
}]
}
Response = 200
{
"cards": [
{
"links": [
{
"label": "CDC guideline for prescribing opioids for chronic pain",
"url": "https://guidelines.gov/summaries/summary/50153/cdc-guideline-for-prescribing-opioids-for-chronic-pain---united-states-2016#420"
},
{
"label": "MME Conversion Tables",
"url": "https://www.cdc.gov/drugoverdose/pdf/calculating_total_daily_dose-a.pdf"
}
]
},
{
"summary": "High risk for opioid overdose - taper now",
"indicator": "warning",
"detail": "Total morphine milligram equivalent (MME) is 540.00000mg/d. Taper to less than 50."
}
]
}
from cqf-ruler.
The periodUnit needs to be specified:
"repeat": {
"count": 1,
"durationUnit": "d",
"frequency": 1,
"period": 3,
"periodUnit": "d"
}
That is necessary to get the correct daily frequency.
from cqf-ruler.
Yup, that fixed it. Updating my tests and closing this issue.
from cqf-ruler.
Related Issues (20)
- Update the existing $davinci-ra.resolve operation to implement the $davinci-ra.remediate operation HOT 1
- 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
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.