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) {}
}
}
diff --git a/src/app/constants/program.constants.ts b/src/app/constants/program.constants.ts
index 3dee969d2..32931f6a8 100644
--- a/src/app/constants/program.constants.ts
+++ b/src/app/constants/program.constants.ts
@@ -6,6 +6,18 @@ const PMTCT_PROGRAM: Program = {
dept: 'HIV',
compatibleWithOtherDeptPrograms: false
};
+const ANC_PROGRAM: Program = {
+ uuid: '52aeb285-fb18-455b-893e-3e53ccc77ceb',
+ name: 'ANTENATAL CARE PROGRAM',
+ dept: 'HIV',
+ compatibleWithOtherDeptPrograms: false
+};
+const PNC_PROGRAM: Program = {
+ uuid: 'd2552058-d7bd-47c6-aed1-480a4308027a',
+ name: 'POSTNATAL PROGRAM',
+ dept: 'HIV',
+ compatibleWithOtherDeptPrograms: false
+};
const STANDARD_HIV_PROGRAM: Program = {
uuid: '781d85b0-1359-11df-a1f1-0026b9348838',
name: 'STANDARD HIV TREATMENT',
@@ -122,5 +134,7 @@ export const Programs = {
EXPRESS_CARE_PROGRAM,
DTG_PHARMACO_VIGILANCE_PROGRAM,
HIV_SOCIAL_WORK_PROGRAM,
- NUTRITION_PROGRAM
+ NUTRITION_PROGRAM,
+ ANC_PROGRAM,
+ PNC_PROGRAM
};
diff --git a/src/app/constants/referral-concepts.contants.ts b/src/app/constants/referral-concepts.contants.ts
index d36c21306..1f9062369 100644
--- a/src/app/constants/referral-concepts.contants.ts
+++ b/src/app/constants/referral-concepts.contants.ts
@@ -13,6 +13,8 @@ const PPP_REFERRAL_CONCEPT = '4e6d1c61-624c-4350-a604-374f835aa481';
const PATIENT_PREFERENCE_CONCEPT = '7e7d4555-362a-498a-b5ed-abcddcfce2a7';
const STANDARD_HIV_CARE_REFERRAL_CONCEPT =
'b412ae76-4ab4-4d00-800e-bd8d167769e1';
+const ANC_CONCEPT = '375e6d4a-ba94-41ac-8ac3-5a56015c4d92';
+const PNC_CONCEPT = 'c5789e91-2c76-450a-94f7-94fce32335d3';
export const ReferralConcepts = {
differentiatedCareConceptUuid,
@@ -27,5 +29,7 @@ export const ReferralConcepts = {
BACK_TO_CCC_REFERRAL_CONCEPT,
PPP_REFERRAL_CONCEPT,
PATIENT_PREFERENCE_CONCEPT,
- STANDARD_HIV_CARE_REFERRAL_CONCEPT
+ STANDARD_HIV_CARE_REFERRAL_CONCEPT,
+ ANC_CONCEPT,
+ PNC_CONCEPT
};
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..ab1f08146
--- /dev/null
+++ 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
new file mode 100644
index 000000000..371af8220
--- /dev/null
+++ b/src/app/data-analytics-dashboard/hiv/registers/anc-register/anc-register.component.html
@@ -0,0 +1,942 @@
+
+ {{ 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
+
+
+ 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/ County |
+ Village/Estate/ Landmark |
+
+ Marital Status
+ NM=Never
+ Married/Single
+ MM=Married
+ Monogamous
+ MP=Married
+ Polygamous
+ W=Widowed
+ D=Divorced
+ S=Separated
+ |
+ Parity |
+ Gravidae |
+
+ 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) |
+ Laboratory |
+ Maternal HAART |
+ Infant Prophylaxis |
+ Partner HIV Testing |
+ Other Conditions and Treatment |
+ Deworming |
+ IPT 1-3 |
+ TT Dose |
+ Supplementation |
+ LLITNs |
+ Referrrals |
+ Remarks |
+
+
+ ANC Number |
+ Age |
+ Phone 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 |
+
+ 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)
+ |
+ From |
+ To |
+
+ Reason for referral
+ (specify)
+ |
+
+
+ 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 1 |
+ HIV Test 2 |
+ HIV Test 3 |
+ HIV Results |
+ Treatment (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 Name |
+ Kit Name |
+ Kit Name |
+ (N/P/Ic/U/N A) |
+
+
+ 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) |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+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 |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
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..7d7e743ba
--- /dev/null
+++ 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
new file mode 100644
index 000000000..e1af70e95
--- /dev/null
+++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.html
@@ -0,0 +1,238 @@
+
+ {{ 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.
+
+
+ 0"
+>
+
+
+
+ Ministry Of Health
+
+
+ HIV Care Treatment Daily Activity Register MOH 366
+
+
+ Ver. July 2023
+
+
+
+
+
+ No |
+ Date |
+ National Identification Number |
+ Client CCC Number |
+ Age |
+ Starting ART |
+
+ TB in HIV Care (Newly Initiated on ART)
+ |
+
+ Currently on ART (Starting and Continuing ART)
+ |
+ DSD |
+ Remarks |
+
+
+ Client Unique Number (NUPI) |
+
+ Tick as appropriate for age
+ |
+ Screened for TB |
+ Started TPT |
+
+ Indicate No. of months of till next appointment or
+ "R"for patients making unscheduled visits
+ |
+ Status |
+ Type |
+
+
+ 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 yrs |
+ 15+ yrs |
+ < 15 yrs |
+ 15+ 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.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..69f16c6f9
--- /dev/null
+++ b/src/app/data-analytics-dashboard/hiv/registers/cntdaily-register/cntdaily-register.component.ts
@@ -0,0 +1,169 @@
+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',
+ styleUrls: ['./cntdaily-register.component.css']
+})
+export class CntdailyRegisterComponent implements OnInit {
+ @Output()
+ public params: any;
+ public indicators: string;
+ public selectedIndicators = [];
+ public careTreatmentRegisterData: 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,
+ public careTreatmentRegisterService: CareTreatmentResourceService
+ ) {
+ 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.careTreatmentRegisterData = [];
+ this.getCareTreatmentRegisterData(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 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.careTreatmentRegisterData.length > 0) {
+ const totalObj = {
+ location: 'Totals'
+ };
+ _.each(this.careTreatmentRegisterData, (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..6efab6429
--- /dev/null
+++ b/src/app/data-analytics-dashboard/hiv/registers/hei-register/hei-register.component.html
@@ -0,0 +1,245 @@
+
+ {{ 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.
+
+ 0"
+>
+
+
+
+ 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 Test |
+ Second HIV DNA PCR Test |
+ Third HIV DNA PCR Test |
+ HEI Outcomes at 12 months |
+ Confirmatory PCR |
+ Antibody test (18 to 24 months) |
+ HEI Outcomes at 24 months |
+ Comments |
+
+
+ Registration Information |
+ Infant's information |
+ Parent's information |
+
+
+ Serial No. |
+
+ Date of Collected enrollment (DD/MM/YYYY)
+ |
+ Birth Certificate Number |
+ HEI ID (MFL-YYYY-NNNN) |
+ Infant's Name |
+ DOB (DD/MM/YYYY) |
+ 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,
+ |
+ Father's/Mother's/Guardian's Name |
+ Age at Test (in wks) |
+
+ Type of Test 1=At Birth 2=at 6 weeks 3=at First Contact
+ |
+ Date Sample Collected |
+ Age at Test (in months) |
+ Date Sample Collected |
+ Age at Test (in months) |
+ Date Sample Collected |
+ Infant Feeding |
+
+ 1=Infected 2= Uninfected 3=Lost to Follow 4=Transfer Out 5=Dead
+ |
+ Age at Test (in months) |
+ Date Sample Collected |
+ Age at Test (in months) |
+ Date Sample Collected |
+ Infant Feeding |
+
+ 1=Infected 2= Uninfected 3=Lost to Follow 4=Transfer Out 5=Dead
+ |
+
+
+ Client Unique Number (NUPI) |
+ (M/F) |
+ (M/F) |
+ Telephone number |
+ Test result (P,N) |
+ Test result (P,N) |
+ Test result (P,N) |
+ BF=Breastfeeding NBF=Not Breastfeeding |
+ Test 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..ab1f08146
--- /dev/null
+++ 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
new file mode 100644
index 000000000..e5d188bea
--- /dev/null
+++ b/src/app/data-analytics-dashboard/hiv/registers/htsrefferallinkage-register/htsrefferallinkage-register.component.html
@@ -0,0 +1,661 @@
+
+ {{ 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
+
+
+ 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 1 |
+ HIV Test 2 |
+ HIV 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/N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+ |
+ |
+
+
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+ Ministry Of Health
+
+
+ MOH 362 HTS LAB, REFERRAL AND LINKAGE REGISTER
+ REFERRAL AND LINKAGE REGISTER
+
+
+ Ver. July 2023
+
+
+
+
+
+
+ Serial
+ Number
+ |
+
+ National Identification
+ Number
+ |
+ Client Names |
+ Telephone 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 Number |
+ Remarks |
+
+
+
+ National Unique
+ Patient Identifier
+ (NUPI) Number
+ |
+ Residence |
+
+
+ (a) |
+ (b) |
+ (c) |
+ (d) |
+ (e) |
+ (f) |
+ (g) |
+ (h) |
+ (i) |
+ (j) |
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+
+
+ Totals Clients Linked |
+ |
+
+
+
+
+
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..ab1f08146
--- /dev/null
+++ 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
new file mode 100644
index 000000000..8ec57b795
--- /dev/null
+++ b/src/app/data-analytics-dashboard/hiv/registers/maternity-register/maternity-register.component.html
@@ -0,0 +1,1205 @@
+
+ {{ 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
+
+
+ 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)
+ |
+ Diagnosis |
+ Delivery |
+ |
+
+ 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
+ |
+ Discharge |
+ Referral |
+ Comments |
+
+
+ NUPI |
+ Age |
+ Phone 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 1 |
+ HIV Test 2 |
+ HIV 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
+ |
+ From |
+ To |
+ Reason 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) |
+
+
+ |
+ |
+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 |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
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..ab1f08146
--- /dev/null
+++ 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
new file mode 100644
index 000000000..aa9f35a0b
--- /dev/null
+++ b/src/app/data-analytics-dashboard/hiv/registers/nutrition-register/nutrition-register.component.html
@@ -0,0 +1,1470 @@
+
+ {{ 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
+
+
+ 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)
+ |
+ Years |
+ Months |
+
+
+ |
+ A |
+ B |
+ C |
+ D |
+ E |
+ F |
+ G |
+ H |
+ I |
+ J |
+ K |
+ L |
+ M |
+ N |
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+ Ministry Of Health
+
+
+ NUTRITION SERVICE REGISTER MOH 407
+
+
+ Ver. July 2023
+
+
+
+
+
+ Client's follow up Register |
+
+
+ Clients' Details |
+ On Admission |
+ |
+ |
+
+ Discharge/Transfer
+ Measurements
+ |
+ Outcome |
+
+
+ week1 |
+ Week2 |
+ week3 |
+ week4 |
+ week5 |
+ week6 |
+ week7 |
+ week8 |
+ week9 |
+ week10 |
+ week11 |
+ week12 |
+
+
+ SNO. |
+
+ Date:
+ dd/mm/yyyy
+ |
+
+ National
+ Identification
+ Number
+ |
+ CCC Number |
+ Client's Name |
+ Village/Estate/Landmark |
+ Mobile number |
+ AGE |
+
+ 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)
+ |
+ Years |
+ Months |
+
+
+
+
+ |
+ (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) |
+ (b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 |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+
+
+
+
+
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..ab1f08146
--- /dev/null
+++ 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
new file mode 100644
index 000000000..6206fb58f
--- /dev/null
+++ b/src/app/data-analytics-dashboard/hiv/registers/pnc-register/pnc-register.component.html
@@ -0,0 +1,895 @@
+
+ {{ 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
+
+
+ MOH 406 Post Natal Register
+
+
+ Ver. July 2023
+
+
+
+
+
+ Date of visit |
+ Maternity History |
+ Postpartum Visit |
+ Vital Signs |
+ Postnatal Examinations |
+ TB screening |
+ |
+ HAART & 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)
+ |
+ Refferals |
+ Remarks |
+
+
+
+ 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 Baby |
+ Temp |
+ Pulse |
+
+ 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 PNC |
+ HIV Test 1 |
+ HIV Test 2 |
+ HIV Test 3 |
+ Results in PNC |
+ <=6wks |
+ >6wks |
+
+ Results
+ 1=Normal,
+ 2=Suspected,
+ 3= Confirmed,
+ 4= Not done
+ |
+
+ Counseled
+ Method received
+ |
+ |
+ |
+ From |
+ To |
+
+ Reasons for
+ referral
+ (specify)
+ |
+
+
+ NUPI |
+ Age in Years |
+ Telephone 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 |
+ >6wks |
+ Infant |
+ Mother |
+ Infant |
+ Mother |
+ |
+ |
+
+ 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. / / |
+ Exp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+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
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..7d7e743ba
--- /dev/null
+++ 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
new file mode 100644
index 000000000..11909e88a
--- /dev/null
+++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.html
@@ -0,0 +1,211 @@
+
+ {{ 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.
+
+
+
+
×
+
+ 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.
+
+
+ 0"
+>
+
+
+
+ 0"
+ style="padding: 20px; font-size: 12px !important"
+ #prepcontentToSnapshot
+>
+
+
+
+ Ministry Of Health
+
+
+ MOH 267 PrEP Daily Activity Register
+
+
+ Ver. July 2023
+
+
+
+
+
+ PrEP No |
+ Date of Visit |
+
+ National Identification Number
+ |
+ Age |
+
+ 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) |
+
+
+
+
+
+
+ {{ 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 }} |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ TOTAL this Month |
+ {{ prepRegisterData.length }} |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
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..90cab6a0c
--- /dev/null
+++ b/src/app/data-analytics-dashboard/hiv/registers/prepdaily-register/prepdaily-register.component.ts
@@ -0,0 +1,164 @@
+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',
+ styleUrls: ['./prepdaily-register.component.css']
+})
+export class PrepdailyRegisterComponent implements OnInit {
+ @Output()
+ public params: any;
+ public indicators: string;
+ public selectedIndicators = [];
+ public prepRegisterData: 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;
+ @ViewChild('prepcontentToSnapshot') contentToSnapshot!: ElementRef;
+
+ 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 register: RegistersResourceService,
+ private datePipe: DatePipe
+ ) {
+ 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.prepRegisterData = [];
+ this.getPrEPRegisterReport(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 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,
+ 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;
+ }
+ }
+
+ 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/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/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;
+ })
+ );
+ }
+}
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/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;
+ })
+ );
+ }
+}
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..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
@@ -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))
diff --git a/src/app/interfaces/return-value.interface.ts b/src/app/interfaces/return-value.interface.ts
index c4c7381dc..c985522df 100644
--- a/src/app/interfaces/return-value.interface.ts
+++ b/src/app/interfaces/return-value.interface.ts
@@ -16,4 +16,5 @@ export interface ReturnValue {
providerUuid: string;
locationUuid: string;
hivReferralLocationUuid: string;
+ pmtctProgrammeUuid: string;
}
diff --git a/src/app/patient-dashboard/common/formentry/formentry-referrals-handler.service.ts b/src/app/patient-dashboard/common/formentry/formentry-referrals-handler.service.ts
index b01362f96..25e9b525c 100644
--- a/src/app/patient-dashboard/common/formentry/formentry-referrals-handler.service.ts
+++ b/src/app/patient-dashboard/common/formentry/formentry-referrals-handler.service.ts
@@ -30,7 +30,8 @@ import { FormUuids } from './../../../constants/forms.constants';
@Injectable()
export class FormentryReferralsHandlerService {
- private PMTCT_PROGRAM: Program = Programs.PMTCT_PROGRAM;
+ private PNC_PROGRAM: Program = Programs.PNC_PROGRAM;
+ private ANC_PROGRAM: Program = Programs.ANC_PROGRAM;
private STANDARD_PROGRAM: Program = Programs.STANDARD_HIV_PROGRAM;
constructor(
@@ -217,7 +218,8 @@ export class FormentryReferralsHandlerService {
encounterDatetime: null,
providerUuid: '',
locationUuid: '',
- hivReferralLocationUuid: ''
+ hivReferralLocationUuid: '',
+ pmtctProgrammeUuid: ''
};
const formUuid = form.schema.uuid ? form.schema.uuid : '';
@@ -226,6 +228,7 @@ export class FormentryReferralsHandlerService {
const referrals_1 = this.getQuestionValue(form, 'referrals');
const internalMvmentData = this.getQuestionValue(form, 'careType');
const interMovementQstnAns = this.getQuestionValue(form, 'internalMove');
+
// validating if selected option is DC care and referrals is blank. Adult and youth forms are different
const referrals =
referrals_1 === undefined
@@ -257,6 +260,8 @@ export class FormentryReferralsHandlerService {
// haS PMTCT referral
if (internalMvmentData === ReferralConcepts.MCH_PROGRAM_CONCEPT) {
returnValue.hasPmtctReferral = true;
+ const pmtctPatientType = this.getQuestionValue(form, 'pmtctType');
+ returnValue.pmtctProgrammeUuid = pmtctPatientType;
}
// has ACTG referral
@@ -319,8 +324,15 @@ export class FormentryReferralsHandlerService {
referralMetaData: referralObj
};
if (referralObj.hasPmtctReferral) {
- refProgram.uuid = this.PMTCT_PROGRAM.uuid;
- refProgram.name = this.PMTCT_PROGRAM.name;
+ if (referralObj.pmtctProgrammeUuid === ReferralConcepts.ANC_CONCEPT) {
+ refProgram.uuid = this.ANC_PROGRAM.uuid;
+ refProgram.name = this.ANC_PROGRAM.name;
+ } else if (
+ referralObj.pmtctProgrammeUuid === ReferralConcepts.PNC_CONCEPT
+ ) {
+ refProgram.uuid = this.PNC_PROGRAM.uuid;
+ refProgram.name = this.PNC_PROGRAM.name;
+ }
} else {
refProgram.uuid = this.STANDARD_PROGRAM.uuid;
refProgram.name = this.STANDARD_PROGRAM.name;
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 25b823e9a..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
@@ -208,14 +208,13 @@ export class HivReferralComponent implements OnInit, OnChanges, OnDestroy {
const enrollmentsPayload = hivPrograms.map(
(hivProgram: ProgramEnrollment) => {
if (
- hivProgram.program.uuid === Programs.STANDARD_HIV_PROGRAM.uuid &&
- this.referredHivProgram.uuid === Programs.PMTCT_PROGRAM.uuid
- ) {
- } else if (
- hivProgram.program.uuid === Programs.PMTCT_PROGRAM.uuid &&
this.referredHivProgram.uuid === Programs.STANDARD_HIV_PROGRAM.uuid
) {
referredToStandard = true;
+ } else if (
+ this.referredHivProgram.uuid === Programs.PNC_PROGRAM.uuid ||
+ this.referredHivProgram.uuid === Programs.ANC_PROGRAM.uuid
+ ) {
} else {
return {
location: this.referredHivProgram.locationUuid,
diff --git a/src/app/patient-dashboard/common/patient-referrals/hiv-referrals/hiv-referral.service.ts b/src/app/patient-dashboard/common/patient-referrals/hiv-referrals/hiv-referral.service.ts
index 15684f514..f7b60ab98 100644
--- a/src/app/patient-dashboard/common/patient-referrals/hiv-referrals/hiv-referral.service.ts
+++ b/src/app/patient-dashboard/common/patient-referrals/hiv-referrals/hiv-referral.service.ts
@@ -130,7 +130,10 @@ export class HivReferralService {
let autoEnrollmentUuid = '';
if (programUuid === Programs.STANDARD_HIV_PROGRAM.uuid) {
autoEnrollmentUuid = this.STANDARD_HIV_AUTO_ENROLLMENT_ENCOUNTER;
- } else if (programUuid === Programs.PMTCT_PROGRAM.uuid) {
+ } else if (
+ programUuid === Programs.ANC_PROGRAM.uuid ||
+ programUuid === Programs.PNC_PROGRAM.uuid
+ ) {
autoEnrollmentUuid = this.PMTCT_AUTO_ENROLLMENT_ENCOUNTER;
}
return autoEnrollmentUuid;
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",