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

[eka-hackathon]: New revised ART guidelines #1609

Merged
merged 8 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from 6 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 @@ -504,6 +504,11 @@ export class ClinicLabOrdersComponent implements OnInit, OnDestroy {
width: 200,
field: 'last_appointment'
},
{
headerName: 'Patient Category',
width: 150,
field: 'patient_category'
},
{
headerName: 'Latest RTC Date',
width: 150,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ export class DefaulterListComponent implements OnInit {
width: 200,
field: 'last_appointment'
},
{
headerName: 'Patient Category',
width: 150,
field: 'patient_category'
},
{
headerName: 'Latest RTC Date',
width: 150,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ export class HivEnhancedComponent implements OnInit {
width: 200,
field: 'last_appointment_max'
},
{
headerName: 'Patient Category',
width: 150,
field: 'patient_category'
},
{
headerName: 'Latest RTC Date',
width: 150,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ export class PatientStatusChangeListComponent implements OnInit, OnDestroy {
width: 200,
field: 'last_appointment'
},
{
headerName: 'Patient Category',
width: 150,
field: 'patient_category'
},
{
headerName: 'Latest RTC Date',
width: 150,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ export class DailyScheduleAppointmentsComponent implements OnInit, OnDestroy {
width: 100,
field: 'sms_receive_time'
},
{
headerName: 'VL Category',
width: 250,
field: 'vl_category'
},
{
headerName: 'SMS Delivery Status',
width: 100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ export class DataEntryStatisticsPatientListComponent
width: 200,
field: 'last_appointment'
},
{
headerName: 'Patient Category',
width: 150,
field: 'patient_category'
},
{
headerName: 'Latest RTC Date',
width: 150,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ export class ContactListComponent implements OnInit {
headerName: 'Reported test date',
width: 150
},

{
field: 'modified_fm_status',
field: 'test_result_value',
headerName: 'Current test results',
width: 150
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export class IptReportPatientListComponent implements OnInit {
phone_number: 'Phone Number',
enrollment_date: 'Date Enrolled',
last_appointment: 'Latest Appointment',
patient_category: 'Patient Category',
latest_rtc_date: 'Latest RTC Date',
days_since_rtc_date: 'Days Since RTC',
status: 'Current Status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,12 @@ export class Moh731PatientListComponent implements OnInit, OnChanges {
cur_arv_line: 'Current ARV Line (edited)',
cur_arv_meds: 'Current ARV Regimen',
vl_1: 'Viral Load',
vl_category: 'VL Category',
vl_1_date: 'Viral Load Date',
has_pending_vl_test: 'Pending Viral Load Test',
phone_number: 'Phone Number',
last_appointment: 'Latest Appointment',
patient_category: 'Patient Category',
latest_rtc_date: 'Latest RTC Date',
latest_vl: 'Latest VL',
latest_vl_date: 'Latest VL Date',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ export class PatientGainsAndLosesPatientListComponent implements OnInit {
}
);
}
public extraColumns() {
return this.patientListCols;
}

private getPatientList(params: any) {
this.patientGainLose
.getPatientGainAndLosePatientList(params)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ export class PatientsRequiringVLBaseComponent implements OnInit {
cellStyle: {
'white-space': 'normal'
}
},
{
headerName: 'VL Category',
field: 'vl_category',
width: 170,
cellStyle: {
'white-space': 'normal'
}
}
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ export class RetentionReportPatientListComponent implements OnInit {
field: 'visit_type',
width: 200
},
{
headerName: 'Patient Category',
width: 150,
field: 'patient_category'
},
{
headerName: 'Latest RTC date',
field: 'latest_rtc_date',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export class PatientRemindersComponent implements OnInit, OnDestroy {
this.errorMessage = error;
}
);
this.patientReminderService.getVlEligible();
this.subscriptions.push(sub2);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { PatientReminderResourceService } from '../../../etl-api/patient-reminde

@Injectable()
export class PatientReminderService {
public vl_eligible: any;
constructor(
private patientReminderResourceService: PatientReminderResourceService
) {}
Expand All @@ -19,6 +20,7 @@ export class PatientReminderService {
personUuid: data.person_uuid,
generatedReminders: data.reminders
};
this.vl_eligible = data.reminders;
return remindersObj;
} else {
return {};
Expand All @@ -30,4 +32,7 @@ export class PatientReminderService {
})
);
}
public getVlEligible(): string {
return this.vl_eligible;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,14 @@
}}
</li>
<li class="list-group-item" style="font-size: large">
INH Prophylaxis Medication : {{ iptProphylaxisMedication }}
TPT Medication : {{ iptProphylaxisMedication }}
</li>
<li class="list-group-item" style="font-size: large">
INH Prophylaxis Start Date :
TPT Start Date :
{{ hivSummary?.ipt_start_date | date: 'dd-MM-yyyy' }}
</li>
<li class="list-group-item" style="font-size: large">
INH Prophylaxis End Date :
TPT End Date :
{{ hivSummary?.ipt_completion_date | date: 'dd-MM-yyyy' }}
<span
*ngIf="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@
>
</p>
</div>
<div class="alert-div" style="display: inline-block">
<p [ngClass]="getViralLoadCategory(patientData?.vl_1)">
<span class="hiv-alert" [style.background-color]="viralloadColor"
>VL Category: {{ this.viralLoadCategory }}</span
>
</p>
</div>
</div>
<div class="snapshot-summary">
<h4 class="component-title">Last Encounter</h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { EncounterResourceService } from 'src/app/openmrs-api/encounter-resource
import { UserDefaultPropertiesService } from '../../../user-default-properties/user-default-properties.service';
import { CervicalCancerScreeningSummaResourceService } from './../../../etl-api/cervical-cancer-screening-summary-resource.service';
import { Covid19ResourceService } from './../../../etl-api/covid-19-resource-service';
import { PatientReminderService } from '../../common/patient-reminders/patient-reminders.service';
// import { PatientReminderService } from 'src/app/patient-dashboard/common/patient-reminders/patient-reminders.service.ts';
hiqedme marked this conversation as resolved.
Show resolved Hide resolved

const mdtProgramUuid = 'c4246ff0-b081-460c-bcc5-b0678012659e';
const stdProgramUuid = '781d85b0-1359-11df-a1f1-0026b9348838';
Expand Down Expand Up @@ -75,6 +77,8 @@ export class HivProgramSnapshotComponent implements OnInit {
public hasSubsequentClinicalEncounter = false;
public resolvedCareStatus: any;
public showCareStatus = true;
public viralLoadCategory: any = '';
public viralloadColor = ' ';
public backgroundColor: any = {
pink: '#FFC0CB',
yellow: '#FFFF00'
Expand Down Expand Up @@ -119,7 +123,8 @@ export class HivProgramSnapshotComponent implements OnInit {
private locationResource: LocationResourceService,
private userDefaultPropertiesService: UserDefaultPropertiesService,
private cervicalCancerScreeningSummaryService: CervicalCancerScreeningSummaResourceService,
private covid19Service: Covid19ResourceService
private covid19Service: Covid19ResourceService,
private patientReminderService: PatientReminderService
) {}

public ngOnInit() {
Expand All @@ -140,6 +145,7 @@ export class HivProgramSnapshotComponent implements OnInit {
0,
this.patient.uuid
);

this.getMoriskyScore();
}

Expand All @@ -160,7 +166,7 @@ export class HivProgramSnapshotComponent implements OnInit {
latestVlResult = this.getlatestVlResult(results);
latestVlDate = latestVlResult.vl_1_date;
latestVl = latestVlResult.vl_1;
latestVl = latestVlResult.vl_1;

this.patientCareStatus = results[0].patient_care_status;
this.hivDisclosureStatus =
results[0].hiv_status_disclosed === 1 ? 'Yes' : 'No';
Expand Down Expand Up @@ -234,6 +240,50 @@ export class HivProgramSnapshotComponent implements OnInit {
);
}

public getViralLoadCategory(latestViralLoad: any) {
const eligiblility = this.patientReminderService.vl_eligible;
let isEligible: any;
_.each(eligiblility, (vl_eligibiliy: any) => {
if (vl_eligibiliy.title === 'Viral Load Reminder') {
isEligible = 1;
} else {
isEligible = 2;
}
});
if (isEligible) {
switch (true) {
case latestViralLoad < 50 &&
latestViralLoad != null &&
isEligible === 2:
this.viralLoadCategory = 'LDL';
this.viralloadColor = 'green';
break;
case latestViralLoad >= 50 && latestViralLoad < 200 && isEligible === 2:
this.viralLoadCategory = 'Low Risk Low Level Viremia';
this.viralloadColor = 'yellowgreen';
break;
case latestViralLoad >= 200 &&
latestViralLoad < 1000 &&
isEligible === 2:
this.viralLoadCategory = 'High Risk Low Level Viremia';
this.viralloadColor = 'orange';
break;
case latestViralLoad >= 1000 && isEligible === 2:
this.viralLoadCategory = 'Suspected Treatment Failure';
this.viralloadColor = 'red';
break;
case isEligible === 1:
this.viralLoadCategory = 'Missing VL';
this.viralloadColor = 'purple';
break;
default:
this.viralLoadCategory = 'N/A';
this.viralloadColor = 'black';
break;
}
}
}

public getPatientCareStatus(care_status_id: any) {
const translateMap = {
'159': 'DECEASED',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ export class ProgramEnrollmentPatientListComponent
width: 200,
field: 'last_appointment'
},
{
headerName: 'Patient Category',
width: 150,
field: 'patient_category'
},
{
headerName: 'Latest RTC Date',
width: 150,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ export class PatientListColumns {
width: 200,
field: 'last_appointment'
},
{
headerName: 'Patient Category',
width: 150,
field: 'patient_category'
},
{
headerName: 'Visit Type',
width: 200,
Expand Down