diff --git a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html index 8944e2a5a..146f6b72a 100644 --- a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html +++ b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html @@ -9,6 +9,7 @@ No patient data to generate HIV program snapshot

+
@@ -137,6 +138,57 @@

Last Encounter

RTC Date: {{ patientData?.rtc_date | date: 'dd-MM-yyyy' }}

+ +

+ Disclosure Status: + + {{ hivDisclosureStatus }} + +

+
+

+ COVID-19 Vaccination Status: + + {{ covid19VaccinationSummary?.vaccination_status }} + + + ({{ + covid19VaccinationSummary.first_dose_vaccine_administered + }} + : {{ covid19VaccinationSummary.date_given_first_dose }}) + + + ({{ + covid19VaccinationSummary.second_dose_vaccine_administered + }} + : {{ covid19VaccinationSummary.date_given_second_dose }}) + + + {{ + covid19VaccinationSummary.vaccination_status_code_message + }} + +

+

@@ -145,6 +197,26 @@

Last Encounter

{{ resolvedCareStatus }}

+
+

+ + Date Started Cryptococcal Treatment: + {{ cm_treatment_start_date | date: 'dd-MM-yyyy' }} + +

+

+ + Cryptococcal Status: {{ cm_treatment_status }}, (Phase : + {{ cm_treatment_phase }}) + +

+

+ + Date completed cryptococcal treatment: + {{ cm_treatment_end_date | date: 'dd-MM-yyyy' }} + +

+
Last Encounter {{ patientData?.med_pickup_rtc_date | date: 'dd-MM-yyyy' }}

-
+ +
+

@@ -225,32 +254,37 @@

Last Encounter

-
-
-

- Morisky Score: - - {{ moriskyScore }}{{ moriskyDenominator }} - - {{ moriskyRating }} -

+
+
+
+

+ Morisky Score: + + {{ moriskyScore }}{{ moriskyDenominator }} - + {{ moriskyRating }} +

+
-
-
-
-

- Morisky Score: - - {{ moriskyScore }}{{ moriskyDenominator }} - - {{ moriskyRating }} -

+
+
+

+ Morisky Score: + + {{ moriskyScore }}{{ moriskyDenominator }} - + {{ moriskyRating }} +

+
diff --git a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts index 5e1390564..65557314d 100644 --- a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts +++ b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts @@ -95,7 +95,12 @@ export class HivProgramSnapshotComponent implements OnInit { public moriskyDenominator: any = ''; public moriskyRating: any = ''; public isMoriskyScorePoorOrInadequate = false; + public showCMSummary = false; public hivDisclosureStatus: any; + public cm_treatment_start_date?: Date; + public cm_treatment_status: any = ''; + public cm_treatment_phase: any = ''; + public cm_treatment_end_date?: Date; public latestCervicalScreeningSummary = []; public cervicalScreeningSummary = []; public covid19VaccinationSummary: Covid19StatusSummary = { @@ -186,6 +191,28 @@ export class HivProgramSnapshotComponent implements OnInit { const transferEncounterIndex = this.getIndexOfTransferEncounter( results ); + // Add cryptoccocal status + let cm_treatment_summary: any; + cm_treatment_summary = this.getPatientCMTreatmentStatus(results); + if (cm_treatment_summary) { + if (cm_treatment_summary.on_cm_treatment === 1) { + this.showCMSummary = true; + } + this.cm_treatment_start_date = + cm_treatment_summary.cm_treatment_start_date; + this.cm_treatment_status = + cm_treatment_summary.on_cm_treatment === 1 ? 'On Treatment' : ''; + this.cm_treatment_end_date = + cm_treatment_summary.cm_treatment_end_date; + this.cm_treatment_phase = + cm_treatment_summary.cm_treatment_phase === 1 + ? 'Induction' + : cm_treatment_summary.cm_treatment_phase === 2 + ? 'Consolidation' + : cm_treatment_summary.cm_treatment_phase === 3 + ? 'Maintenance' + : ''; + } // Did the patient have a clinical encounter following their transfer encounter i.e. did they return to care? this.hasSubsequentClinicalEncounter = @@ -616,6 +643,7 @@ export class HivProgramSnapshotComponent implements OnInit { this.covid19Service .getCovid19VaccinationStatus(patientUuid) .subscribe((result: Covid19StatusSummary) => { + console.log(result); if (result) { this.covid19VaccinationSummary = result; } @@ -680,4 +708,15 @@ export class HivProgramSnapshotComponent implements OnInit { return alert; } + public getPatientCMTreatmentStatus(hivSummaryData: any) { + const latestStatus = _.orderBy( + hivSummaryData, + (hivSummary) => { + return moment(hivSummary.cm_treatment_start_date); + }, + ['desc'] + ); + + return latestStatus[0]; + } }