Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ac-fhir-models

Package Overview
Dependencies
Maintainers
0
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ac-fhir-models - npm Package Compare versions

Comparing version 7.9.1 to 7.10.0-rc.0

2

package.json
{
"name": "ac-fhir-models",
"version": "7.9.1",
"version": "7.10.0-rc.0",
"author": "Henrik Joreteg <henrik@anesthesiacharting.com>",

@@ -5,0 +5,0 @@ "dependencies": {

@@ -6,2 +6,3 @@ // @ts-check

import {
getCodeableConceptProp,
getContainedObjectProp,

@@ -38,2 +39,4 @@ getDirectReferenceProp,

const nsGeneratedCategory = 'https://ns.anesthesiacharting.com/generated'
const compositionFields = {

@@ -49,2 +52,5 @@ resourceType: 'str',

'type.coding.[].display': 'str',
'category.[].coding.[].system': 'str',
'category.[].coding.[].code': 'str',
'category.[].coding.[].display': 'str',
date: 'str',

@@ -189,2 +195,10 @@ 'contained.[].resourceType': 'str',

lastUpdated: 'meta.lastUpdated',
generatedCategory: getCodeableConceptProp({
propName: 'category',
codingSystem: nsGeneratedCategory,
options: {
hhxMerge: 'From merging two health histories',
hhxCaseExtract: 'Extracted from a case',
},
}),
},

@@ -191,0 +205,0 @@ definition: buildDefinition(compositionFields, fhirFieldTypes),

@@ -48,2 +48,54 @@ // @ts-check

t.test('generated categories', t => {
const composition = hhxDefinition.set(
{
category: [{ coding: [{ system: 'https://loinc.org', code: 'foo' }] }],
},
{ generatedCategory: 'hhxMerge' }
)
t.deepEqual(composition.category, [
{ coding: [{ system: 'https://loinc.org', code: 'foo' }] },
{
coding: [
{
system: 'https://ns.anesthesiacharting.com/generated',
code: 'hhxMerge',
display: 'From merging two health histories',
},
],
},
])
t.equal(hhxDefinition.getValues(composition).generatedCategory, 'hhxMerge')
const composition2 = hhxDefinition.set(composition, {
generatedCategory: 'hhxCaseExtract',
})
t.deepEqual(composition2.category, [
{ coding: [{ system: 'https://loinc.org', code: 'foo' }] },
{
coding: [
{
system: 'https://ns.anesthesiacharting.com/generated',
code: 'hhxCaseExtract',
display: 'Extracted from a case',
},
],
},
])
t.equal(
hhxDefinition.getValues(composition2).generatedCategory,
'hhxCaseExtract'
)
const composition3 = hhxDefinition.set(composition2, {
generatedCategory: null,
})
t.deepEqual(composition3.category, [
{ coding: [{ system: 'https://loinc.org', code: 'foo' }] },
])
t.notOk(hhxDefinition.getValues(composition3).generatedCategory)
t.end()
})
t.end()

@@ -50,0 +102,0 @@ })

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc