Giter Club home page Giter Club logo

Comments (33)

c-schuler avatar c-schuler commented on June 7, 2024

I am aware of this issue, which may be an issue with HAPI (hapifhir/hapi-fhir#787). I am working on determining the cause.

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

Ok, I have worked out the issue. I will be committing the fix shortly.

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

Get the latest. I have fleshed out the test suite for all the cds operations.

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

Whoops. Forgot git doesn't include empty directories... Please get the latest and try again.

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

Awesome! Thanks Jeff. Closing this...

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

Hmm. Did you forget to add a medication code?

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

I haven't updated that IG in several months... I would get everything from either the ruler or this repo.

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

Ok, now you need dosageInstructions see the example request for everything you'll need.

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

They are dstu2 resources in the example request because EHR's mainly use dstu2. You can use stu3, but they need to include the same fields as dstu2. See the opioid guidance test to see the resources that need to be in the server. I will add some validation of the context and prefetch resources that will throw meaningful errors if the resources are missing required fields.
Also, the prefetch should be populated with all active MedicationRequest resources for the patient.

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

I am currently working on getting the stu3 requests to work. The dstu2 request works for me. The prefetch for your stu3 request is malformed btw.

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

Added STU3 support in latest commit. Request should look like the following (prefetch is a Bundle):

{
  "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",
      "authoredOn":"2017-01-01",
      "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"
      },
      "reasonCode":[
        {
          "coding":[
            {
              "system":"http://snomed.info/sct",
              "code":"82423001",
              "display":"Chronic pain"
            }
          ],
          "text":"Chronic pain"
        }
      ],
      "dosageInstruction":[
        {
          "text":"Take 40mg three times daily",
          "timing":{
            "repeat":{
              "count":1,
              "durationUnit":"d",
              "frequency":3,
              "frequencyMax":3,
              "period":1
            }
          },
          "asNeededBoolean":false,
          "doseQuantity":{
            "value":1,
            "unit":"mg",
            "system":"http://unitsofmeasure.org",
            "code":"mg"
          }
        }
      ],
      "dispenseRequest":{
        "quantity":{
          "value":1,
          "unit":"mg",
          "system":"http://unitsofmeasure.org",
          "code":"mg"
        }
      }
    }
  ],
  "prefetch":{
    "medication":{
      "resource":{
        "resourceType":"Bundle",
        "entry":[
          {
            "resource":{
              "resourceType":"MedicationRequest",
              "id":"medrx001",
              "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"
              },
              "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 40mg three times daily",
                  "timing":{
                    "repeat":{
                      "count":1,
                      "durationUnit":"d",
                      "frequency":3,
                      "frequencyMax":3,
                      "period":1
                    }
                  },
                  "asNeededBoolean":false,
                  "doseQuantity":{
                    "value":1,
                    "unit":"mg",
                    "system":"http://unitsofmeasure.org",
                    "code":"mg"
                  }
                }
              ],
              "dispenseRequest":{
                "quantity":{
                  "value":1,
                  "unit":"mg",
                  "system":"http://unitsofmeasure.org",
                  "code":"mg"
                }
              }
            }
          }
        ]
      }
    }
  }
}

Should give the following response:

{
  "cards": [
    {
      "summary": "High risk for opioid overdose - taper now",
      "indicator": "warning",
      "detail": "Total morphine milligram equivalent (MME) is 504.000mg/d. Taper to less than 50."
    }
  ]
}

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

Also just added validation for context and prefetch resources for the cdc-opioid-guidance cds hooks request. Will now give meaningful errors when missing required fields. Hope that helps in the future. =)

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

That looks good. I was able to run that request successfully. Do you have the OpioidManagementTerminologyKnowledge.db file in the src/main/resources/cds directory?

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

You need to add a src/main/resources/cds directory in the cqf-ruler project and add the db file. Then build and it will be included in the war file.
I will email it to you. We are not allowed to make it publicly available.

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

Yeah, that should be it... I need to remove that from that repo.

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

c-schuler avatar c-schuler commented on June 7, 2024

Everything looks right. I am able to run this with the request and endpoint you specified. Not sure how to proceed... I will setup Tomcat and see if I can figure out what the issue is - probably won't have anything for you today. I'll keep you posted.

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

from cqf-ruler.

jeffeastman avatar jeffeastman commented on June 7, 2024

Problem resolved.

from cqf-ruler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.