generated from EyeSeeTea/dhis2-app-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
167 additions
and
136 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
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
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
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
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
65 changes: 65 additions & 0 deletions
65
src/domain/entities/disease-outbreak-event/PerformanceOverviewMetrics.ts
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { Id } from "../Ref"; | ||
|
||
export type DiseaseNames = | ||
| "AFP" | ||
| "Acute VHF" | ||
| "Acute respiratory" | ||
| "Anthrax" | ||
| "Bacterial meningitis" | ||
| "COVID19" | ||
| "Cholera" | ||
| "Diarrhoea with blood" | ||
| "Measles" | ||
| "Monkeypox" | ||
| "Neonatal tetanus" | ||
| "Plague" | ||
| "SARIs" | ||
| "Typhoid fever" | ||
| "Zika fever"; | ||
|
||
export type HazardNames = | ||
| "Animal type" | ||
| "Human type" | ||
| "Human and Animal type" | ||
| "Environmental type"; | ||
|
||
export type PerformanceOverviewMetrics = { | ||
id: Id; | ||
event: string; | ||
province: string; | ||
duration: string; | ||
manager: string; | ||
cases: string; | ||
deaths: string; | ||
era1: string; | ||
era2: string; | ||
era3: string; | ||
era4: string; | ||
era5: string; | ||
era6: string; | ||
era7: string; | ||
detect7d: string; | ||
notify1d: string; | ||
respond7d: string; | ||
creationDate: string; | ||
suspectedDisease: DiseaseNames; | ||
hazardType: HazardNames; | ||
}; | ||
|
||
type BaseCounts = { | ||
name: DiseaseNames | HazardNames; | ||
total: number; | ||
type: "disease" | "hazard"; | ||
}; | ||
|
||
type DiseaseCounts = BaseCounts & { | ||
name: DiseaseNames; | ||
type: "disease"; | ||
}; | ||
|
||
type HazardCounts = BaseCounts & { | ||
name: HazardNames; | ||
type: "hazard"; | ||
}; | ||
|
||
export type EventTrackerCounts = DiseaseCounts | HazardCounts; |
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,13 +1,13 @@ | ||
import { FutureData } from "../../data/api-futures"; | ||
import { DiseaseOutbreakEventBaseAttrs } from "../entities/disease-outbreak-event/DiseaseOutbreakEvent"; | ||
import { | ||
DiseaseTotalAttrs, | ||
EventTrackerCounts, | ||
PerformanceOverviewMetrics, | ||
} from "../../data/repositories/PerformanceOverviewD2Repository"; | ||
import { DiseaseOutbreakEventBaseAttrs } from "../entities/disease-outbreak-event/DiseaseOutbreakEvent"; | ||
} from "../entities/disease-outbreak-event/PerformanceOverviewMetrics"; | ||
|
||
export interface PerformanceOverviewRepository { | ||
getPerformanceOverviewMetrics( | ||
diseaseOutbreakEvents: DiseaseOutbreakEventBaseAttrs[] | ||
): FutureData<PerformanceOverviewMetrics[]>; | ||
getDiseasesTotal(filters?: Record<string, string[]>): FutureData<DiseaseTotalAttrs[]>; | ||
getDiseasesTotal(filters?: Record<string, string[]>): FutureData<EventTrackerCounts[]>; | ||
} |
Oops, something went wrong.