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

added contraints in consultations and custom migrations #1917

Conversation

DraKen0009
Copy link
Contributor

@DraKen0009 DraKen0009 commented Feb 26, 2024

Proposed Changes

  • Added unique constraint to patient_no and facility and created a custom migration to add suffix to duplicate patient_no

Associated Issue

Merge Checklist

  • Tests added/fixed
  • Tested locally on frontend
  • Linting Complete

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

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

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.98%. Comparing base (2170b37) to head (8c0ebab).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1917      +/-   ##
==========================================
+ Coverage   61.95%   61.98%   +0.03%     
==========================================
  Files         221      221              
  Lines       12170    12175       +5     
  Branches     1736     1738       +2     
==========================================
+ Hits         7540     7547       +7     
+ Misses       4324     4322       -2     
  Partials      306      306              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DraKen0009 DraKen0009 marked this pull request as ready for review February 28, 2024 17:14
@DraKen0009
Copy link
Contributor Author

Here are the screenshots -

  • When trying to create consultation with same patient_no within facility

Screenshot from 2024-02-28 16-32-20

  • When trying to create consultation with same patient_no in different facility
    Screenshot from 2024-02-28 16-32-36
    Screenshot from 2024-02-28 16-32-43

@DraKen0009
Copy link
Contributor Author

updated the dummy data as it was not following the constraints. And the load_dummy_data command wasn't working

@vigneshhari vigneshhari merged commit 284c639 into coronasafe:master Mar 4, 2024
5 checks passed
Ashesh3 pushed a commit that referenced this pull request Mar 5, 2024
* added contraints in consultations and custom migrations

* added noop reverse

* updated test_utils to handle the constraint

* added a test for consultations

* removed print statements

* added one more test

* updated tests for consultations

* updated dummy data

---------

Co-authored-by: Aakash Singh <mail@singhaakash.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate IP(In Patient) numbers are allowed in consultation
5 participants