Skip to content

Commit

Permalink
POC-475: modified columns under patient tracker
Browse files Browse the repository at this point in the history
modified columns under patient tracker
  • Loading branch information
Angie-540 committed Feb 15, 2024
1 parent dff61de commit bbf1671
Show file tree
Hide file tree
Showing 5 changed files with 146 additions and 78 deletions.
Original file line number Diff line number Diff line change
@@ -1,86 +1,134 @@
<div>
<div>
<table class="table table-hover table-striped table-responsive" *ngIf=" tbStartdates.length > 0 || tbEnddates[0] != null">
<thead>
<tr>
<th>TB Start Date </th>
<th>TB End Date </th>

</tr>
</thead>
<tbody>
<tr>
<td *ngFor="let startDate of tbStartdates">{{ startDate | date: 'dd-MM-yyyy' }}</td>
<td *ngFor="let endDate of tbEnddates">{{ endDate | date: 'dd-MM-yyyy' }}</td>
</tr>
</tbody>
</table>

<table
class="table table-hover table-striped table-responsive"
*ngIf="tbStartdates.length > 0 || tbEnddates[0] != null"
>
<thead>
<tr>
<th>TB Treatment Start Date</th>
<th>TB Treatment End Date</th>
</tr>
</thead>
<tbody>
<tr>
<td *ngFor="let startDate of tbStartdates">
{{ startDate | date: 'dd-MM-yyyy' }}
</td>
<td *ngFor="let endDate of tbEnddates">
{{ endDate | date: 'dd-MM-yyyy' }}
</td>
</tr>
</tbody>
</table>

<table class="table table-hover table-striped table-responsive" *ngIf="cryptococallStartDates[0] != null || cryptococallEndDates[0] != null">
<table
class="table table-hover table-striped table-responsive"
*ngIf="
cryptococallStartDates[0] != null || cryptococallEndDates[0] != null
"
>
<thead>
<tr>
<th>Cryptococcal Start Date : </th>
<th>Cryptococcal End Date : </th>

<th>Cryptococcal Treatment Start Date :</th>
<th>Cryptococcal Treatment End Date :</th>
</tr>
</thead>
<tbody>
<tr >
<td *ngFor="let startDate of cryptococallStartDates"> {{ startDate | date: 'dd-MM-yyyy' }} </td>
<td *ngFor="let endDate of cryptococallEndDates"> {{ endDate | date: 'dd-MM-yyyy' }} </td>
</tr>
</tbody>
<tbody>
<tr>
<td *ngFor="let startDate of cryptococallStartDates">
{{ startDate | date: 'dd-MM-yyyy' }}
</td>
<td *ngFor="let endDate of cryptococallEndDates">
{{ endDate | date: 'dd-MM-yyyy' }}
</td>
</tr>
</tbody>
</table>

<table class="table table-hover table-striped table-responsive" *ngIf="pcpStartDates[0] != null || pcpEndDates[0] != null">
<thead >

<table
class="table table-hover table-striped table-responsive"
*ngIf="pcpStartDates[0] != null || pcpEndDates[0] != null"
>
<thead>
<tr>
<th>PCP Start Date</th>
<th>PCP End Date</th>
<th>PCP Treatment Start Date</th>
<th>PCP Treatment End Date</th>
</tr>
</thead>
<tbody>
<tr>
<td *ngFor="let startDate of pcpStartDates">{{ startDate | date: 'dd-MM-yyyy' }}</td>
<td *ngFor="let endDate of pcpEndDates">{{ endDate | date: 'dd-MM-yyyy' }}</td>
</tr>
</tbody>
<tbody>
<tr>
<td *ngFor="let startDate of pcpStartDates">
{{ startDate | date: 'dd-MM-yyyy' }}
</td>
<td *ngFor="let endDate of pcpEndDates">
{{ endDate | date: 'dd-MM-yyyy' }}
</td>
</tr>
</tbody>
</table>

<table class="table table-hover table-striped table-responsive" *ngIf="toxoplasmosisStartDates[0] != null || toxoplasmosisEndDates[0] != null">
<thead>
<tr>
<th>Toxoplasmosis Start Date</th>
<th>Toxoplasmosis End Date</th>
</tr>
</thead>
<tbody>
<tr>
<td *ngFor="let startDate of toxoplasmosisStartDates">{{ startDate | date: 'dd-MM-yyyy' }}</td>
<td *ngFor="let startDate of toxoplasmosisEndDates">{{ endDate | date: 'dd-MM-yyyy' }}</td>
</tr>
</tbody>
</table>

