Giter VIP home page Giter VIP logo

Comments (13)

prithi69 avatar prithi69 commented on September 1, 2024

Visit note is creating for the same patient multiple times when we visit a recent visit and view patient overview screen.
+--------------+----------------+------------+-------------+---------+---------------------+---------+---------------------+--------+-----------+-------------+-------------+------------+--------------+----------+--------------------------------------+
| encounter_id | encounter_type | patient_id | location_id | form_id | encounter_datetime | creator | date_created | voided | voided_by | date_voided | void_reason | changed_by | date_changed | visit_id | uuid |
+--------------+----------------+------------+-------------+---------+---------------------+---------+---------------------+--------+-----------+-------------+-------------+------------+--------------+----------+--------------------------------------+
| 360 | 6 | 253 | 11 | NULL | 2017-08-12 12:55:47 | 4 | 2017-08-12 13:08:16 | 0 | NULL | NULL | NULL | NULL | NULL | 89 | f6118498-8756-4dc1-b23c-b2af29ed32d7 |
| 361 | 1 | 253 | 11 | NULL | 2017-08-12 12:55:47 | 4 | 2017-08-12 13:08:17 | 0 | NULL | NULL | NULL | NULL | NULL | 89 | 5796cce1-b84d-49bc-b8ef-29dffa6946df |
| 362 | 9 | 253 | NULL | NULL | 2017-08-12 13:12:27 | 1 | 2017-08-12 13:12:27 | 0 | NULL | NULL | NULL | NULL | NULL | 89 | f6f07268-4ede-442a-9ae1-0f5acfdb25c8 |
| 363 | 9 | 253 | NULL | NULL | 2017-08-13 09:48:55 | 1 | 2017-08-13 09:49:13 | 0 | NULL | NULL | NULL | NULL | NULL | NULL | 91ebe620-b00b-482b-a0ad-2d116c8a74be |
| 364 | 9 | 253 | NULL | NULL | 2017-08-13 09:48:56 | 1 | 2017-08-13 09:49:16 | 0 | NULL | NULL | NULL | NULL | NULL | 89 | 652fe488-6224-4ea9-9908-4303d6eaf01b |
| 369 | 9 | 253 | NULL | NULL | 2017-08-14 07:07:42 | 1 | 2017-08-14 07:07:45 | 0 | NULL | NULL | NULL | NULL | NULL | NULL | a9d21452-8c40-47e1-a53c-fc44373dd8cc |
| 370 | 9 | 253 | NULL | NULL | 2017-08-14 07:07:42 | 1 | 2017-08-14 07:07:45 | 0 | NULL | NULL | NULL | NULL | NULL | 89 | 4006e3f3-1901-4d64-bce9-6878f2f54d71 |
| 381 | 9 | 253 | NULL | NULL | 2017-08-15 05:41:16 | 1 | 2017-08-15 05:41:18 | 0 | NULL | NULL | NULL | NULL | NULL | NULL | eda3c35e-95f5-4a3a-89df-8777ab1cb1ef |
| 382 | 9 | 253 | NULL | NULL | 2017-08-15 05:41:16 | 1 | 2017-08-15 05:41:18 | 0 | NULL | NULL | NULL | NULL | NULL | 89 | 248565f1-f569-4ac8-84fd-41b43a6bae80 |
| 386 | 9 | 253 | NULL | NULL | 2017-08-16 12:24:10 | 1 | 2017-08-16 12:24:11 | 0 | NULL | NULL | NULL | NULL | NULL | NULL | 53771d86-bbdc-4a90-80b7-ba05af085e22 |
| 387 | 6 | 253 | 2 | 1 | 2017-08-16 12:27:32 | 1 | 2017-08-16 12:27:32 | 0 | NULL | NULL | NULL | NULL | NULL | 89 | a0f5304d-09b9-45e3-ac56-f042da82ba04 |
| 393 | 9 | 253 | NULL | NULL | 2017-08-22 06:36:00 | 1 | 2017-08-22 06:36:07 | 0 | NULL | NULL | NULL | NULL | NULL | NULL | 2cb965bd-aa56-41aa-aca3-515eb9d2bddd |
| 394 | 9 | 253 | NULL | NULL | 2017-08-22 06:36:00 | 1 | 2017-08-22 06:36:09 | 0 | NULL | NULL | NULL | NULL | NULL | 89 | adc1298d-407e-4fe3-b739-6b182ae3f6eb |
+--------------+----------------+------------+-------------+---------+---------------------+---------+---------------------+--------+-----------+-------------+-------------+------------+--------------+----------+--------------------------------------+

