ac-fhir-models
Advanced tools
Comparing version 7.8.0-rc.3 to 7.8.0-rc.4
{ | ||
"name": "ac-fhir-models", | ||
"version": "7.8.0-rc.3", | ||
"version": "7.8.0-rc.4", | ||
"author": "Henrik Joreteg <henrik@anesthesiacharting.com>", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -602,3 +602,3 @@ // @ts-check | ||
date: 'date', | ||
caseData: getContainedObjectProp('hhxData'), | ||
caseData: getContainedObjectProp('caseData'), | ||
}, | ||
@@ -605,0 +605,0 @@ definition: buildDefinition(compositionFields, fhirFieldTypes), |
// @ts-check | ||
import test from 'tape' | ||
import { compositionDefinition } from './composition' | ||
import { compositionDefinition, hhxDefinition } from './composition' | ||
test('hhxDefinition', t => { | ||
const composition = hhxDefinition.create({ | ||
caseData: { something: 'random' }, | ||
}) | ||
t.deepEqual( | ||
composition, | ||
{ | ||
resourceType: 'Composition', | ||
title: 'Health History', | ||
type: { | ||
coding: [ | ||
{ | ||
system: 'http://loinc.org', | ||
code: '35089-2', | ||
display: 'History and Physical Panel', | ||
}, | ||
], | ||
}, | ||
contained: [ | ||
{ | ||
resourceType: 'Binary', | ||
id: 'caseData', | ||
contentType: 'application/json', | ||
data: 'ewAiAHMAbwBtAGUAdABoAGkAbgBnACIAOgAiAHIAYQBuAGQAbwBtACIAfQA=', | ||
}, | ||
], | ||
}, | ||
'should produce a composition resource with a contained binary' | ||
) | ||
t.deepEqual(hhxDefinition.getValues(composition).caseData, { | ||
something: 'random', | ||
}) | ||
t.end() | ||
}) | ||
test('compositionDefinition', t => { | ||
@@ -6,0 +41,0 @@ const composition = compositionDefinition.create({ |
Sorry, the diff of this file is too big to display
237250
8095