fixing tests.

This commit is contained in:
Jason Kulatunga 2023-03-17 23:21:16 -07:00
parent 41cea8601f
commit f76ef5e392
No known key found for this signature in database
3 changed files with 24 additions and 1 deletions

View File

@ -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>

View File

@ -1,6 +1,7 @@
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;
@ -8,6 +9,7 @@ describe('DocumentReferenceComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [NgbCollapseModule],
declarations: [ DocumentReferenceComponent ]
})
.compileComponents();

View File

@ -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', () => {
@ -18,6 +19,26 @@ describe('DocumentReferenceModel', () => {
// expected.docStatus: string | undefined
expected.type_coding = { system: 'http://loinc.org', code: '34108-1', display: 'Outpatient Note' }
// expected.classCoding: string | undefined
expected.category = new CodableConceptModel({
"coding": [
{
"system": "http://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://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://terminology.hl7.org/CodeSystem/v3-Confidentiality', code: 'V', display: 'very restricted' }
expected.context = {