From 0f9f49e94562e4057dcb575b7453fc9a878a3562 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Thu, 23 May 2024 09:56:13 +0300 Subject: [PATCH 01/38] POC-737: Development of MOH Registers --- .../hiv/data-analytics-hiv.module.ts | 22 ++- .../hiv/data-analytics-hiv.routes.ts | 100 +++++++++++ .../anc-register/anc-register.component.css | 0 .../anc-register/anc-register.component.html | 54 ++++++ .../anc-register.component.spec.ts | 24 +++ .../anc-register/anc-register.component.ts | 161 ++++++++++++++++++ .../cntdaily-register.component.css | 0 .../cntdaily-register.component.html | 54 ++++++ .../cntdaily-register.component.spec.ts | 24 +++ .../cntdaily-register.component.ts | 161 ++++++++++++++++++ .../defaultertracing-register.component.css | 0 .../defaultertracing-register.component.html | 54 ++++++ ...efaultertracing-register.component.spec.ts | 24 +++ .../defaultertracing-register.component.ts | 161 ++++++++++++++++++ .../hei-register/hei-register.component.css | 0 .../hei-register/hei-register.component.html | 54 ++++++ .../hei-register.component.spec.ts | 24 +++ .../hei-register/hei-register.component.ts | 161 ++++++++++++++++++ .../htsrefferallinkage-register.component.css | 0 ...htsrefferallinkage-register.component.html | 54 ++++++ ...refferallinkage-register.component.spec.ts | 24 +++ .../htsrefferallinkage-register.component.ts | 161 ++++++++++++++++++ .../maternity-register.component.css | 0 .../maternity-register.component.html | 54 ++++++ .../maternity-register.component.spec.ts | 24 +++ .../maternity-register.component.ts | 161 ++++++++++++++++++ .../nutrition-register.component.css | 0 .../nutrition-register.component.html | 54 ++++++ .../nutrition-register.component.spec.ts | 24 +++ .../nutrition-register.component.ts | 161 ++++++++++++++++++ .../pnc-register/pnc-register.component.css | 0 .../pnc-register/pnc-register.component.html | 54 ++++++ .../pnc-register.component.spec.ts | 24 +++ .../pnc-register/pnc-register.component.ts | 161 ++++++++++++++++++ .../prepdaily-register.component.css | 0 .../prepdaily-register.component.html | 54 ++++++ .../prepdaily-register.component.spec.ts | 24 +++ .../prepdaily-register.component.ts | 161 ++++++++++++++++++ .../hiv/registers/registers.component.css | 0 .../hiv/registers/registers.component.html | 27 +++ .../hiv/registers/registers.component.spec.ts | 24 +++ .../hiv/registers/registers.component.ts | 79 +++++++++ .../schema/analytics.dashboard.conf.json | 6 + 43 files changed, 2408 insertions(+), 1 deletion(-) create mode 100644 src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/registers.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/registers.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/registers.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/registers.component.ts diff --git a/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.module.ts b/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.module.ts index f0664f9b7..d370a3a9e 100644 --- a/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.module.ts +++ b/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.module.ts @@ -44,6 +44,16 @@ import { TxMmdReportComponent } from './datim-reports/tx-mmd-report.component'; import { TxRttReportComponent } from './datim-reports/tx-rtt-report.component'; import { AhdReportComponent } from './ahd-report/ahd-report.component'; import { PlhivNcdV2ReportComponent } from './plhiv-ncd-v2-report/plhiv-ncd-v2-report.component'; +import { RegistersComponent } from './registers/registers.component'; +import { HeiRegisterComponent } from './registers/hei-register/hei-register.component'; +import { AncRegisterComponent } from './registers/anc-register/anc-register.component'; +import { NutritionRegisterComponent } from './registers/nutrition-register/nutrition-register.component'; +import { MaternityRegisterComponent } from './registers/maternity-register/maternity-register.component'; +import { HtsrefferallinkageRegisterComponent } from './registers/htsrefferallinkage-register/htsrefferallinkage-register.component'; +import { PncRegisterComponent } from './registers/pnc-register/pnc-register.component'; +import { DefaultertracingRegisterComponent } from './registers/defaultertracing-register/defaultertracing-register.component'; +import { PrepdailyRegisterComponent } from './registers/prepdaily-register/prepdaily-register.component'; +import { CntdailyRegisterComponent } from './registers/cntdaily-register/cntdaily-register.component'; @NgModule({ imports: [ @@ -97,7 +107,17 @@ import { PlhivNcdV2ReportComponent } from './plhiv-ncd-v2-report/plhiv-ncd-v2-re TxMmdReportComponent, TxRttReportComponent, PlhivNcdV2ReportComponent, - AhdReportComponent + AhdReportComponent, + RegistersComponent, + HeiRegisterComponent, + AncRegisterComponent, + NutritionRegisterComponent, + MaternityRegisterComponent, + HtsrefferallinkageRegisterComponent, + PncRegisterComponent, + DefaultertracingRegisterComponent, + PrepdailyRegisterComponent, + CntdailyRegisterComponent ], providers: [ DataAnalyticsDashboardService, diff --git a/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.routes.ts b/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.routes.ts index e9e7a5919..cd482d7c5 100644 --- a/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.routes.ts +++ b/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.routes.ts @@ -57,6 +57,16 @@ import { AhdReportComponent } from './ahd-report/ahd-report.component'; import { AhdMonthlyReportPatientlistComponent } from 'src/app/hiv-care-lib/ahd-monthly-report/ahd-monthly-report-patientlist/ahd-monthly-report-patientlist.component'; import { PlhivNcdV2ReportPatientListComponent } from 'src/app/hiv-care-lib/plhiv-ncd-v2-report/plhiv-ncd-v2-report-patient-list/plhiv-ncd-v2-report-patient-list.component'; import { PlhivNcdV2ReportComponent } from './plhiv-ncd-v2-report/plhiv-ncd-v2-report.component'; +import { RegistersComponent } from './registers/registers.component'; +import { HeiRegisterComponent } from './registers/hei-register/hei-register.component'; +import { AncRegisterComponent } from './registers/anc-register/anc-register.component'; +import { NutritionRegisterComponent } from './registers/nutrition-register/nutrition-register.component'; +import { MaternityRegisterComponent } from './registers/maternity-register/maternity-register.component'; +import { HtsrefferallinkageRegisterComponent } from './registers/htsrefferallinkage-register/htsrefferallinkage-register.component'; +import { PncRegisterComponent } from './registers/pnc-register/pnc-register.component'; +import { DefaultertracingRegisterComponent } from './registers/defaultertracing-register/defaultertracing-register.component'; +import { PrepdailyRegisterComponent } from './registers/prepdaily-register/prepdaily-register.component'; +import { CntdailyRegisterComponent } from './registers/cntdaily-register/cntdaily-register.component'; const routes: Routes = [ { @@ -285,6 +295,96 @@ const routes: Routes = [ } ] }, + { + path: 'registers', + children: [ + { + path: '', + component: RegistersComponent + }, + { + path: 'hei-register', + children: [ + { + path: '', + component: HeiRegisterComponent + } + ] + }, + { + path: 'anc-register', + children: [ + { + path: '', + component: AncRegisterComponent + } + ] + }, + { + path: 'nutrition-register', + children: [ + { + path: '', + component: NutritionRegisterComponent + } + ] + }, + { + path: 'maternity-register', + children: [ + { + path: '', + component: MaternityRegisterComponent + } + ] + }, + { + path: 'htsrefferallinkage-register', + children: [ + { + path: '', + component: HtsrefferallinkageRegisterComponent + } + ] + }, + { + path: 'pnc-register', + children: [ + { + path: '', + component: PncRegisterComponent + } + ] + }, + { + path: 'defaultertracing-register', + children: [ + { + path: '', + component: DefaultertracingRegisterComponent + } + ] + }, + { + path: 'prepdaily-register', + children: [ + { + path: '', + component: PrepdailyRegisterComponent + } + ] + }, + { + path: 'cntdaily-register', + children: [ + { + path: '', + component: CntdailyRegisterComponent + } + ] + } + ] + }, { path: 'datim-report', children: [ diff --git a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.spec.ts new file mode 100644 index 000000000..dc9a601fd --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AncRegisterComponent } from './anc-register.component'; + +describe('AncRegisterComponent', () => { + let component: AncRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [AncRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AncRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.ts new file mode 100644 index 000000000..661cc2895 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-anc-register', + templateUrl: './anc-register.component.html', + styleUrls: ['./anc-register.component.css'] +}) +export class AncRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'ANC Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.spec.ts new file mode 100644 index 000000000..afa8dd874 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CntdailyRegisterComponent } from './cntdaily-register.component'; + +describe('CntdailyRegisterComponent', () => { + let component: CntdailyRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [CntdailyRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CntdailyRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts new file mode 100644 index 000000000..ac6aed7de --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-cntdaily-register', + templateUrl: './cntdaily-register.component.html', + styleUrls: ['./cntdaily-register.component.css'] +}) +export class CntdailyRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'Care and Treatment Daily Activity'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.spec.ts new file mode 100644 index 000000000..85c755813 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DefaultertracingRegisterComponent } from './defaultertracing-register.component'; + +describe('DefaultertracingRegisterComponent', () => { + let component: DefaultertracingRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [DefaultertracingRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(DefaultertracingRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.ts new file mode 100644 index 000000000..83b012c91 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-defaultertracing-register', + templateUrl: './defaultertracing-register.component.html', + styleUrls: ['./defaultertracing-register.component.css'] +}) +export class DefaultertracingRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'Defaulter Tracing Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.spec.ts new file mode 100644 index 000000000..19143ac64 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HeiRegisterComponent } from './hei-register.component'; + +describe('HeiRegisterComponent', () => { + let component: HeiRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [HeiRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HeiRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts new file mode 100644 index 000000000..2a9de1b47 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-hei-register', + templateUrl: './hei-register.component.html', + styleUrls: ['./hei-register.component.css'] +}) +export class HeiRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'HEI Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.spec.ts new file mode 100644 index 000000000..925245470 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HtsrefferallinkageRegisterComponent } from './htsrefferallinkage-register.component'; + +describe('HtsrefferallinkageRegisterComponent', () => { + let component: HtsrefferallinkageRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [HtsrefferallinkageRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HtsrefferallinkageRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.ts new file mode 100644 index 000000000..503ec25fc --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-htsrefferallinkage-register', + templateUrl: './htsrefferallinkage-register.component.html', + styleUrls: ['./htsrefferallinkage-register.component.css'] +}) +export class HtsrefferallinkageRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'HTS Lab Refferal & Linkage Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.spec.ts new file mode 100644 index 000000000..1a50a56fd --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MaternityRegisterComponent } from './maternity-register.component'; + +describe('MaternityRegisterComponent', () => { + let component: MaternityRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [MaternityRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MaternityRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.ts new file mode 100644 index 000000000..8fe1183d4 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-maternity-register', + templateUrl: './maternity-register.component.html', + styleUrls: ['./maternity-register.component.css'] +}) +export class MaternityRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'Martenity Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.spec.ts new file mode 100644 index 000000000..02a62ca91 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NutritionRegisterComponent } from './nutrition-register.component'; + +describe('NutritionRegisterComponent', () => { + let component: NutritionRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [NutritionRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(NutritionRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.ts new file mode 100644 index 000000000..3240e3fd1 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-nutrition-register', + templateUrl: './nutrition-register.component.html', + styleUrls: ['./nutrition-register.component.css'] +}) +export class NutritionRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'Nutrition Service Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.spec.ts new file mode 100644 index 000000000..bc56e4b5d --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PncRegisterComponent } from './pnc-register.component'; + +describe('PncRegisterComponent', () => { + let component: PncRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [PncRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PncRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.ts new file mode 100644 index 000000000..160dead32 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-pnc-register', + templateUrl: './pnc-register.component.html', + styleUrls: ['./pnc-register.component.css'] +}) +export class PncRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'PNC Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.spec.ts new file mode 100644 index 000000000..b44182395 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PrepdailyRegisterComponent } from './prepdaily-register.component'; + +describe('PrepdailyRegisterComponent', () => { + let component: PrepdailyRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [PrepdailyRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PrepdailyRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts new file mode 100644 index 000000000..c982e94bd --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-prepdaily-register', + templateUrl: './prepdaily-register.component.html', + styleUrls: ['./prepdaily-register.component.css'] +}) +export class PrepdailyRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'PrEP Daily Activity Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/registers.component.css b/src/app/data-analytics-dashboard/hiv/registers/registers.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/registers.component.html b/src/app/data-analytics-dashboard/hiv/registers/registers.component.html new file mode 100644 index 000000000..c40ea7725 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/registers.component.html @@ -0,0 +1,27 @@ + +

Loading available dashboards ...

+
+ {{ errorMessage }} +
+ \ No newline at end of file diff --git a/src/app/data-analytics-dashboard/hiv/registers/registers.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/registers.component.spec.ts new file mode 100644 index 000000000..769a029a0 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/registers.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RegistersComponent } from './registers.component'; + +describe('RegistersComponent', () => { + let component: RegistersComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [RegistersComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RegistersComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/registers.component.ts b/src/app/data-analytics-dashboard/hiv/registers/registers.component.ts new file mode 100644 index 000000000..92750254f --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/registers.component.ts @@ -0,0 +1,79 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; + +@Component({ + selector: 'app-registers', + templateUrl: './registers.component.html', + styleUrls: ['./registers.component.css'] +}) +export class RegistersComponent implements OnInit { + public isBusy = false; + public errorMessage = ''; + + public dashboards: Array = []; + constructor(public router: Router, public route: ActivatedRoute) {} + + ngOnInit() { + this.dashboards = [ + { + title: 'MOH-408: HEI Register', + description: '', + url: 'hei-register', + icon: 'fa' + }, + { + title: 'MOH-405: ANC Register', + description: '', + url: 'anc-register', + icon: 'fa' + }, + { + title: 'MOH-407: Nutrition Service Register', + description: '', + url: 'nutrition-register', + icon: 'fa' + }, + { + title: 'MOH-333: Martenity Register', + description: '', + url: 'maternity-register', + icon: 'fa' + }, + { + title: 'MOH-362: HTS Lab Refferal & Linkage Register', + description: '', + url: 'htsrefferallinkage-register', + icon: 'fa' + }, + { + title: 'MOH-406: PNC Register', + description: '', + url: 'pnc-register', + icon: 'fa' + }, + { + title: 'Defaulter Tracing Register', + description: '', + url: 'defaultertracing-register', + icon: 'fa' + }, + { + title: 'MOH-267: PrEP Daily Activity Register', + description: '', + url: 'prepdaily-register', + icon: 'fa' + }, + { + title: 'MOH-366: Care and Treatment Daily Activity', + description: '', + url: 'cntdaily-register', + icon: 'fa' + } + ]; + } + public viewDashboard(dashboard: any) { + this.router.navigate([dashboard.url], { + relativeTo: this.route + }); + } +} diff --git a/src/app/shared/dynamic-route/schema/analytics.dashboard.conf.json b/src/app/shared/dynamic-route/schema/analytics.dashboard.conf.json index 0cc6d3a9c..ebd82770a 100644 --- a/src/app/shared/dynamic-route/schema/analytics.dashboard.conf.json +++ b/src/app/shared/dynamic-route/schema/analytics.dashboard.conf.json @@ -114,6 +114,12 @@ "icon": "fa fa-file", "isSideBarOpen": false }, + { + "url": "registers", + "label": "Registers", + "icon": "fa fa-list-alt", + "isSideBarOpen": false + }, { "url": "select-department", "label": "Change Department", From 624b758c6da367a1997fbadbbefbfed65202fdbf Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Thu, 23 May 2024 10:22:12 +0300 Subject: [PATCH 02/38] POC-737: Development of MOH Registers --- .../hiv/registers/registers.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/registers.component.html b/src/app/data-analytics-dashboard/hiv/registers/registers.component.html index c40ea7725..e040fcba0 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/registers.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/registers.component.html @@ -24,4 +24,4 @@
{{ dashboard.description }}
- \ No newline at end of file + From 09c622364348ec96296915bfb8a4a76084a3b225 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Fri, 24 May 2024 15:29:39 +0300 Subject: [PATCH 03/38] POC-746: MOH 366 Care and Treatment Daily Activity --- .../cntdaily-register.component.css | 14 + .../cntdaily-register.component.html | 990 +++++++++++++++++- 2 files changed, 988 insertions(+), 16 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.css index e69de29bb..7d7e743ba 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.css +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.css @@ -0,0 +1,14 @@ +tr, +.table-bordered th, +.table-bordered td { + border: 2px solid #000; /* Darker border color */ +} +tbody tr { + height: 20px; /* Adjust the height as per your design */ +} +.vertical-text { + writing-mode: vertical-rl; + text-orientation: mixed; + transform: rotate(180deg); + white-space: nowrap; +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html index 40a18d212..0dfc1180d 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html @@ -35,20 +35,978 @@

Viewing a Draft Version of the Report for the chosen month. This report is likely to change without warning. -
- - - - - + +
+
+
+
+ Ministry Of Health +
+
+ HIV Care Treatment Daily Activity Register MOH 366 +
+
+ Ver. July 2023 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NoDateNational Identification NumberClient CCC NumberAgeStarting ART + TB in HIV Care
(Newly Initiated on ART) +
+ Currently on ART (Starting and Continuing ART) + DSDRemarks
Client Unique Number (NUPI) + Tick as appropriate for age + Screened for TBStarted TPT + Indicate No. of months of till next appointment or
+ "R"for patients making unscheduled visits +
StatusType
Indicate Y/N/NA + E=Established
+ NE=Not Established +
+ C
+ FT
+ HFAG
+ PFAG
+ HCAG
+ PCAG
+ CP
+ CADP
+ IACD +
< 1 yrs (M)< 1 yrs (F)1-4 yrs (M)1-4 yrs (F)5-9 yrs (M)5-9 yrs (F)10-14 yrs (M)10-14 yrs (F)15-19 yrs (M)15-19 yrs (F)20-24 yrs(M)20-24 yrs (F)25+ yrs (M)25+ yrs (F)< 15 yrs15+ yrs< 15 yrs15+ yrs< 1 yrs (M)< 1 yrs (F)1-4 yrs (M)1-4 yrs (F)5-9 yrs (M)5-9 yrs (F)10-14 yrs (M)10-14 yrs (F)15-19 yrs (M)15-19 yrs (F)20-24 yrs(M)20-24 yrs (F)25+ yrs (M)25+ yrs (F)
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)(aa)(ab)(ac)(ad)(ae)(af)(ag)(ah)(ai)(aj)(ak)(al)(am)(an)(ao)
Data element CODEHV03-01HV03-02HV03-03HV03-04HV03-05HV03-06HV03-07HV03-08HV03-09HV03-10HV03-11HV03-12HV03-13HV03-14HV03-15HV03-16HV03-17HV03-18HV03-19HV03-20HV03-21HV03-22HV03-23HV03-24HV03-25HV03-26HV03-27HV03-28HV03-29HV03-30HV03-31HV03-32HV03-33HV03-34
TOTAL this Page
TOTAL this Page
TOTAL this Month
(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)(aa)(ab)(ac)(ad)(ae)(af)(ag)(ah)(ai)(aj)(ak)(al)(am)(an)(ao)
+ Summary of clinical visits + + Count of clients with 2 months appointment +
Total this Month (2s)
+ Count of clients with 3 months appointment +
Total this Month (3s)
+ Count of clients with 4 months appointment +
Total this Month (4s)
+ Count of clients with 5 months appointment +
Total this Month (5s)
+ Count of clients with 6 months appointment +
Total this Month (6s)
+
From 5a10e2ced60a126cc968401baba2937d202f09f9 Mon Sep 17 00:00:00 2001 From: Faith Kamau <121166087+hiqedme@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:34:30 +0300 Subject: [PATCH 04/38] POC-746 added data for HEI --- .../cntdaily-register.component.html | 883 ++---------------- .../cntdaily-register.component.ts | 54 +- .../care-treatment-resource.service.ts | 38 + 3 files changed, 122 insertions(+), 853 deletions(-) create mode 100644 src/app/etl-api/care-treatment-resource.service.ts diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html index 0dfc1180d..0852fc031 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html @@ -36,7 +36,7 @@

This report is likely to change without warning.

-
+
@@ -177,835 +177,58 @@

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Data element CODE - - - HV03-01 - HV03-02 - HV03-03 - HV03-04 - HV03-05 - HV03-06 - HV03-07 - HV03-08 - HV03-09 - HV03-10 - HV03-11 - HV03-12 - HV03-13 - HV03-14 - HV03-15 - HV03-16 - HV03-17 - HV03-18 - HV03-19 - HV03-20 - HV03-21 - HV03-22 - HV03-23 - HV03-24 - HV03-25 - HV03-26 - HV03-27 - HV03-28 - HV03-29 - HV03-30 - HV03-31 - HV03-32 - HV03-33 - HV03-34 - - - - TOTAL this Page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TOTAL this Page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TOTAL this Month - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (e) - (f) - (g) - (h) - (i) - (j) - (k) - (l) - (m) - (n) - (o) - (q) - (r) - (s) - (t) - (u) - (v) - (w) - (x) - (y) - (z) - (aa) - (ab) - (ac) - (ad) - (ae) - (af) - (ag) - (ah) - (ai) - (aj) - (ak) - (al) - (am) - (an) - (ao) - - - - Summary of clinical visits - - - Count of clients with 2 months appointment - - - - - - - - - - - - - - - - - - - - - - - Total this Month (2s) - - - - - - - - - - - - - - - - - - - - - - Count of clients with 3 months appointment - - - - - - - - - - - - - - - - - - - - - - Total this Month (3s) - - - - - - - - - - - - - - - - - - - - - - Count of clients with 4 months appointment - - - - - - - - - - - - - - - - - - - - - - Total this Month (4s) - - - - - - - - - - - - - - - - - - - - - - Count of clients with 5 months appointment - - - - - - - - - - - - - - - - - - - - - - Total this Month (5s) - - - - - - - - - - - - - - - - - - - - - - Count of clients with 6 months appointment - - - - - - - - - - - - - - - - - - - - - - Total this Month (6s) - - - - - - - - - - - - - - - - - - - + + + {{a+1}} + {{data.DATE}} + {{data.National_ID}} + {{data.CCC_Number}} + {{data.Age}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{data.NUPI}} + + + + +

diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts index ac6aed7de..69f16c6f9 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts @@ -2,6 +2,7 @@ import { Component, OnInit, Output } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import * as _ from 'lodash'; import * as Moment from 'moment'; +import { CareTreatmentResourceService } from 'src/app/etl-api/care-treatment-resource.service'; @Component({ selector: 'app-cntdaily-register', templateUrl: './cntdaily-register.component.html', @@ -12,7 +13,7 @@ export class CntdailyRegisterComponent implements OnInit { public params: any; public indicators: string; public selectedIndicators = []; - public txnewReportSummaryData: any = []; + public careTreatmentRegisterData: any = []; public columnDefs: any = []; public reportName = 'Care and Treatment Daily Activity'; public currentView = 'monthly'; @@ -48,7 +49,11 @@ export class CntdailyRegisterComponent implements OnInit { this._locationUuids = locationUuids; } - constructor(public router: Router, public route: ActivatedRoute) { + constructor( + public router: Router, + public route: ActivatedRoute, + public careTreatmentRegisterService: CareTreatmentResourceService + ) { this.route.queryParams.subscribe((data) => { data.month === undefined ? (this._month = Moment() @@ -71,8 +76,8 @@ export class CntdailyRegisterComponent implements OnInit { this.route.parent.parent.params.subscribe((params: any) => { this.storeParamsInUrl(params.location_uuid); }); - this.txnewReportSummaryData = []; - // this.getTxNewReport(this.params); + this.careTreatmentRegisterData = []; + this.getCareTreatmentRegisterData(this.params); } public storeParamsInUrl(param) { @@ -89,31 +94,34 @@ export class CntdailyRegisterComponent implements OnInit { }); } - // public getTxNewReport(params: any) { - // this.isLoading = true; - // this.txnewReport.getTxNewReport(params).subscribe((data) => { - // if (data.error) { - // this.showInfoMessage = true; - // this.errorMessage = `There has been an error while loading the report, please retry again`; - // this.isLoading = false; - // } else { - // this.showInfoMessage = false; - // this.columnDefs = data.sectionDefinitions; - // this.txnewReportSummaryData = data.result; - // this.calculateTotalSummary(); - // this.isLoading = false; - // this.showDraftReportAlert(this._month); - // } - // }); - // } + public getCareTreatmentRegisterData(params: any) { + this.isLoading = true; + this.careTreatmentRegisterService + .getCareTreatmentRegister(params) + .subscribe((data) => { + if (data.error) { + this.showInfoMessage = true; + this.errorMessage = `There has been an error while loading the report, please retry again`; + this.isLoading = false; + } else { + console.log('Care&Treatment', data); + this.showInfoMessage = false; + this.columnDefs = data.sectionDefinitions; + this.careTreatmentRegisterData = data; + this.calculateTotalSummary(); + this.isLoading = false; + this.showDraftReportAlert(this._month); + } + }); + } public calculateTotalSummary() { const totalsRow = []; - if (this.txnewReportSummaryData.length > 0) { + if (this.careTreatmentRegisterData.length > 0) { const totalObj = { location: 'Totals' }; - _.each(this.txnewReportSummaryData, (row) => { + _.each(this.careTreatmentRegisterData, (row) => { Object.keys(row).map((key) => { if (Number.isInteger(row[key]) === true) { if (totalObj[key]) { diff --git a/src/app/etl-api/care-treatment-resource.service.ts b/src/app/etl-api/care-treatment-resource.service.ts new file mode 100644 index 000000000..77e76f6fd --- /dev/null +++ b/src/app/etl-api/care-treatment-resource.service.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@angular/core'; +import { AppSettingsService } from '../app-settings/app-settings.service'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import * as Moment from 'moment'; +import { catchError, map } from 'rxjs/operators'; +@Injectable({ + providedIn: 'root' +}) +export class CareTreatmentResourceService { + public get url(): string { + return this.appSettingsService.getEtlRestbaseurl().trim(); + } + constructor( + public http: HttpClient, + public appSettingsService: AppSettingsService + ) {} + public getCareTreatmentRegister(params: any): Observable { + // tslint:disable-next-line: max-line-length + return this.http + .get( + `${this.url}care-and-treatment-register?endDate=${params.month}&locationUuids=${params.locationUuids}` + ) + .pipe( + catchError((err: any) => { + const error: any = err; + const errorObj = { + error: error.status, + message: error.statusText + }; + return Observable.of(errorObj); + }), + map((response: Response) => { + return response; + }) + ); + } +} From a5232dc2b1c4382b1f01f731399400c0417251e2 Mon Sep 17 00:00:00 2001 From: Faith Kamau <121166087+hiqedme@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:56:31 +0300 Subject: [PATCH 05/38] Poc 739 (#1752) * POC-737: Development of MOH Registers * POC-737: Development of MOH Registers * POC-739: MOH 408 HIV Exposed Infant Registers * POC-739 added data for HEI --------- Co-authored-by: Alfred-Mutai --- .../hiv/data-analytics-hiv.module.ts | 22 +- .../hiv/data-analytics-hiv.routes.ts | 100 +++++++++ .../anc-register/anc-register.component.css | 0 .../anc-register/anc-register.component.html | 54 +++++ .../anc-register.component.spec.ts | 24 ++ .../anc-register/anc-register.component.ts | 161 ++++++++++++++ .../cntdaily-register.component.css | 0 .../cntdaily-register.component.html | 54 +++++ .../cntdaily-register.component.spec.ts | 24 ++ .../cntdaily-register.component.ts | 161 ++++++++++++++ .../defaultertracing-register.component.css | 0 .../defaultertracing-register.component.html | 54 +++++ ...efaultertracing-register.component.spec.ts | 24 ++ .../defaultertracing-register.component.ts | 161 ++++++++++++++ .../hei-register/hei-register.component.css | 8 + .../hei-register/hei-register.component.html | 206 ++++++++++++++++++ .../hei-register.component.spec.ts | 24 ++ .../hei-register/hei-register.component.ts | 167 ++++++++++++++ .../htsrefferallinkage-register.component.css | 0 ...htsrefferallinkage-register.component.html | 54 +++++ ...refferallinkage-register.component.spec.ts | 24 ++ .../htsrefferallinkage-register.component.ts | 161 ++++++++++++++ .../maternity-register.component.css | 0 .../maternity-register.component.html | 54 +++++ .../maternity-register.component.spec.ts | 24 ++ .../maternity-register.component.ts | 161 ++++++++++++++ .../nutrition-register.component.css | 0 .../nutrition-register.component.html | 54 +++++ .../nutrition-register.component.spec.ts | 24 ++ .../nutrition-register.component.ts | 161 ++++++++++++++ .../pnc-register/pnc-register.component.css | 0 .../pnc-register/pnc-register.component.html | 54 +++++ .../pnc-register.component.spec.ts | 24 ++ .../pnc-register/pnc-register.component.ts | 161 ++++++++++++++ .../prepdaily-register.component.css | 0 .../prepdaily-register.component.html | 54 +++++ .../prepdaily-register.component.spec.ts | 24 ++ .../prepdaily-register.component.ts | 161 ++++++++++++++ .../hiv/registers/registers.component.css | 0 .../hiv/registers/registers.component.html | 27 +++ .../hiv/registers/registers.component.spec.ts | 24 ++ .../hiv/registers/registers.component.ts | 79 +++++++ .../etl-api/hei-register-resource.service.ts | 58 +++++ .../schema/analytics.dashboard.conf.json | 6 + 44 files changed, 2632 insertions(+), 1 deletion(-) create mode 100644 src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/registers.component.css create mode 100644 src/app/data-analytics-dashboard/hiv/registers/registers.component.html create mode 100644 src/app/data-analytics-dashboard/hiv/registers/registers.component.spec.ts create mode 100644 src/app/data-analytics-dashboard/hiv/registers/registers.component.ts create mode 100644 src/app/etl-api/hei-register-resource.service.ts diff --git a/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.module.ts b/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.module.ts index f0664f9b7..d370a3a9e 100644 --- a/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.module.ts +++ b/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.module.ts @@ -44,6 +44,16 @@ import { TxMmdReportComponent } from './datim-reports/tx-mmd-report.component'; import { TxRttReportComponent } from './datim-reports/tx-rtt-report.component'; import { AhdReportComponent } from './ahd-report/ahd-report.component'; import { PlhivNcdV2ReportComponent } from './plhiv-ncd-v2-report/plhiv-ncd-v2-report.component'; +import { RegistersComponent } from './registers/registers.component'; +import { HeiRegisterComponent } from './registers/hei-register/hei-register.component'; +import { AncRegisterComponent } from './registers/anc-register/anc-register.component'; +import { NutritionRegisterComponent } from './registers/nutrition-register/nutrition-register.component'; +import { MaternityRegisterComponent } from './registers/maternity-register/maternity-register.component'; +import { HtsrefferallinkageRegisterComponent } from './registers/htsrefferallinkage-register/htsrefferallinkage-register.component'; +import { PncRegisterComponent } from './registers/pnc-register/pnc-register.component'; +import { DefaultertracingRegisterComponent } from './registers/defaultertracing-register/defaultertracing-register.component'; +import { PrepdailyRegisterComponent } from './registers/prepdaily-register/prepdaily-register.component'; +import { CntdailyRegisterComponent } from './registers/cntdaily-register/cntdaily-register.component'; @NgModule({ imports: [ @@ -97,7 +107,17 @@ import { PlhivNcdV2ReportComponent } from './plhiv-ncd-v2-report/plhiv-ncd-v2-re TxMmdReportComponent, TxRttReportComponent, PlhivNcdV2ReportComponent, - AhdReportComponent + AhdReportComponent, + RegistersComponent, + HeiRegisterComponent, + AncRegisterComponent, + NutritionRegisterComponent, + MaternityRegisterComponent, + HtsrefferallinkageRegisterComponent, + PncRegisterComponent, + DefaultertracingRegisterComponent, + PrepdailyRegisterComponent, + CntdailyRegisterComponent ], providers: [ DataAnalyticsDashboardService, diff --git a/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.routes.ts b/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.routes.ts index e9e7a5919..cd482d7c5 100644 --- a/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.routes.ts +++ b/src/app/data-analytics-dashboard/hiv/data-analytics-hiv.routes.ts @@ -57,6 +57,16 @@ import { AhdReportComponent } from './ahd-report/ahd-report.component'; import { AhdMonthlyReportPatientlistComponent } from 'src/app/hiv-care-lib/ahd-monthly-report/ahd-monthly-report-patientlist/ahd-monthly-report-patientlist.component'; import { PlhivNcdV2ReportPatientListComponent } from 'src/app/hiv-care-lib/plhiv-ncd-v2-report/plhiv-ncd-v2-report-patient-list/plhiv-ncd-v2-report-patient-list.component'; import { PlhivNcdV2ReportComponent } from './plhiv-ncd-v2-report/plhiv-ncd-v2-report.component'; +import { RegistersComponent } from './registers/registers.component'; +import { HeiRegisterComponent } from './registers/hei-register/hei-register.component'; +import { AncRegisterComponent } from './registers/anc-register/anc-register.component'; +import { NutritionRegisterComponent } from './registers/nutrition-register/nutrition-register.component'; +import { MaternityRegisterComponent } from './registers/maternity-register/maternity-register.component'; +import { HtsrefferallinkageRegisterComponent } from './registers/htsrefferallinkage-register/htsrefferallinkage-register.component'; +import { PncRegisterComponent } from './registers/pnc-register/pnc-register.component'; +import { DefaultertracingRegisterComponent } from './registers/defaultertracing-register/defaultertracing-register.component'; +import { PrepdailyRegisterComponent } from './registers/prepdaily-register/prepdaily-register.component'; +import { CntdailyRegisterComponent } from './registers/cntdaily-register/cntdaily-register.component'; const routes: Routes = [ { @@ -285,6 +295,96 @@ const routes: Routes = [ } ] }, + { + path: 'registers', + children: [ + { + path: '', + component: RegistersComponent + }, + { + path: 'hei-register', + children: [ + { + path: '', + component: HeiRegisterComponent + } + ] + }, + { + path: 'anc-register', + children: [ + { + path: '', + component: AncRegisterComponent + } + ] + }, + { + path: 'nutrition-register', + children: [ + { + path: '', + component: NutritionRegisterComponent + } + ] + }, + { + path: 'maternity-register', + children: [ + { + path: '', + component: MaternityRegisterComponent + } + ] + }, + { + path: 'htsrefferallinkage-register', + children: [ + { + path: '', + component: HtsrefferallinkageRegisterComponent + } + ] + }, + { + path: 'pnc-register', + children: [ + { + path: '', + component: PncRegisterComponent + } + ] + }, + { + path: 'defaultertracing-register', + children: [ + { + path: '', + component: DefaultertracingRegisterComponent + } + ] + }, + { + path: 'prepdaily-register', + children: [ + { + path: '', + component: PrepdailyRegisterComponent + } + ] + }, + { + path: 'cntdaily-register', + children: [ + { + path: '', + component: CntdailyRegisterComponent + } + ] + } + ] + }, { path: 'datim-report', children: [ diff --git a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.spec.ts new file mode 100644 index 000000000..dc9a601fd --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AncRegisterComponent } from './anc-register.component'; + +describe('AncRegisterComponent', () => { + let component: AncRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [AncRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AncRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.ts new file mode 100644 index 000000000..661cc2895 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-anc-register', + templateUrl: './anc-register.component.html', + styleUrls: ['./anc-register.component.css'] +}) +export class AncRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'ANC Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.spec.ts new file mode 100644 index 000000000..afa8dd874 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CntdailyRegisterComponent } from './cntdaily-register.component'; + +describe('CntdailyRegisterComponent', () => { + let component: CntdailyRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [CntdailyRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CntdailyRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts new file mode 100644 index 000000000..ac6aed7de --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-cntdaily-register', + templateUrl: './cntdaily-register.component.html', + styleUrls: ['./cntdaily-register.component.css'] +}) +export class CntdailyRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'Care and Treatment Daily Activity'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.spec.ts new file mode 100644 index 000000000..85c755813 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DefaultertracingRegisterComponent } from './defaultertracing-register.component'; + +describe('DefaultertracingRegisterComponent', () => { + let component: DefaultertracingRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [DefaultertracingRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(DefaultertracingRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.ts new file mode 100644 index 000000000..83b012c91 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-defaultertracing-register', + templateUrl: './defaultertracing-register.component.html', + styleUrls: ['./defaultertracing-register.component.css'] +}) +export class DefaultertracingRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'Defaulter Tracing Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.css new file mode 100644 index 000000000..a6a8ced85 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.css @@ -0,0 +1,8 @@ +tr, +.table-bordered th, +.table-bordered td { + border: 2px solid #000; /* Darker border color */ +} +tbody tr { + height: 20px; /* Adjust the height as per your design */ +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html new file mode 100644 index 000000000..fedc228d4 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html @@ -0,0 +1,206 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+
+
+
+ Ministry Of Health +
+
+ HIV EXPOSED INFANT REGISTER MOH 408 +
+
+ Ver. July 2023 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Cohort: Month/Year + (MMM-YYYY).........................../.............................................. +
Infant and Mother/Guardian Information + First HIV DNA PCR Test at Birth, 6 weeks or First Contact + Second HIV DNA PCR TestThird HIV DNA PCR TestHEI Outcomes at 12 monthsConfirmatory PCRAntibody test (18 to 24 months)HEI Outcomes at 24 monthsComments
Registration InformationInfant's informationParent's information
Serial No. + Date of Collected enrollment (DD/MM/YYYY) + Birth Certificate NumberHEI ID (MFL-YYYY-NNNN)Infant's NameDOB (DD/MM/YYYY)Sex + Infant Prophylaxis 1=NVP, 2=AZT, 3=NVP &AZT, 4=None, + Father's/Mother's/Guardian's NameAge at Test (in wks) + Type of Test 1=At Birth 2=at 6 weeks 3=at First Contact + Date Sample CollectedAge at Test (in months)Date Sample CollectedAge at Test (in months)Date Sample CollectedInfant Feeding + 1=Infected 2= Uninfected 3=Lost to Follow 4=Transfer Out 5=Dead + Age at Test (in months)Date Sample CollectedAge at Test (in months)Date Sample CollectedInfant Feeding + 1=Infected 2= Uninfected 3=Lost to Follow 4=Transfer Out 5=Dead +
Client Unique Number (NUPI)(M/F)(M/F)Telephone numberTest result (P,N)Test result (P,N)Test result (P,N)BF=Breastfeeding NBF=Not BreastfeedingTest result (P,N)Test result (P,N)BF=Breastfeeding NBF=Not Breastfeeding
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)
{{a+1}}{{data.date_enrolled}}{{data.Birth_Certificate_number}}{{data.HEI_ID}}{{data.Infant_name}}{{data.birth_date}}Sex{{null}}{{data.parent_name}}{{data.age_in_weeks_on_first_pcr}}{{date_enrolled}}{{data.first_pcr_date}}{{data.age_in_months_on_second_pcr}}{{data.second_pcr_date}}{{data.age_in_months_on_third_pcr}}{{data.third_pcr_date}}Infant Feeding{{data.hei_outcome}}{{data.age_in_months_on_confirm_pcr}}{{data.confirm_pcr_date}}{{data.age_in_months_on_first_antibody}}{{data.first_antibody_date}}{{null}}{{null}}{{null}}
{{data.NUPI}}{{data.gender}}{{data.Phone_Number}}{{data.results_pcr_first_pcr}}{{data.results_pcr_second_pcr}}{{data.results_pcr_third_pcr}}{{data.infant_feeding}}{{data.results_confirm_pcr}}{{data.results_first_antibody}}{{null}}{{null}}
+
+
diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.spec.ts new file mode 100644 index 000000000..19143ac64 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HeiRegisterComponent } from './hei-register.component'; + +describe('HeiRegisterComponent', () => { + let component: HeiRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [HeiRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HeiRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts new file mode 100644 index 000000000..5721caff6 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts @@ -0,0 +1,167 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +import { HeiRegisterResourceService } from 'src/app/etl-api/hei-register-resource.service'; +@Component({ + selector: 'app-hei-register', + templateUrl: './hei-register.component.html', + styleUrls: ['./hei-register.component.css'] +}) +export class HeiRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public heiRegisterData: any = []; + public columnDefs: any = []; + public reportName = 'HEI Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor( + public router: Router, + public route: ActivatedRoute, + public heiRegisterService: HeiRegisterResourceService + ) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.heiRegisterData = []; + this.getHeiRegisterData(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + public getHeiRegisterData(params: any) { + this.isLoading = true; + this.heiRegisterService.getHeiRegister(params).subscribe((data) => { + if (data.error) { + this.showInfoMessage = true; + this.errorMessage = `There has been an error while loading the report, please retry again`; + this.isLoading = false; + } else { + console.log('HeiDataSummary: ', data); + this.showInfoMessage = false; + this.columnDefs = data.sectionDefinitions; + this.heiRegisterData = data; + // this.calculateTotalSummary(); + this.isLoading = false; + this.showDraftReportAlert(this._month); + } + }); + } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.heiRegisterData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.heiRegisterData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.spec.ts new file mode 100644 index 000000000..925245470 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HtsrefferallinkageRegisterComponent } from './htsrefferallinkage-register.component'; + +describe('HtsrefferallinkageRegisterComponent', () => { + let component: HtsrefferallinkageRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [HtsrefferallinkageRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HtsrefferallinkageRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.ts new file mode 100644 index 000000000..503ec25fc --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-htsrefferallinkage-register', + templateUrl: './htsrefferallinkage-register.component.html', + styleUrls: ['./htsrefferallinkage-register.component.css'] +}) +export class HtsrefferallinkageRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'HTS Lab Refferal & Linkage Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.spec.ts new file mode 100644 index 000000000..1a50a56fd --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MaternityRegisterComponent } from './maternity-register.component'; + +describe('MaternityRegisterComponent', () => { + let component: MaternityRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [MaternityRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MaternityRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.ts new file mode 100644 index 000000000..8fe1183d4 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-maternity-register', + templateUrl: './maternity-register.component.html', + styleUrls: ['./maternity-register.component.css'] +}) +export class MaternityRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'Martenity Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.spec.ts new file mode 100644 index 000000000..02a62ca91 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NutritionRegisterComponent } from './nutrition-register.component'; + +describe('NutritionRegisterComponent', () => { + let component: NutritionRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [NutritionRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(NutritionRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.ts new file mode 100644 index 000000000..3240e3fd1 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-nutrition-register', + templateUrl: './nutrition-register.component.html', + styleUrls: ['./nutrition-register.component.css'] +}) +export class NutritionRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'Nutrition Service Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.spec.ts new file mode 100644 index 000000000..bc56e4b5d --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PncRegisterComponent } from './pnc-register.component'; + +describe('PncRegisterComponent', () => { + let component: PncRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [PncRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PncRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.ts new file mode 100644 index 000000000..160dead32 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-pnc-register', + templateUrl: './pnc-register.component.html', + styleUrls: ['./pnc-register.component.css'] +}) +export class PncRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'PNC Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html new file mode 100644 index 000000000..40a18d212 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html @@ -0,0 +1,54 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+
+ + + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.spec.ts new file mode 100644 index 000000000..b44182395 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PrepdailyRegisterComponent } from './prepdaily-register.component'; + +describe('PrepdailyRegisterComponent', () => { + let component: PrepdailyRegisterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [PrepdailyRegisterComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PrepdailyRegisterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts new file mode 100644 index 000000000..c982e94bd --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts @@ -0,0 +1,161 @@ +import { Component, OnInit, Output } from '@angular/core'; +import { Router, ActivatedRoute } from '@angular/router'; +import * as _ from 'lodash'; +import * as Moment from 'moment'; +@Component({ + selector: 'app-prepdaily-register', + templateUrl: './prepdaily-register.component.html', + styleUrls: ['./prepdaily-register.component.css'] +}) +export class PrepdailyRegisterComponent implements OnInit { + @Output() + public params: any; + public indicators: string; + public selectedIndicators = []; + public txnewReportSummaryData: any = []; + public columnDefs: any = []; + public reportName = 'PrEP Daily Activity Register'; + public currentView = 'monthly'; + public currentViewBelow = 'pdf'; + public month: string; + public year: number; + public quarter: string; + public eDate: string; + public sDate: string; + + public statusError = false; + public errorMessage = ''; + public showInfoMessage = false; + public isLoading = false; + public reportHead: any; + public enabledControls = 'locationControl,monthControl'; + public pinnedBottomRowData: any = []; + public _month: string; + public isReleased = true; + + public _locationUuids: any = []; + public get locationUuids(): Array { + return this._locationUuids; + } + + public set locationUuids(v: Array) { + const locationUuids = []; + _.each(v, (location: any) => { + if (location.value) { + locationUuids.push(location); + } + }); + this._locationUuids = locationUuids; + } + + constructor(public router: Router, public route: ActivatedRoute) { + this.route.queryParams.subscribe((data) => { + data.month === undefined + ? (this._month = Moment() + .subtract(1, 'M') + .endOf('month') + .format('YYYY-MM-DD')) + : (this._month = data.month); + + this.showDraftReportAlert(this._month); + }); + } + + ngOnInit() {} + + public onMonthChange(value): any { + this._month = Moment(value).endOf('month').format('YYYY-MM-DD'); + } + + public generateReport(): any { + this.route.parent.parent.params.subscribe((params: any) => { + this.storeParamsInUrl(params.location_uuid); + }); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); + } + + public storeParamsInUrl(param) { + this.params = { + locationUuids: param, + _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), + reportName: this.reportName, + _date: Moment(this._month).format('DD-MM-YYYY') + }; + this.router.navigate([], { + relativeTo: this.route, + queryParams: this.params + }); + } + + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } + + public calculateTotalSummary() { + const totalsRow = []; + if (this.txnewReportSummaryData.length > 0) { + const totalObj = { + location: 'Totals' + }; + _.each(this.txnewReportSummaryData, (row) => { + Object.keys(row).map((key) => { + if (Number.isInteger(row[key]) === true) { + if (totalObj[key]) { + totalObj[key] = row[key] + totalObj[key]; + } else { + totalObj[key] = row[key]; + } + } else { + if (Number.isNaN(totalObj[key])) { + totalObj[key] = 0; + } + if (totalObj[key] === null) { + totalObj[key] = 0; + } + totalObj[key] = 0 + totalObj[key]; + } + }); + }); + totalObj.location = 'Totals'; + totalsRow.push(totalObj); + this.pinnedBottomRowData = totalsRow; + } + } + public onIndicatorSelected(value) { + this.router.navigate(['patient-list'], { + relativeTo: this.route, + queryParams: { + indicators: value.field, + indicatorHeader: value.headerName, + indicatorGender: value.gender, + month: this._month, + locationUuids: value.location, + currentView: this.currentView + } + }); + } + + public showDraftReportAlert(date) { + if (date != null && date >= Moment().endOf('month').format('YYYY-MM-DD')) { + this.isReleased = false; + } else { + this.isReleased = true; + } + } +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/registers.component.css b/src/app/data-analytics-dashboard/hiv/registers/registers.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/data-analytics-dashboard/hiv/registers/registers.component.html b/src/app/data-analytics-dashboard/hiv/registers/registers.component.html new file mode 100644 index 000000000..e040fcba0 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/registers.component.html @@ -0,0 +1,27 @@ + +

Loading available dashboards ...

+
+ {{ errorMessage }} +
+ diff --git a/src/app/data-analytics-dashboard/hiv/registers/registers.component.spec.ts b/src/app/data-analytics-dashboard/hiv/registers/registers.component.spec.ts new file mode 100644 index 000000000..769a029a0 --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/registers.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RegistersComponent } from './registers.component'; + +describe('RegistersComponent', () => { + let component: RegistersComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [RegistersComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RegistersComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/data-analytics-dashboard/hiv/registers/registers.component.ts b/src/app/data-analytics-dashboard/hiv/registers/registers.component.ts new file mode 100644 index 000000000..92750254f --- /dev/null +++ b/src/app/data-analytics-dashboard/hiv/registers/registers.component.ts @@ -0,0 +1,79 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; + +@Component({ + selector: 'app-registers', + templateUrl: './registers.component.html', + styleUrls: ['./registers.component.css'] +}) +export class RegistersComponent implements OnInit { + public isBusy = false; + public errorMessage = ''; + + public dashboards: Array = []; + constructor(public router: Router, public route: ActivatedRoute) {} + + ngOnInit() { + this.dashboards = [ + { + title: 'MOH-408: HEI Register', + description: '', + url: 'hei-register', + icon: 'fa' + }, + { + title: 'MOH-405: ANC Register', + description: '', + url: 'anc-register', + icon: 'fa' + }, + { + title: 'MOH-407: Nutrition Service Register', + description: '', + url: 'nutrition-register', + icon: 'fa' + }, + { + title: 'MOH-333: Martenity Register', + description: '', + url: 'maternity-register', + icon: 'fa' + }, + { + title: 'MOH-362: HTS Lab Refferal & Linkage Register', + description: '', + url: 'htsrefferallinkage-register', + icon: 'fa' + }, + { + title: 'MOH-406: PNC Register', + description: '', + url: 'pnc-register', + icon: 'fa' + }, + { + title: 'Defaulter Tracing Register', + description: '', + url: 'defaultertracing-register', + icon: 'fa' + }, + { + title: 'MOH-267: PrEP Daily Activity Register', + description: '', + url: 'prepdaily-register', + icon: 'fa' + }, + { + title: 'MOH-366: Care and Treatment Daily Activity', + description: '', + url: 'cntdaily-register', + icon: 'fa' + } + ]; + } + public viewDashboard(dashboard: any) { + this.router.navigate([dashboard.url], { + relativeTo: this.route + }); + } +} diff --git a/src/app/etl-api/hei-register-resource.service.ts b/src/app/etl-api/hei-register-resource.service.ts new file mode 100644 index 000000000..9fe930f89 --- /dev/null +++ b/src/app/etl-api/hei-register-resource.service.ts @@ -0,0 +1,58 @@ +import { Injectable } from '@angular/core'; +import { AppSettingsService } from '../app-settings/app-settings.service'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import * as Moment from 'moment'; +import { catchError, map } from 'rxjs/operators'; +@Injectable({ + providedIn: 'root' +}) +export class HeiRegisterResourceService { + public get url(): string { + return this.appSettingsService.getEtlRestbaseurl().trim(); + } + constructor( + public http: HttpClient, + public appSettingsService: AppSettingsService + ) {} + public getHeiRegister(params: any): Observable { + // tslint:disable-next-line: max-line-length + return this.http + .get( + `${this.url}hei-register?endDate=${params.month}&locationUuids=${params.locationUuids}` + ) + .pipe( + catchError((err: any) => { + const error: any = err; + const errorObj = { + error: error.status, + message: error.statusText + }; + return Observable.of(errorObj); + }), + map((response: Response) => { + return response; + }) + ); + } + public getTxNewPatientList(params: any): Observable { + // tslint:disable-next-line: max-line-length + return this.http + .get( + `${this.url}txnew-summary-patient-list?endDate=${params.month}&locationUuids=${params.locationUuids}&indicators=${params.indicators}` + ) + .pipe( + catchError((err: any) => { + const error: any = err; + const errorObj = { + error: error.status, + message: error.statusText + }; + return Observable.of(errorObj); + }), + map((response: Response) => { + return response; + }) + ); + } +} diff --git a/src/app/shared/dynamic-route/schema/analytics.dashboard.conf.json b/src/app/shared/dynamic-route/schema/analytics.dashboard.conf.json index 0cc6d3a9c..ebd82770a 100644 --- a/src/app/shared/dynamic-route/schema/analytics.dashboard.conf.json +++ b/src/app/shared/dynamic-route/schema/analytics.dashboard.conf.json @@ -114,6 +114,12 @@ "icon": "fa fa-file", "isSideBarOpen": false }, + { + "url": "registers", + "label": "Registers", + "icon": "fa fa-list-alt", + "isSideBarOpen": false + }, { "url": "select-department", "label": "Change Department", From 148920e9ee8e249ed9fc79cfa89a865b070ff101 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Fri, 24 May 2024 15:29:39 +0300 Subject: [PATCH 06/38] POC-746: MOH 366 Care and Treatment Daily Activity --- .../cntdaily-register.component.css | 14 + .../cntdaily-register.component.html | 990 +++++++++++++++++- 2 files changed, 988 insertions(+), 16 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.css index e69de29bb..7d7e743ba 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.css +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.css @@ -0,0 +1,14 @@ +tr, +.table-bordered th, +.table-bordered td { + border: 2px solid #000; /* Darker border color */ +} +tbody tr { + height: 20px; /* Adjust the height as per your design */ +} +.vertical-text { + writing-mode: vertical-rl; + text-orientation: mixed; + transform: rotate(180deg); + white-space: nowrap; +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html index 40a18d212..0dfc1180d 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html @@ -35,20 +35,978 @@

Viewing a Draft Version of the Report for the chosen month. This report is likely to change without warning.

-
- - - - - + +
+
+
+
+ Ministry Of Health +
+
+ HIV Care Treatment Daily Activity Register MOH 366 +
+
+ Ver. July 2023 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NoDateNational Identification NumberClient CCC NumberAgeStarting ART + TB in HIV Care
(Newly Initiated on ART) +
+ Currently on ART (Starting and Continuing ART) + DSDRemarks
Client Unique Number (NUPI) + Tick as appropriate for age + Screened for TBStarted TPT + Indicate No. of months of till next appointment or
+ "R"for patients making unscheduled visits +
StatusType
Indicate Y/N/NA + E=Established
+ NE=Not Established +
+ C
+ FT
+ HFAG
+ PFAG
+ HCAG
+ PCAG
+ CP
+ CADP
+ IACD +
< 1 yrs (M)< 1 yrs (F)1-4 yrs (M)1-4 yrs (F)5-9 yrs (M)5-9 yrs (F)10-14 yrs (M)10-14 yrs (F)15-19 yrs (M)15-19 yrs (F)20-24 yrs(M)20-24 yrs (F)25+ yrs (M)25+ yrs (F)< 15 yrs15+ yrs< 15 yrs15+ yrs< 1 yrs (M)< 1 yrs (F)1-4 yrs (M)1-4 yrs (F)5-9 yrs (M)5-9 yrs (F)10-14 yrs (M)10-14 yrs (F)15-19 yrs (M)15-19 yrs (F)20-24 yrs(M)20-24 yrs (F)25+ yrs (M)25+ yrs (F)
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)(aa)(ab)(ac)(ad)(ae)(af)(ag)(ah)(ai)(aj)(ak)(al)(am)(an)(ao)
Data element CODEHV03-01HV03-02HV03-03HV03-04HV03-05HV03-06HV03-07HV03-08HV03-09HV03-10HV03-11HV03-12HV03-13HV03-14HV03-15HV03-16HV03-17HV03-18HV03-19HV03-20HV03-21HV03-22HV03-23HV03-24HV03-25HV03-26HV03-27HV03-28HV03-29HV03-30HV03-31HV03-32HV03-33HV03-34
TOTAL this Page
TOTAL this Page
TOTAL this Month
(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)(aa)(ab)(ac)(ad)(ae)(af)(ag)(ah)(ai)(aj)(ak)(al)(am)(an)(ao)
+ Summary of clinical visits + + Count of clients with 2 months appointment +
Total this Month (2s)
+ Count of clients with 3 months appointment +
Total this Month (3s)
+ Count of clients with 4 months appointment +
Total this Month (4s)
+ Count of clients with 5 months appointment +
Total this Month (5s)
+ Count of clients with 6 months appointment +
Total this Month (6s)
+
From ac43659fa00e55d8742f76fb7829257f0c985843 Mon Sep 17 00:00:00 2001 From: Faith Kamau <121166087+hiqedme@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:34:30 +0300 Subject: [PATCH 07/38] POC-746 added data for HEI --- .../cntdaily-register.component.html | 883 ++---------------- .../cntdaily-register.component.ts | 54 +- .../care-treatment-resource.service.ts | 38 + 3 files changed, 122 insertions(+), 853 deletions(-) create mode 100644 src/app/etl-api/care-treatment-resource.service.ts diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html index 0dfc1180d..0852fc031 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html @@ -36,7 +36,7 @@

This report is likely to change without warning.

-
+
@@ -177,835 +177,58 @@

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Data element CODE - - - HV03-01 - HV03-02 - HV03-03 - HV03-04 - HV03-05 - HV03-06 - HV03-07 - HV03-08 - HV03-09 - HV03-10 - HV03-11 - HV03-12 - HV03-13 - HV03-14 - HV03-15 - HV03-16 - HV03-17 - HV03-18 - HV03-19 - HV03-20 - HV03-21 - HV03-22 - HV03-23 - HV03-24 - HV03-25 - HV03-26 - HV03-27 - HV03-28 - HV03-29 - HV03-30 - HV03-31 - HV03-32 - HV03-33 - HV03-34 - - - - TOTAL this Page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TOTAL this Page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TOTAL this Month - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (e) - (f) - (g) - (h) - (i) - (j) - (k) - (l) - (m) - (n) - (o) - (q) - (r) - (s) - (t) - (u) - (v) - (w) - (x) - (y) - (z) - (aa) - (ab) - (ac) - (ad) - (ae) - (af) - (ag) - (ah) - (ai) - (aj) - (ak) - (al) - (am) - (an) - (ao) - - - - Summary of clinical visits - - - Count of clients with 2 months appointment - - - - - - - - - - - - - - - - - - - - - - - Total this Month (2s) - - - - - - - - - - - - - - - - - - - - - - Count of clients with 3 months appointment - - - - - - - - - - - - - - - - - - - - - - Total this Month (3s) - - - - - - - - - - - - - - - - - - - - - - Count of clients with 4 months appointment - - - - - - - - - - - - - - - - - - - - - - Total this Month (4s) - - - - - - - - - - - - - - - - - - - - - - Count of clients with 5 months appointment - - - - - - - - - - - - - - - - - - - - - - Total this Month (5s) - - - - - - - - - - - - - - - - - - - - - - Count of clients with 6 months appointment - - - - - - - - - - - - - - - - - - - - - - Total this Month (6s) - - - - - - - - - - - - - - - - - - - + + + {{a+1}} + {{data.DATE}} + {{data.National_ID}} + {{data.CCC_Number}} + {{data.Age}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{data.NUPI}} + + + + +

diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts index ac6aed7de..69f16c6f9 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts @@ -2,6 +2,7 @@ import { Component, OnInit, Output } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import * as _ from 'lodash'; import * as Moment from 'moment'; +import { CareTreatmentResourceService } from 'src/app/etl-api/care-treatment-resource.service'; @Component({ selector: 'app-cntdaily-register', templateUrl: './cntdaily-register.component.html', @@ -12,7 +13,7 @@ export class CntdailyRegisterComponent implements OnInit { public params: any; public indicators: string; public selectedIndicators = []; - public txnewReportSummaryData: any = []; + public careTreatmentRegisterData: any = []; public columnDefs: any = []; public reportName = 'Care and Treatment Daily Activity'; public currentView = 'monthly'; @@ -48,7 +49,11 @@ export class CntdailyRegisterComponent implements OnInit { this._locationUuids = locationUuids; } - constructor(public router: Router, public route: ActivatedRoute) { + constructor( + public router: Router, + public route: ActivatedRoute, + public careTreatmentRegisterService: CareTreatmentResourceService + ) { this.route.queryParams.subscribe((data) => { data.month === undefined ? (this._month = Moment() @@ -71,8 +76,8 @@ export class CntdailyRegisterComponent implements OnInit { this.route.parent.parent.params.subscribe((params: any) => { this.storeParamsInUrl(params.location_uuid); }); - this.txnewReportSummaryData = []; - // this.getTxNewReport(this.params); + this.careTreatmentRegisterData = []; + this.getCareTreatmentRegisterData(this.params); } public storeParamsInUrl(param) { @@ -89,31 +94,34 @@ export class CntdailyRegisterComponent implements OnInit { }); } - // public getTxNewReport(params: any) { - // this.isLoading = true; - // this.txnewReport.getTxNewReport(params).subscribe((data) => { - // if (data.error) { - // this.showInfoMessage = true; - // this.errorMessage = `There has been an error while loading the report, please retry again`; - // this.isLoading = false; - // } else { - // this.showInfoMessage = false; - // this.columnDefs = data.sectionDefinitions; - // this.txnewReportSummaryData = data.result; - // this.calculateTotalSummary(); - // this.isLoading = false; - // this.showDraftReportAlert(this._month); - // } - // }); - // } + public getCareTreatmentRegisterData(params: any) { + this.isLoading = true; + this.careTreatmentRegisterService + .getCareTreatmentRegister(params) + .subscribe((data) => { + if (data.error) { + this.showInfoMessage = true; + this.errorMessage = `There has been an error while loading the report, please retry again`; + this.isLoading = false; + } else { + console.log('Care&Treatment', data); + this.showInfoMessage = false; + this.columnDefs = data.sectionDefinitions; + this.careTreatmentRegisterData = data; + this.calculateTotalSummary(); + this.isLoading = false; + this.showDraftReportAlert(this._month); + } + }); + } public calculateTotalSummary() { const totalsRow = []; - if (this.txnewReportSummaryData.length > 0) { + if (this.careTreatmentRegisterData.length > 0) { const totalObj = { location: 'Totals' }; - _.each(this.txnewReportSummaryData, (row) => { + _.each(this.careTreatmentRegisterData, (row) => { Object.keys(row).map((key) => { if (Number.isInteger(row[key]) === true) { if (totalObj[key]) { diff --git a/src/app/etl-api/care-treatment-resource.service.ts b/src/app/etl-api/care-treatment-resource.service.ts new file mode 100644 index 000000000..77e76f6fd --- /dev/null +++ b/src/app/etl-api/care-treatment-resource.service.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@angular/core'; +import { AppSettingsService } from '../app-settings/app-settings.service'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import * as Moment from 'moment'; +import { catchError, map } from 'rxjs/operators'; +@Injectable({ + providedIn: 'root' +}) +export class CareTreatmentResourceService { + public get url(): string { + return this.appSettingsService.getEtlRestbaseurl().trim(); + } + constructor( + public http: HttpClient, + public appSettingsService: AppSettingsService + ) {} + public getCareTreatmentRegister(params: any): Observable { + // tslint:disable-next-line: max-line-length + return this.http + .get( + `${this.url}care-and-treatment-register?endDate=${params.month}&locationUuids=${params.locationUuids}` + ) + .pipe( + catchError((err: any) => { + const error: any = err; + const errorObj = { + error: error.status, + message: error.statusText + }; + return Observable.of(errorObj); + }), + map((response: Response) => { + return response; + }) + ); + } +} From fa3ef39b3bf5959bc344abeea5b12d2c4419468b Mon Sep 17 00:00:00 2001 From: Faith Kamau <121166087+hiqedme@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:16:28 +0300 Subject: [PATCH 08/38] POC-746 added data for HEI --- .../hei-register/hei-register.component.html | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html index abea5fa35..fedc228d4 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html @@ -35,7 +35,6 @@

Viewing a Draft Version of the Report for the chosen month. This report is likely to change without warning.

-<<<<<<< HEAD
@@ -204,22 +203,4 @@

-======= -
- - - - - ->>>>>>> 5a10e2ced60a126cc968401baba2937d202f09f9
From 97a7a8ed0f36844f8b049506db798eaf0c5cafdd Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Thu, 23 May 2024 09:56:13 +0300 Subject: [PATCH 09/38] POC-737: Development of MOH Registers --- .../cntdaily-register.component.html | 213 ++---------------- .../cntdaily-register.component.ts | 54 ++--- .../hei-register/hei-register.component.html | 184 ++------------- .../hei-register/hei-register.component.ts | 52 ++--- 4 files changed, 78 insertions(+), 425 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html index 0852fc031..40a18d212 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html @@ -35,201 +35,20 @@

Viewing a Draft Version of the Report for the chosen month. This report is likely to change without warning.

- -
-
-
-
- Ministry Of Health -
-
- HIV Care Treatment Daily Activity Register MOH 366 -
-
- Ver. July 2023 -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NoDateNational Identification NumberClient CCC NumberAgeStarting ART - TB in HIV Care
(Newly Initiated on ART) -
- Currently on ART (Starting and Continuing ART) - DSDRemarks
Client Unique Number (NUPI) - Tick as appropriate for age - Screened for TBStarted TPT - Indicate No. of months of till next appointment or
- "R"for patients making unscheduled visits -
StatusType
Indicate Y/N/NA - E=Established
- NE=Not Established -
- C
- FT
- HFAG
- PFAG
- HCAG
- PCAG
- CP
- CADP
- IACD -
< 1 yrs (M)< 1 yrs (F)1-4 yrs (M)1-4 yrs (F)5-9 yrs (M)5-9 yrs (F)10-14 yrs (M)10-14 yrs (F)15-19 yrs (M)15-19 yrs (F)20-24 yrs(M)20-24 yrs (F)25+ yrs (M)25+ yrs (F)< 15 yrs15+ yrs< 15 yrs15+ yrs< 1 yrs (M)< 1 yrs (F)1-4 yrs (M)1-4 yrs (F)5-9 yrs (M)5-9 yrs (F)10-14 yrs (M)10-14 yrs (F)15-19 yrs (M)15-19 yrs (F)20-24 yrs(M)20-24 yrs (F)25+ yrs (M)25+ yrs (F)
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)(aa)(ab)(ac)(ad)(ae)(af)(ag)(ah)(ai)(aj)(ak)(al)(am)(an)(ao)
{{a+1}}{{data.DATE}}{{data.National_ID}}{{data.CCC_Number}}{{data.Age}}
{{data.NUPI}}
-
+
+ + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts index 69f16c6f9..ac6aed7de 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts @@ -2,7 +2,6 @@ import { Component, OnInit, Output } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import * as _ from 'lodash'; import * as Moment from 'moment'; -import { CareTreatmentResourceService } from 'src/app/etl-api/care-treatment-resource.service'; @Component({ selector: 'app-cntdaily-register', templateUrl: './cntdaily-register.component.html', @@ -13,7 +12,7 @@ export class CntdailyRegisterComponent implements OnInit { public params: any; public indicators: string; public selectedIndicators = []; - public careTreatmentRegisterData: any = []; + public txnewReportSummaryData: any = []; public columnDefs: any = []; public reportName = 'Care and Treatment Daily Activity'; public currentView = 'monthly'; @@ -49,11 +48,7 @@ export class CntdailyRegisterComponent implements OnInit { this._locationUuids = locationUuids; } - constructor( - public router: Router, - public route: ActivatedRoute, - public careTreatmentRegisterService: CareTreatmentResourceService - ) { + constructor(public router: Router, public route: ActivatedRoute) { this.route.queryParams.subscribe((data) => { data.month === undefined ? (this._month = Moment() @@ -76,8 +71,8 @@ export class CntdailyRegisterComponent implements OnInit { this.route.parent.parent.params.subscribe((params: any) => { this.storeParamsInUrl(params.location_uuid); }); - this.careTreatmentRegisterData = []; - this.getCareTreatmentRegisterData(this.params); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); } public storeParamsInUrl(param) { @@ -94,34 +89,31 @@ export class CntdailyRegisterComponent implements OnInit { }); } - public getCareTreatmentRegisterData(params: any) { - this.isLoading = true; - this.careTreatmentRegisterService - .getCareTreatmentRegister(params) - .subscribe((data) => { - if (data.error) { - this.showInfoMessage = true; - this.errorMessage = `There has been an error while loading the report, please retry again`; - this.isLoading = false; - } else { - console.log('Care&Treatment', data); - this.showInfoMessage = false; - this.columnDefs = data.sectionDefinitions; - this.careTreatmentRegisterData = data; - this.calculateTotalSummary(); - this.isLoading = false; - this.showDraftReportAlert(this._month); - } - }); - } + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } public calculateTotalSummary() { const totalsRow = []; - if (this.careTreatmentRegisterData.length > 0) { + if (this.txnewReportSummaryData.length > 0) { const totalObj = { location: 'Totals' }; - _.each(this.careTreatmentRegisterData, (row) => { + _.each(this.txnewReportSummaryData, (row) => { Object.keys(row).map((key) => { if (Number.isInteger(row[key]) === true) { if (totalObj[key]) { diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html index fedc228d4..40a18d212 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html @@ -35,172 +35,20 @@

Viewing a Draft Version of the Report for the chosen month. This report is likely to change without warning.

-
-
-
-
- Ministry Of Health -
-
- HIV EXPOSED INFANT REGISTER MOH 408 -
-
- Ver. July 2023 -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Cohort: Month/Year - (MMM-YYYY).........................../.............................................. -
Infant and Mother/Guardian Information - First HIV DNA PCR Test at Birth, 6 weeks or First Contact - Second HIV DNA PCR TestThird HIV DNA PCR TestHEI Outcomes at 12 monthsConfirmatory PCRAntibody test (18 to 24 months)HEI Outcomes at 24 monthsComments
Registration InformationInfant's informationParent's information
Serial No. - Date of Collected enrollment (DD/MM/YYYY) - Birth Certificate NumberHEI ID (MFL-YYYY-NNNN)Infant's NameDOB (DD/MM/YYYY)Sex - Infant Prophylaxis 1=NVP, 2=AZT, 3=NVP &AZT, 4=None, - Father's/Mother's/Guardian's NameAge at Test (in wks) - Type of Test 1=At Birth 2=at 6 weeks 3=at First Contact - Date Sample CollectedAge at Test (in months)Date Sample CollectedAge at Test (in months)Date Sample CollectedInfant Feeding - 1=Infected 2= Uninfected 3=Lost to Follow 4=Transfer Out 5=Dead - Age at Test (in months)Date Sample CollectedAge at Test (in months)Date Sample CollectedInfant Feeding - 1=Infected 2= Uninfected 3=Lost to Follow 4=Transfer Out 5=Dead -
Client Unique Number (NUPI)(M/F)(M/F)Telephone numberTest result (P,N)Test result (P,N)Test result (P,N)BF=Breastfeeding NBF=Not BreastfeedingTest result (P,N)Test result (P,N)BF=Breastfeeding NBF=Not Breastfeeding
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)
{{a+1}}{{data.date_enrolled}}{{data.Birth_Certificate_number}}{{data.HEI_ID}}{{data.Infant_name}}{{data.birth_date}}Sex{{null}}{{data.parent_name}}{{data.age_in_weeks_on_first_pcr}}{{date_enrolled}}{{data.first_pcr_date}}{{data.age_in_months_on_second_pcr}}{{data.second_pcr_date}}{{data.age_in_months_on_third_pcr}}{{data.third_pcr_date}}Infant Feeding{{data.hei_outcome}}{{data.age_in_months_on_confirm_pcr}}{{data.confirm_pcr_date}}{{data.age_in_months_on_first_antibody}}{{data.first_antibody_date}}{{null}}{{null}}{{null}}
{{data.NUPI}}{{data.gender}}{{data.Phone_Number}}{{data.results_pcr_first_pcr}}{{data.results_pcr_second_pcr}}{{data.results_pcr_third_pcr}}{{data.infant_feeding}}{{data.results_confirm_pcr}}{{data.results_first_antibody}}{{null}}{{null}}
-
+
+ + + + +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts index 5721caff6..2a9de1b47 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts +++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts @@ -2,7 +2,6 @@ import { Component, OnInit, Output } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import * as _ from 'lodash'; import * as Moment from 'moment'; -import { HeiRegisterResourceService } from 'src/app/etl-api/hei-register-resource.service'; @Component({ selector: 'app-hei-register', templateUrl: './hei-register.component.html', @@ -13,7 +12,7 @@ export class HeiRegisterComponent implements OnInit { public params: any; public indicators: string; public selectedIndicators = []; - public heiRegisterData: any = []; + public txnewReportSummaryData: any = []; public columnDefs: any = []; public reportName = 'HEI Register'; public currentView = 'monthly'; @@ -49,11 +48,7 @@ export class HeiRegisterComponent implements OnInit { this._locationUuids = locationUuids; } - constructor( - public router: Router, - public route: ActivatedRoute, - public heiRegisterService: HeiRegisterResourceService - ) { + constructor(public router: Router, public route: ActivatedRoute) { this.route.queryParams.subscribe((data) => { data.month === undefined ? (this._month = Moment() @@ -76,8 +71,8 @@ export class HeiRegisterComponent implements OnInit { this.route.parent.parent.params.subscribe((params: any) => { this.storeParamsInUrl(params.location_uuid); }); - this.heiRegisterData = []; - this.getHeiRegisterData(this.params); + this.txnewReportSummaryData = []; + // this.getTxNewReport(this.params); } public storeParamsInUrl(param) { @@ -94,32 +89,31 @@ export class HeiRegisterComponent implements OnInit { }); } - public getHeiRegisterData(params: any) { - this.isLoading = true; - this.heiRegisterService.getHeiRegister(params).subscribe((data) => { - if (data.error) { - this.showInfoMessage = true; - this.errorMessage = `There has been an error while loading the report, please retry again`; - this.isLoading = false; - } else { - console.log('HeiDataSummary: ', data); - this.showInfoMessage = false; - this.columnDefs = data.sectionDefinitions; - this.heiRegisterData = data; - // this.calculateTotalSummary(); - this.isLoading = false; - this.showDraftReportAlert(this._month); - } - }); - } + // public getTxNewReport(params: any) { + // this.isLoading = true; + // this.txnewReport.getTxNewReport(params).subscribe((data) => { + // if (data.error) { + // this.showInfoMessage = true; + // this.errorMessage = `There has been an error while loading the report, please retry again`; + // this.isLoading = false; + // } else { + // this.showInfoMessage = false; + // this.columnDefs = data.sectionDefinitions; + // this.txnewReportSummaryData = data.result; + // this.calculateTotalSummary(); + // this.isLoading = false; + // this.showDraftReportAlert(this._month); + // } + // }); + // } public calculateTotalSummary() { const totalsRow = []; - if (this.heiRegisterData.length > 0) { + if (this.txnewReportSummaryData.length > 0) { const totalObj = { location: 'Totals' }; - _.each(this.heiRegisterData, (row) => { + _.each(this.txnewReportSummaryData, (row) => { Object.keys(row).map((key) => { if (Number.isInteger(row[key]) === true) { if (totalObj[key]) { From 7c1602bb3dc469af06f71af5971f60b7b9a71b8a Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Mon, 27 May 2024 12:24:25 +0300 Subject: [PATCH 10/38] POC-745: MOH 267 PrEP Daily Activity Register --- .../cntdaily-register.component.html | 54 --- .../prepdaily-register.component.css | 14 + .../prepdaily-register.component.html | 372 +++++++++++++++++- 3 files changed, 370 insertions(+), 70 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html index 40a18d212..e69de29bb 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html @@ -1,54 +0,0 @@ -

- {{ reportName }} -

- -
- Loading... -
- - -
- - - - -
-
- -
- × -

- An - error occurred while trying to load the report. Please try again. -

-

- {{ errorMessage }} -

-
-
- Viewing a Draft Version of the Report for the chosen month. - This report is likely to change without warning. -
-
- - - - - -
diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.css index e69de29bb..7d7e743ba 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.css +++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.css @@ -0,0 +1,14 @@ +tr, +.table-bordered th, +.table-bordered td { + border: 2px solid #000; /* Darker border color */ +} +tbody tr { + height: 20px; /* Adjust the height as per your design */ +} +.vertical-text { + writing-mode: vertical-rl; + text-orientation: mixed; + transform: rotate(180deg); + white-space: nowrap; +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html index 40a18d212..70eaf9048 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html @@ -35,20 +35,360 @@

Viewing a Draft Version of the Report for the chosen month. This report is likely to change without warning.

-
- - - - - + +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+ +
+
+
+
+ Ministry Of Health +
+
+ MOH 267 PrEP Daily Activity Register +
+
+ Ver. July 2023 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PrEP NoDate of VisitNational Identification NumberAge + Sex
+ (M/F) +
+ Population type
+ (Use the codes):
+ 1. General Population
+ 2. Discordant Couple
+ 3. MSM/MSW
+ 4. FSW
+ 5. PWID/PWUD
+ 6. VP +
+ Client PrEP Status:
+ N- New
+ C- Continuing
+ D-Discontinued
+ R-Restart +
+ PrEP Method:
+ 1. Daily oral PrEP
+ 2. Event driven oral PrEP
+ 3. Dapivirine Vaginal ring
+ 4. Cabotegravir Injectable +
+ HIV Results
+ (N/P/Ic/NA) +
+ Diagnosed with
+ STI
+ (N/Y) +
Remarks
National Unique Patient Identifier (NUPI)
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)
TOTAL this Page
TOTAL this Month
+
From 143a6f76b53fa01aefe1585625b3340a5fc6a25d Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Thu, 6 Jun 2024 10:11:21 +0300 Subject: [PATCH 11/38] Added data --- .../prepdaily-register.component.html | 303 ++++-------------- .../prepdaily-register.component.ts | 107 ++++--- .../registers-resource.service.spec.ts | 18 ++ src/app/etl-api/registers-resource.service.ts | 38 +++ 4 files changed, 171 insertions(+), 295 deletions(-) create mode 100644 src/app/etl-api/registers-resource.service.spec.ts create mode 100644 src/app/etl-api/registers-resource.service.ts diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html index 70eaf9048..11909e88a 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html @@ -51,7 +51,24 @@

This report is likely to change without warning.

-
+
+ +
+
+
@@ -69,7 +86,9 @@

PrEP No Date of Visit - National Identification Number + + National Identification Number + Age Sex
@@ -111,7 +130,9 @@

Remarks - National Unique Patient Identifier (NUPI) + + National Unique Patient Identifier (NUPI) + (a) @@ -128,185 +149,43 @@

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + {{ data.PrEP_Number }} + + + {{ transformDate(data.Date_Of_Visit) }} + + {{ data.National_ID }} + {{ data.Age }} + {{ data.Sex }} + + {{ data.population_type }} + + + {{ data.client_prep_status }} + + + {{ data.prep_method }} + + + {{ data.HIV_result }} + + + {{ data.with_STI }} + + + {{ data.remarks }} + + + + {{ data.NUPI }} + + TOTAL this Page - + {{ prepRegisterData.length }} @@ -317,7 +196,7 @@

TOTAL this Month - + {{ prepRegisterData.length }} @@ -326,68 +205,6 @@

-

diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts index c982e94bd..90cab6a0c 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts +++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts @@ -1,7 +1,19 @@ -import { Component, OnInit, Output } from '@angular/core'; +import { DatePipe } from '@angular/common'; +import { + Component, + OnInit, + Output, + Input, + OnDestroy, + ViewChild, + ElementRef +} from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import * as _ from 'lodash'; import * as Moment from 'moment'; +import { RegistersResourceService } from 'src/app/etl-api/registers-resource.service'; +import * as html2canvas from 'html2canvas'; +import * as jsPDF from 'jspdf'; @Component({ selector: 'app-prepdaily-register', templateUrl: './prepdaily-register.component.html', @@ -12,7 +24,7 @@ export class PrepdailyRegisterComponent implements OnInit { public params: any; public indicators: string; public selectedIndicators = []; - public txnewReportSummaryData: any = []; + public prepRegisterData: any = []; public columnDefs: any = []; public reportName = 'PrEP Daily Activity Register'; public currentView = 'monthly'; @@ -32,6 +44,7 @@ export class PrepdailyRegisterComponent implements OnInit { public pinnedBottomRowData: any = []; public _month: string; public isReleased = true; + @ViewChild('prepcontentToSnapshot') contentToSnapshot!: ElementRef; public _locationUuids: any = []; public get locationUuids(): Array { @@ -48,7 +61,12 @@ export class PrepdailyRegisterComponent implements OnInit { this._locationUuids = locationUuids; } - constructor(public router: Router, public route: ActivatedRoute) { + constructor( + public router: Router, + public route: ActivatedRoute, + public register: RegistersResourceService, + private datePipe: DatePipe + ) { this.route.queryParams.subscribe((data) => { data.month === undefined ? (this._month = Moment() @@ -71,8 +89,8 @@ export class PrepdailyRegisterComponent implements OnInit { this.route.parent.parent.params.subscribe((params: any) => { this.storeParamsInUrl(params.location_uuid); }); - this.txnewReportSummaryData = []; - // this.getTxNewReport(this.params); + this.prepRegisterData = []; + this.getPrEPRegisterReport(this.params); } public storeParamsInUrl(param) { @@ -89,54 +107,22 @@ export class PrepdailyRegisterComponent implements OnInit { }); } - // public getTxNewReport(params: any) { - // this.isLoading = true; - // this.txnewReport.getTxNewReport(params).subscribe((data) => { - // if (data.error) { - // this.showInfoMessage = true; - // this.errorMessage = `There has been an error while loading the report, please retry again`; - // this.isLoading = false; - // } else { - // this.showInfoMessage = false; - // this.columnDefs = data.sectionDefinitions; - // this.txnewReportSummaryData = data.result; - // this.calculateTotalSummary(); - // this.isLoading = false; - // this.showDraftReportAlert(this._month); - // } - // }); - // } - - public calculateTotalSummary() { - const totalsRow = []; - if (this.txnewReportSummaryData.length > 0) { - const totalObj = { - location: 'Totals' - }; - _.each(this.txnewReportSummaryData, (row) => { - Object.keys(row).map((key) => { - if (Number.isInteger(row[key]) === true) { - if (totalObj[key]) { - totalObj[key] = row[key] + totalObj[key]; - } else { - totalObj[key] = row[key]; - } - } else { - if (Number.isNaN(totalObj[key])) { - totalObj[key] = 0; - } - if (totalObj[key] === null) { - totalObj[key] = 0; - } - totalObj[key] = 0 + totalObj[key]; - } - }); - }); - totalObj.location = 'Totals'; - totalsRow.push(totalObj); - this.pinnedBottomRowData = totalsRow; - } + public getPrEPRegisterReport(params: any) { + this.isLoading = true; + this.register.getPrEPRegisterReport(params).subscribe((data) => { + if (data.error) { + this.showInfoMessage = true; + this.errorMessage = `There has been an error while loading the report, please retry again`; + this.isLoading = false; + } else { + this.showInfoMessage = false; + this.prepRegisterData = data; + this.isLoading = false; + this.showDraftReportAlert(this._month); + } + }); } + public onIndicatorSelected(value) { this.router.navigate(['patient-list'], { relativeTo: this.route, @@ -158,4 +144,21 @@ export class PrepdailyRegisterComponent implements OnInit { this.isReleased = true; } } + + transformDate(date: string): string | null { + return this.datePipe.transform(date, 'dd/MM/yyyy'); + } + + public takeSnapshotAndExport() { + const elementToSnapshot = this.contentToSnapshot.nativeElement; + + html2canvas(elementToSnapshot).then((canvas) => { + const imgData = canvas.toDataURL('image/png'); + const pdf = new jsPDF('p', 'mm', 'a4'); + const imgWidth = 210; // A4 width in mm + const imgHeight = (canvas.height * imgWidth) / canvas.width; + pdf.addImage(imgData, 'PNG', 0, 0, imgWidth, imgHeight); + pdf.save('MOH 267 PrEP Daily Activity Register.pdf'); + }); + } } diff --git a/src/app/etl-api/registers-resource.service.spec.ts b/src/app/etl-api/registers-resource.service.spec.ts new file mode 100644 index 000000000..35c519fe1 --- /dev/null +++ b/src/app/etl-api/registers-resource.service.spec.ts @@ -0,0 +1,18 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { RegistersResourceService } from './registers-resource.service'; + +describe('RegistersResourceService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [RegistersResourceService] + }); + }); + + it('should be created', inject( + [RegistersResourceService], + (service: RegistersResourceService) => { + expect(service).toBeTruthy(); + } + )); +}); diff --git a/src/app/etl-api/registers-resource.service.ts b/src/app/etl-api/registers-resource.service.ts new file mode 100644 index 000000000..140bb39e9 --- /dev/null +++ b/src/app/etl-api/registers-resource.service.ts @@ -0,0 +1,38 @@ +import { Injectable } from '@angular/core'; +import { AppSettingsService } from '../app-settings/app-settings.service'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import * as Moment from 'moment'; +import { catchError, map } from 'rxjs/operators'; +@Injectable({ + providedIn: 'root' +}) +export class RegistersResourceService { + public get url(): string { + return this.appSettingsService.getEtlRestbaseurl().trim(); + } + constructor( + public http: HttpClient, + public appSettingsService: AppSettingsService + ) {} + public getPrEPRegisterReport(params: any): Observable { + // tslint:disable-next-line: max-line-length + return this.http + .get( + `${this.url}prepregisterdata?month=${params.month}&locationUuids=${params.locationUuids}` + ) + .pipe( + catchError((err: any) => { + const error: any = err; + const errorObj = { + error: error.status, + message: error.statusText + }; + return Observable.of(errorObj); + }), + map((response: Response) => { + return response; + }) + ); + } +} From 71a66722e76d0301142875040d98dfa114e798dd Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Thu, 2 May 2024 16:22:17 +0300 Subject: [PATCH 12/38] Initial MOH731 template --- .../moh-731-report-pdf-view.component.html | 382 +++++++++++++++++- 1 file changed, 380 insertions(+), 2 deletions(-) diff --git a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html index e62f3113b..21fc3e2e7 100644 --- a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html +++ b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html @@ -20,7 +20,7 @@
- - + --> + + +
+
+ Ministry of Health +
+
+ Ver. July 2023 +
+
+
+ National AIDS & STI Control Program - NASCOP + MOH 731-Ver. July 2023
+ Comprehensive HIV/AIDS reporting form +
+
+
+ County________________________Sub County__________________________Facility______________________MFL_________Month_______Year__________ +
+
+
+
+
+ 1. HIV Testing Services & Pre exposure Prophylaxis +
+
+
+
+
+ 1.1 HIV Tests +
+
+
+
+ Male +
+
+ Female(including PMTCT) +
+
+ Tests +
+
+ HV01-01 +
+
+ HV01-02 +
+
+
+
+ Tests-Facility +
+
+ HV01-03 +
+
+ Tests-Community +
+
+ HV01-04 +
+
+
+
+ Tested KVP +
+
+ HV01-05 +
+
+
+
+ 1.2 HIV Positive Results +
+
+
+
+ Male +
+
+ Female(including PMTCT) +
+
+
+
+ Positive_2-9 +
+
+ HV01-06 +
+
+ HV01-07 +
+
+ Positive_10-14 +
+
+ HV01-08 +
+
+ HV01-09 +
+
+ Positive_15-19 +
+
+ HV01-10 +
+
+ HV01-11 +
+
+ Positive_20-24 +
+
+ HV01-12 +
+
+ HV01-13 +
+
+ Positive_25+ +
+
+ HV01-14 +
+
+ HV01-15 +
+
+ Positive_KVP +
+
+ HV01-16 +
+
+
+
+ Discordant +
+
+ HV01-17 +
+
+ HV01-18 +
+
+
+
+ 1.3 No. Seroconverted while on PrEP +
+
+
+
+ Male +
+
+ Female +
+
+
+
+ HIV Positive +
+
+ HV01-19 +
+
+ HV01-20 +
+
+
+
+
+
+ 1.4 No. Initiated on PrEP(NEW) +
+
+
+
+ Male +
+
+ Female +
+
+
+
+ General popn +
+
+ HV01-21 +
+
+ HV01-22 +
+
+ MSM/MSW +
+
+ HV01-23 +
+
+ PSW +
+
+ HV01-24 +
+
+ PWID/PWUD +
+
+ HV01-25 +
+
+ HV01-26 +
+
+ Discordant Couple +
+
+ HV01-27 +
+
+ HV01-28 +
+
+ Vulnerable Pop +
+
+ HV01-29 +
+
+ HV01-30 +
+
+ AYP (15-24yrs) +
+
+ HV01-31 +
+
+ HV01-32 +
+
+ Pregnant and breastfeeding women +
+
+ HV01-33 +
+
+
+
+ 1.5 No. on Prep Diagnosed with STI +
+
+
+
+ Male +
+
+ Female +
+
+
+
+ General popn +
+
+ HV01-34 +
+
+ HV01-35 +
+
+ MSM/MSW +
+
+ HV01-36 +
+
+ PSW +
+
+ HV01-37 +
+
+ PWID/PWUD +
+
+ HV01-38 +
+
+ HV01-39 +
+
+ Discordant Couple +
+
+ HV01-40 +
+
+ HV01-41 +
+
+ Vulnerable Pop +
+
+ HV01-42 +
+
+ HV01-43 +
+
+ AYP (15-24yrs) +
+
+ HV01-44 +
+
+ HV01-45 +
+
+
+
+
+
+
+ 2. Elimination of Mother-To-Child Transmission(EMTCT) +
+
+ sdfghjk +
+
+ 3. HIV and TB Treatment +
+
+
+
+
+
+ sdfghjk +
+
+ sdfghjk +
+
+ sdfghjk +
+
+
+
+
+
+ kdthfjklh +
+
+ 4. Medical Male Circumcision +
+
+ sdfghjk +
+
+ 5. Post Exposure Prophylaxis +
+
+ sdfghjk +
+
+ +
+
+
+
+ + +
5. Post Exposure Prophylaxis
- sdfghjk +
+
+ Exposed_Occupational +
+
+ HV05-01 + +
+
+ Exposed_Other +
+
+ HV05-02 + +
+
+
+
+ PEP_Occupational +
+
+ HV05-03 + +
+
+ PEP_Other +
+
+ HV05-04 + +
+
From c062771eaac2c3795d6d83048b083202a3b46e2e Mon Sep 17 00:00:00 2001 From: Faith Kamau <121166087+hiqedme@users.noreply.github.com> Date: Fri, 3 May 2024 17:27:45 +0300 Subject: [PATCH 15/38] MOH-731 added section 4.3 --- .../moh-731-report-pdf-view.component.html | 76 ++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html index 36f8fceee..f7108aa41 100644 --- a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html +++ b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html @@ -1253,7 +1253,81 @@ 4. Medical Male Circumcision
- sdfghjk +
+ 4.3 Circumcision Adverse Events +
+
+
+ AE_During_Moderate +
+
+ HV04-09 + +
+
+ AE_During_Severe +
+
+ HV04-10 + +
+
+ IAE_Post_Moderate +
+
+ HV04-11 + +
+
+ AE_Post_Severe +
+
+ HV04-12 + +
+
+ Follow up visit less than 14d +
+
+ HV04-13 + +
+
+
Date: Mon, 6 May 2024 12:51:33 +0300 Subject: [PATCH 16/38] Updated MOH template --- .../moh-731-report-pdf-view.component.html | 952 +++++++++++++++--- 1 file changed, 818 insertions(+), 134 deletions(-) diff --git a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html index f7108aa41..1153a53f1 100644 --- a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html +++ b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html @@ -110,13 +110,13 @@
HV01-01 -
HV01-02 -
@@ -127,7 +127,7 @@
HV01-03 -
@@ -138,7 +138,7 @@ >HV01-04 HV01-05 -
@@ -177,13 +177,13 @@
HV01-06 -
HV01-07 -
@@ -194,7 +194,7 @@ >HV01-08 HV01-09 HV01-10 HV01-11 HV01-12 HV01-13 HV01-14 HV01-15 HV01-16 HV01-17 -
HV01-18 -
@@ -347,13 +347,13 @@
HV01-19 -
HV01-20 -
@@ -379,13 +379,13 @@
HV01-21 -
HV01-22 -
@@ -396,7 +396,7 @@ >HV01-23 HV01-24 -
@@ -418,7 +418,7 @@
HV01-25 -
@@ -426,7 +426,7 @@ >HV01-26 HV01-27 HV01-28 HV01-29 HV01-30 HV01-31 HV01-32 HV01-33 HV01-34 -
HV01-35 -
@@ -567,7 +567,7 @@ >HV01-36 HV01-37 -
@@ -589,7 +589,7 @@
HV01-38 -
@@ -597,7 +597,7 @@ >HV01-39 HV01-40 HV01-41 HV01-42 HV01-43 HV01-44 HV01-45 HV02-01 -
@@ -740,13 +740,13 @@
HV02-02 -
HV02-03 -
@@ -757,7 +757,7 @@ >HV02-04 HV02-05 HV02-06 HV02-07 HV02-08 HV02-09 HV02-10 -
@@ -853,7 +853,7 @@ >HV02-11 HV02-12 HV02-13 HV02-14 -
@@ -913,7 +913,7 @@ >HV02-15 HV02-16 HV02-17 HV02-18 HV02-19 -
@@ -990,7 +990,7 @@ >HV02-20 HV02-21 -
HV02-22 -
@@ -1039,7 +1039,7 @@ >HV02-23 HV02-24 HV02-25 HV02-26 HV02-27 HV02-28 HV02-29 -
@@ -1135,7 +1135,7 @@ >HV02-30 HV02-31 HV02-32 -
@@ -1184,7 +1184,7 @@
HV02-33 -
@@ -1195,7 +1195,7 @@ >HV02-34
-
+
- sdfghjk +
+ 3.1 Starting ART +
+
+
+ Start ART_< 1 +
+
+ (M)HV03-01 + +
+
+ (F)HV03-02 + +
+
+ Start ART_1-4 +
+
+ (M)HV03-03 + +
+
+ (F)HV03-04 + +
+
+ Start ART_5-9 +
+
+ (M)HV03-05 + +
+
+ (F)HV03-06 + +
+
+ Start ART_10-14 +
+
+ (M)HV03-07 + +
+
+ (F)HV03-08 + +
+
+ Start ART_15-19 +
+
+ (M)HV03-09 + +
+
+ (F)HV03-10 + +
+
+ Start ART_20-24 +
+
+ (M)HV03-11 + +
+
+ (F)HV03-12 + +
+
+ Start ART_25+ +
+
+ (M)HV03-13 + +
+
+ (F)HV03-14 + +
+
+
+
+ 3.2 Currently on ART([All]) +
+
+
+ Start ART_< 1 +
+
+ (M)HV03-015 + +
+
+ (F)HV03-016 + +
+
+ Start ART_1-4 +
+
+ (M)HV03-017 + +
+
+ (F)HV03-018 + +
+
+ Start ART_5-9 +
+
+ (M)HV03-019 + +
+
+ (F)HV03-020 + +
+
+ Start ART_10-14 +
+
+ (M)HV03-021 + +
+
+ (F)HV03-022 + +
+
+ Start ART_15-19 +
+
+ (M)HV03-023 + +
+
+ (F)HV03-024 + +
+
+ Start ART_20-24 +
+
+ (M)HV03-025 + +
+
+ (F)HV03-026 + +
+
+ Start ART_25+ +
+
+ (M)HV03-027 + +
+
+ (F)HV03-028 + +
+
+
+
+ 3.3 TB Screening +
+
+
+ Screen for TB_< 15 +
+
+ HV03-029 + +
+
+ Screen for TB_15+ +
+
+ HV03-030 + +
+
+
+
+ 3.4 Starting TPT +
+
+
+ Start TPT_< 15 +
+
+ HV03-031 + +
+
+ Start TPT_15+ +
+
+ HV03-032 + +
+
+
+
+ 3.5 Differentiated Service Delivery +
+
+
+ Established +
+
+ HV03-033 + +
+
+ Not Established +
+
+ HV03-034 + +
+
+ Community +
+
+ HV03-035 + +
+
+ Facility +
+
+ HV03-036 + +
+
+
- sdfghjk -
-
- sdfghjk +
+ 3.6 Nutrition and HIV +
+
+
+ Number SAM + +
+
+ 0-59Months +
+
+ HV03-037 + +
+
+ 5-9Years +
+
+ HV03-038 + +
+
+ 10-14Years +
+
+ HV03-039 + +
+
+ 15-19Years +
+
+ HV03-040 + +
+
+ 20+ +
+
+ HV03-041 + +
+
+ Pregnant & Lactating +
+
+ HV03-042 + +
+
+
+
+ Number MAM + +
+
+ 0-59Months +
+
+ HV03-043 + +
+
+ 5-9Years +
+
+ HV03-044 + +
+
+ 10-14Years +
+
+ HV03-045 + +
+
+ 15-19Years +
+
+ HV03-046 + +
+
+ 20+ +
+
+ HV03-047 + +
+
+ Pregnant & Lactating +
+
+ HV03-048 + +
+
+
+
+ Number SAM+ receiving therapeutic foods +
+
+ 0-59Months +
+
+ HV03-049 + +
+
+ 5-9Years +
+
+ HV03-050 + +
+
+ 10-14Years +
+
+ HV03-051 + +
+
+ 15-19Years +
+
+ HV03-052 + +
+
+ 20+ +
+
+ HV03-053 + +
+
+ Pregnant & Lactating +
+
+ HV03-054 + +
+
+
+
+ Number MAM + receiving Supplemental foods +
+
+ 0-59Months +
+
+ HV03-055 + +
+
+ 5-9Years +
+
+ HV03-056 + +
+
+ 10-14Years +
+
+ HV03-057 + +
+
+ 15-19Years +
+
+ HV03-058 + +
+
+ 20+ +
+
+ HV03-059 + +
+
+ Pregnant & Lactating +
+
+ HV03-060 + +
+
+
+
-
+
- kdthfjklh +
+ 3.7 HIV in TB Clinic +
+
+
+ TB cases _New +
+
+ HV03-061 + +
+
+ TB New_Known HIV Positive(KPs) +
+
+ HV03-062 + +
+
+ TB_New HIV Positive +
+
+ HV03-063 + +
+
+ TB_New_Known HIV Positive(KP) +
+
+ HV03-064 + +
+
+ TB New_Start_HAART +
+
+ HV03-065 + +
+
+
4. Medical Male Circumcision
-
- 4.3 Circumcision Adverse Events +
+ 4.1 Number circumcised
- AE_During_Moderate + Circumcised_0-60 days
HV04-09 - HV04-01 +
- AE_During_Severe + Circumcised_61 days-9 yrs
- HV04-10 - HV04-02 +
- IAE_Post_Moderate + Circumcised_10-14
HV04-11 - HV04-03 +
- AE_Post_Severe + Circumcised_15+
HV04-12 - HV04-04 +
+
+
- Follow up visit less than 14d + Tested_ HIV+
HV04-13 - HV04-05 +
+
+ Tested_ HIV- +
+
+ HV04-06 + +
+
+
+ 4.2 Type of circumcision +
+
+
+ Surgical +
+
+ HV04-07 + +
+
+ Devices +
+
+ HV04-08 + +
+
+
+
+ 4.3 Circumcision Adverse Events +
+
+
+ AE_During_Moderate +
+
+ HV04-09 + +
+
+ AE_During_Severe +
+
+ HV04-10 + +
+
+ IAE_Post_Moderate +
+
+ HV04-11 + +
+
+ AE_Post_Severe +
+
+ HV04-12 + +
+
+ Follow up visit less than 14d +
+
+ HV04-13 + +
+
@@ -1339,7 +2023,7 @@ > 5. Post Exposure Prophylaxis
-
+
Exposed_Occupational @@ -1347,7 +2031,7 @@
HV05-01 -
@@ -1358,7 +2042,7 @@ >HV05-02 HV05-03 -
@@ -1384,7 +2068,7 @@ >HV05-04 Date: Wed, 8 May 2024 11:26:25 +0300 Subject: [PATCH 17/38] MOH-731: Updated report --- .../moh-731-report-pdf-view.component.html | 4876 ++++++++++------- .../moh-731-report-pdf-view.component.ts | 57 +- 2 files changed, 2984 insertions(+), 1949 deletions(-) diff --git a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html index 1153a53f1..80678a74b 100644 --- a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html +++ b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html @@ -11,7 +11,7 @@
- -
diff --git a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.ts b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.ts index 893109337..c452b9af8 100644 --- a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.ts +++ b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.ts @@ -1,5 +1,12 @@ import { take } from 'rxjs/operators'; -import { Component, OnInit, Input, OnDestroy } from '@angular/core'; +import { + Component, + OnInit, + Input, + OnDestroy, + ViewChild, + ElementRef +} from '@angular/core'; import { MOHReportService } from './moh-731-report-pdf-view.service'; import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser'; import { LocationResourceService } from '../../openmrs-api/location-resource.service'; @@ -7,6 +14,8 @@ import * as _ from 'lodash'; import { Subscription, BehaviorSubject } from 'rxjs'; import * as Moment from 'moment'; import { PDFDocumentProxy } from 'ng2-pdf-viewer'; +import * as html2canvas from 'html2canvas'; +import * as jsPDF from 'jspdf'; @Component({ selector: 'moh-731-pdf', templateUrl: 'moh-731-report-pdf-view.component.html' @@ -21,13 +30,18 @@ export class MOHReportComponent implements OnInit, OnDestroy { public errorFlag = false; public subscription: Subscription; public locations = []; + public location: any; + public reportData: any; public sectionDefinitions: any; public mohReports: Array; public previousData: any; public numberOfPages = 0; public _data; + month: string | null = null; + year: string | null = null; public stack = []; + @ViewChild('contentToSnapshot') contentToSnapshot!: ElementRef; @Input() public isAggregated = false; @@ -70,6 +84,19 @@ export class MOHReportComponent implements OnInit, OnDestroy { } } + public takeSnapshotAndExport() { + const elementToSnapshot = this.contentToSnapshot.nativeElement; + + html2canvas(elementToSnapshot).then((canvas) => { + const imgData = canvas.toDataURL('image/png'); + const pdf = new jsPDF('p', 'mm', 'a4'); + const imgWidth = 210; // A4 width in mm + const imgHeight = (canvas.height * imgWidth) / canvas.width; + pdf.addImage(imgData, 'PNG', 0, 0, imgWidth, imgHeight); + pdf.save('MOH-731.pdf'); + }); + } + public generatePdf(): void { this.resolveLationParams(); } @@ -151,14 +178,40 @@ export class MOHReportComponent implements OnInit, OnDestroy { ); } + public extractMonthAndYear(dateString: string) { + const parts = dateString.split('-'); + if (parts.length === 3) { + const day = parseInt(parts[0], 10); + const month = parseInt(parts[1], 10); + const year = parseInt(parts[2], 10); + + // Creating a Date object to validate the date + const dateObject = new Date(year, month - 1, day); // Month is zero-based + + if (!isNaN(dateObject.getTime())) { + // Date is valid, extract month and year + this.month = dateObject.toLocaleString('default', { month: 'long' }); + this.year = year.toString(); + } else { + // Invalid date + console.error('Invalid date format.'); + } + } else { + // Invalid date format + console.error('Invalid date format.'); + } + } + private moh731Report(reportsData, sectionDefinitions) { if (Array.isArray(reportsData) && reportsData.length > 0) { // tslint:disable-next-line:prefer-for-of // for (let i = 0; i < reportsData.length; i++) { const paramsArray = this.getLocationHeaders(reportsData); + this.location = paramsArray; + this.extractMonthAndYear(paramsArray[0].endDate); const rowsArray = this.getJoinLocations(reportsData); - + this.reportData = reportsData; this.mohReportService .generateMultiplePdfs(paramsArray, rowsArray, sectionDefinitions) .pipe(take(1)) From 5e4b3bc70a9c46f37e5cf9aebbc8b400a5063ec0 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Wed, 8 May 2024 19:33:47 +0300 Subject: [PATCH 18/38] Sorted formatting --- .../moh-731-report-pdf-view.component.html | 507 ++++++++++++------ 1 file changed, 345 insertions(+), 162 deletions(-) diff --git a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html index 80678a74b..27a108017 100644 --- a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html +++ b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html @@ -49,7 +49,15 @@ >
 National AIDS & STI Control Program - NASCOP National AIDS & STI Control Program - NASCOP HV01-02 HV01-03 HV01-04 HV01-06 HV01-07 HV01-08 HV01-10 HV01-12 HV01-14 HV01-16 HV01-18 HV01-19 HV01-20 HV01-21 HV01-22 HV01-23 {{ reportData[0]?.started_PEP_occupational }} +
+
+ HV01-24 + HV01-25 HV01-27 HV01-29 HV01-31 HV01-33 HV01-35 HV01-36 HV01-38 HV01-40 HV01-42 HV01-44 HV02-01 HV02-02 HV02-03 HV02-04 HV02-06 HV02-08 HV02-10 HV02-11 HV02-13 HV02-15 HV02-17 HV02-19 HV02-20 HV02-22 HV02-23 HV02-25 HV02-27 HV02-29 HV02-30 HV02-32 HV02-33 HV02-34 (F)HV03-02 (M)HV03-03 (M)HV03-05 (M)HV03-07 (M)HV03-09 (M)HV03-11 (M)HV03-13 (M)HV03-015 (F)HV03-016 (M)HV03-017 (M)HV03-019 (M)HV03-021 (M)HV03-023 (M)HV03-025 (M)HV03-027 HV03-029 HV03-030 HV03-032 HV03-034 HV03-036 HV03-038 HV03-040 HV03-042 HV03-044 HV03-046 HV03-048 HV03-050 HV03-052 HV03-054 HV03-056 HV03-058 HV03-060 HV03-062 HV03-064 HV04-01 HV04-02 HV04-04 HV04-06 HV04-08 HV04-10 HV04-12 HV05-01 HV05-02 HV05-04 {{ reportData[0]?.started_PEP_occupational }}0
@@ -156,7 +156,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0
@@ -175,7 +175,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0
@@ -193,7 +193,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0
@@ -212,7 +212,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0
@@ -244,7 +244,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0
@@ -258,7 +258,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0
@@ -276,7 +276,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0
@@ -291,7 +291,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0
@@ -309,7 +309,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0
@@ -324,7 +324,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0
@@ -342,7 +342,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0
@@ -357,7 +357,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0
@@ -375,7 +375,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0
@@ -390,7 +390,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -408,7 +408,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -427,7 +427,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -441,7 +441,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -473,7 +473,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -487,7 +487,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -521,7 +521,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -535,7 +535,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -553,7 +553,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -570,21 +570,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }} - -
- HV01-24 - {{ reportData[0]?.started_PEP_occupational }}0
@@ -616,7 +602,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -634,7 +620,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -649,7 +635,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -667,7 +653,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -682,7 +668,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -700,7 +686,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -715,7 +701,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -733,7 +719,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -765,7 +751,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -779,7 +765,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -797,7 +783,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -814,7 +800,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -846,7 +832,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -864,7 +850,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -879,7 +865,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -897,7 +883,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -912,7 +898,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -930,7 +916,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -945,7 +931,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -992,7 +978,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1020,7 +1006,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1034,7 +1020,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1052,7 +1038,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1067,7 +1053,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1085,7 +1071,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1100,7 +1086,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1118,7 +1104,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1133,7 +1119,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1156,7 +1142,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1174,7 +1160,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1192,7 +1178,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1210,7 +1196,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1233,7 +1219,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1251,7 +1237,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1269,7 +1255,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1287,7 +1273,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}
0
@@ -1305,7 +1291,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1330,7 +1316,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1348,7 +1334,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1384,7 +1370,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1398,7 +1384,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1416,7 +1402,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1431,7 +1417,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1449,7 +1435,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1464,7 +1450,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1482,7 +1468,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1497,7 +1483,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1520,7 +1506,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1538,7 +1524,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1556,7 +1542,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1581,7 +1567,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1602,7 +1588,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1620,7 +1606,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -1671,7 +1657,10 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__0_to_1__started_art + }} @@ -1685,7 +1674,10 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__0_to_1__started_art + }} @@ -1704,7 +1696,10 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__1_to_9__started_art + }} @@ -1719,7 +1714,10 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__1_to_9__started_art + }} @@ -1738,7 +1736,10 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__1_to_9__started_art + }} @@ -1753,7 +1754,10 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__1_to_9__started_art + }} @@ -1772,7 +1776,10 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__10_to_14__gender__M__started_art + }} @@ -1787,7 +1794,10 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__10_to_14__gender__F__started_art + }} @@ -1806,7 +1816,10 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__15_to_19__gender__M__started_art + }} @@ -1821,7 +1834,10 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__15_to_19__gender__F__started_art + }} @@ -1840,7 +1856,10 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__20_to_24__gender__M__started_art + }} @@ -1855,7 +1874,10 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__20_to_24__gender__F__started_art + }} @@ -1874,7 +1896,10 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__older_than_24__gender__M__started_art + }} @@ -1889,7 +1914,10 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__older_than_24__gender__F__started_art + }} @@ -1918,7 +1946,10 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__0_to_1__current_on_art + }} @@ -1932,7 +1963,10 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__0_to_1__current_on_art + }} @@ -1951,7 +1985,10 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__1_to_9__current_on_art + }} @@ -1966,7 +2003,10 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__1_to_9__current_on_art + }} @@ -1985,7 +2025,10 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__1_to_9__current_on_art + }} @@ -2000,7 +2043,10 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__1_to_9__current_on_art + }} @@ -2019,7 +2065,10 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__gender__M__age_range__10_to_14__current_on_art + }} @@ -2034,7 +2083,10 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__gender__F__age_range__10_to_14__current_on_art + }} @@ -2053,7 +2105,10 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__gender__M__age_range__15_to_19__current_on_art + }} @@ -2068,7 +2123,10 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__gender__F__age_range__15_to_19__current_on_art + }} @@ -2087,7 +2145,10 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__gender__M__age_range__20_to_24__current_on_art + }} @@ -2102,7 +2163,10 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__gender__F__age_range__20_to_24__current_on_art + }} @@ -2121,7 +2185,10 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__gender__M__age_range__older_than_24__current_on_art + }} @@ -2136,7 +2203,10 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__gender__F__age_range__older_than_24__current_on_art + }} @@ -2159,7 +2229,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2178,7 +2248,10 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__15_to_19__screened_for_tb + }} @@ -2201,7 +2274,10 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__20_to_24__screened_for_tb + }} @@ -2220,7 +2296,10 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}{{ + reportData[0] + ?.dc__age_range__15_to_19__started_ipt + }} @@ -2243,7 +2322,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2262,7 +2341,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2281,7 +2360,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2300,7 +2379,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2328,7 +2407,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2347,7 +2426,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2366,7 +2445,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2385,7 +2464,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2404,7 +2483,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2423,7 +2502,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2445,7 +2524,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2464,7 +2543,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2483,7 +2562,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2502,7 +2581,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2521,7 +2600,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2540,7 +2619,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2562,7 +2641,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2581,7 +2660,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2600,7 +2679,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2619,7 +2698,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2638,7 +2717,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2657,7 +2736,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2679,7 +2758,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2698,7 +2777,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2717,7 +2796,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2736,7 +2815,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2755,7 +2834,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2774,7 +2853,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2807,7 +2886,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2826,7 +2905,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2845,7 +2924,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2864,7 +2943,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2883,7 +2962,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2918,7 +2997,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2937,7 +3016,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2956,7 +3035,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2975,7 +3054,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -2994,7 +3073,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -3013,7 +3092,7 @@ border-top: none; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -3035,9 +3114,7 @@ display: inline-block; border: 1px solid black; " - >{{ - reportData[0]?.started_PEP_occupational - }}0 @@ -3056,9 +3133,7 @@ border-top: none; border-top: none; " - >{{ - reportData[0]?.started_PEP_occupational - }}0 @@ -3081,9 +3156,7 @@ display: inline-block; border: 1px solid black; " - >{{ - reportData[0]?.started_PEP_occupational - }}0 @@ -3101,9 +3174,7 @@ border: 1px solid black; border-top: none; " - >{{ - reportData[0]?.started_PEP_occupational - }}0 @@ -3121,9 +3192,7 @@ border: 1px solid black; border-top: none; " - >{{ - reportData[0]?.started_PEP_occupational - }}0 @@ -3141,9 +3210,7 @@ border: 1px solid black; border-top: none; " - >{{ - reportData[0]?.started_PEP_occupational - }}0 @@ -3161,9 +3228,7 @@ border: 1px solid black; border-top: none; " - >{{ - reportData[0]?.started_PEP_occupational - }}0 @@ -3196,7 +3261,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -3214,7 +3279,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -3233,7 +3298,7 @@ display: inline-block; border: 1px solid black; " - >{{ reportData[0]?.started_PEP_occupational }}0 @@ -3251,7 +3316,7 @@ border: 1px solid black; border-top: none; " - >{{ reportData[0]?.started_PEP_occupational }}0 From 4118a3337239a27e6f6dd1eabc76f5fc1c537612 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Thu, 9 May 2024 10:51:09 +0300 Subject: [PATCH 20/38] Updated PSW to FSW --- .../moh-731-report/moh-731-report-pdf-view.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html index ab1ea8330..87f17d9f7 100644 --- a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html +++ b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html @@ -558,7 +558,7 @@ >
- PSW + FSW
- PSW + FSW
Date: Tue, 14 May 2024 10:28:15 +0300 Subject: [PATCH 21/38] Sorted formatting --- .../moh-731-report/moh-731-report-pdf-view.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html index 87f17d9f7..ff3af87f5 100644 --- a/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html +++ b/src/app/hiv-care-lib/moh-731-report/moh-731-report-pdf-view.component.html @@ -1091,7 +1091,7 @@ >
- Tested at PNC_>=6 weeks + Tested at PNC_> 6 weeks
Date: Thu, 30 May 2024 10:54:13 +0300 Subject: [PATCH 22/38] POC-743: MOH 406 PNC Register. --- .../pnc-register/pnc-register.component.css | 17 + .../pnc-register/pnc-register.component.html | 873 +++++++++++++++++- 2 files changed, 874 insertions(+), 16 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.css index e69de29bb..ab1f08146 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.css +++ b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.css @@ -0,0 +1,17 @@ +tr, +.table-bordered th, +.table-bordered td { + border: 2px solid #000; /* Darker border color */ +} +tbody tr { + height: 20px; /* Adjust the height as per your design */ +} +.vertical-text { + writing-mode: vertical-rl; + text-orientation: mixed; + transform: rotate(180deg); + white-space: nowrap; +} +th { + min-width: 70px; +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.html index 40a18d212..6206fb58f 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.html @@ -35,20 +35,861 @@

Viewing a Draft Version of the Report for the chosen month. This report is likely to change without warning.

-
- - - - - + +
+
+
+
+ Ministry Of Health +
+
+ MOH 406 Post Natal Register +
+
+ Ver. July 2023 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Date of visitMaternity HistoryPostpartum VisitVital SignsPostnatal ExaminationsTB screeningHAART & Infant Prophylaxis and Treatment + Cervical Cancer
+ Screening
+ (VIA/VILLI/PAP
+ Smear/ND) +
+ Modern Post
+ Partum Family
+ Planning
+ (Y/N) +
+ Other Maternal
+ Complications +
+ Haematinics
+ (Y/N) +
RefferalsRemarks
+ Date of Visit
+ (dd/mm/yyyy) +
+ PNC Number
+ (New Visit) +
+ PNC Number/NUPI
+ (Revisit) +
+ Full Name(first name, middle and
+ surname) +
+ Date of Birth
+ (dd/mm/yyyy) +
+ County/
+ SubCounty +
Village/Estate/ Landmark + Date of Delivery
+ (dd/mm/yyyy) +
+ Place of
+ Delivery
+ 1)Facility
+ 2) Home
+ 3) BBA +
+ Mode of
+ Delivery
+ 1) SVD
+ 2) CS
+ 3) Breech
+ 4) AVD +
+ Timing
+ Mother +
Timing BabyTempPulse + Blood
+ Pressure +
+ Pallor
+ (Y/N) +
+ Breast
+ 1=normal
+ 2= cracked
+ nipple
+ 3=engorged
+ 4=mastitis +
+ Uterus
+ 1=
+ contracte d
+ 2= not
+ contracte d
+ 3= Others
+ Specify +
+ PPH
+ 1=present
+ 2=Absent +
+ C-Section Site
+ 1=Bleeding
+ 2=Normal
+ 3=Infected
+ 4=Gapping
+ 5=N/A +
+ Lochia
+ 1=Normal
+ 2=Foul
+ smelling
+ 3=Excessi
+ ve +
+ Episiotomy
+ 1=Repaired
+ 2=Gaping
+ 3=Infected
+ 4=Healed
+ 5=N/ +
+ Fistula
+ 1=VVF
+ 2=RVF
+ 3=VVR
+ 4=Non +
+ TB Screening
+ 1: Presumed TB
+ 2: No signs
+ 3: On TB treatment
+ 4: On TPT
+ 5: Not done +
Tested PNCHIV Test 1HIV Test 2HIV Test 3Results in PNC<=6wks>6wks + Results
+ 1=Normal,
+ 2=Suspected,
+ 3= Confirmed,
+ 4= Not done +
+ Counseled
+ Method received +
FromTo + Reasons for
+ referral
+ (specify) +
NUPIAge in YearsTelephone number + 1=no change,
+ 2=10 days to
+ 14 days;
+ 3=4 to 6
+ weeks;
+ 4=4 to 6
+ months +
+ 1=no change,
+ 2=10 days to
+ 14 days;
+ 3=4 to 6
+ weeks;
+ 4=4 to 6
+ months +
+ 1= mild;
+ 2= moderate;
+ 3= severe +
(I/R/ND/KP)Kit Name:Kit Name:Kit Name:<=6wks>6wksInfantMotherInfantMother + 1 = Community Unit
+ 2 = Another Health
+ Facility
+ 3 = Not Applicable +
+ 1 = Community Unit

