Skip to content

Commit

Permalink
POC-633: Display the Total abdominal hysterectomy on the patient dash…
Browse files Browse the repository at this point in the history
…board. Concept ID 5276 (AMPATH#1707)
  • Loading branch information
henrykorir authored Feb 14, 2024
1 parent e4c4772 commit 51d4206
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,20 @@ <h4 class="component-title">Last Encounter</h4>
</div>
</div>
<div class="col-md-12">
<div class="col-md-12" *ngIf="cervicalScreeningSummary.length > 0">
<div class="col-md-12" *ngIf="reason_cacx_not_done">
<p>
Cervical Cancer Screening :
<strong>{{ reason_cacx_not_done }}</strong>
</p>
</div>
<div
class="col-md-12"
*ngIf="
!reason_cacx_not_done &&
cervicalScreeningSummary.length > 0 &&
cervicalScreeningSummary[0].via_or_via_vili
"
>
<div class="col-md-12 col-xs-12">
<p>
Cervical Cancer Screening :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export class HivProgramSnapshotComponent implements OnInit {
public last_pcr_status: string;
public last_pcr_date: string;
public infant_feeding_method: string;
public reason_cacx_not_done: string = null;

constructor(
private hivSummaryResourceService: HivSummaryResourceService,
Expand Down Expand Up @@ -656,6 +657,9 @@ export class HivProgramSnapshotComponent implements OnInit {
this.cervicalScreeningSummary = result;
if (result.length > 0) {
this.latestCervicalScreeningSummary = result[0];
this.reason_cacx_not_done = this.reasonCaCxNotDone(
result[0].reason
);
}
}
},
Expand Down Expand Up @@ -819,4 +823,17 @@ export class HivProgramSnapshotComponent implements OnInit {

return INFANT_FEEDING_METHODS[this.patientData.infant_feeding_method];
}

public reasonCaCxNotDone(reasons: string): string {
if (reasons.includes('=5276')) {
return 'Not Done: Total Abdominal Hysterectomy';
} else if (reasons.includes('12110=12109')) {
return 'Not Done: Cervix Not Accessible';
} else if (reasons.includes('12110=5989')) {
return 'Not Done: Menstruating';
} else if (reasons.includes('12110=1504')) {
return 'Not Done: Patient Refusal';
}
return null;
}
}

0 comments on commit 51d4206

Please sign in to comment.