Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC-633: Display the Total abdominal hysterectomy on the patientsnapshot. Concept ID 5276 #1707

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
}
Loading