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.10.0 to 7.11.0-rc.0

2

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

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

@@ -9,3 +9,3 @@ // @ts-check

import {
compositionDefinition,
arDefinition,
healthHistoryPatientAnswersDefinition,

@@ -110,3 +110,3 @@ hhxDefinition,

modelType: 'AnesthesiaRecord',
modelDefinition: compositionDefinition,
modelDefinition: arDefinition,
},

@@ -113,0 +113,0 @@ '35089-2': {

@@ -15,3 +15,3 @@ // @ts-check

patientCommentDefinition,
compositionDefinition,
arDefinition,
hhxDefinition,

@@ -42,3 +42,3 @@ healthHistoryPatientAnswersDefinition,

['PatientComment', patientCommentDefinition, {}],
['AnesthesiaRecord', compositionDefinition, {}],
['AnesthesiaRecord', arDefinition, {}],
['HealthHistory', hhxDefinition, {}],

@@ -45,0 +45,0 @@ ['HealthHistoryPatientAnswers', healthHistoryPatientAnswersDefinition, {}],

@@ -146,2 +146,4 @@ // @ts-check

/** @deprecated Use arDefinition instead */
/** @type {import('../helpers/fhir-model').FHIRModelDefinition} */
export const compositionDefinition = createFHIRModelDefinition({

@@ -180,2 +182,4 @@ resourceType: 'Composition',

export const arDefinition = compositionDefinition
export const hhxDefinition = createFHIRModelDefinition({

@@ -182,0 +186,0 @@ resourceType: 'Composition',

// @ts-check
import test from 'tape'
import { compositionDefinition, hhxDefinition } from './composition'
import { arDefinition, hhxDefinition } from './composition'

@@ -103,4 +103,4 @@ test('hhxDefinition', t => {

test('compositionDefinition', t => {
const composition = compositionDefinition.create({
test('arDefinition', t => {
const composition = arDefinition.create({
title: 'Anesthesia Case',

@@ -134,3 +134,3 @@ caseData: { something: 'random' },

)
t.deepEqual(compositionDefinition.getValues(composition).caseData, {
t.deepEqual(arDefinition.getValues(composition).caseData, {
something: 'random',

@@ -141,4 +141,4 @@ })

test('compositionDefinition props', t => {
const composition = compositionDefinition.create({
test('arDefinition props', t => {
const composition = arDefinition.create({
title: 'Anesthesia Case',

@@ -184,3 +184,3 @@ patientId: 'blah',

)
const values = compositionDefinition.getValues(composition)
const values = arDefinition.getValues(composition)
t.deepEqual(values.patientId, 'blah')

@@ -192,5 +192,5 @@ t.deepEqual(values.title, 'Anesthesia Case')

test('compositionDefinition supports unicode in caseData', t => {
test('arDefinition supports unicode in caseData', t => {
const string = '✓ hurray!'
const composition = compositionDefinition.create({
const composition = arDefinition.create({
caseData: {

@@ -201,26 +201,23 @@ something: string,

t.deepEqual(
compositionDefinition.getValues(composition).caseData.something,
string
)
t.deepEqual(arDefinition.getValues(composition).caseData.something, string)
t.end()
})
test('compositionDefinition get/set authorId', t => {
test('arDefinition get/set authorId', t => {
const id = 'someone'
const composition = compositionDefinition.create({
const composition = arDefinition.create({
authorId: id,
})
t.equal(compositionDefinition.getValues(composition).authorId, id)
t.equal(arDefinition.getValues(composition).authorId, id)
const composition2 = compositionDefinition.set(composition, {
const composition2 = arDefinition.set(composition, {
authorId: 'blah',
})
t.equal(compositionDefinition.getValues(composition2).authorId, 'blah')
t.equal(arDefinition.getValues(composition2).authorId, 'blah')
t.end()
})
test('compositionDefinition status', t => {
test('arDefinition status', t => {
t.throws(() => {
compositionDefinition.create({
arDefinition.create({
status: 'invalid status',

@@ -231,3 +228,3 @@ })

t.deepEqual(
compositionDefinition.create({
arDefinition.create({
status: 'preliminary',

@@ -255,3 +252,3 @@ }),

const input = 'O₂'
const thing = compositionDefinition.create({
const thing = arDefinition.create({
caseData: {

@@ -261,3 +258,3 @@ something: input,

})
const output = compositionDefinition.getValues(thing).caseData.something
const output = arDefinition.getValues(thing).caseData.something

@@ -289,4 +286,4 @@ t.deepEqual(input, output, 'input and output is the same')

t.equal(caseData.a.length, size, 'prop has right length')
const obj = compositionDefinition.set({}, { caseData })
const out = compositionDefinition.getValues(obj).caseData
const obj = arDefinition.set({}, { caseData })
const out = arDefinition.getValues(obj).caseData
t.equal(out.a.length, size, 'out prop has right length')

@@ -293,0 +290,0 @@ t.deepEqual(caseData, out, 'objects are the same')

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