Skip to content

Commit

Permalink
show crypto when present
Browse files Browse the repository at this point in the history
POC-10: added cryptoccocal tracking to patient
snapshot
  • Loading branch information
hiqedme committed Aug 2, 2023
1 parent eaa29aa commit 838e8dc
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
No patient data to generate HIV program snapshot
</p>
</div>

<div *ngIf="!hasError && hasData && displayProgram">
<div class="row">
<div *ngIf="gbvScreeningResult" style="display: inline-block">
Expand Down Expand Up @@ -137,6 +138,57 @@ <h4 class="component-title">Last Encounter</h4>
<div class="col-md-12">
<div class="col-md-6 col-xs-12">
<p>RTC Date: {{ patientData?.rtc_date | date: 'dd-MM-yyyy' }}</p>

<p>
Disclosure Status:
<span style="text-transform: capitalize">
{{ hivDisclosureStatus }}
</span>
</p>
<div *ngIf="covid19VaccinationSummary?.vaccination_status">
<p>
COVID-19 Vaccination Status:
<span>
{{ covid19VaccinationSummary?.vaccination_status }}
</span>
<span
style="text-transform: capitalize"
*ngIf="
covid19VaccinationSummary?.first_dose_vaccine_administered
"
>
({{
covid19VaccinationSummary.first_dose_vaccine_administered
}}
: {{ covid19VaccinationSummary.date_given_first_dose }})
</span>
<span
style="text-transform: capitalize"
*ngIf="
covid19VaccinationSummary?.second_dose_vaccine_administered
"
>
({{
covid19VaccinationSummary.second_dose_vaccine_administered
}}
: {{ covid19VaccinationSummary.date_given_second_dose }})
</span>
<span
style="
text-transform: capitalize;
color: red;
padding: 2px 2px 2px 2px;
"
*ngIf="
covid19VaccinationSummary?.vaccination_status_code_message
"
>
{{
covid19VaccinationSummary.vaccination_status_code_message
}}
</span>
</p>
</div>
</div>
<div class="col-md-6 col-xs-12" *ngIf="showCareStatus">
<p>
Expand All @@ -145,6 +197,26 @@ <h4 class="component-title">Last Encounter</h4>
{{ resolvedCareStatus }}
</span>
</p>
<div *ngIf="showCMSummary">
<p>
<span>
Date Started Cryptococcal Treatment:
{{ cm_treatment_start_date | date: 'dd-MM-yyyy' }}
</span>
</p>
<p>
<span style="text-transform: capitalize">
Cryptococcal Status: {{ cm_treatment_status }}, (Phase :
{{ cm_treatment_phase }})
</span>
</p>
<p>
<span style="text-transform: capitalize">
Date completed cryptococcal treatment:
{{ cm_treatment_end_date | date: 'dd-MM-yyyy' }}
</span>
</p>
</div>
</div>
<div
class="col-md-6 col-xs-12"
Expand All @@ -155,59 +227,16 @@ <h4 class="component-title">Last Encounter</h4>
{{ patientData?.med_pickup_rtc_date | date: 'dd-MM-yyyy' }}
</p>
</div>
<div class="col-md-6 col-xs-12" *ngIf="showCareStatus">
<!-- <div class="col-md-6 col-xs-12" *ngIf="showCareStatus">
<p>
Disclosure Status:
<span style="text-transform: capitalize">
{{ hivDisclosureStatus }}
</span>
</p>
</div>
<div
class="col-md-12 col-xs-12"
*ngIf="covid19VaccinationSummary?.vaccination_status"
>
<p>
COVID-19 Vaccination Status:
<span>
{{ covid19VaccinationSummary?.vaccination_status }}
</span>
<span
style="text-transform: capitalize"
*ngIf="
covid19VaccinationSummary?.first_dose_vaccine_administered
"
>
({{
covid19VaccinationSummary.first_dose_vaccine_administered
}}
: {{ covid19VaccinationSummary.date_given_first_dose }})
</span>
<span
style="text-transform: capitalize"
*ngIf="
covid19VaccinationSummary?.second_dose_vaccine_administered
"
>
({{
covid19VaccinationSummary.second_dose_vaccine_administered
}}
: {{ covid19VaccinationSummary.date_given_second_dose }})
</span>
<span
style="
text-transform: capitalize;
color: red;
padding: 2px 2px 2px 2px;
"
*ngIf="
covid19VaccinationSummary?.vaccination_status_code_message
"
>
{{ covid19VaccinationSummary.vaccination_status_code_message }}
</span>
</p>
</div>
</div> -->
</div>
<div class="col-md-12">
<div class="col-md-12" *ngIf="cervicalScreeningSummary.length > 0">
<div class="col-md-12 col-xs-12">
<p>
Expand All @@ -225,32 +254,37 @@ <h4 class="component-title">Last Encounter</h4>
</div>
</div>
</div>
<div
class="col-md-12"
*ngIf="hasMoriskyScore && !isMoriskyScorePoorOrInadequate"
>
<div class="col-md-6 col-xs-12">
<p>
Morisky Score:
<span style="font-weight: 500; padding: 2px 2px 2px 2px">
{{ moriskyScore }}{{ moriskyDenominator }} -
{{ moriskyRating }}</span
>
</p>
<div class="col-md-12">
<div
class="col-md-6"
*ngIf="hasMoriskyScore && !isMoriskyScorePoorOrInadequate"
>
<div class="col-md-6 col-xs-12">
<p>
Morisky Score:
<span style="font-weight: 500; padding: 2px 2px 2px 2px">
{{ moriskyScore }}{{ moriskyDenominator }} -
{{ moriskyRating }}</span
>
</p>
</div>
</div>
</div>
<div
class="col-md-12"
*ngIf="hasMoriskyScore && isMoriskyScorePoorOrInadequate"
>
<div class="col-md-6 col-xs-12">
<p>
Morisky Score:
<span class="score" style="color: red; padding: 2px 2px 2px 2px">
{{ moriskyScore }}{{ moriskyDenominator }} -
{{ moriskyRating }}</span
>
</p>
<div
class="col-md-6"
*ngIf="hasMoriskyScore && isMoriskyScorePoorOrInadequate"
>
<div class="col-md-6 col-xs-12">
<p>
Morisky Score:
<span
class="score"
style="color: red; padding: 2px 2px 2px 2px"
>
{{ moriskyScore }}{{ moriskyDenominator }} -
{{ moriskyRating }}</span
>
</p>
</div>
</div>
</div>
<div class="clear"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -616,6 +643,7 @@ export class HivProgramSnapshotComponent implements OnInit {
this.covid19Service
.getCovid19VaccinationStatus(patientUuid)
.subscribe((result: Covid19StatusSummary) => {
console.log(result);
if (result) {
this.covid19VaccinationSummary = result;
}
Expand Down Expand Up @@ -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];
}
}

0 comments on commit 838e8dc

Please sign in to comment.