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 43a699018..5ab7c7806 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 @@ -155,7 +155,16 @@

(onEncounterEdit)="onEncounterSelected($event)" >
Patient yet to see provider
- + +
+ You cannot fill a return visit form for a date earlier than the + initial visit! +
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 970036063..d25c67ddf 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 @@ -35,6 +35,7 @@ export class VisitDetailsComponent implements OnInit { public qualifiesForCovidScreening = false; public isViremicHighVL = false; public isRetrospectiveVisit = false; + public isAdultReturnVisitBeforeInitialVisit = false; public get visitEncounters(): any[] { const mappedEncounters: Encounter[] = new Array(); @@ -230,10 +231,18 @@ export class VisitDetailsComponent implements OnInit { if ( e.errors && e.errors.covidError && - e.errors.covidError != null + e.errors.covidError != null && + !this.isRetrospectiveVisit ) { this.qualifiesForCovidScreening = true; } + if ( + e.errors && + e.errors.isAdultReturnVisitBeforeInitialVisit != null && + this.isRetrospectiveVisit + ) { + this.isAdultReturnVisitBeforeInitialVisit = true; + } }); } // Check if their are allowed Viremia clinical encounters already capture in the allowed visits. @@ -249,7 +258,8 @@ export class VisitDetailsComponent implements OnInit { if ( Array.isArray(viremiaEncounterFilter) && - viremiaEncounterFilter.length === 0 + viremiaEncounterFilter.length === 0 && + !this.isRetrospectiveVisit ) { this.isViremicHighVL = true; }