ac-fhir-models
Advanced tools
Comparing version 7.7.3-rc.0 to 7.7.3-rc.2
{ | ||
"name": "ac-fhir-models", | ||
"version": "7.7.3-rc.0", | ||
"version": "7.7.3-rc.2", | ||
"author": "Henrik Joreteg <henrik@anesthesiacharting.com>", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -337,7 +337,11 @@ // @ts-check | ||
}, | ||
text: 'No known allergy', | ||
text: { status: 'generated', div: 'No known allergy' }, | ||
emptyReason: { | ||
system: 'http://snomed.info/sct', | ||
code: '716186003', | ||
display: 'No known allergy', | ||
coding: [ | ||
{ | ||
system: 'http://snomed.info/sct', | ||
code: '716186003', | ||
display: 'No known allergy', | ||
}, | ||
], | ||
}, | ||
@@ -364,7 +368,11 @@ } | ||
}, | ||
text: 'Patient not on medication', | ||
text: { status: 'generated', div: 'Patient not on medication' }, | ||
emptyReason: { | ||
system: 'http://snomed.info/sct', | ||
code: '242571000000102', | ||
display: 'Patient not on medication', | ||
coding: [ | ||
{ | ||
system: 'http://snomed.info/sct', | ||
code: '242571000000102', | ||
display: 'Patient not on medication', | ||
}, | ||
], | ||
}, | ||
@@ -371,0 +379,0 @@ } |
@@ -57,2 +57,7 @@ // @ts-check | ||
'section.[].title': 'str', | ||
'section.[].emptyReason.coding.[].system': 'str', | ||
'section.[].emptyReason.coding.[].code': 'str', | ||
'section.[].emptyReason.coding.[].display': 'str', | ||
'section.[].text.status': 'str', | ||
'section.[].text.div': 'str', | ||
'section.[].entry.[].reference': 'str', | ||
@@ -173,4 +178,5 @@ 'section.[].entry.[].extension.[].url': 'str', | ||
existing.emptyReason && | ||
existing.emptyReason.system === allowEmpty.reasonCoding.system && | ||
existing.emptyReason.code === allowEmpty.reasonCoding.code | ||
existing.emptyReason.coding[0].system === | ||
allowEmpty.reasonCoding.system && | ||
existing.emptyReason.coding[0].code === allowEmpty.reasonCoding.code | ||
) { | ||
@@ -203,5 +209,9 @@ return allowEmpty.value | ||
if (allowEmpty && entryReferences === allowEmpty.value) { | ||
sectionUpdates.emptyReason = allowEmpty.reasonCoding | ||
sectionUpdates.emptyReason = { coding: [allowEmpty.reasonCoding] } | ||
// FHIR requires the section to have a text or entries so we need something to put here | ||
sectionUpdates.text = allowEmpty.reasonCoding.display | ||
// for when we have no entries. This is a Narrative element and these fields are required. | ||
sectionUpdates.text = { | ||
status: 'generated', | ||
div: allowEmpty.reasonCoding.display, | ||
} | ||
@@ -208,0 +218,0 @@ // NOTE!: we do NOT clear the entries here automatically if the existing section has some |
Sorry, the diff of this file is too big to display
221469
7597