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

@arkhn/fhir.ts

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arkhn/fhir.ts - npm Package Compare versions

Comparing version 3.4.0 to 3.4.1

tests/fixtures/patient-animal.json

13

lib/definition.js

@@ -79,2 +79,10 @@ "use strict";

var current = attributes[0], rest = attributes.slice(1);
// If previous has several types but choices are not constrained, we spread them
// to fill choices.
// In case we reached the end of the attributes, make sure we spread the types if needed.
if (previous &&
!(current && exports.isChoiceOf(current, previous.definition)) &&
previous.path.endsWith('[x]') &&
previous.choices.length === 0)
previous.spreadTypes();
// if the list of snapshot elements is over, return the attribute list

@@ -96,7 +104,2 @@ if (!current) {

}
if (previous.path.endsWith('[x]') && previous.choices.length === 0) {
// If previous has several types but choices are not constrained, we spread them
// to fill choices
previous.spreadTypes();
}
if (exports.isSliceOf(current, previous.definition)) {

@@ -103,0 +106,0 @@ var slice = new attribute_1.Attribute(current);

{
"name": "@arkhn/fhir.ts",
"private": false,
"version": "3.4.0",
"version": "3.4.1",
"description": "Open source typescript library providing FHIR utilities",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

import * as heartrateProfile from './fixtures/heartrate-profile.json'
import * as mockDefinition from './fixtures/mockDefinition.json'
import * as definitionWithSlices from './fixtures/definitionWithSlices.json'
import * as patientAnimal from './fixtures/patient-animal.json'

@@ -133,2 +134,11 @@ import { structurize, isChildOf } from 'definition'

})
it('spread types when no choices are specified', () => {
const structured = structurize(patientAnimal.resource)
expect(structured.attributes).toHaveLength(3)
expect(structured.attributes![0].slices).toHaveLength(3)
expect(structured.attributes![2].children).toHaveLength(0)
expect(structured.attributes![2].choices).toHaveLength(50)
})
})
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