From b6ab85ea3a62bea8d15f33bae279c4342a2bca51 Mon Sep 17 00:00:00 2001 From: Alfred Mutai <124869802+Alfred-Mutai@users.noreply.github.com> Date: Fri, 26 Jan 2024 16:48:56 +0300 Subject: [PATCH] POC-635 : Patient relationship bug (#1706) * Patient relationship bug * Patient relationship bug --- .../locator-pretty-viewer/locator-pretty-viewer.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/patient-dashboard/common/formentry/locator-pretty-viewer/locator-pretty-viewer.component.ts b/src/app/patient-dashboard/common/formentry/locator-pretty-viewer/locator-pretty-viewer.component.ts index ff1eaaf41..1e95dc6ea 100644 --- a/src/app/patient-dashboard/common/formentry/locator-pretty-viewer/locator-pretty-viewer.component.ts +++ b/src/app/patient-dashboard/common/formentry/locator-pretty-viewer/locator-pretty-viewer.component.ts @@ -31,7 +31,6 @@ export class LocatorPrettyViewerComponent implements OnInit { } } this.mappedAttributes = this.generateMappings(this.data); - console.log('mappedAttributes', this.mappedAttributes); } generateMappings(data: any) { @@ -46,7 +45,9 @@ export class LocatorPrettyViewerComponent implements OnInit { for (const item of data[type]) { if (type === 'obs' && item.concept.name.display) { mappings[type][item.concept.name.display] = - item.value.display || item.value; + item.value && item.value.display + ? item.value.display + : item.value || null; } else if (type === 'attributes' && item.display) { const parts = item.display.split('='); if (parts.length === 2) {