Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BAH-1236 | Bug fix. Modified query to display only preferred patients… #110

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SooryaKumaranC-tw
Copy link

… in active tab after merging

Co-authored-by: Kavitha S [email protected]

@gsluthra
Copy link

Why DELETE and INSERT? And not instead just UPDATE?

@SooryaKumaranC-tw
Copy link
Author

SooryaKumaranC-tw commented Jan 24, 2022

Why DELETE and INSERT? And not instead just UPDATE?

Ohh we thought we have to update the whole table. Okay we will just update that file and push them again.

@SooryaKumaranC-tw
Copy link
Author

@gsluthra we have modified the file with the update statement.

@gsluthra
Copy link

Just for reference, these are the older SQL queries that were there before this change was made:

VALUES ('emrapi.sqlSearch.activePatients',

@SooryaKumaranC-tw
Copy link
Author

Different Tabs tested in this flow are:

  1. Active
  2. Programs
  3. My Patients
  4. OPD-1
  5. PatientsByLocation

Note:

  1. All tab is working fine before itself. So we did not change anything there.
  2. We removed activeVisitUuid column from the select statement because we have to display, only unique patient cards irrespective of number of active visits.

Scenario's Tested after merging 2 or 3 patients:

  1. With 1 active visits:
    Before: There were duplicate patient cards in each tab (Active, Program, My Patients....)
    After: Only one preferred patient card is shown in all the tabs.

    Upon clicking the card it will redirect to respective dashboard. In patient dashboard we can see all visits under visit tab.

  2. With 2 or more active visits:
    Before: There were duplicate patient cards in each tab (Active, Program, My Patients....)
    After: Only one preferred patient card is shown in all the tabs.

    Upon clicking the card it will redirect to respective dashboard. In patient dashboard we can see all visits under visit tab.

  3. With no active visits, no patients cards are displayed.

@gsluthra
Copy link

Thanks! sounds good.

where v.date_stopped is null AND v.voided = 0;"
WHERE property = "emrapi.sqlSearch.activePatients";

UPDATE global_property SET property_value =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we please break the SQL file into 3 different ones please and also create liquibase changesets that are specific to a specific property?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, sure.

@@ -3874,6 +3874,11 @@
<sqlFile path="V1_98_WardsListSql.sql"/>
</changeSet>

<changeSet id="bahmni-PatientSearch-Update-202201250315" author="Kavitha S, Soorya Kumaran C">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please use 3 different changesets as suggested above? also please make sure that the changeset clearly says which is for which property

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants