Skip to content

Commit

Permalink
Merge branch 'master' into POC-538
Browse files Browse the repository at this point in the history
  • Loading branch information
sainingo authored Oct 2, 2023
2 parents dd5c7ce + ba6a7d3 commit b21d992
Show file tree
Hide file tree
Showing 9 changed files with 244 additions and 24 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-amrs",
"version": "2.17.0",
"version": "2.17.1",
"scripts": {
"ng": "ng",
"start": "ng serve --host 0.0.0.0 --port 3000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ export class DefaulterListComponent implements OnInit {
field: 'ovcid_id',
width: 150
},
{
headerName: 'Outreach Follow-up',
width: 150,
field: 'outreach_follow_up'
},
{
headerName: 'Latest VL',
width: 75,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ <h3 *ngIf="confirmingCancelVisit || confirmingEndVisit">
<strong
>Oops! You cannot schedule an Adult return visit for a date that comes
before the initial visit</strong
*ngIf="isViremicHighVL"
style="margin-top: 10px"
>
<strong
>To access clinical forms kindly fill Enhanced Adherence Encounter
Form</strong
>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class VisitDetailsComponent implements OnInit {
public retrospectiveAttributeTypeUuid =
'3bb41949-6596-4ff9-a54f-d3d7883a69ed';
public qualifiesForCovidScreening = false;
public isViremicHighVL = false;
public isRetrospectiveVisit = false;
public isAdultReturnVisitBeforeInitialVisit = false;

Expand Down Expand Up @@ -243,6 +244,23 @@ export class VisitDetailsComponent implements OnInit {
}
});
}
// Check if their are allowed Viremia clinical encounters already capture in the allowed visits.
const viremiaEncounterFilter = visitType.encounterTypes.allowedEncounters.filter(
(encounterType) => {
return [
'8d5b2be0-c2cc-11de-8d13-0010c6dffd0f',
'4e7553b4-373d-452f-bc89-3f4ad9a01ce7',
'8d5b3108-c2cc-11de-8d13-0010c6dffd0f'
].includes(encounterType.uuid);
}
);

if (
Array.isArray(viremiaEncounterFilter) &&
viremiaEncounterFilter.length === 0
) {
this.isViremicHighVL = true;
}

