-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #296 from rcpch/anchit/refactor-kpi-calcs-to-use-s…
…hared-denoms Anchit/refactor-kpi-calcs-to-use-shared-denoms
- Loading branch information
Showing
7 changed files
with
268 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
# Object types | ||
from dataclasses import dataclass | ||
from datetime import date, datetime | ||
from typing import Dict, Union | ||
|
||
|
||
@dataclass | ||
class KPIResult: | ||
total_eligible: int | ||
total_ineligible: int | ||
total_passed: int | ||
total_failed: int | ||
total_failed: int | ||
|
||
|
||
@dataclass | ||
class KPICalculationsObject: | ||
pz_code: str | ||
calculation_datetime: datetime | ||
audit_start_date: date | ||
audit_end_date: date | ||
total_patients_count: int | ||
calculated_kpi_values: Dict[ | ||
str, | ||
Union[KPIResult, str], | ||
] # looks like { 'kpi_name' : KPIResult OR "Not implemented"} |
Oops, something went wrong.