From 1f331d8853681a18f9be2e7acb8458dd5ca2a94e Mon Sep 17 00:00:00 2001 From: OhHeyAlan Date: Fri, 4 Aug 2023 00:17:30 -0500 Subject: [PATCH] Update list-medication.component.ts --- .../list-medication.component.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/components/list-generic-resource/list-medication.component.ts b/frontend/src/app/components/list-generic-resource/list-medication.component.ts index 043ac2fc..479e83cf 100644 --- a/frontend/src/app/components/list-generic-resource/list-medication.component.ts +++ b/frontend/src/app/components/list-generic-resource/list-medication.component.ts @@ -6,10 +6,15 @@ import {GenericColumnDefn, ListGenericResourceComponent} from './list-generic-re templateUrl: './list-generic-resource.component.html', styleUrls: ['./list-generic-resource.component.scss'] }) -export class ListMedicationComponent extends ListGenericResourceComponent { +export class ListMedicationRequestComponent extends ListGenericResourceComponent { columnDefinitions: GenericColumnDefn[] = [ - { title: 'Medication', versions: '*', format: 'code', getter: c => c.medicationCodeableConcept.coding[0] }, - { title: 'Date Prescribed', versions: '*', format: 'date', getter: c => c.authoredOn }, - { title: 'Status', 'versions': '*', getter: c => c.status } + // { title: 'Medication', versions: '*', format: 'code', getter: m => m.medicationCodeableConcept?.coding[0] }, + { title: 'Author Date', versions: '*', format: 'date', getter: m => m.authoredOn }, + { title: 'Medication', versions: '*', getter: m => m.medicationCodeableConcept.coding[0].display }, //remove drug code + { title: 'Dosage Timing', versions: '*', format: 'period', getter: m => m.dosageInstruction[0]?.timing.repeat.boundsPeriod}, + // Not used { title: 'Dosage Date', versions: '*', format: 'date', getter: m => m.dosageInstruction[0]?.timing.event}, + { title: 'Route', versions: '*', format: 'code', getter: m => m.dosageInstruction[0]?.route.coding[0] }, + { title: 'Do Not Perform', versions: '*', getter: m => m.doNotPerform}, + { title: 'Reason', versions: '*', format: 'code', getter: m => m.reasonCode[0]?.coding[0] }, ] }