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) {