+ 2 = Another Health
+ Facility
+ 3 = Not Applicable +
Lot No.Lot No.Lot No.(N/P/Ic/NA)(N/P/Ic/NA) + NVP +AZT
+ +CTX
+ or
+ NVP +CTX +
HAART + NVP +AZT
+ +CTX
+ or
+ NVP +CTX +
HAART
Expiry No. / /Expiry No. / /Expiry No. / /(Y/N/NA/R)(Y/N/NA/R)(Y/N/NA/R)(Y/N/NA/R)
(N,P,I,NA)(N,P,I,NA)(N,P,I,NA)
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)(aa)(ab)(ac)(ad)(ae)(af)(ag)(ah)(ai)(aj)(ak)(al)(am)(an)(ao)(ap)
+
From e4904553ddf3cac3747528138d6e36de8f542777 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Thu, 16 May 2024 17:44:12 +0300 Subject: [PATCH 23/38] POC-730: Internal movement form, add Patient type with options Antenatal and Postnatal care programs under PMTCT program and validate --- .../hiv-referrals/hiv-referral.component.ts | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/app/patient-dashboard/common/patient-referrals/hiv-referrals/hiv-referral.component.ts b/src/app/patient-dashboard/common/patient-referrals/hiv-referrals/hiv-referral.component.ts index 68507b90b..917ce9b4a 100644 --- a/src/app/patient-dashboard/common/patient-referrals/hiv-referrals/hiv-referral.component.ts +++ b/src/app/patient-dashboard/common/patient-referrals/hiv-referrals/hiv-referral.component.ts @@ -223,6 +223,45 @@ export class HivReferralComponent implements OnInit, OnChanges, OnDestroy { program: hivProgram.program.uuid }; } + + // if ( + // hivProgram.program.uuid === Programs.STANDARD_HIV_PROGRAM.uuid && + // this.referredHivProgram.uuid === Programs.ANC_PROGRAM.uuid + // ) { + // } + // if ( + // hivProgram.program.uuid === Programs.STANDARD_HIV_PROGRAM.uuid && + // this.referredHivProgram.uuid === Programs.PNC_PROGRAM.uuid + // ) { + // } + // if ( + // hivProgram.program.uuid === Programs.PNC_PROGRAM.uuid && + // this.referredHivProgram.uuid === Programs.ANC_PROGRAM.uuid + // ) { + // } + // if ( + // hivProgram.program.uuid === Programs.ANC_PROGRAM.uuid && + // this.referredHivProgram.uuid === Programs.PNC_PROGRAM.uuid + // ) { + // } else if ( + // hivProgram.program.uuid === Programs.ANC_PROGRAM.uuid && + // this.referredHivProgram.uuid === Programs.STANDARD_HIV_PROGRAM.uuid + // ) { + // referredToStandard = true; + // } + // else if ( + // hivProgram.program.uuid === Programs.PNC_PROGRAM.uuid && + // this.referredHivProgram.uuid === Programs.STANDARD_HIV_PROGRAM.uuid + // ) { + // referredToStandard = true; + // } else { + // return { + // location: this.referredHivProgram.locationUuid, + // patient: this.patient.uuid, + // dateEnrolled: moment().subtract(1, 'minutes').format(), + // program: hivProgram.program.uuid + // }; + // } } ); // Add the referred program in payload From 835edd712d4d44f9485a345001616e98ad86b204 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Thu, 16 May 2024 17:51:19 +0300 Subject: [PATCH 24/38] POC-730: Internal movement form, add Patient type with options Antenatal and Postnatal care programs under PMTCT program and validate --- .../hiv-referrals/hiv-referral.component.ts | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/src/app/patient-dashboard/common/patient-referrals/hiv-referrals/hiv-referral.component.ts b/src/app/patient-dashboard/common/patient-referrals/hiv-referrals/hiv-referral.component.ts index 917ce9b4a..68507b90b 100644 --- a/src/app/patient-dashboard/common/patient-referrals/hiv-referrals/hiv-referral.component.ts +++ b/src/app/patient-dashboard/common/patient-referrals/hiv-referrals/hiv-referral.component.ts @@ -223,45 +223,6 @@ export class HivReferralComponent implements OnInit, OnChanges, OnDestroy { program: hivProgram.program.uuid }; } - - // if ( - // hivProgram.program.uuid === Programs.STANDARD_HIV_PROGRAM.uuid && - // this.referredHivProgram.uuid === Programs.ANC_PROGRAM.uuid - // ) { - // } - // if ( - // hivProgram.program.uuid === Programs.STANDARD_HIV_PROGRAM.uuid && - // this.referredHivProgram.uuid === Programs.PNC_PROGRAM.uuid - // ) { - // } - // if ( - // hivProgram.program.uuid === Programs.PNC_PROGRAM.uuid && - // this.referredHivProgram.uuid === Programs.ANC_PROGRAM.uuid - // ) { - // } - // if ( - // hivProgram.program.uuid === Programs.ANC_PROGRAM.uuid && - // this.referredHivProgram.uuid === Programs.PNC_PROGRAM.uuid - // ) { - // } else if ( - // hivProgram.program.uuid === Programs.ANC_PROGRAM.uuid && - // this.referredHivProgram.uuid === Programs.STANDARD_HIV_PROGRAM.uuid - // ) { - // referredToStandard = true; - // } - // else if ( - // hivProgram.program.uuid === Programs.PNC_PROGRAM.uuid && - // this.referredHivProgram.uuid === Programs.STANDARD_HIV_PROGRAM.uuid - // ) { - // referredToStandard = true; - // } else { - // return { - // location: this.referredHivProgram.locationUuid, - // patient: this.patient.uuid, - // dateEnrolled: moment().subtract(1, 'minutes').format(), - // program: hivProgram.program.uuid - // }; - // } } ); // Add the referred program in payload From 4770e9fe620fd2aa1e904890a8eb081308fa49e1 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Tue, 28 May 2024 17:04:01 +0300 Subject: [PATCH 25/38] mch bugfix --- src/app/build-version/build-version.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/build-version/build-version.component.ts b/src/app/build-version/build-version.component.ts index d1f229b80..c60a3b385 100644 --- a/src/app/build-version/build-version.component.ts +++ b/src/app/build-version/build-version.component.ts @@ -8,7 +8,7 @@ import { VERSION } from '../../environments/version'; }) export class BuildVersionComponent implements OnInit { public version: string; - public buildDate: Date; + public buildDate: any; public hash: string; constructor() {} @@ -20,7 +20,7 @@ export class BuildVersionComponent implements OnInit { try { this.version = VERSION.version; this.hash = VERSION.hash; - this.buildDate = new Date(VERSION.buildDate); + this.buildDate = 'Feb 15, 2024, 6:38:55 PM'; // new Date(VERSION.buildDate); } catch (e) {} } } From 4b6bb5a1f6cbdb98e13d77a5dc1c1923e21d33f7 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Tue, 28 May 2024 16:37:07 +0300 Subject: [PATCH 26/38] POC-738: Initial commit --- .../anc-register/anc-register.component.css | 17 ++ .../anc-register/anc-register.component.html | 245 ++++++++++++++++-- 2 files changed, 246 insertions(+), 16 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.css index e69de29bb..ab1f08146 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.css +++ b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.css @@ -0,0 +1,17 @@ +tr, +.table-bordered th, +.table-bordered td { + border: 2px solid #000; /* Darker border color */ +} +tbody tr { + height: 20px; /* Adjust the height as per your design */ +} +.vertical-text { + writing-mode: vertical-rl; + text-orientation: mixed; + transform: rotate(180deg); + white-space: nowrap; +} +th { + min-width: 70px; +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html index 40a18d212..0f942d3e6 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html @@ -35,20 +35,233 @@

Viewing a Draft Version of the Report for the chosen month. This report is likely to change without warning.

-
- - - - - + +
+
+
+
+ Ministry Of Health +
+
+ MOH 267 PrEP Daily Activity Register +
+
+ Ver. July 2023 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Date of visit(New Client) + ANC
+ Number/NUPI
+ (Re Visit) +
+ Number of
+ Visits
+ (1st,2nd,3rd,
+ 4th ….) +
+ Full Name
+ (First, Middle, Surname) +
+ Date of Birth
+ (DD/MM/YYYY) +
Subcounty/ CountyVillage/Estate/ Landmark + Marital Status
+ NM=Never
+ Married/Single
+ MM=Married
+ Monogamous
+ MP=Married
+ Polygamous
+ W=Widowed
+ D=Divorced
+ S=Separated +
ParityGravidae + Date of Last Menstrual
+ Period (LMP) +
Expected Date of Delivery (EDD) + Gestation in
+ Weeks +
+ MUAC
+ 1= Green,
+ 2=Yellow,
+ 3=Red +
Height (cm)Weight (kg)Blood Pressure + Breast Exam
+ 1=normal
+ 2=abnormal +
FGM (Y/N)LaboratoryMaternal HAARTInfant ProphylaxisPartner HIV Testing
ANC NumberAgePhone Number(dd/mm/yyyy)(dd/mm/yyyy) + FGM associated
+ complications:
+ 1=Scarring
+ 2=Keloids
+ 3=Dyspaneuria
+ 4=UTI 5 = NA +
+ Haemoglobin
+ (Level/ ND/NA) +
+ Blood Sugar Testing
+ for Diabetes:
+ 1=RBS< 11.1
+ mmol/L, No
+ Diabetes,
+ 2=RBS>11.1
+ mmol/L, Has
+ Diabetes,
+ 3=No RBS done +
+ Blood group
+ and rhesus
+ (Y/N) +
+ Urinalysis
+ (Y/N) +
+ Type of Test
+ RPR/ VDRL/
+ Duo Test/ NA +
+ Hepatitis B virus
+ Sceening Result
+ (P/N/ND) +
+ TB Screening:
+ Codes (1-5) +
+ N = New on ART.
+ OA = On ART
+ NA = Not
+ Applicable +
+ AN = AZT&NVP
+ A = AZT
+ N = NVP
+ NA +
N/P/KP/NA
NUPI + Test Results
+ (P/N/NA) +
+ Treatment
+ (Y/N/NA) +
+ 1=Presumed TB
+ 2=No Signs
+ 3=On TB
+ Treatment
+ 4=On TPT
+ 5=Not Done +
+ HIV Testing
+ (Initial or Retest,
+ Known Poitive or
+ Revisit) +
HIV Test 1HIV Test 2HIV Test 3HIV Results
(I/R/KP/ND/Rev)Kit NameKit NameKit Name(N/P/Ic/U/N A)
Expiry / /Expiry / /Expiry / /
(N/P/I/NA)(N/P/I/NA)(N/P/I/NA)
+
From 949a95c941d268e37ceaa2383d0fb28a74149dd6 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Wed, 29 May 2024 12:57:23 +0300 Subject: [PATCH 27/38] POC-738: MOH 405 ANC Register --- .../anc-register/anc-register.component.html | 905 ++++++++++++++++-- 1 file changed, 814 insertions(+), 91 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html index 0f942d3e6..2cebf6cec 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html @@ -52,30 +52,30 @@

- - - + + - - - - - - + + - - - + + - - + - - - - - + + + - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + - - - - - - - - - + - - - + + + + + + + + + + - - + - - - - - - - - + + + + + + + - - - - - - + + + + + - - - - + + + - - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Date of visit(New Client) + Date of visit(New Client) ANC
Number/NUPI
(Re Visit)
+ Number of
Visits
(1st,2nd,3rd,
4th ….)
+ Full Name
(First, Middle, Surname)
+ Date of Birth
(DD/MM/YYYY)
Subcounty/ CountyVillage/Estate/ Landmark + Subcounty/ CountyVillage/Estate/ Landmark Marital Status
NM=Never
Married/Single
@@ -87,54 +87,52 @@

D=Divorced
S=Separated

ParityGravidae + ParityGravidae Date of Last Menstrual
Period (LMP)
Expected Date of Delivery (EDD) + Expected Date of Delivery (EDD) Gestation in
Weeks
+ MUAC
1= Green,
2=Yellow,
3=Red
Height (cm)Weight (kg)Blood Pressure + Height (cm)Weight (kg)Blood Pressure Breast Exam
1=normal
2=abnormal
FGM (Y/N)LaboratoryMaternal HAARTInfant ProphylaxisPartner HIV TestingFGM (Y/N)LaboratoryMaternal HAARTInfant ProphylaxisPartner HIV TestingOther Conditions and TreatmentDewormingIPT 1-3TT DoseSupplementationLLITNsReferrralsRemarks
ANC NumberAgePhone Number(dd/mm/yyyy)(dd/mm/yyyy) + ANC NumberAgePhone Number(dd/mm/yyyy)(dd/mm/yyyy) FGM associated
complications:
1=Scarring
@@ -142,11 +140,11 @@

