fixing fhir test.

This commit is contained in:
Jason Kulatunga 2022-09-26 19:52:55 -07:00
parent 631bb9bdcd
commit e7701be572
1 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,6 @@
import {Component} from '@angular/core';
import {GenericColumnDefn, ListGenericResourceComponent} from './list-generic-resource.component';
import {attributeXTime} from './utils';
import {getPath} from '../../fhir/utils';
@Component({
selector: 'app-list-care-plan',
@ -13,8 +12,8 @@ export class ListCarePlanComponent extends ListGenericResourceComponent {
{ title: 'Category', versions: '*', format: 'code', getter: c => c.category[0].coding[0] },
{ title: 'Reason', versions: '*', getter: c => {
return (c.activity || []).map((a, i) => {
let reason = getPath(a, "detail.code.coding.0.display") || ""
return reason ? [reason, getPath(a, "detail.status") || "no data"] : []
let reason = a.detail?.code?.coding[0]?.display || ""
return reason ? [reason, a.detail?.status || "no data"] : []
})
} },
{ title: 'Period', versions: '*', format: 'period', getter: c => c.period },