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

Issue with visit scheduling when reentering lost data #1253

Closed
mahalakshme opened this issue Dec 25, 2023 · 13 comments
Closed

Issue with visit scheduling when reentering lost data #1253

mahalakshme opened this issue Dec 25, 2023 · 13 comments
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Dec 25, 2023

https://avni.freshdesk.com/a/tickets/3348

Approach 1:

  • Update old visit schedule rules to not create planned encounters if planned encounter already exists with the same name and encounter to be scheduled is backdated.
  • handle for all programs - child, pregnancy, eligible couple, etc., and if general encounters if any.
  • Example test cases:
    -- When editing a old delivery encounter, for which PNC1 already scheduled, PNC1 should not get again scheduled
    -- At the same time, encounter forms like 'Monthly needs assessment' and 'ANC VHND Follow up' gets scheduled with the same name repeatedly. Future scheduling for these should not get affected.
  • Need to test with CK and IHMP

Approach 2:

If in none of the visit schedule rules of CK and IHMP, we are modifying the scheduling of the visits based on data collected, then we can just disable scheduling of visits on edit flow(can be determined from encounter_date_time) for CK and IHMP.
Old rules for CK and IHMP can be found in their respective repos.
Caution: There are some old rules in avni-health-modules also.

Reference:

Data to be collected again can be found in this folder under the respective org folder:
https://drive.google.com/drive/u/0/folders/1gsrLmsvpZ6gbqxHEQb8zYRwUuQ0ALrWh

@mahalakshme mahalakshme converted this from a draft issue Dec 25, 2023
@mahalakshme
Copy link
Contributor Author

@petmongrels this was the data for which they need to recollect the data right?

@mahalakshme mahalakshme moved this from In Analysis to Ready in Avni Product Dec 25, 2023
@petmongrels
Copy link
Contributor

yes.......for IHMP that is the folder

@mahalakshme mahalakshme moved this from Ready to In Analysis in Avni Product Dec 25, 2023
@mahalakshme mahalakshme moved this from In Analysis to Ready in Avni Product Dec 25, 2023
@mahalakshme mahalakshme changed the title Update old visit schedule rules to not create planned encounters if already exists Issue with visit scheduling when reentering lost data Dec 25, 2023
@petmongrels petmongrels moved this from Ready to In Progress in Avni Product Dec 26, 2023
@petmongrels petmongrels self-assigned this Dec 26, 2023
@petmongrels
Copy link
Contributor

Testing

  • JSS, IHMP, Any other impl which has scheduled visits
  • choose visit types that schedule visit types
  • try with new visit and editing existing old visit

Wrong visits should be scheduled. Please verify after saving as well.

petmongrels added a commit to avniproject/avni-models that referenced this issue Dec 27, 2023
@petmongrels petmongrels moved this from In Progress to Code Review Ready in Avni Product Dec 27, 2023
@mahalakshme
Copy link
Contributor Author

mahalakshme commented Dec 27, 2023

@AchalaBelokar I think this should go as patch release since it for a urgent ticket where we have already delayed a lot and mistake on our side and I think we might not be able to release 6.1.0 by tomorrow. @petmongrels If you also think the same, can you cherry-pick the commit to 6.0 branch

@vinayvenu @petmongrels But IHMP's 170 users need to upgrade their app, to use this fix. Cant think of a way out.

@mahalakshme mahalakshme moved this from Code Review Ready to In Code Review in Avni Product Dec 27, 2023
@mahalakshme
Copy link
Contributor Author

mahalakshme commented Dec 27, 2023

@petmongrels where are we calling this method: everScheduledEncountersOfType in IHMP and CK rules? cant find in client codebase

@mahalakshme mahalakshme moved this from In Code Review to Code Review with Comments in Avni Product Dec 27, 2023
@petmongrels
Copy link
Contributor

it is not called by rules but the RuleEvalService. the change is in the platform

@mahalakshme
Copy link
Contributor Author

@petmongrels yeah I checked in 6.0 branch, didn't know it was pushed into a patch version branch. The commit was marked with a different card number.

  1. was unable to find the function everScheduledEncounters used in models
  2. to everScheduledEncountersOfType we are passing encounterType but we are consuming it considering it as name.
  3. we didn't handle for general encounters - found 2 general encounters SES Survey and Census in the orgs of interest - not sure if they have visit schedule rules - I think we can handle it as well for consistency if you also think the same.

@mahalakshme
Copy link
Contributor Author

making a different comment to notify:
@petmongrels have added a comment here regarding release of this card.

petmongrels added a commit to avniproject/avni-models that referenced this issue Dec 28, 2023
@petmongrels
Copy link
Contributor

i. fixed
ii. rules return encounter type as string
iii. these have been left out as the numbers are few

included for program enrolment and program encounter cancel

@mahalakshme
Copy link
Contributor Author

@AchalaBelokar test in 6.0.1 branch

@mahalakshme mahalakshme moved this from Code Review with Comments to QA Ready in Avni Product Dec 28, 2023
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Dec 28, 2023
@AchalaBelokar
Copy link

AchalaBelokar commented Dec 28, 2023

Found

  • @petmongrels Login with taqi@ihmp Created a individual with name Gjj Fh after that I enrolled Eligible couple then visit is scheduled monthly needs assessment then I cancel the that visit then it is asking me next visit but after filling that date visit is not schedule.

  • login with hr@calutta_kids Their is individual fgfg fgfg fill the birth encounter their 3 questions are coming 2 times ..

Image

Image

Image

last screen shot is on production

@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Dec 29, 2023
@AchalaBelokar AchalaBelokar moved this from In QA to Done in Avni Product Dec 29, 2023
@himeshr
Copy link
Contributor

himeshr commented Dec 29, 2023

@AchalaBelokar Fix for
Login with hr@calutta_kids Their is individual fgfg fgfg fill the birth encounter their 3 questions are coming 2 times . issue mentioned above is done as part of card avniproject/avni-server#675

@AchalaBelokar AchalaBelokar moved this from Done to Focus Items in Avni Product Apr 5, 2024
@AchalaBelokar AchalaBelokar moved this from Focus Items to QA Failed in Avni Product Apr 5, 2024
@AchalaBelokar
Copy link

@AchalaBelokar AchalaBelokar moved this from QA Failed to Triaged in Avni Product Apr 5, 2024
@AchalaBelokar AchalaBelokar moved this from Triaged to QA Failed in Avni Product Apr 5, 2024
@vinayvenu vinayvenu reopened this Apr 5, 2024
@github-project-automation github-project-automation bot moved this from QA Failed to Triaged in Avni Product Apr 5, 2024
@mahalakshme mahalakshme moved this from Triaged to QA Failed in Avni Product Apr 5, 2024
@mahalakshme mahalakshme moved this from QA Failed to Done in Avni Product Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

5 participants