Skip to content

Commit

Permalink
[POC-539-fix] dna pcr snapshot (#1674)
Browse files Browse the repository at this point in the history
  • Loading branch information
henrykorir authored Oct 4, 2023
1 parent ba6a7d3 commit 513fe01
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ <h4 class="component-title">Last Encounter</h4>
*ngIf="isHEIActive"
[ngClass]="{ 'text-bold red': isVirallyUnsuppressed }"
>
Age PCR Done: {{ age_of_ped_on_last_pcr }}M
Age PCR Done: {{ age_of_ped_on_last_pcr }}
</p>
<p>
<i
Expand Down Expand Up @@ -217,7 +217,7 @@ <h4 class="component-title">Last Encounter</h4>
<p>
PCR Results:
<span style="text-transform: capitalize">
{{ 'NEGATIVE' }}
{{ last_pcr_status }}
</span>
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class HivProgramSnapshotComponent implements OnInit {
public prediction: any;

public isHEIActive = false;
public age_of_ped_on_last_pcr: number;
public age_of_ped_on_last_pcr: string;
public last_pcr_status: string;
public last_pcr_date: string;
public infant_feeding_method: string;
Expand Down Expand Up @@ -256,13 +256,18 @@ export class HivProgramSnapshotComponent implements OnInit {
}
}
if (this.isHEIActive) {
this.last_pcr_date = this.getLastPCRDate();
this.last_pcr_status = this.getLastPCRStatus();
this.infant_feeding_method = this.getInfantFeedingMethod();
this.age_of_ped_on_last_pcr = moment(this.last_pcr_date).diff(
moment(this.patientData.birth_date),
'months'
);
this.last_pcr_date = this.getLastPCRDate();
if (this.last_pcr_date === '') {
this.age_of_ped_on_last_pcr = '';
this.last_pcr_status = '';
} else {
this.last_pcr_status = this.getLastPCRStatus();
this.age_of_ped_on_last_pcr =
moment(this.last_pcr_date)
.diff(moment(this.patientData.birth_date), 'months')
.toString() + 'M';
}
}
});
}
Expand Down

0 comments on commit 513fe01

Please sign in to comment.