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

@arkhn/fhir.ts

Package Overview
Dependencies
Maintainers
4
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.3 to 3.4.4

2

lib/attribute.js

@@ -235,3 +235,3 @@ "use strict";

throw new Error("attribute " + this.path + " has no extension child");
var ext = new Attribute(__assign(__assign({}, childExtension.definition), { type: [{ code: 'Extension', extension: [{ valueUrl: definitionId }] }] }));
var ext = new Attribute(__assign(__assign({}, childExtension.definition), { type: [{ code: definitionId }] }));
return childExtension.addItem(index, ext);

@@ -238,0 +238,0 @@ };

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

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

@@ -115,2 +115,18 @@ import { Attribute } from 'attribute'

const observationExtensionDefinition: AttributeDefinition = {
id: 'Observation.extension',
path: 'Observation.extension',
definition: 'Extenson blabla',
min: 0,
max: '*',
base: {
path: 'DomainResource.extension',
},
type: [
{
code: 'Extension',
},
],
}
describe('Attribute', () => {

@@ -328,2 +344,13 @@ it('builds from an AttributeDefinition', () => {

describe('addExtension', () => {
it('adds an extension with the extension id', () => {
const parent = new Attribute(observationCodeDefinition)
const child = new Attribute(observationExtensionDefinition)
parent.addChild(child)
const extensionNode = parent.addExtension('extension-custom-id')
expect(extensionNode.types).toEqual(['extension-custom-id'])
})
})
describe('addItem', () => {

@@ -330,0 +357,0 @@ it('throws if the attribute is not an array', () => {

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