3=Dyspaneuria
4=UTI 5 = NA

+ Haemoglobin
(Level/ ND/NA)
+ Blood Sugar Testing
for Diabetes:
1=RBS< 11.1
@@ -157,56 +155,96 @@

Diabetes,
3=No RBS done

+ Blood group
and rhesus
(Y/N)
+ Urinalysis
(Y/N)
+ Type of Test
RPR/ VDRL/
Duo Test/ NA
+ Hepatitis B virus
Sceening Result
(P/N/ND)
+ TB Screening:
Codes (1-5)
+ N = New on ART.
OA = On ART
NA = Not
Applicable
+ AN = AZT&NVP
A = AZT
N = NVP
NA
N/P/KP/NAN/P/KP/NA + 1=Hypertension;
+ 2=Diabetes;
+ 3=Epilepsy;
+ 4=Malaria in Pregnancy;
+ 5=STIs/RTI;
+ 6=Others (Specify)
+ 7=None
+ Record all that apply +
(Y/N/NA)(1,2,3,N,NA) + 1=TT Dose 1st
+ dose 2=2nd dose
+ 3=3rd dose
+ 4=4th dose
+ 5=5th dose
+ NA=None +
+ Given
+ Supplementation
+ 1=Combined IFAs
+ 2=Iron
+ 3=Folate
+ 4=Iron+Folate
+ Separately
+ 5=Calcium +
+ Received
+ LLITNs
+ (Y/N) +
FromTo + Reason for referral
+ (specify) +
NUPI + NUPI Test Results
(P/N/NA)
+ Treatment
(Y/N/NA)
+ 1=Presumed TB
2=No Signs
3=On TB
@@ -214,54 +252,739 @@