9=encounter_type=visit note

from intelehealth-openmrs-module.

amalafrozalam avatar amalafrozalam commented on September 1, 2024

patientSummary.gsp
Line 93.

Check logic behind lines 85 - 89.

from intelehealth-openmrs-module.

amalafrozalam avatar amalafrozalam commented on September 1, 2024

Lines 129 to 159 should also be checked out.

from intelehealth-openmrs-module.

nehav39 avatar nehav39 commented on September 1, 2024

Yup, this is happening, this issue has not been solved. Essentially the logical flow for this page should be
At page load, check is an active encounter of type Visit Note exists (encounter_type 253).
If (it exists)
GET the encounter uuid and store it in a variable. Make sure all other POST obs POST with this encounter uuid.
If (it does not exist)
Create a new encounter of type Visit Note and store it in a variable. Make sure all other POST obs POST with this encounter uuid.

from intelehealth-openmrs-module.

nehav39 avatar nehav39 commented on September 1, 2024

Every visit should have only one encounter of type Visit Note

from intelehealth-openmrs-module.

amalafrozalam avatar amalafrozalam commented on September 1, 2024

Update:
So my previous comments were with a lack of understanding of how Angular works and how MVC works. The right lines of code to change are 130 - 156. The logic there is messed up. Will be debugging now.

from intelehealth-openmrs-module.

amalafrozalam avatar amalafrozalam commented on September 1, 2024

@nehagoel2 so I identified where the problems are. If you check the https://github.com/Intelehealth/intelehealth-openmrs-module/commit/0030e71f203ed4cdcdc42fdee83367690e526311, I have added TODOs as to where the encounters are being created. To be honest, if this code is going to be scraped for a better code base, it might be better to hold on this issue for later. Mainly because I do not know how the logic is flowing to create these 3 other encounters in the first place.

from intelehealth-openmrs-module.

amalafrozalam avatar amalafrozalam commented on September 1, 2024

Also, to clarify something. The code IS actually looking for an active encounter when it loads. The problem is that it also creates 3 more encounters for those different sections.

from intelehealth-openmrs-module.

amalafrozalam avatar amalafrozalam commented on September 1, 2024

So I'm going to change the code and modify it so that only the patientSummary.gsp creates encounters. Going to debug each fragment to stop other fragments from creating encounters. Have the patientSummary.gsp create the encounter and just have it pass it down.

from intelehealth-openmrs-module.

amalafrozalam avatar amalafrozalam commented on September 1, 2024

So technically this has now been fixed. No encounters are just "created" when a patient's summary page is loaded.

The issue is with advice.gsp, meds.gsp, orderedTests.gsp, and intelehealth_additional_comments.controller.js

Each of these portions are creating encounters for themselves upon page load. I think the idea was to check if the doctor had done anything yet, and create an encounter for the doctor at the time of open. I think the fix for all of this is to correct Factory1 in each of these, or maybe the logic that calls factory1 then factory2.

Otherwise, this issue is done.

@nehagoel2 and @prithi69 please advise next steps.

from intelehealth-openmrs-module.

prithi69 avatar prithi69 commented on September 1, 2024

encounter_testing
In this screenshot you see, Three tables. First tables is to when i go to active visit to patient dashboard screen, and second tables indicates when i go to patient dashboard screen to pateint overview screen, and after going to patient overscreen, i refreshed the page 4 encounter Type created which is 9 shown in the tables, these 9 is the visit note. and 4 different encounter_id created, among this 4 encounter_id, when i put prescribed medication, prescribed test , medical advice, its get saved on one encounter_id which is 887, and this is being pulled on the app, and showed on the visit summary screen of the app, and i also posted diagnoses in the over view screen, it also posted on the database but havent fetched as it got posted on encounter-id 890,

from intelehealth-openmrs-module.

prithi69 avatar prithi69 commented on September 1, 2024

@amalafrozalam if we can have a call, i will make u understand much better.

from intelehealth-openmrs-module.

prithi69 avatar prithi69 commented on September 1, 2024

it created one visit note with visit_id after refreshing the page.. tested on cloud .

from intelehealth-openmrs-module.

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.