From 7d0715755051d591bc94e873a75f43d3da4ba921 Mon Sep 17 00:00:00 2001 From: David Radcliffe Date: Tue, 13 Aug 2024 03:06:39 -0400 Subject: [PATCH] cleanup source detail page (#500) - hide image if there is no brand - show complete address - use the source id instead of endpoint_id in breadcrumbs Co-authored-by: Jason Kulatunga --- .../pages/source-detail/source-detail.component.html | 11 ++++++----- .../pages/source-detail/source-detail.component.ts | 7 ++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/pages/source-detail/source-detail.component.html b/frontend/src/app/pages/source-detail/source-detail.component.html index aa01aafa..6d60514e 100644 --- a/frontend/src/app/pages/source-detail/source-detail.component.html +++ b/frontend/src/app/pages/source-detail/source-detail.component.html @@ -4,10 +4,9 @@
-
+
- {{selectedSource?.endpoint_id}} @@ -30,12 +29,14 @@
{{getPatientDOB()}}
Age:
{{getPatientAge()}} Years Old
-
Email
+
Email:
{{getPatientEmail()}}
Phone:
{{getPatientPhone()}}
Address:
-
{{getPatientAddress()}}
+
+
{{line}}
+
ID:
{{selectedPatient?.source_resource_id}}
MRN:
@@ -51,7 +52,7 @@
Sources - {{selectedSource?.endpoint_id}} + {{selectedSource?.id}} Details
diff --git a/frontend/src/app/pages/source-detail/source-detail.component.ts b/frontend/src/app/pages/source-detail/source-detail.component.ts index e59934cb..2cf17edd 100644 --- a/frontend/src/app/pages/source-detail/source-detail.component.ts +++ b/frontend/src/app/pages/source-detail/source-detail.component.ts @@ -47,6 +47,10 @@ export class SourceDetailComponent implements OnInit { this.selectedTotalElements = this.resourceTypeCounts[resourceType] } + isExternal(){ + return this.selectedSource?.brand_id != '00000000-0000-0000-0000-000000000000'; + } + //functions to call on patient getPatientName(){ // @ts-ignore @@ -88,7 +92,8 @@ export class SourceDetailComponent implements OnInit { const line = getPath(this.selectedPatient?.resource_raw, 'address.0.line') const city = getPath(this.selectedPatient?.resource_raw, 'address.0.city') const state = getPath(this.selectedPatient?.resource_raw, 'address.0.state') - return `${line}, ${city}, ${state}` + const zip = getPath(this.selectedPatient?.resource_raw, 'address.0.postalCode') + return [`${line}`, `${city}, ${state} ${zip}`] } }