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

Fix op number constraint for readmitted patients #2147

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

skks1212
Copy link
Member

Proposed Changes

Merge Checklist

  • Tests added/fixed
  • Update docs in /docs
  • Linting Complete
  • Any other necessary step

Only PR's with test cases included and passing lint and test pipelines will be reviewed

@coronasafe/care-backend-maintainers @coronasafe/care-backend-admins

@skks1212 skks1212 requested a review from a team as a code owner May 12, 2024 18:07
@sainak
Copy link
Member

sainak commented May 21, 2024

@skks1212 add test for the cases mentioned in the issue

@nihal467 nihal467 added the P1 High priority; urgent label May 21, 2024
@nihal467
Copy link
Member

nihal467 commented May 21, 2024

@skks1212 the PR is not working as expected

Test Case Status : failed

  • Same IP number for re-admitted patient within the facility { It should throw error }
  • Same OP number for re-admitted patient within the facility
  • Use Earlier IP number for re-admitted patient within the facility and his latest OP number for domiciliary care
  • OP number is unique for different patient within the facility
  • OP number can be modified to match previous consultation OP number

Bug

image

  • unable to create OP patients with same OP number

image

  • When we re-admit same patient to the same facility with same IP number , it is throw "something went wrong" error, reuse the existing error shown for unique IP number

image

  • when we re-admit same patient to the same facility using his earlier IP number (Admission) as the latest OP number (Domiciliary Care), it is throw "something "

@skks1212
Copy link
Member Author

PR was incomplete, forgot to label as wip 😅. Fixing now

@skks1212 skks1212 added the In progress Work in progress label May 21, 2024
@nihal467
Copy link
Member

@skks1212 the PR is still having bugs, I can create multiple consultation with same IP number for a single patient within a facility

@skks1212 skks1212 removed the In progress Work in progress label May 21, 2024
@skks1212 skks1212 requested review from sainak and nihal467 May 21, 2024 16:44
@nihal467
Copy link
Member

As per the issue , we are removing Data validation on the OP No. field.

Copy link
Member

@nihal467 nihal467 left a comment

Choose a reason for hiding this comment

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

when a patient is discharged, and we reuse the same IP for next patient, it is being accept

Note: When a patient is live, and we try to reuse the IP for a new patient, this error is thrown properly

Copy link
Member

@sainak sainak left a comment

Choose a reason for hiding this comment

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

test case required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 High priority; urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove all OP number validation
3 participants