Skip to content

Commit

Permalink
fixing fhir-resource tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Jan 16, 2023
1 parent 8cbfcbf commit aa8289f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
12 changes: 9 additions & 3 deletions frontend/src/lib/models/resources/encounter-model.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
]

Expand All @@ -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);
Expand Down

0 comments on commit aa8289f

Please sign in to comment.