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

Anchit/kpis/implement-pdu-vs-patient-calc-methods #311

Merged

Conversation

anchit-chandran
Copy link
Contributor

@anchit-chandran anchit-chandran commented Oct 9, 2024

Signed-off-by: anchit-chandran anchit97123@gmail.com

Overview

Refactors the CalculateKPIS class to expose 2 separate methods for calculating kpis.

  1. calculate_kpis_for_patients which takes in a queryset of patients
  2. calculate_kpis_for_pdus which takes in a list of str (pz_codes)

The both work to set the self.patients attribute in different ways, and then run the same calculation method. Both return the same resulting calculations object

Code changes

  • refactors CalculateKPIS to expose 2 methods
  • updates views using the class appropriately
  • fix all tests which broke due to new interface
  • removes old KPI view just used for debugging calcs

Documentation changes (done or required as a result of this PR)

nil

Related Issues

#308
#287

Mentions

@mentions of the person or team responsible for reviewing proposed changes.

…ENTED' string

Signed-off-by: anchit-chandran <anchit97123@gmail.com>
…alculate_kpis_for_patients`

Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
…ger specific to pdus

Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
@anchit-chandran anchit-chandran marked this pull request as ready for review October 9, 2024 07:44
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
Signed-off-by: anchit-chandran <anchit97123@gmail.com>
@anchit-chandran anchit-chandran merged commit 423c2f4 into live Oct 9, 2024
1 check passed
@anchit-chandran anchit-chandran deleted the anchit/kpis/implement-pdu-vs-patient-calc-methods branch October 9, 2024 07:58
@mbarton
Copy link
Member

mbarton commented Oct 9, 2024

Seen on STAGING (merged by @anchit-chandran 5 minutes and 28 seconds ago) Please check your changes!

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

Successfully merging this pull request may close these issues.

2 participants