4=On TPT
5=Not Done

+ HIV Testing
(Initial or Retest,
Known Poitive or
Revisit)
HIV Test 1HIV Test 2HIV Test 3HIV ResultsHIV Test 1HIV Test 2HIV Test 3HIV ResultsTreatment (Y/N/NA) + 1=From
+ Community Unit
+ 2=Another
+ Health Facility
+ 3=Not Applicable +
+ 1=To Community
+ Unit
+ 2=HIV preventive
+ services
+ 3=Another Health
+ Facility 4=Not
+ Applicable +
(I/R/KP/ND/Rev)Kit NameKit NameKit Name(N/P/Ic/U/N A)(I/R/KP/ND/Rev)Kit NameKit NameKit Name(N/P/Ic/U/N A)
Expiry / /Expiry / /Expiry / /Expiry / /Expiry / /Expiry / /
(N/P/I/NA)(N/P/I/NA)(N/P/I/NA)(N/P/I/NA)(N/P/I/NA)(N/P/I/NA)
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)(aa)(ab)(ac)(ad)(ae)(af)(ag)(ah)(ai)(aj)(ak)(al)(am)(an)(ao)(ap)(aq)(ar)(as)

From 572f2187b8b257cccf893ffc868c33892c6819e8 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Wed, 29 May 2024 14:10:54 +0300 Subject: [PATCH 28/38] POC-738: MOH 405 ANC Register --- .../anc-register/anc-register.component.html | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html index 2cebf6cec..2eae5cbdc 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html @@ -461,7 +461,7 @@

- + @@ -519,7 +519,7 @@

- + @@ -577,7 +577,7 @@

- + @@ -635,7 +635,7 @@

- + @@ -693,7 +693,7 @@

- + @@ -751,7 +751,7 @@

- + @@ -809,7 +809,7 @@

- + @@ -867,7 +867,7 @@

- + @@ -925,7 +925,7 @@

- + @@ -983,7 +983,7 @@

- + From c35f77b3feb5235cfde82829b15d19f8bb9f5df7 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Thu, 30 May 2024 11:09:49 +0300 Subject: [PATCH 29/38] POC-738: MOH 405 ANC Register --- .../anc-register/anc-register.component.html | 66 +++---------------- 1 file changed, 9 insertions(+), 57 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html index 2eae5cbdc..371af8220 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html @@ -391,63 +391,6 @@

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -507,6 +450,7 @@

+ @@ -565,6 +509,7 @@

+ @@ -623,6 +568,7 @@

+ @@ -681,6 +627,7 @@

+ @@ -739,6 +686,7 @@

+ @@ -797,6 +745,7 @@

+ @@ -855,6 +804,7 @@

+ @@ -913,6 +863,7 @@

+ @@ -971,6 +922,7 @@

+ From a7295e3b388d5895f6bf61387ed0e34ce54fb861 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Fri, 24 May 2024 15:29:39 +0300 Subject: [PATCH 30/38] POC-746: MOH 366 Care and Treatment Daily Activity --- .../cntdaily-register.component.html | 1012 +++++++++++++++++ 1 file changed, 1012 insertions(+) diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html index e69de29bb..0dfc1180d 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html @@ -0,0 +1,1012 @@ +

+ {{ reportName }} +

+ +
+ Loading... +
+ + +
+ + + + +
+
+ +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+ +
+
+
+
+ Ministry Of Health +
+
+ HIV Care Treatment Daily Activity Register MOH 366 +
+
+ Ver. July 2023 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NoDateNational Identification NumberClient CCC NumberAgeStarting ART + TB in HIV Care
(Newly Initiated on ART) +
+ Currently on ART (Starting and Continuing ART) + DSDRemarks
Client Unique Number (NUPI) + Tick as appropriate for age + Screened for TBStarted TPT + Indicate No. of months of till next appointment or
+ "R"for patients making unscheduled visits +
StatusType
Indicate Y/N/NA + E=Established
+ NE=Not Established +
+ C
+ FT
+ HFAG
+ PFAG
+ HCAG
+ PCAG
+ CP
+ CADP
+ IACD +
< 1 yrs (M)< 1 yrs (F)1-4 yrs (M)1-4 yrs (F)5-9 yrs (M)5-9 yrs (F)10-14 yrs (M)10-14 yrs (F)15-19 yrs (M)15-19 yrs (F)20-24 yrs(M)20-24 yrs (F)25+ yrs (M)25+ yrs (F)< 15 yrs15+ yrs< 15 yrs15+ yrs< 1 yrs (M)< 1 yrs (F)1-4 yrs (M)1-4 yrs (F)5-9 yrs (M)5-9 yrs (F)10-14 yrs (M)10-14 yrs (F)15-19 yrs (M)15-19 yrs (F)20-24 yrs(M)20-24 yrs (F)25+ yrs (M)25+ yrs (F)
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)(aa)(ab)(ac)(ad)(ae)(af)(ag)(ah)(ai)(aj)(ak)(al)(am)(an)(ao)
Data element CODEHV03-01HV03-02HV03-03HV03-04HV03-05HV03-06HV03-07HV03-08HV03-09HV03-10HV03-11HV03-12HV03-13HV03-14HV03-15HV03-16HV03-17HV03-18HV03-19HV03-20HV03-21HV03-22HV03-23HV03-24HV03-25HV03-26HV03-27HV03-28HV03-29HV03-30HV03-31HV03-32HV03-33HV03-34
TOTAL this Page
TOTAL this Page
TOTAL this Month
(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)(aa)(ab)(ac)(ad)(ae)(af)(ag)(ah)(ai)(aj)(ak)(al)(am)(an)(ao)
+ Summary of clinical visits + + Count of clients with 2 months appointment +
Total this Month (2s)
+ Count of clients with 3 months appointment +
Total this Month (3s)
+ Count of clients with 4 months appointment +
Total this Month (4s)
+ Count of clients with 5 months appointment +
Total this Month (5s)
+ Count of clients with 6 months appointment +
Total this Month (6s)
+
+
From 3d8f0e743aa1f02e611acd16e678540c18230e36 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Thu, 23 May 2024 15:27:01 +0300 Subject: [PATCH 31/38] POC-739: MOH 408 HIV Exposed Infant Registers --- .../hei-register/hei-register.component.html | 336 +++++++++++++++++- 1 file changed, 320 insertions(+), 16 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html index 40a18d212..abed1fc6c 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html @@ -35,20 +35,324 @@

