Git Product home page Git Product logo

Comments (6)

eedrummer avatar eedrummer commented on July 23, 2024

@port80labs We use the patient_id in the URL, so that is correct. We display the medical record number on the page, since that is what the user will be used to working with. I'm not sure why your patient view isn't getting populated. Would you be able to pass along any errors that might be showing up in the JavaScript console?

from pophealth.

sporkd avatar sporkd commented on July 23, 2024

I'm getting the same problem. One thing I noticed is that when hovering over the link to the patient, the id in the href does not match the id printed on the screen. Then when I click on the link, I get the following in the js console:

  GET http://localhost:3000/api/patients/5203afe2f7305cbf316eb5af?include_results=true 404 (Not Found)

Applying @port80labs changes fixed the issue, albeit with quite a lag before the patient is rendered.

from pophealth.

eedrummer avatar eedrummer commented on July 23, 2024

@sporkd @port80labs I think I now understand what is going on here.

A little bit of history: The bundle that gets loaded by popHealth when you set it up was originally created by a sister project called Cypress. The bundle contains all of the information that Cypress needs to run. This includes not only the Meaningful Use clinical quality measures, but also the "test deck" of synthetic patients and a set of precomputed results for those patients. The last part seems to be where we are running into trouble.

The bundle import process is populating the records collection with synthetic patients. When it does that, it is assigning a new _id to each record it imports.

Where I think we are running into problems is that the importer is also populating the patient_cache collection. When it does this, it is putting in calculation results, which include a patient_id. Unfortunately, I believe that this patient_id is the one that was created in the application that created the bundle. This means when it is loaded into popHealth, it is pointing to a record that does not exist.

This would point to the problem being in the way we handle bundles and not the view code. To verify this, could you try running the unmodified code, but clean out your caches. You can do this by going into the Patients admin page and clicking the "Delete Caches" button, or you could go into MongoDB and drop the query_cache and patient_cache collections. After that, if you go back to the dashboard, the selected measures should recalculate and the patient views should work.

Would either of you be able to confirm this?

from pophealth.

addynaik avatar addynaik commented on July 23, 2024

I tried to do this but the data wasnt getting refreshed. I stopped the delayed_worker and ran the worker using rake.. I get this error.

[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 6 failed attempts
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 6 failed attempts
[Worker(host:pophealthinstance pid:4876)] 2 jobs processed at 11.3484 j/s, 2 failed ...
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 6 failed attempts
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 6 failed attempts
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 6 failed attempts
[Worker(host:pophealthinstance pid:4876)] 3 jobs processed at 9.1766 j/s, 3 failed ...
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 6 failed attempts
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 6 failed attempts
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 6 failed attempts
[Worker(host:pophealthinstance pid:4876)] 3 jobs processed at 8.7740 j/s, 3 failed ...
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 7 failed attempts
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 7 failed attempts
[Worker(host:pophealthinstance pid:4876)] 2 jobs processed at 8.5776 j/s, 2 failed ...
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 7 failed attempts
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 7 failed attempts
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 7 failed attempts
[Worker(host:pophealthinstance pid:4876)] 3 jobs processed at 7.9250 j/s, 3 failed ...
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 7 failed attempts
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 7 failed attempts
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 7 failed attempts
[Worker(host:pophealthinstance pid:4876)] 3 jobs processed at 9.0317 j/s, 3 failed ...
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 8 failed attempts
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 8 failed attempts
[Worker(host:pophealthinstance pid:4876)] 2 jobs processed at 7.6123 j/s, 2 failed ...
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 8 failed attempts
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 8 failed attempts
[Worker(host:pophealthinstance pid:4876)] QME::MapReduce::MeasureCalculationJob failed with RuntimeError: Expected one group from patient_cache aggregation, got 0 - 8 failed attempts

from pophealth.

sporkd avatar sporkd commented on July 23, 2024

Thanks @eedrummer. Dropping the collections manually in console and then reloading the page did work for me. But in the process of figuring out what was breaking I ended up creating the PR above to fix it on import.

from pophealth.

addynaik avatar addynaik commented on July 23, 2024

was able to do this as well.. cleared the cache and refreshed and it showed the information correctly..

from pophealth.

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.