care icon indicating copy to clipboard operation
care copied to clipboard

Sort "No Consultation Filed" patients to the top of Patient List page

Open GokulramGHV opened this issue 1 year ago • 7 comments

Proposed Changes

  • sorted patients such that patients with no consultation are before patients with consultation

Associated Issue

  • coronasafe/care_fe#6635

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

GokulramGHV avatar Nov 16 '23 12:11 GokulramGHV

Codecov Report

Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 61.83%. Comparing base (51ce81e) to head (be11738). Report is 52 commits behind head on develop.

:exclamation: Current head be11738 differs from pull request most recent head bcb0fb2. Consider uploading reports for the commit bcb0fb2 to get more accurate results

Files Patch % Lines
care/facility/api/viewsets/patient.py 75.00% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1718      +/-   ##
===========================================
- Coverage    62.20%   61.83%   -0.37%     
===========================================
  Files          221      221              
  Lines        12204    12165      -39     
  Branches      1742     1736       -6     
===========================================
- Hits          7591     7522      -69     
- Misses        4305     4334      +29     
- Partials       308      309       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Nov 16 '23 12:11 codecov[bot]

@GokulramGHV it is not working properly for patient on readmission

CC: @rithviknishad

nihal467 avatar Nov 22 '23 17:11 nihal467

@GokulramGHV can you fix the issue ASAP

nihal467 avatar Dec 27 '23 13:12 nihal467

Here is the conditions when we show the "No consultation filed" badge:

(!patient.last_consultation || patient.last_consultation?.facility !== patient.facility ||
(patient.last_consultation?.discharge_date && patient.is_active))

Ashesh3 avatar Dec 28 '23 06:12 Ashesh3

Here is the conditions when we show the "No consultation filed" badge:

(!patient.last_consultation || patient.last_consultation?.facility !== patient.facility ||
(patient.last_consultation?.discharge_date && patient.is_active))

@Ashesh3 Thanks!

GokulramGHV avatar Dec 28 '23 19:12 GokulramGHV

@nihal467 Can you check if it works for the readmissions? I've updated the sorting order.

GokulramGHV avatar Dec 28 '23 19:12 GokulramGHV

LGTM

nihal467 avatar Jan 01 '24 12:01 nihal467

Resolve conflicts

vigneshhari avatar Apr 09 '24 11:04 vigneshhari