Skip to content

Commit

Permalink
Merge branch 'AMPATH:master' into POC-341
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfred-Mutai authored Jan 19, 2024
2 parents 9861b07 + 6d238f4 commit b84e51a
Show file tree
Hide file tree
Showing 135 changed files with 6,513 additions and 464 deletions.
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "none",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
38 changes: 0 additions & 38 deletions .vscode/launch.json

This file was deleted.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-amrs",
"version": "2.17.0",
"version": "2.18.1",
"scripts": {
"ng": "ng",
"start": "ng serve --host 0.0.0.0 --port 3000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,21 @@ export class DefaulterListComponent implements OnInit {
field: 'ovcid_id',
width: 150
},
{
headerName: 'Outreach Follow-up',
width: 150,
field: 'outreach_follow_up'
},
{
headerName: 'Latest VL',
width: 75,
field: 'latest_vl'
},
{
headerName: 'VL Category',
width: 150,
field: 'vl_category'
},
{
headerName: 'Latest VL Date',
width: 150,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,26 @@ <h4 for="week-selector">
</div>
</div>
</form>
<div class="row" style="margin-bottom: 10px">
<div class="col-md-12 col-lg-12 col-xs-12 col-sm-12">
<span
>Key
<span class="label label-success" style="font-size: 12px; color: black"
>Successful contact attempts</span
>
<span
class="label"
style="background-color: pink; font-size: 12px; color: black"
>Unsuccessful contact attempts</span
>
<span
class="label"
style="background-color: yellow; font-size: 12px; color: black"
>Requested reschedule</span
>
</span>
</div>
</div>
</div>

<div *ngIf="errors" style="color: red !important">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ export class PreAppointmentOutreachComponent implements OnInit {
private ALL = 'All';
private FOLLOW_UP_SUCCESSFUL = 'Follow-up Successful';
private FAILED_FOLLOW_UP_ATTEMPT = 'Failed Follow-up Attempt';
private NO_FOLLOW_UP_ATTEMPT = 'Follow-up Not Attempted';

public filterTypeOptions: any[] = [
this.ALL,
this.FOLLOW_UP_SUCCESSFUL,
this.FAILED_FOLLOW_UP_ATTEMPT
this.FAILED_FOLLOW_UP_ATTEMPT,
this.NO_FOLLOW_UP_ATTEMPT
];
public selectedFilterType = 'All'; // defaults to All
// TODO refactor this later
Expand All @@ -51,22 +53,25 @@ export class PreAppointmentOutreachComponent implements OnInit {
private route: ActivatedRoute
) {
const today = new Date();
const currentWeek = this.getISOWeek(today);
const currentYear = today.getFullYear();
const startYear = 2023;
const numberOfWeeks = 52; // Set the maximum number of weeks to 52

for (let weekNumber = 1; weekNumber <= numberOfWeeks; weekNumber++) {
const weekString = `${currentYear}-W${weekNumber
.toString()
.padStart(2, '0')}`;
this.weeks.push({
label: `${currentYear}-W${weekNumber} - From ${this.getStartDate(
weekString
)} to ${this.getEndDate(weekString)}`,
value: weekString
});
for (let year = startYear; year <= currentYear; year++) {
const lastWeek = year === currentYear ? currentWeek : numberOfWeeks;
for (let weekNumber = 1; weekNumber <= lastWeek; weekNumber++) {
const weekString = `${year}-W${weekNumber.toString().padStart(2, '0')}`;
this.weeks.push({
label: `${year}-W${weekNumber} - From ${this.getStartDate(
weekString
)} to ${this.getEndDate(weekString)}`,
value: weekString
});
}
}
this.weeks.reverse();

const currentWeek = this.getISOWeek(today);
this.selectedWeek = `${currentYear}-W${currentWeek
.toString()
.padStart(2, '0')}`;
Expand Down Expand Up @@ -102,6 +107,11 @@ export class PreAppointmentOutreachComponent implements OnInit {
this.explainedFilterType =
'Patient for whom follow-up attempts have been unsuccessful.';
break;
case this.NO_FOLLOW_UP_ATTEMPT:
this.mappedSelectedFilterType = 2;
this.explainedFilterType =
'Patients for whom there has been no follow-up attempt.';
break;
default:
this.explainedFilterType = '';
}
Expand Down Expand Up @@ -208,6 +218,11 @@ export class PreAppointmentOutreachComponent implements OnInit {
width: 100,
field: 'rescheduled_date'
},
{
headerName: 'No. of Failed Phone Attempts',
width: 100,
field: 'number_of_failed_phone_attempts'
},
{
headerName: 'Contact Reached',
width: 100,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="container-fluid">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<pmtct-calhiv-rri-report
[locations]="selectedClinic"
></pmtct-calhiv-rri-report>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Subscription } from 'rxjs';
import { Router, ActivatedRoute } from '@angular/router';
import { ClinicDashboardCacheService } from '../../services/clinic-dashboard-cache.service';

@Component({
selector: 'clinic-dashboard-pmtct-rri-report',
templateUrl: './clinic-dashboard-pmtct-rri-report.component.html',
styleUrls: ['./clinic-dashboard-pmtct-rri-report.component.css']
})
export class ClinicDashboardPmtctRriReportComponent implements OnInit {
public selectedClinic = '';
private subs: Subscription[] = [];
public routeSub: Subscription;

constructor(
private _router: Router,
private _route: ActivatedRoute,
private _clinicDashboardCacheService: ClinicDashboardCacheService
) {}

public ngOnInit() {
this.routeSub = this._route.parent.parent.params.subscribe((params) => {
this._clinicDashboardCacheService.setCurrentClinic(
params['location_uuid']
);
});

const sub = this._clinicDashboardCacheService
.getCurrentClinic()
.subscribe((location) => {
this.selectedClinic = location;
});

this.subs.push(sub);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ export class HivDifferentiatedCareComponent implements OnInit {
width: 100,
field: 'latest_vl'
},
{
headerName: 'VL Category',
width: 100,
field: 'vl_category'
},
{
headerName: 'Latest VL Date',
width: 150,
Expand Down
4 changes: 4 additions & 0 deletions src/app/clinic-dashboard/hiv/hiv-program.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ import { ClinicDashboardRetentionReportComponent } from './retention-report/clin
import { ClinicDashboardCaseManagementComponent } from './case-management/clinic-dashboard-case-management.component';
import { PrepReportComponent } from './prep-report/prep-report.component';
import { ClinicDashboardHeiReportComponent } from './clinic-dashboard-hei-indicators-report/clinic-dashboard-hei-report.component';
import { ClinicDashboardPmtctRriReportComponent } from './clinic-dashboard-pmtct-rri-report/clinic-dashboard-pmtct-rri-report.component';

import { HIVListsMicroFrontendComponent } from './hiv-lists-microfrontend-report/hiv-lists-microfrontend.component';
import { FamilyTestingComponent } from './family-testing/family-testing.component';
import { AngularMultiSelectModule } from 'angular2-multiselect-dropdown/angular2-multiselect-dropdown';
Expand Down Expand Up @@ -133,6 +135,7 @@ import { PreAppointmentOutreachComponent } from '../general/pre-appointment-outr
RangeSliderComponent,
RouterModule,
ClinicDashboardHeiReportComponent,
ClinicDashboardPmtctRriReportComponent,
ClinicDashboardGainsAndLossesComponent,
MOH412ClinicDashboardComponent,
MOH412ClinicDashboardPatientListComponent,
Expand Down Expand Up @@ -175,6 +178,7 @@ import { PreAppointmentOutreachComponent } from '../general/pre-appointment-outr
ClinicDashboardCaseManagementComponent,
PrepReportComponent,
ClinicDashboardHeiReportComponent,
ClinicDashboardPmtctRriReportComponent,
HIVListsMicroFrontendComponent,
FamilyTestingComponent,
ClinicDashboardGainsAndLossesComponent,
Expand Down
32 changes: 32 additions & 0 deletions src/app/clinic-dashboard/hiv/hiv-program.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ import { IptReportPatientListComponent } from 'src/app/hiv-care-lib/ipt-report/i

import { ClinicDashboardHeiReportComponent } from './clinic-dashboard-hei-indicators-report/clinic-dashboard-hei-report.component';
import { HeiIndicatorsPatientListComponent } from './../../hiv-care-lib/hei-indicators-report/hei-indicators-patient-list.component';
// pmtct-rri reports
import { PmtctCalhivRriReportComponent } from 'src/app/hiv-care-lib/pmtct-calhiv-rri-report/pmtct-calhiv-rri-report.component';
import { PmtctCalhivRriPatientListComponent } from 'src/app/hiv-care-lib/pmtct-calhiv-rri-report/pmtct-calhiv-patient-list.component';
import { ClinicDashboardPmtctRriReportComponent } from './clinic-dashboard-pmtct-rri-report/clinic-dashboard-pmtct-rri-report.component';

import { HIVListsMicroFrontendComponent } from './hiv-lists-microfrontend-report/hiv-lists-microfrontend.component';
import { FamilyTestingBaseComponent } from 'src/app/hiv-care-lib/family-testing/family-testing-base.component';
import { FamilyTestingContactComponent } from 'src/app/hiv-care-lib/family-testing/family-testing-contact-list.component';
Expand Down Expand Up @@ -296,6 +301,19 @@ const routes: Routes = [
{ path: 'location', component: ClinicFlowLocationStatsComponent },
{ path: '', redirectTo: 'summary', pathMatch: 'prefix' }
]
},
{
path: 'pmtct-rri-report',
children: [
{ path: 'visits', component: ClinicFlowVisitsComponent },
{ path: 'summary', component: ClinicFlowSummaryComponent },
{
path: 'provider-stats',
component: ClinicFlowProviderStatsComponent
},
{ path: 'location', component: ClinicFlowLocationStatsComponent },
{ path: '', redirectTo: 'summary', pathMatch: 'prefix' }
]
}
]
},
Expand Down Expand Up @@ -470,6 +488,20 @@ const routes: Routes = [
}
]
},

{
path: 'pmtct-rri-report',
children: [
{
path: '',
component: ClinicDashboardPmtctRriReportComponent
},
{
path: 'patient-list',
component: PmtctCalhivRriPatientListComponent
}
]
},
{
path: 'pre-appoinment-outreach',
component: PreAppointmentOutreachComponent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
[data]="dailyAppointmentsPatientList"
[extraColumns]="extraColumns"
[hivColumns]="true"
[excludecolumns]="true"
>
</patient-list>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,20 @@ 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,
field: 'sms_delivery_status'
},
{
headerName: 'Latest VL',
width: 75,
field: 'latest_vl'
},
{
headerName: 'Latest VL Date',
width: 150,
field: 'latest_vl_date'
}
];
public errors: any[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { DataAnalyticsMonthlyReportComponent } from './monthly-reports-dashboard
import { DataAnalyticsHivGainsAndLossesComponent } from './hiv-monthly-gains-and-losses/data-analytics-hiv-gains-and-losses.component';
import { ContactTestingComponent } from './contact-testing/contact-testing/contact-testing.component';
import { DialogModule } from 'primeng/primeng';
import { PrepMonthlyReportPatientListComponent } from 'src/app/hiv-care-lib/prep-report/monthly/prep-monthly-patient-list/prep-monthly-report-patient-list.component';
import { TxReportsDashboardComponent } from './tx-reports-dashboard/tx-reports-dashboard.component';
import { TxMlReportComponent } from './tx-ml-report/tx-ml-report.component';
import { TxNewReportComponent } from './datim-reports/tx-new-report/tx-new-report.component';
Expand Down Expand Up @@ -80,6 +81,7 @@ import { TxRttReportComponent } from './datim-reports/tx-rtt-report.component';
HivSummaryMonthlyIndicatorsComponent,
SurgeReportComponent,
PrepReportComponent,
PrepMonthlyReportPatientListComponent,
MOH412HIVDataAnalyticsComponent,
MOH412HIVDataAnalyticsPatientListComponent,
IPTReportComponent,
Expand Down
Loading

0 comments on commit b84e51a

Please sign in to comment.