ac-fhir-models
Advanced tools
Comparing version 5.2.2 to 5.3.0
@@ -794,2 +794,3 @@ 'use strict'; | ||
}), | ||
visionId: getIdentifierProp('https://ns.anesthesiacharting.com/vision-id'), | ||
...getSharedProps(), | ||
@@ -802,2 +803,5 @@ }, | ||
orgId: 'str', | ||
'identifier.[].use': 'str', | ||
'identifier.[].system': 'str', | ||
'identifier.[].value': 'str', | ||
'name.[].family': 'str', | ||
@@ -804,0 +808,0 @@ 'name.[].given.[]': 'str', |
{ | ||
"name": "ac-fhir-models", | ||
"version": "5.2.2", | ||
"version": "5.3.0", | ||
"author": "Henrik Joreteg <henrik@anesthesiacharting.com>", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -33,2 +33,3 @@ // @ts-check | ||
}), | ||
visionId: getIdentifierProp('https://ns.anesthesiacharting.com/vision-id'), | ||
...getSharedProps(), | ||
@@ -41,2 +42,5 @@ }, | ||
orgId: 'str', | ||
'identifier.[].use': 'str', | ||
'identifier.[].system': 'str', | ||
'identifier.[].value': 'str', | ||
'name.[].family': 'str', | ||
@@ -43,0 +47,0 @@ 'name.[].given.[]': 'str', |
@@ -167,2 +167,3 @@ import test from 'tape' | ||
mobile: '+15095215113', | ||
visionId: 'SOME_ID', | ||
}) | ||
@@ -173,2 +174,9 @@ t.deepEqual( | ||
resourceType: 'Patient', | ||
identifier: [ | ||
{ | ||
use: 'usual', | ||
system: 'https://ns.anesthesiacharting.com/vision-id', | ||
value: 'SOME_ID', | ||
}, | ||
], | ||
name: [ | ||
@@ -186,5 +194,27 @@ { given: ['Henrik'], family: 'Joreteg' }, | ||
t.deepEqual( | ||
patientDefinition.set(patientResource, { visionId: null }), | ||
{ | ||
resourceType: 'Patient', | ||
name: [ | ||
{ given: ['Henrik'], family: 'Joreteg' }, | ||
{ use: 'nickname', text: 'Ingy' }, | ||
], | ||
telecom: [ | ||
{ system: 'email', value: 'henrik@joreteg.com' }, | ||
{ system: 'sms', value: '+15095215113' }, | ||
], | ||
}, | ||
'handles setting visionId to null' | ||
) | ||
t.deepEqual( | ||
patientDefinition.set(patientResource, { nickname: 'Bob' }), | ||
{ | ||
resourceType: 'Patient', | ||
identifier: [ | ||
{ | ||
use: 'usual', | ||
system: 'https://ns.anesthesiacharting.com/vision-id', | ||
value: 'SOME_ID', | ||
}, | ||
], | ||
name: [ | ||
@@ -201,2 +231,3 @@ { given: ['Henrik'], family: 'Joreteg' }, | ||
) | ||
t.end() | ||
@@ -203,0 +234,0 @@ }) |
100406
3478