fixing fhir-resource tests.

This commit is contained in:
Jason Kulatunga 2023-01-16 12:04:56 -08:00
parent 8cbfcbfd39
commit aa8289f30a
2 changed files with 10 additions and 4 deletions

View File

@ -1,7 +1,7 @@
<div class="card card-fhir-resource" >
<div class="card-header" (click)="isCollapsed = ! isCollapsed">
<div>
<h6 class="card-title">{{displayModel.title}}</h6>
<h6 class="card-title">{{displayModel?.title}}</h6>
<p class="card-text tx-gray-400" *ngIf="displayModel?.sort_date"><strong>Start date</strong> {{displayModel?.sort_date | date}}</p>
</div>
<fhir-ui-badge class="float-right" [status]="displayModel?.status">{{displayModel?.status}}</fhir-ui-badge>

View File

@ -36,10 +36,11 @@ describe('EncounterModel', () => {
expected.resource_status = 'finished'
expected.participant = [
{
display: undefined,
display: 'Dr Adam Careful',
reference: { reference: 'Practitioner/example', display: 'Dr Adam Careful' },
text: undefined,
periodStart: '2015-01-17T16:00:00+10:00'
periodStart: '2015-01-17T16:00:00+10:00',
role: undefined,
}
]
@ -56,7 +57,12 @@ describe('EncounterModel', () => {
expected.resource_class = 'ambulatory'
expected.resource_status = 'finished'
expected.participant = [
{ display: undefined, reference: Object({ reference: 'Practitioner/f201' }), text: undefined, periodStart: undefined }
{ display: undefined,
reference: Object({ reference: 'Practitioner/f201' }),
text: undefined,
periodStart: undefined,
role: undefined
}
]
expect(new EncounterModel(example3Fixture)).toEqual(expected);