<table class="table table-hover table-striped table-responsive" *ngIf="kaposisStartDates[0] != null || kaposisEndDates[0] != null">
<table
class="table table-hover table-striped table-responsive"
*ngIf="
toxoplasmosisStartDates[0] != null || toxoplasmosisEndDates[0] != null
"
>
<thead>
<tr>
<th>Kaposis Sarcoma Start Date</th>
<th>Kaposis Sarcoma End Date</th>
<th>Toxoplasmosis Treatment Start Date</th>
<th>Toxoplasmosis Treatment End Date</th>
</tr>
</thead>
<tbody>
<tr>
<td *ngFor="let startDate of kaposisStartDates">{{ startDate | date: 'dd-MM-yyyy' }}</td>
<td *ngFor="let startDate of kaposisEndDates">{{ endDate | date: 'dd-MM-yyyy' }}</td>
<td *ngFor="let startDate of toxoplasmosisStartDates">
{{ startDate | date: 'dd-MM-yyyy' }}
</td>
<td *ngFor="let startDate of toxoplasmosisEndDates">
{{ endDate | date: 'dd-MM-yyyy' }}
</td>
</tr>
</tbody>
</table>
</div>

<!-- <div *ngIf="" >
<p class="mx-8" >NO AHD SUMMARY DATA!</p>
</div> -->
<table
class="table table-hover table-striped table-responsive"
*ngIf="kaposisStartDates[0] != null || kaposisEndDates[0] != null"
>
<thead>
<tr>
<th>Kaposis Sarcoma Treatment Start Date</th>
<th>Kaposis Sarcoma Treatment End Date</th>
</tr>
</thead>
<tbody>
<tr>
<td *ngFor="let startDate of kaposisStartDates">
{{ startDate | date: 'dd-MM-yyyy' }}
</td>
<td *ngFor="let startDate of kaposisEndDates">
{{ endDate | date: 'dd-MM-yyyy' }}
</td>
</tr>
</tbody>
</table>
</div>

<div
*ngIf="
kaposisStartDates[0] == null &&
kaposisEndDates[0] == null &&
toxoplasmosisStartDates[0] == null &&
toxoplasmosisEndDates[0] == null &&
tbStartdates.length == 0 &&
tbEnddates[0] == null &&
pcpStartDates[0] == null &&
pcpEndDates[0] == null &&
cryptococallStartDates[0] == null &&
cryptococallEndDates[0] == null
"
>
<p class="mx-8">NO AHD SUMMARY DATA!</p>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@
}}
</td>

<td>
{{
(hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
(1000 * 60 * 60 * 24) >
0
? (hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
(1000 * 60 * 60 * 24)
: 0
}}
</td>

<td *ngIf="hasMedicationRtc">
{{ hivSummary.med_pickup_rtc_date | date: 'dd-MM-yyyy' }}
</td>
Expand All @@ -64,23 +75,23 @@
<td *ngIf="hasMdtSessionNo">{{ hivSummary.mdt_session_number }}</td>
<td>
{{
((hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
(hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
(1000 * 60 * 60 * 24) >
0) &&
((hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
0 &&
(hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
(1000 * 60 * 60 * 24) <=
5)
5
? 'missed'
: ((hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
: (hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
(1000 * 60 * 60 * 24) >
4 )&&
((hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
4 &&
(hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
(1000 * 60 * 60 * 24) <=
28)
28
? 'defaulter'
: ((hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
: (hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
(1000 * 60 * 60 * 24) >
28)
28
? 'LTFU'
: ''
}}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.table {
width: 100%;
}

th,
td {
padding: 8px;
width: 10%;
}

th:nth-child(6) {
width: 18%;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<th>Change Date</th>
<th>Previous VL</th>
<th>Previous Vl Date</th>
<th>DST</th>
<th>DST Date</th>
<th>DST/DRT Date</th>
<th>Current Regimen</th>
<th>ARV Line</th>
<th>Reason</th>
Expand All @@ -16,9 +15,7 @@
<td>{{ encounter.encounter_datetime }}</td>
<td>{{ (encounter.previousViralLoad | zeroVl) || ' ' }}</td>
<td>{{ encounter.previous_vl_date }}</td>

<td>{{ ' ' }}</td>
<td>{{ ' ' }}</td>
<td></td>
<td>{{ encounter.current_regimen || '&nbsp;' }}</td>
<td>{{ encounter.cur_arv_line || '&nbsp;' }}</td>
<td>{{ encounter.reason_for_regimen_change || '&nbsp;' }}</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Subscription } from 'rxjs';
@Component({
selector: 'medication-change-history',
templateUrl: './medication-history.component.html',
styleUrls: []
styleUrls: ['./medication-history.component.css']
})
export class MedicationHistoryComponent implements OnInit, OnDestroy {
public encounters = [];
Expand All @@ -29,7 +29,6 @@ export class MedicationHistoryComponent implements OnInit, OnDestroy {
this.encounters = this.convertPreviousVlValueTostring(
medication.result
);
console.log(this.encounters);
});
}

Expand Down

0 comments on commit bbf1671

Please sign in to comment.