Skip to content

Commit

Permalink
fixing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Mar 18, 2023
1 parent 41cea86 commit f76ef5e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<fhir-markdown [displayModel]="displayModel"></fhir-markdown>
</ng-template>
<ng-template #showHighlight>
<pre><code [languages]="['json', 'xml']" [highlight]="displayModel | json"></code></pre>
<pre><code [languages]="['json', 'xml']" [highlight]="displayModel.content"></code></pre>
</ng-template>
<ng-template #showText>
<fhir-binary-text [displayModel]="displayModel"></fhir-binary-text>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { DocumentReferenceComponent } from './document-reference.component';
import {NgbCollapseModule} from '@ng-bootstrap/ng-bootstrap';

describe('DocumentReferenceComponent', () => {
let component: DocumentReferenceComponent;
let fixture: ComponentFixture<DocumentReferenceComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [NgbCollapseModule],
declarations: [ DocumentReferenceComponent ]
})
.compileComponents();
Expand Down
21 changes: 21 additions & 0 deletions frontend/src/lib/models/resources/document-reference-model.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { DocumentReferenceModel } from './document-reference-model';
import {AdverseEventModel} from './adverse-event-model';
import {CodableConceptModel} from '../datatypes/codable-concept-model';
import * as example1Fixture from "../../fixtures/r4/resources/documentReference/example1.json"
import {BinaryModel} from './binary-model';


describe('DocumentReferenceModel', () => {
Expand All @@ -18,6 +19,26 @@ describe('DocumentReferenceModel', () => {
// expected.docStatus: string | undefined
expected.type_coding = { system: 'http:https://loinc.org', code: '34108-1', display: 'Outpatient Note' }
// expected.classCoding: string | undefined
expected.category = new CodableConceptModel({
"coding": [
{
"system": "http:https://ihe.net/xds/connectathon/classCodes",
"code": "History and Physical",
"display": "History and Physical"
}
]
})
expected.content = [
new BinaryModel({
"contentType": "application/hl7-v3+xml",
"language": "en-US",
"url": "http:https://example.org/xds/mhd/Binary/07a6483f-732b-461e-86b6-edb665c45510",
"size": 3654,
"hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk=",
"title": "Physical",
"creation": "2005-12-24T09:35:00+11:00"
})
]
expected.created_at = '2005-12-24T09:43:41+11:00'
expected.security_label_coding = { system: 'http:https://terminology.hl7.org/CodeSystem/v3-Confidentiality', code: 'V', display: 'very restricted' }
expected.context = {
Expand Down

0 comments on commit f76ef5e

Please sign in to comment.