diff --git a/src/app/hiv-care-lib/registers/otz/otz-registers/otz-register.component.html b/src/app/hiv-care-lib/registers/otz/otz-registers/otz-register.component.html
index 3edc720ed..7aa57c2cb 100644
--- a/src/app/hiv-care-lib/registers/otz/otz-registers/otz-register.component.html
+++ b/src/app/hiv-care-lib/registers/otz/otz-registers/otz-register.component.html
@@ -182,7 +182,7 @@
Registration Details
rowspan="2"
style="width: 20%; text-align: center"
>
- 2022-01-01
+ {{data.original_art_regimen}}
{{ data.firstname_middlename }}
@@ -217,32 +217,33 @@ Registration Details
|
{{ data.first_regimen_switch }} |
{{ data.first_regimen_switch_date }} |
- gm |
+ {{ data.first_regimen_switch_reason }} |
{{ data.third_regimen_switch }} |
{{ data.third_regimen_switch_date }} |
- pppprrr |
+ {{ data.third_regimen_switch_reason }} |
- rrrr |
+ {{ vlResult }} |
- |
- gx |
- gy |
+ {{ data.discontinue_otz_reason }} |
+ |
+ {{ data.clinical_remarks }} |
{{ data.age_at_enrollment }} years |
+
{{ data.last_name }} |
{{ data.vl_result_date_at_otz_enrollment }} |
{{ data.art_regimen_start_date_at_otz_enrollment }} |
{{ data.second_regimen_switch }} |
{{ data.second_regimen_switch_date }} |
- xxx |
+ {{ data.second_regimen_switch_reason }} |
{{ data.fourth_regimen_switch }} |
{{ data.fourth_regimen_switch_date }} |
- yyy |
+ {{ data.fourth_regimen_switch_reason }} |
- gg |
+ {{ vlDate }} |
- gggg |
+ {{ data.discontinue_otz_date }} |
diff --git a/src/app/hiv-care-lib/registers/otz/otz-registers/otz-register.component.ts b/src/app/hiv-care-lib/registers/otz/otz-registers/otz-register.component.ts
index c5b4adcd5..e90c5ad8e 100644
--- a/src/app/hiv-care-lib/registers/otz/otz-registers/otz-register.component.ts
+++ b/src/app/hiv-care-lib/registers/otz/otz-registers/otz-register.component.ts
@@ -14,7 +14,9 @@ export class OtzRegisterComponent implements OnInit {
public otzData = [];
public enabledControls = 'monthControl';
public _month: string;
-
+ public vlDate = [];
+ public vlResult = [] ;
+
counterArray = Array(18)
.fill(0)
.map((_, index) => index + 1);
@@ -47,7 +49,29 @@ export class OtzRegisterComponent implements OnInit {
this.otzData = result.results.results;
console.log("otzdata", this.otzData);
console.log('age2', this.otzData[1].age_at_enrollment);
+
+ for (let data of this.otzData) {
+ const viral_load = data.vl_result_post_otz_enrollment;
+ const vl_array = viral_load.split(',');
+ console.log(vl_array);
+ const mapped_vls = vl_array.map((v) => {
+ const vl_dates = v.split('=');
+ this.vlDate = vl_dates[0];
+ this.vlResult = vl_dates[1];
+ console.log('Date:', this.vlDate, 'Result:', this.vlResult);
+ return {
+ vlDate: vl_dates[0],
+ vlResult: vl_dates[1]
+
+ };
+ });
+ console.log('mapped_vls',mapped_vls);
+
+
+ }
+
})
+
}
}