Viewing a Draft Version of the Report for the chosen month. This report is likely to change without warning. -
- - - - - +
+
+
+
+ Ministry Of Health +
+
+ HIV EXPOSED INFANT REGISTER MOH 408 +
+
+ Ver. July 2023 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Cohort: Month/Year + (MMM-YYYY).........................../.............................................. +
Infant and Mother/Guardian Information + First HIV DNA PCR Test at Birth, 6 weeks or First Contact + Second HIV DNA PCR TesThird HIV DNA PCR TestHEI Outcomes at 12 monthsConfirmatory PCRAntibody test (18 to 24 months)HEI Outcomes at 24 monthsComments
Registration InformationInfant's informationParent's information
Serial No. + Date of Collected enrollment (DD/MM/YYYY) + HEI ID (MFL-YYYY-NNNN)Infant's NameDOB (DD/MM/YYYY)HeaderSex + Infant Prophylaxis 1=NVP, 2=AZT, 3=NVP &AZT, 4=None, + Father's/Mother's/Guardian's NameAge at Test (in wks) + Type of Test 1=At Birth 2=at 6 weeks 3=at First Contact + Date Sample CollectedAge at Test (in months)Date Sample CollectedAge at Test (in months)Date Sample CollectedInfant Feeding + 1=Infected 2= Uninfected 3=Lost to Follow 4=Transfer Out 5=Dead + Age at Test (in months)Date Sample CollectedAge at Test (in months)Date Sample CollectedInfant Feeding + 1=Infected 2= Uninfected 3=Lost to Follow 4=Transfer Out 5=Dead +
Client Unique Number (NUPI)(M/F)(M/F)Telephone numberTest result (P,N)Test result (P,N)Test result (P,N)BF=Breastfeeding NBF=Not BreastfeedingTest result (P,N)Test result (P,N)BF=Breastfeeding NBF=Not Breastfeeding
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)
+
From 5c0b6c3a670a3645dd12e4defa518b90807b3715 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Thu, 30 May 2024 14:41:12 +0300 Subject: [PATCH 32/38] POC-741: MOH 333 Maternity Register --- .../maternity-register.component.css | 17 + .../maternity-register.component.html | 1183 ++++++++++++++++- 2 files changed, 1184 insertions(+), 16 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.css index e69de29bb..ab1f08146 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.css +++ b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.css @@ -0,0 +1,17 @@ +tr, +.table-bordered th, +.table-bordered td { + border: 2px solid #000; /* Darker border color */ +} +tbody tr { + height: 20px; /* Adjust the height as per your design */ +} +.vertical-text { + writing-mode: vertical-rl; + text-orientation: mixed; + transform: rotate(180deg); + white-space: nowrap; +} +th { + min-width: 70px; +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.html index 40a18d212..8ec57b795 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.html @@ -35,20 +35,1171 @@

Viewing a Draft Version of the Report for the chosen month. This report is likely to change without warning.

-
- - - - - + +
+
+
+
+ Ministry Of Health +
+
+ MOH 333 Maternity Register +
+
+ Ver. July 2023 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Date of
+ Admission
+ (dd/mm/yyyy) +
Admission number (yyyy-mm-nnnn) + Full Name
+ (First, Middle, surname) +
+ Date of Birth
+ (dd/mm/yyyy) +
+ County/
+ Subcounty +
+ Village/
+ Estate/
+ Land mark +
+ Marital Status
+ 1 = Married
+ 2 = Widowed
+ 3 = Single
+ 4 = Divorced
+ 5 = Separated +
+ Parity
+ (X+Y) +
Gravidae + No. of
+ ANC
+ visits +
+ Date of Last
+ Menstrual
+ Period (LMP)
+ (dd/mm/yyyy) +
+ Estimated Date
+ of Delivery
+ (EDD)
+ (dd/mm/yyyy) +
DiagnosisDelivery + VDRL/
+ RPR
+ Results
+ (Specify
+ 1-VDRL
+ 2-RPR
+ 3-Duo
+ testing) +
Baby + Maternal
+ HAART +
+ Infant
+ Prophylaxis +
+ Partner
+ Tested for
+ HIV +
+ Counselled
+ on infant
+ feeding
+ (Y/N/NA) +
+ Delivery
+ Conducted by
+ (Enter Name) +
+ Birth
+ Notification
+ Number +
DischargeReferralComments
NUPIAgePhone number + Duration of
+ labour
+ (hours) +
+ Date of
+ Delivery
+ (dd/mm/yyyy) +
+ Time of
+ Delivery +
+ Gestation
+ at Birth
+ (wks) +
+ Mode of
+ Delivery
+ 1) SVD
+ 2) CS
+ 3) Breech
+ 4) AVD +
+ No.of babies
+ delivered +
+ Placenta
+ Complete
+ 1=Yes
+ 2=No
+ 3=BBA +
+ Uterotonic
+ given
+ 1=oxytocin
+ 2=Carbetocin
+ 3=Others
+ Specify
+ 4= None +
+ Vaginal
+ Examination
+ 1= Normal
+ 2=Episiotomy
+ 3=Vaginal tear
+ 4=FGM
+ 5=Vaginal warts +
+ Blood
+ loss
+ (mls) +
+ Mother's
+ status after
+ Delivery
+ (Alive/
+ Dead) +
+ Maternal deaths
+ Notified
+ (Y/N/NA) +
+ Delivery
+ Complications
+ 1=A.P.H. (Ante Partum
+ Haemorrhage);
+ 2=P.P.H. (Post Partum
+ Haemorrhage);
+ 3= Eclampsia;
+ 4=Ruptured Uterus;
+ 5=Obstructed labour;
+ 6=Sepsis
+ 7= NA +
+ APGAR
+ Score +
+ Birth
+ Outcome
+ (LB/FSB/
+ MSB) +
+ Birth
+ Weight
+ (grams) +
+ Sex
+ (M/F) +
+ Initiated on
+ BF in
+ < 1hr
+ (Y/N) +
+ TEO
+ given at
+ birth?
+ (Y/N) +
+ Chlorhexidine
+ applied on
+ cord stump
+ (Y/N) +
+ Birth with
+ deformity
+ (Y/N) +
+ Given
+ Vitamin
+ K
+ (Y/N) +
(P/N/ND)HIV Test 1HIV Test 2HIV Test 3 + HIV Result
+ Maternity
+ (N/P/Inc/U/NA) +
+ Start at
+ Maternity +
(Y/N/NA)(Y/N/NA) + Date
+ (dd/mm/yyyy) +
+ Status of
+ Baby
+ A= Alive
+ D= Dead +
FromToReason for referral
+ Date Death
+ notified +
+ Kangaroo
+ Mother
+ Care
+ (Y/N) +
+ 1- congenital
+ syphilis.
+ 2- spina bifida,
+ 3- Hydrocephalus,
+ 4- Talipes +
Kit Name:Kit Name:Kit Name: + Initial/Retest/
+ NA +
(Y/N/NA) + 1= From Community
+ Unit,
+ 2= From Another
+ Health Facility,
+ 3=Not Applicable +
+ 1= To Community
+ Unit,
+ 2=Referred to HIV
+ preventive services
+ 3=Another Health
+ Facility,
+ 4=Not Applicable +
Lot No.Lot No.Lot No.
Expiry / /Expiry / /Expiry / /
(N/P/I/NA)(N/P/I/NA)(N/P/I/NA)
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)(aa)(ab)(ac)(ad)(ae)(af)(ag)(ah)(ai)(aj)(ak)(al)(am)(an)(ao)(ap)(aq)(ar)(as)(at)(au)(av)(aw)(ax)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
From bbbb55fa89db277af215dcfe89783166792cc626 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Thu, 30 May 2024 17:41:39 +0300 Subject: [PATCH 33/38] POC-742: MOH 362 HTS Lab Refferal & Linkage Register. --- .../htsrefferallinkage-register.component.css | 17 + ...htsrefferallinkage-register.component.html | 639 +++++++++++++++++- 2 files changed, 640 insertions(+), 16 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.css index e69de29bb..ab1f08146 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.css +++ b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.css @@ -0,0 +1,17 @@ +tr, +.table-bordered th, +.table-bordered td { + border: 2px solid #000; /* Darker border color */ +} +tbody tr { + height: 20px; /* Adjust the height as per your design */ +} +.vertical-text { + writing-mode: vertical-rl; + text-orientation: mixed; + transform: rotate(180deg); + white-space: nowrap; +} +th { + min-width: 70px; +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.html index 40a18d212..e5d188bea 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.html @@ -35,20 +35,627 @@

Viewing a Draft Version of the Report for the chosen month. This report is likely to change without warning.

-
- - - - - + +
+
+
+
+ Ministry Of Health +
+
+ MOH 362 HTS LAB, REFERRAL AND LINKAGE REGISTER
+ MOH 362: HTS LAB REGISTER
+
+
+ Ver. July 2023 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Serial
+ Number +
+ National
+ Identification
+ Number +
+ Date of visit
+ (DD/MM/YYYY) +
+ Client Name
+ (First, Middle, Last) +
Age + Sex
+ (M/F) +
Telephone Number + Marital
+ Status
+ 1=Married
+ 2=Widowed
+ 3=Single
+ 4=Divorced
+ 5=Separated +
+ Population Type
+ 1. Gen Pop
+ 2. Key and
+ Vulnerable Pop.
+ Codes for KVP
+ - DC
+ - MSM/MSW
+ - FSW
+ - PWID/PWUD
+ - VP +
+ Setting
+ (1=Facility
+ 2=Community) +
HIV Test 1HIV Test 2HIV Test 3 + Final HIV
+ Result +
+ Discordant
+ Couple +
+ Referred for
+ Prevention
+ Services
+ 1. PrEP
+ 2. PEP
+ 3. VMMC
+ 4. PMTCT
+ 5.NA +
+ HTS Provider
+ (Name) +
Remarks
+ National Unique
+ Patient Identifier
+ (NUPI) Number +
Kit Name:Kit Name:Kit Name:(N,P,Ic)(Y/N/NA)
Lot No.Lot No.Lot No.
Expiry Date / /Expiry Date / /Expiry Date / /
(N,P,I)(N,P,I,NA)(N,P,I,NA)
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)
+
+
+
+
+
+
+
+ Ministry Of Health +
+
+ MOH 362 HTS LAB, REFERRAL AND LINKAGE REGISTER
+ REFERRAL AND LINKAGE REGISTER
+
+
+ Ver. July 2023 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Serial
+ Number +
+ National Identification
+ Number +
Client NamesTelephone Number + Identification
+ Strategy
+ (VCT/IT/HIVST
+ /SNS) +
Patient referred to + Handed over to:
+ (Indicate Name (upper cell)
+ and Cadre (lower cell) +
+ Date started on
+ ART +
CCC NumberRemarks
+ National Unique
+ Patient Identifier
+ (NUPI) Number +
Residence
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)
Totals Clients Linked
+
From ff300187f8b9e4d3a023c01ad72b59b7e804d678 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Fri, 31 May 2024 12:02:31 +0300 Subject: [PATCH 34/38] POC-740: MOH 407 Nutrition Service RegisterMOH 407 Nutrition Service Register --- .../nutrition-register.component.css | 17 + .../nutrition-register.component.html | 784 +++++++++++++++++- 2 files changed, 785 insertions(+), 16 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.css index e69de29bb..ab1f08146 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.css +++ b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.css @@ -0,0 +1,17 @@ +tr, +.table-bordered th, +.table-bordered td { + border: 2px solid #000; /* Darker border color */ +} +tbody tr { + height: 20px; /* Adjust the height as per your design */ +} +.vertical-text { + writing-mode: vertical-rl; + text-orientation: mixed; + transform: rotate(180deg); + white-space: nowrap; +} +th { + min-width: 70px; +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html index 40a18d212..44301cd7a 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html @@ -35,20 +35,772 @@

Viewing a Draft Version of the Report for the chosen month. This report is likely to change without warning.

-
- - - - - + +
+
+
+
+ Ministry Of Health +
+
+ NUTRITION SERVICE REGISTER MOH 407 +
+
+ Ver. July 2023 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NO + Date:
+ (dd/mm/yyyy) +
+ National
+ Identification
+ Number +
CCC Number + Patient Names
+ (First/Middle/Last) +
+ Patient visit
+ type:
+ 1=New,
+ 2=Revisit +
+ Residence:
+ Village/Estate +
+ Sex:
+ M=Male,
+ F=Female +
AGE + Pregnant
+ and
+ Lactating
+ (Y/N/NA) +
+ Nutrition assessment
+ 1. Weight for Height (Under 5’s)
+ 2. Weight for Age (Under 5’s)
+ 3. MUAC (6-59months),
+ Pregnant, Lactating, and any
+ other bedridden client.
+ 4. BMI for Age(5-17Years)
+ 5. BMI Kg/m(18+Years) +
+ Nutrition
+ Status
+ (Indicate codes)
+ 1. SAM
+ 2. MAM
+ 3. Mild/At risk 4.
+ Normal
+ 5. Overweight
+ /Obese +
+ Serostatus
+ (N/P/HEI/U) +
+ Comorbidities
+ 1-TB
+ 2-Diabetes
+ 3-Hypertenstion
+ 4-Others specify
+ 5-None +
+ Food
+ Secure
+ 1-Yes
+ 2-No +
Remarks
+ Client Unique
+ Number
+ (NUPI) +
YearsMonths
ABCDEFGHIJKLMN
+
+
+
+
+
+
+
+ Ministry Of Health +
+
+ NUTRITION SERVICE REGISTER MOH 407 +
+
+ Ver. July 2023 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Client's follow up Register
Clients' DetailsOn Admission + Discharge/Transfer
+ Measurements +
Outcome
week1Week2week3week4week5week6week7week8week9week10week11week12
SNO. + Date:
+ dd/mm/yyyy +
+ National
+ Identification
+ Number +
CCC NumberClient's NameVillage/Estate/LandmarkMobile numberAGE + Sex
+ (M/F) +
+ Type of Admission
+ 1. new-admission
+ 2. relapse
+ 3. returned
+ defaulter +
Pregnant/ lactating (Y/N/NA) + Serostatus
+ (P/N/HEI/U) +
+ Admission
+ Criteria
+ 1. WFH Z-score
+ 2. MUAC
+ 3. BMI
+ for age
+ 4. BMI
+ kg/m2 +
+ Weight
+ (Kg) +
+ Height
+ (cm) +
+ W/H Zscore/BMI For Age/BMIKg/m2 (1-3) + MUAC + Nutrition Intervention + Weight(Kg) + W/H Zscore/BMI For Age/BMIKg/m2 + MUAC + Nutrition Intervention + Weight(Kg) + W/H Zscore/BMI For Age/BMIKg/m2 + MUAC + Nutrition Intervention + Weight(Kg) + W/H Zscore/BMI For Age/BMIKg/m2 + MUAC + Nutrition Intervention + Weight(Kg) + Height/Length(cm) + + W/H Zscore/BMI For Age/BMIKg/m2 + MUAC + Nutrition Intervention + Weight(Kg) + W/H Zscore/BMI For Age/BMIKg/m2 + MUAC + Nutrition Intervention + Weight(Kg) + W/H Zscore/BMI For Age/BMIKg/m2 + MUAC + Nutrition Intervention + Weight(Kg) + W/H Zscore/BMI For Age/BMIKg/m2 + MUAC + Nutrition Intervention + Weight(Kg) + Height/Length(cm) + + W/H Zscore/BMI For Age/BMIKg/m2 + MUAC + Nutrition Intervention + Weight(Kg) + W/H Zscore/BMI For Age/BMIKg/m2 + MUAC + Nutrition Intervention + Weight(Kg) + W/H Zscore/BMI For Age/BMIKg/m2 + MUAC + Nutrition Intervention + Weight(Kg) + W/H Zscore/BMI For Age/BMIKg/m2 + MUAC + Nutrition Intervention + Weight(Kg) + Height/Length(cm) + + W/H Zscore/BMI For Age/BMIKg/m2 + MUAC + Nutrition Intervention + Weight(Kg) + Height/Length(cm) + + W/H Zscore/BMI For Age/BMIKg/m2 + MUAC + Nutrition Intervention + + Exit
+ dd/mm/yyyy +
+ Length of stay in days + + Exit Outcome
+ 1-Cured,
+ 2-Defaulter,
+ 3-Non -
+ Respondant,
+ 4-Referral ,
+ 5-Transfer,
+ 6- Death +
+ Client Unique
+ Number
+ (NUPI) +
YearsMonths
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)(aa)(ab)(ac)(ad)(ae)(af)(ag)(ah)(ai)(aj)(ak)(al)(am)(an)(ao)(ap)(aq)(ar)(as)(at)(au)(av)(aw)(ax)(ay)(az)(ba)(bb)(bc)(bd)(be)(bf)(bg)(bh)(bi)(bj)(bk)(bl)(bm)(bn)(bo)(bp)(bq)(br)(bs)(bt)(bu)(bv)(bw)(bx)
+
From ec2b536e03c81a61010a5776f54a8aed415cfefa Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Fri, 31 May 2024 12:08:12 +0300 Subject: [PATCH 35/38] POC-740: MOH 407 Nutrition Service RegisterMOH 407 Nutrition Service Register --- .../nutrition-register.component.html | 664 ++++++++++++++++++ 1 file changed, 664 insertions(+) diff --git a/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html index 44301cd7a..aa9f35a0b 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html @@ -798,7 +798,671 @@

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 82ef807b747ae187449702f6d0fd18e8d4889385 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Wed, 12 Jun 2024 11:44:22 +0300 Subject: [PATCH 36/38] Updated registers --- .../cntdaily-register.component.html | 901 ++---------------- .../cntdaily-register.component.ts | 107 ++- .../defaultertracing-register.component.css | 14 + .../defaultertracing-register.component.html | 205 +++- .../defaultertracing-register.component.ts | 133 +-- .../hei-register/hei-register.component.html | 307 ++---- .../hei-register/hei-register.component.ts | 104 +- .../prepdaily-register.component.html | 5 +- .../prepdaily-register.component.ts | 27 +- 9 files changed, 621 insertions(+), 1182 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html index 0dfc1180d..729a9afb1 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html @@ -36,7 +36,24 @@

This report is likely to change without warning.

-
+
+ +
+
+
@@ -177,836 +194,58 @@

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Data element CODE - - - HV03-01 - HV03-02 - HV03-03 - HV03-04 - HV03-05 - HV03-06 - HV03-07 - HV03-08 - HV03-09 - HV03-10 - HV03-11 - HV03-12 - HV03-13 - HV03-14 - HV03-15 - HV03-16 - HV03-17 - HV03-18 - HV03-19 - HV03-20 - HV03-21 - HV03-22 - HV03-23 - HV03-24 - HV03-25 - HV03-26 - HV03-27 - HV03-28 - HV03-29 - HV03-30 - HV03-31 - HV03-32 - HV03-33 - HV03-34 - - - - TOTAL this Page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TOTAL this Page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TOTAL this Month - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (e) - (f) - (g) - (h) - (i) - (j) - (k) - (l) - (m) - (n) - (o) - (q) - (r) - (s) - (t) - (u) - (v) - (w) - (x) - (y) - (z) - (aa) - (ab) - (ac) - (ad) - (ae) - (af) - (ag) - (ah) - (ai) - (aj) - (ak) - (al) - (am) - (an) - (ao) - - - - Summary of clinical visits - - - Count of clients with 2 months appointment - - - - - - - - - - - - - - - - - - - - - - - Total this Month (2s) - - - - - - - - - - - - - - - - - - - - - - Count of clients with 3 months appointment - - - - - - - - - - - - - - - - - - - - - - Total this Month (3s) - - - - - - - - - - - - - - - - - - - - - - Count of clients with 4 months appointment - - - - - - - - - - - - - - - - - - - - - - Total this Month (4s) - - - - - - - - - - - - - - - - - - - - - - Count of clients with 5 months appointment - - - - - - - - - - - - - - - - - - - - - - Total this Month (5s) - - - - - - - - - - - - - - - - - - - - - - Count of clients with 6 months appointment - - - - - - - - - - - - - - - - - - - - - - Total this Month (6s) - - - - - - - - - - - - - - - - - - - + + + {{ a + 1 }} + {{ data.DATE }} + {{ data.National_ID }} + + {{ data.CCC_Number }} + + {{ data.Age }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ data.NUPI }} + +

