diff --git a/package-lock.json b/package-lock.json
index 0b683431e..f5d2e1c78 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "ngx-amrs",
- "version": "2.16.5-SNAPSHOT",
+ "version": "2.17.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ngx-amrs",
- "version": "2.16.5-SNAPSHOT",
+ "version": "2.17.1",
"dependencies": {
"@ampath-kenya/ngx-openmrs-formentry": "2.12.23",
"@angular/animations": "^6.1.0",
diff --git a/package.json b/package.json
index 84c18ba32..dd1b7ba4a 100644
--- a/package.json
+++ b/package.json
@@ -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",
diff --git a/src/app/patient-dashboard/common/visit/visit-details/visit-details.component.html b/src/app/patient-dashboard/common/visit/visit-details/visit-details.component.html
index 0ab13d8c5..2fd834a8e 100644
--- a/src/app/patient-dashboard/common/visit/visit-details/visit-details.component.html
+++ b/src/app/patient-dashboard/common/visit/visit-details/visit-details.component.html
@@ -164,6 +164,16 @@
>To access clinical forms kindly fill Covid 19 Assessment Form
+
+ To access clinical forms kindly fill Enhanced Adherence Encounter
+ Form
+
diff --git a/src/app/patient-dashboard/common/visit/visit-details/visit-details.component.ts b/src/app/patient-dashboard/common/visit/visit-details/visit-details.component.ts
index 84b65c165..970036063 100644
--- a/src/app/patient-dashboard/common/visit/visit-details/visit-details.component.ts
+++ b/src/app/patient-dashboard/common/visit/visit-details/visit-details.component.ts
@@ -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 get visitEncounters(): any[] {
@@ -226,11 +227,32 @@ export class VisitDetailsComponent implements OnInit {
Array.isArray(visitType.encounterTypes.disallowedEncounters)
) {
visitType.encounterTypes.disallowedEncounters.forEach((e) => {
- if (e.errors && e.errors.covidError != null) {
+ if (
+ e.errors &&
+ e.errors.covidError &&
+ e.errors.covidError != null
+ ) {
this.qualifiesForCovidScreening = true;
}
});
}
+ // 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 &&