if (
visitType &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,41 @@
Current weight (kg):
{{ hivSummary?.weight !== null ? hivSummary?.weight : 'NONE' }}
</li>
<li class="list-group-item" style="font-size: large">
Last PCR status: {{ lastPCRStatus }}
<li
*ngIf="hivSummary?.hiv_dna_pcr_1"
class="list-group-item"
style="font-size: large"
>
PCR 1
<div>Age PCR Done: {{ pcrSnapShop?.hiv_dna_pcr_1_at }}M</div>
<div>PCR Results: {{ pcrSnapShop?.hiv_dna_pcr_1 }}</div>
<div>
Date Done: {{ hivSummary?.hiv_dna_pcr_1_date | date: 'dd-MM-yyyy' }}
</div>
</li>
<li class="list-group-item" style="font-size: large">
Last PCR Date: {{ lastPCRDate | date: 'dd-MM-yyyy' }}
<li
*ngIf="hivSummary?.hiv_dna_pcr_2"
class="list-group-item"
style="font-size: large"
>
PCR 2
<div>Age PCR Done: {{ pcrSnapShop?.hiv_dna_pcr_2_at }}M</div>
<div>PCR Results: {{ pcrSnapShop?.hiv_dna_pcr_2 }}</div>
<div>
Date Done: {{ hivSummary?.hiv_dna_pcr_2_date | date: 'dd-MM-yyyy' }}
</div>
</li>
<li
*ngIf="hivSummary?.hiv_dna_pcr_3"
class="list-group-item"
style="font-size: large"
>
PCR 3
<div>Age PCR Done: {{ pcrSnapShop?.hiv_dna_pcr_3_at }}M</div>
<div>PCR Results: {{ pcrSnapShop?.hiv_dna_pcr_3 }}</div>
<div>
Date Done: {{ hivSummary?.hiv_dna_pcr_3_date | date: 'dd-MM-yyyy' }}
</div>
</li>
<li class="list-group-item" style="font-size: large">
Current ART Prophylaxis: {{ hivSummary?.cur_arv_meds }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ export class HivSummaryLatestComponent implements OnInit, OnDestroy {
public infantFeedingMethod: string;
public heiOutCome: string;
public pcpProphylaxis: string;
public pcrSnapShop = {
hiv_dna_pcr_1: null,
hiv_dna_pcr_1_at: null,
hiv_dna_pcr_2: null,
hiv_dna_pcr_2_at: null,
hiv_dna_pcr_3: null,
hiv_dna_pcr_3_at: null
};

constructor(
private hivSummaryService: HivSummaryService,
Expand Down Expand Up @@ -243,6 +251,7 @@ export class HivSummaryLatestComponent implements OnInit, OnDestroy {
this.infantFeedingMethod = this.getInfantFeedingMethod();
this.heiOutCome = this.getHEIOutcome();
this.pcpProphylaxis = this.getPCPprophylaxis();
this.getHEIPCRSnapshot();
}
}
this.getPatientEligibility(this.hivSummary);
Expand Down Expand Up @@ -469,4 +478,50 @@ export class HivSummaryLatestComponent implements OnInit, OnDestroy {
}
return 'NONE';
}

private pcr_status_helper(pcr_status: number): string {
if (pcr_status === 664) {
return 'NEGATIVE';
} else if (pcr_status === 703) {
return 'POSITIVE';
} else if (pcr_status === 1118) {
return 'NOT DONE';
} else if (pcr_status === 1138) {
return 'INDETERMINATE';
} else if (pcr_status === 1304) {
return 'POOR SAMPLE QUALITY';
} else {
return 'NONE';
}
}

private calculate_age_by_pcr_date(pcr_date: string): number {
const age = Moment(pcr_date).diff(
Moment(this.hivSummary.birth_date),
'months'
);
return age;
}

public getHEIPCRSnapshot(): void {
this.pcrSnapShop.hiv_dna_pcr_1 = this.pcr_status_helper(
this.hivSummary.hiv_dna_pcr_1
);
this.pcrSnapShop.hiv_dna_pcr_2 = this.pcr_status_helper(
this.hivSummary.hiv_dna_pcr_2
);
this.pcrSnapShop.hiv_dna_pcr_3 = this.pcr_status_helper(
this.hivSummary.hiv_dna_pcr_3
);

this.pcrSnapShop.hiv_dna_pcr_1_at = this.calculate_age_by_pcr_date(
this.hivSummary.hiv_dna_pcr_1_date
);
this.pcrSnapShop.hiv_dna_pcr_2_at = this.calculate_age_by_pcr_date(
this.hivSummary.hiv_dna_pcr_2_date
);
this.pcrSnapShop.hiv_dna_pcr_3_at = this.calculate_age_by_pcr_date(
this.hivSummary.hiv_dna_pcr_3_date
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,24 +93,12 @@ <h4 class="component-title">Last Encounter</h4>
</div>
<div class="snapshot-body">
<div class="col-md-12">
<div
[ngClass]="
isHEIActive === true
? 'col-md-12 col-xs-12'
: 'col-md-6 col-xs-12'
"
>
<div class="col-md-6 col-xs-12">
<p>
Date: {{ patientData?.encounter_datetime | date: 'dd-MM-yyyy' }}
</p>
</div>
<div
[ngClass]="
isHEIActive === true
? 'col-md-12 col-xs-12'
: 'col-md-6 col-xs-12'
"
>
<div class="col-md-6 col-xs-12">
<p>
Type:
{{
Expand All @@ -125,8 +113,11 @@ <h4 class="component-title">Last Encounter</h4>
<div class="col-md-6 col-xs-12">
<p>ARV Regimen: {{ patientData?.cur_arv_meds }}</p>
</div>
<div class="col-md-6 col-xs-12" *ngIf="!isHEIActive">
<p [ngClass]="{ 'text-bold red': isVirallyUnsuppressed }">
<div class="col-md-6 col-xs-12">
<p
*ngIf="!isHEIActive"
[ngClass]="{ 'text-bold red': isVirallyUnsuppressed }"
>
Last Viral Load: {{ patientData?.latest_vl | zeroVl }}
<ng-container *ngIf="patientData.latest_vl !== undefined">
(<span>{{
Expand All @@ -135,6 +126,12 @@ <h4 class="component-title">Last Encounter</h4>
>)
</ng-container>
</p>
<p
*ngIf="isHEIActive"
[ngClass]="{ 'text-bold red': isVirallyUnsuppressed }"
>
Age PCR Done: {{ age_of_ped_on_last_pcr }}M
</p>
<p>
<i
style="font-size: smaller"
Expand All @@ -158,7 +155,12 @@ <h4 class="component-title">Last Encounter</h4>
</div>
<div class="col-md-12">
<div class="col-md-6 col-xs-12">
<p>RTC Date: {{ patientData?.rtc_date | date: 'dd-MM-yyyy' }}</p>
<p *ngIf="!isHEIActive">
RTC Date: {{ patientData?.rtc_date | date: 'dd-MM-yyyy' }}
</p>
<p *ngIf="isHEIActive">
Infant Feeding Method: {{ infant_feeding_method }}
</p>

<p *ngIf="!isHEIActive">
Disclosure Status:
Expand Down Expand Up @@ -211,6 +213,14 @@ <h4 class="component-title">Last Encounter</h4>
</p>
</div>
</div>
<div *ngIf="isHEIActive" class="col-md-6 col-xs-12">
<p>
PCR Results:
<span style="text-transform: capitalize">
{{ 'NEGATIVE' }}
</span>
</p>
</div>
<div
class="col-md-6 col-xs-12"
*ngIf="showCareStatus && !isHEIActive"
Expand Down Expand Up @@ -303,6 +313,14 @@ <h4 class="component-title">Last Encounter</h4>
</div>
</div>
</div>
<div *ngIf="isHEIActive" class="col-md-12">
<div class="col-md-6 col-xs-12">
<p>RTC Date: {{ patientData?.rtc_date | date: 'dd-MM-yyyy' }}</p>
</div>
<div class="col-md-6 col-xs-12">
<p>Date of PCR: {{ last_pcr_date | date: 'dd-MM-yyyy' }}</p>
</div>
</div>
<div class="clear"></div>
</div>
</div>
Expand Down
Loading

0 comments on commit b21d992

Please sign in to comment.