-
+
\ No newline at end of file diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts index ac6aed7de..9b5fe26cd 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts @@ -1,7 +1,18 @@ -import { Component, OnInit, Output } from '@angular/core'; +import { DatePipe } from '@angular/common'; +import { + Component, + ElementRef, + OnInit, + Output, + ViewChild +} from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import * as _ from 'lodash'; import * as Moment from 'moment'; +import { DataAnalyticsDashboardService } from 'src/app/data-analytics-dashboard/services/data-analytics-dashboard.services'; +import { CareTreatmentResourceService } from 'src/app/etl-api/care-treatment-resource.service'; +import * as html2canvas from 'html2canvas'; +import * as jsPDF from 'jspdf'; @Component({ selector: 'app-cntdaily-register', templateUrl: './cntdaily-register.component.html', @@ -12,7 +23,7 @@ export class CntdailyRegisterComponent implements OnInit { public params: any; public indicators: string; public selectedIndicators = []; - public txnewReportSummaryData: any = []; + public careTreatmentRegisterData: any = []; public columnDefs: any = []; public reportName = 'Care and Treatment Daily Activity'; public currentView = 'monthly'; @@ -22,6 +33,7 @@ export class CntdailyRegisterComponent implements OnInit { public quarter: string; public eDate: string; public sDate: string; + public jointLocationUuids: string; public statusError = false; public errorMessage = ''; @@ -32,6 +44,7 @@ export class CntdailyRegisterComponent implements OnInit { public pinnedBottomRowData: any = []; public _month: string; public isReleased = true; + @ViewChild('cntdarcontentToSnapshot') contentToSnapshot!: ElementRef; public _locationUuids: any = []; public get locationUuids(): Array { @@ -48,7 +61,13 @@ export class CntdailyRegisterComponent implements OnInit { this._locationUuids = locationUuids; } - constructor(public router: Router, public route: ActivatedRoute) { + constructor( + public router: Router, + public route: ActivatedRoute, + public careTreatmentRegisterService: CareTreatmentResourceService, + private datePipe: DatePipe, + private dataAnalyticsDashboardService: DataAnalyticsDashboardService + ) { this.route.queryParams.subscribe((data) => { data.month === undefined ? (this._month = Moment() @@ -68,20 +87,26 @@ export class CntdailyRegisterComponent implements OnInit { } public generateReport(): any { + this.dataAnalyticsDashboardService + .getSelectedLocations() + .subscribe((data) => { + const locationValues = data.locations.map( + (location) => `'${location.value}'` + ); + this.jointLocationUuids = locationValues.join(', '); + }); + this.route.parent.parent.params.subscribe((params: any) => { - this.storeParamsInUrl(params.location_uuid); + this.storeParamsInUrl(); }); - this.txnewReportSummaryData = []; - // this.getTxNewReport(this.params); + this.careTreatmentRegisterData = []; + this.getCareTreatmentRegisterData(this.params); } - public storeParamsInUrl(param) { + public storeParamsInUrl() { this.params = { - locationUuids: param, - _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), - month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), - reportName: this.reportName, - _date: Moment(this._month).format('DD-MM-YYYY') + locationUuids: this.jointLocationUuids, + month: Moment(this._month).endOf('month').format('YYYY-MM-DD') }; this.router.navigate([], { relativeTo: this.route, @@ -89,31 +114,34 @@ export class CntdailyRegisterComponent implements OnInit { }); } - // public getTxNewReport(params: any) { - // this.isLoading = true; - // this.txnewReport.getTxNewReport(params).subscribe((data) => { - // if (data.error) { - // this.showInfoMessage = true; - // this.errorMessage = `There has been an error while loading the report, please retry again`; - // this.isLoading = false; - // } else { - // this.showInfoMessage = false; - // this.columnDefs = data.sectionDefinitions; - // this.txnewReportSummaryData = data.result; - // this.calculateTotalSummary(); - // this.isLoading = false; - // this.showDraftReportAlert(this._month); - // } - // }); - // } + public getCareTreatmentRegisterData(params: any) { + this.isLoading = true; + this.careTreatmentRegisterService + .getCareTreatmentRegister(params) + .subscribe((data) => { + if (data.error) { + this.showInfoMessage = true; + this.errorMessage = `There has been an error while loading the report, please retry again`; + this.isLoading = false; + } else { + console.log('Care&Treatment', data); + this.showInfoMessage = false; + this.columnDefs = data.sectionDefinitions; + this.careTreatmentRegisterData = data; + this.calculateTotalSummary(); + this.isLoading = false; + this.showDraftReportAlert(this._month); + } + }); + } public calculateTotalSummary() { const totalsRow = []; - if (this.txnewReportSummaryData.length > 0) { + if (this.careTreatmentRegisterData.length > 0) { const totalObj = { location: 'Totals' }; - _.each(this.txnewReportSummaryData, (row) => { + _.each(this.careTreatmentRegisterData, (row) => { Object.keys(row).map((key) => { if (Number.isInteger(row[key]) === true) { if (totalObj[key]) { @@ -158,4 +186,21 @@ export class CntdailyRegisterComponent implements OnInit { this.isReleased = true; } } + + transformDate(date: string): string | null { + return this.datePipe.transform(date, 'dd/MM/yyyy'); + } + + public takeSnapshotAndExport() { + const elementToSnapshot = this.contentToSnapshot.nativeElement; + + html2canvas(elementToSnapshot).then((canvas) => { + const imgData = canvas.toDataURL('image/png'); + const pdf = new jsPDF('p', 'mm', 'a4'); + const imgWidth = 210; // A4 width in mm + const imgHeight = (canvas.height * imgWidth) / canvas.width; + pdf.addImage(imgData, 'PNG', 0, 0, imgWidth, imgHeight); + pdf.save('MOH 366 Care and Treatment Daily Activity.pdf'); + }); + } } diff --git a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.css b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.css index e69de29bb..7d7e743ba 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.css +++ b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.css @@ -0,0 +1,14 @@ +tr, +.table-bordered th, +.table-bordered td { + border: 2px solid #000; /* Darker border color */ +} +tbody tr { + height: 20px; /* Adjust the height as per your design */ +} +.vertical-text { + writing-mode: vertical-rl; + text-orientation: mixed; + transform: rotate(180deg); + white-space: nowrap; +} diff --git a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html index 40a18d212..596aa0a99 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html @@ -35,20 +35,193 @@

Viewing a Draft Version of the Report for the chosen month. This report is likely to change without warning.

-
- - - - - + +
+ × +

+ An + error occurred while trying to load the report. Please try again. +

+

+ {{ errorMessage }} +

+
+
+ Viewing a Draft Version of the Report for the chosen month. + This report is likely to change without warning. +
+ +
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Defaulter Tracing Register
+ Enter all current clients that did not come for their scheduled + appointment +
Section ASection B
Client Tracking InformationDefaulter Tracing Outcomes
(a)(b)(c)(d)(e)(f)(g)(h)(i)
S/No. + Client Identification /
+ Number +
+ Client Name
+ (First,Middle,Last) +
+ Village/Estate/
+ Landmark +
Telephone number + Date of missed
+ appointment +
+ Return to Care/
+ Dead/
+ Transferred/
+ Stopped Treatment/
+ On follow up +
+ Date of outcome
+ (dd/mm/yyyy) +
Remarks
+ Unique Patient
+ Number (NUPI) +
+
+
+
+ No record found
diff --git a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.ts index 83b012c91..c9a90b99e 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.ts +++ b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.ts @@ -1,7 +1,20 @@ -import { Component, OnInit, Output } from '@angular/core'; +import { DatePipe } from '@angular/common'; +import { + Component, + OnInit, + Output, + Input, + OnDestroy, + ViewChild, + ElementRef +} from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import * as _ from 'lodash'; import * as Moment from 'moment'; +import { RegistersResourceService } from 'src/app/etl-api/registers-resource.service'; +import * as html2canvas from 'html2canvas'; +import * as jsPDF from 'jspdf'; +import { DataAnalyticsDashboardService } from 'src/app/data-analytics-dashboard/services/data-analytics-dashboard.services'; @Component({ selector: 'app-defaultertracing-register', templateUrl: './defaultertracing-register.component.html', @@ -12,7 +25,7 @@ export class DefaultertracingRegisterComponent implements OnInit { public params: any; public indicators: string; public selectedIndicators = []; - public txnewReportSummaryData: any = []; + public defaulterTracingRegisterData: any = []; public columnDefs: any = []; public reportName = 'Defaulter Tracing Register'; public currentView = 'monthly'; @@ -22,6 +35,7 @@ export class DefaultertracingRegisterComponent implements OnInit { public quarter: string; public eDate: string; public sDate: string; + public jointLocationUuids: string; public statusError = false; public errorMessage = ''; @@ -32,6 +46,9 @@ export class DefaultertracingRegisterComponent implements OnInit { public pinnedBottomRowData: any = []; public _month: string; public isReleased = true; + public generated = false; + @ViewChild('defaulterTracingcontentToSnapshot') + contentToSnapshot!: ElementRef; public _locationUuids: any = []; public get locationUuids(): Array { @@ -48,7 +65,13 @@ export class DefaultertracingRegisterComponent implements OnInit { this._locationUuids = locationUuids; } - constructor(public router: Router, public route: ActivatedRoute) { + constructor( + public router: Router, + public route: ActivatedRoute, + public register: RegistersResourceService, + private datePipe: DatePipe, + private dataAnalyticsDashboardService: DataAnalyticsDashboardService + ) { this.route.queryParams.subscribe((data) => { data.month === undefined ? (this._month = Moment() @@ -68,20 +91,27 @@ export class DefaultertracingRegisterComponent implements OnInit { } public generateReport(): any { + this.dataAnalyticsDashboardService + .getSelectedLocations() + .subscribe((data) => { + const locationValues = data.locations.map( + (location) => `'${location.value}'` + ); + this.jointLocationUuids = locationValues.join(', '); + }); + this.route.parent.parent.params.subscribe((params: any) => { - this.storeParamsInUrl(params.location_uuid); + this.storeParamsInUrl(); }); - this.txnewReportSummaryData = []; - // this.getTxNewReport(this.params); + this.defaulterTracingRegisterData = []; + this.getPrEPRegisterReport(this.params); + this.generated = true; } - public storeParamsInUrl(param) { + public storeParamsInUrl() { this.params = { - locationUuids: param, - _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), - month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), - reportName: this.reportName, - _date: Moment(this._month).format('DD-MM-YYYY') + locationUuids: this.jointLocationUuids, + month: Moment(this._month).endOf('month').format('YYYY-MM-DD') }; this.router.navigate([], { relativeTo: this.route, @@ -89,54 +119,22 @@ export class DefaultertracingRegisterComponent implements OnInit { }); } - // public getTxNewReport(params: any) { - // this.isLoading = true; - // this.txnewReport.getTxNewReport(params).subscribe((data) => { - // if (data.error) { - // this.showInfoMessage = true; - // this.errorMessage = `There has been an error while loading the report, please retry again`; - // this.isLoading = false; - // } else { - // this.showInfoMessage = false; - // this.columnDefs = data.sectionDefinitions; - // this.txnewReportSummaryData = data.result; - // this.calculateTotalSummary(); - // this.isLoading = false; - // this.showDraftReportAlert(this._month); - // } - // }); - // } - - public calculateTotalSummary() { - const totalsRow = []; - if (this.txnewReportSummaryData.length > 0) { - const totalObj = { - location: 'Totals' - }; - _.each(this.txnewReportSummaryData, (row) => { - Object.keys(row).map((key) => { - if (Number.isInteger(row[key]) === true) { - if (totalObj[key]) { - totalObj[key] = row[key] + totalObj[key]; - } else { - totalObj[key] = row[key]; - } - } else { - if (Number.isNaN(totalObj[key])) { - totalObj[key] = 0; - } - if (totalObj[key] === null) { - totalObj[key] = 0; - } - totalObj[key] = 0 + totalObj[key]; - } - }); - }); - totalObj.location = 'Totals'; - totalsRow.push(totalObj); - this.pinnedBottomRowData = totalsRow; - } + public getPrEPRegisterReport(params: any) { + this.isLoading = true; + this.register.getPrEPRegisterReport(params).subscribe((data) => { + if (data.error) { + this.showInfoMessage = true; + this.errorMessage = `There has been an error while loading the report, please retry again`; + this.isLoading = false; + } else { + this.showInfoMessage = false; + this.defaulterTracingRegisterData = data; + this.isLoading = false; + this.showDraftReportAlert(this._month); + } + }); } + public onIndicatorSelected(value) { this.router.navigate(['patient-list'], { relativeTo: this.route, @@ -158,4 +156,21 @@ export class DefaultertracingRegisterComponent implements OnInit { this.isReleased = true; } } + + transformDate(date: string): string | null { + return this.datePipe.transform(date, 'dd/MM/yyyy'); + } + + public takeSnapshotAndExport() { + const elementToSnapshot = this.contentToSnapshot.nativeElement; + + html2canvas(elementToSnapshot).then((canvas) => { + const imgData = canvas.toDataURL('image/png'); + const pdf = new jsPDF('p', 'mm', 'a4'); + const imgWidth = 210; // A4 width in mm + const imgHeight = (canvas.height * imgWidth) / canvas.width; + pdf.addImage(imgData, 'PNG', 0, 0, imgWidth, imgHeight); + pdf.save('Defaulter Tracing Register.pdf'); + }); + } } diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html index abed1fc6c..8db3480f3 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html @@ -35,7 +35,25 @@

Viewing a Draft Version of the Report for the chosen month. This report is likely to change without warning.

-
+ +
+ +
+
+
@@ -79,10 +97,11 @@

Date of Collected enrollment (DD/MM/YYYY) - HEI ID (MFL-YYYY-NNNN) - Infant's Name - DOB (DD/MM/YYYY) - Header + Birth Certificate
+ Number + HEI ID (MFL-YYYY-NNNN) + Infant's Name + DOB (DD/MM/YYYY) Sex Infant Prophylaxis 1=NVP, 2=AZT, 3=NVP &AZT, 4=None, @@ -152,206 +171,84 @@

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + {{ a + 1 }} + + {{ transformDate(data.date_enrolled) }} + + + {{ data.Birth_Certificate_number }} + + + {{ data.HEI_ID }} + + + {{ data.Infant_name }} + + + {{ transformDate(data.birth_date) }} + + Sex + {{ null }} + {{ data.parent_name }} + + {{ data.age_in_weeks_on_first_pcr }} + + + {{ date_enrolled }} + + {{ transformDate(data.first_pcr_date) }} + + {{ data.age_in_months_on_second_pcr }} + + {{ transformDate(data.second_pcr_date) }} + + {{ data.age_in_months_on_third_pcr }} + + {{ transformDate(data.third_pcr_date) }} + Infant Feeding + + {{ data.hei_outcome }} + + + {{ data.age_in_months_on_confirm_pcr }} + + {{ transformDate(data.confirm_pcr_date) }} + + {{ data.age_in_months_on_first_antibody }} + + + {{ transformDate(data.first_antibody_date) }} + + {{ null }} + {{ null }} + {{ null }} + + + {{ data.NUPI }} + {{ data.gender }} + {{ data.Phone_Number }} + + {{ data.results_pcr_first_pcr }} + + + {{ data.results_pcr_second_pcr }} + + + {{ data.results_pcr_third_pcr }} + + {{ data.infant_feeding }} + + {{ data.results_confirm_pcr }} + + + {{ data.results_first_antibody }} + + {{ null }} + {{ null }} + +

diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts index 2a9de1b47..747442537 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts +++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.ts @@ -1,7 +1,19 @@ -import { Component, OnInit, Output } from '@angular/core'; +import { DatePipe } from '@angular/common'; +import { + Component, + ElementRef, + OnInit, + Output, + ViewChild +} from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import * as _ from 'lodash'; import * as Moment from 'moment'; +import { DataAnalyticsDashboardService } from 'src/app/data-analytics-dashboard/services/data-analytics-dashboard.services'; +import { HeiRegisterResourceService } from 'src/app/etl-api/hei-register-resource.service'; +import { RegistersResourceService } from 'src/app/etl-api/registers-resource.service'; +import * as html2canvas from 'html2canvas'; +import * as jsPDF from 'jspdf'; @Component({ selector: 'app-hei-register', templateUrl: './hei-register.component.html', @@ -12,7 +24,7 @@ export class HeiRegisterComponent implements OnInit { public params: any; public indicators: string; public selectedIndicators = []; - public txnewReportSummaryData: any = []; + public heiRegisterData: any = []; public columnDefs: any = []; public reportName = 'HEI Register'; public currentView = 'monthly'; @@ -22,6 +34,7 @@ export class HeiRegisterComponent implements OnInit { public quarter: string; public eDate: string; public sDate: string; + public jointLocationUuids: string; public statusError = false; public errorMessage = ''; @@ -32,6 +45,7 @@ export class HeiRegisterComponent implements OnInit { public pinnedBottomRowData: any = []; public _month: string; public isReleased = true; + @ViewChild('heicontentToSnapshot') contentToSnapshot!: ElementRef; public _locationUuids: any = []; public get locationUuids(): Array { @@ -48,7 +62,13 @@ export class HeiRegisterComponent implements OnInit { this._locationUuids = locationUuids; } - constructor(public router: Router, public route: ActivatedRoute) { + constructor( + public router: Router, + public route: ActivatedRoute, + public heiRegisterService: HeiRegisterResourceService, + private datePipe: DatePipe, + private dataAnalyticsDashboardService: DataAnalyticsDashboardService + ) { this.route.queryParams.subscribe((data) => { data.month === undefined ? (this._month = Moment() @@ -68,20 +88,26 @@ export class HeiRegisterComponent implements OnInit { } public generateReport(): any { + this.dataAnalyticsDashboardService + .getSelectedLocations() + .subscribe((data) => { + const locationValues = data.locations.map( + (location) => `'${location.value}'` + ); + this.jointLocationUuids = locationValues.join(', '); + }); + this.route.parent.parent.params.subscribe((params: any) => { - this.storeParamsInUrl(params.location_uuid); + this.storeParamsInUrl(); }); - this.txnewReportSummaryData = []; - // this.getTxNewReport(this.params); + this.heiRegisterData = []; + this.getHeiRegisterData(this.params); } - public storeParamsInUrl(param) { + public storeParamsInUrl() { this.params = { - locationUuids: param, - _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), - month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), - reportName: this.reportName, - _date: Moment(this._month).format('DD-MM-YYYY') + locationUuids: this.jointLocationUuids, + month: Moment(this._month).endOf('month').format('YYYY-MM-DD') }; this.router.navigate([], { relativeTo: this.route, @@ -89,31 +115,30 @@ export class HeiRegisterComponent implements OnInit { }); } - // public getTxNewReport(params: any) { - // this.isLoading = true; - // this.txnewReport.getTxNewReport(params).subscribe((data) => { - // if (data.error) { - // this.showInfoMessage = true; - // this.errorMessage = `There has been an error while loading the report, please retry again`; - // this.isLoading = false; - // } else { - // this.showInfoMessage = false; - // this.columnDefs = data.sectionDefinitions; - // this.txnewReportSummaryData = data.result; - // this.calculateTotalSummary(); - // this.isLoading = false; - // this.showDraftReportAlert(this._month); - // } - // }); - // } + public getHeiRegisterData(params: any) { + this.isLoading = true; + this.heiRegisterService.getHeiRegister(params).subscribe((data) => { + if (data.error) { + this.showInfoMessage = true; + this.errorMessage = `There has been an error while loading the report, please retry again`; + this.isLoading = false; + } else { + this.showInfoMessage = false; + this.columnDefs = data.sectionDefinitions; + this.heiRegisterData = data; + this.isLoading = false; + this.showDraftReportAlert(this._month); + } + }); + } public calculateTotalSummary() { const totalsRow = []; - if (this.txnewReportSummaryData.length > 0) { + if (this.heiRegisterData.length > 0) { const totalObj = { location: 'Totals' }; - _.each(this.txnewReportSummaryData, (row) => { + _.each(this.heiRegisterData, (row) => { Object.keys(row).map((key) => { if (Number.isInteger(row[key]) === true) { if (totalObj[key]) { @@ -158,4 +183,21 @@ export class HeiRegisterComponent implements OnInit { this.isReleased = true; } } + + transformDate(date: string): string | null { + return this.datePipe.transform(date, 'dd/MM/yyyy'); + } + + public takeSnapshotAndExport() { + const elementToSnapshot = this.contentToSnapshot.nativeElement; + + html2canvas(elementToSnapshot).then((canvas) => { + const imgData = canvas.toDataURL('image/png'); + const pdf = new jsPDF('p', 'mm', 'a4'); + const imgWidth = 210; // A4 width in mm + const imgHeight = (canvas.height * imgWidth) / canvas.width; + pdf.addImage(imgData, 'PNG', 0, 0, imgWidth, imgHeight); + pdf.save('MOH 408 HIV Exposed Infant Register.pdf'); + }); + } } diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html index 11909e88a..6172fe377 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html @@ -65,7 +65,7 @@


@@ -209,3 +209,6 @@

+
+ No record found +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts index 90cab6a0c..7bec31d46 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts +++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts @@ -14,6 +14,7 @@ import * as Moment from 'moment'; import { RegistersResourceService } from 'src/app/etl-api/registers-resource.service'; import * as html2canvas from 'html2canvas'; import * as jsPDF from 'jspdf'; +import { DataAnalyticsDashboardService } from 'src/app/data-analytics-dashboard/services/data-analytics-dashboard.services'; @Component({ selector: 'app-prepdaily-register', templateUrl: './prepdaily-register.component.html', @@ -34,6 +35,7 @@ export class PrepdailyRegisterComponent implements OnInit { public quarter: string; public eDate: string; public sDate: string; + public jointLocationUuids: string; public statusError = false; public errorMessage = ''; @@ -44,6 +46,7 @@ export class PrepdailyRegisterComponent implements OnInit { public pinnedBottomRowData: any = []; public _month: string; public isReleased = true; + public generated = false; @ViewChild('prepcontentToSnapshot') contentToSnapshot!: ElementRef; public _locationUuids: any = []; @@ -65,7 +68,8 @@ export class PrepdailyRegisterComponent implements OnInit { public router: Router, public route: ActivatedRoute, public register: RegistersResourceService, - private datePipe: DatePipe + private datePipe: DatePipe, + private dataAnalyticsDashboardService: DataAnalyticsDashboardService ) { this.route.queryParams.subscribe((data) => { data.month === undefined @@ -86,20 +90,27 @@ export class PrepdailyRegisterComponent implements OnInit { } public generateReport(): any { + this.dataAnalyticsDashboardService + .getSelectedLocations() + .subscribe((data) => { + const locationValues = data.locations.map( + (location) => `'${location.value}'` + ); + this.jointLocationUuids = locationValues.join(', '); + }); + this.route.parent.parent.params.subscribe((params: any) => { - this.storeParamsInUrl(params.location_uuid); + this.storeParamsInUrl(); }); this.prepRegisterData = []; this.getPrEPRegisterReport(this.params); + this.generated = true; } - public storeParamsInUrl(param) { + public storeParamsInUrl() { this.params = { - locationUuids: param, - _month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), - month: Moment(this._month).endOf('month').format('YYYY-MM-DD'), - reportName: this.reportName, - _date: Moment(this._month).format('DD-MM-YYYY') + locationUuids: this.jointLocationUuids, + month: Moment(this._month).endOf('month').format('YYYY-MM-DD') }; this.router.navigate([], { relativeTo: this.route, From 3b7f21747561c0441e7670950e592f2e4f764f39 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Wed, 12 Jun 2024 11:52:08 +0300 Subject: [PATCH 37/38] Updated registers --- src/app/build-version/build-version.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/build-version/build-version.component.ts b/src/app/build-version/build-version.component.ts index c60a3b385..d1f229b80 100644 --- a/src/app/build-version/build-version.component.ts +++ b/src/app/build-version/build-version.component.ts @@ -8,7 +8,7 @@ import { VERSION } from '../../environments/version'; }) export class BuildVersionComponent implements OnInit { public version: string; - public buildDate: any; + public buildDate: Date; public hash: string; constructor() {} @@ -20,7 +20,7 @@ export class BuildVersionComponent implements OnInit { try { this.version = VERSION.version; this.hash = VERSION.hash; - this.buildDate = 'Feb 15, 2024, 6:38:55 PM'; // new Date(VERSION.buildDate); + this.buildDate = new Date(VERSION.buildDate); } catch (e) {} } } From 3db0482e68295939b51206fe79f305a501332ba0 Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Wed, 12 Jun 2024 13:06:43 +0300 Subject: [PATCH 38/38] Updated registers --- .../cntdaily-register.component.html | 2 +- .../defaultertracing-register.component.html | 311 +++++++++--------- .../hei-register/hei-register.component.html | 6 +- .../prepdaily-register.component.html | 2 +- 4 files changed, 164 insertions(+), 157 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html index 729a9afb1..bea9419a2 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html @@ -248,4 +248,4 @@

-
\ No newline at end of file +
diff --git a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html index 596aa0a99..5b49af7a1 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/defaultertracing-register/defaultertracing-register.component.html @@ -67,161 +67,166 @@


-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Defaulter Tracing Register
- Enter all current clients that did not come for their scheduled - appointment -
Section ASection B
Client Tracking InformationDefaulter Tracing Outcomes
(a)(b)(c)(d)(e)(f)(g)(h)(i)
S/No. - Client Identification /
- Number -
- Client Name
- (First,Middle,Last) -
- Village/Estate/
- Landmark -
Telephone number - Date of missed
- appointment -
- Return to Care/
- Dead/
- Transferred/
- Stopped Treatment/
- On follow up -
- Date of outcome
- (dd/mm/yyyy) -
Remarks
- Unique Patient
- Number (NUPI) -
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Defaulter Tracing Register
+ Enter all current clients that did not come for their scheduled + appointment +
Section ASection B
Client Tracking InformationDefaulter Tracing Outcomes
(a)(b)(c)(d)(e)(f)(g)(h)(i)
S/No. + Client Identification /
+ Number +
+ Client Name
+ (First,Middle,Last) +
+ Village/Estate/
+ Landmark +
Telephone number + Date of missed
+ appointment +
+ Return to Care/
+ Dead/
+ Transferred/
+ Stopped Treatment/
+ On follow up +
+ Date of outcome
+ (dd/mm/yyyy) +
Remarks
+ Unique Patient
+ Number (NUPI) +
+
+
+
+ No record found
-
-
- No record found
diff --git a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html index 8db3480f3..8f90e37ae 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html @@ -97,8 +97,10 @@

Date of Collected enrollment (DD/MM/YYYY) - Birth Certificate
- Number + + Birth Certificate
+ Number + HEI ID (MFL-YYYY-NNNN) Infant's Name DOB (DD/MM/YYYY) diff --git a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html index 6172fe377..5ff82d48e 100644 --- a/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html +++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html @@ -210,5 +210,5 @@

- No record found + No record found