New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

fhir-validator

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fhir-validator

A validator for resources conforming to the FHIR specification.

latest
Source
npmnpm
Version
0.5.1
Version published
Weekly downloads
21
-8.7%
Maintainers
1
Weekly downloads
 
Created
Source

Javascript FHIR Validator

A javascript FHIR (www.hl7.org/fhir/) validator for use with json or strings that conform to the FHIR 3 standard.

Usage

Node

var fhir = require('fhir-validator'),
	resource,
	result;

// Your resource to validate (as json or a string)
resource = {
	resourceType: 'Medication',
	invalidProperty: 'This property is invalid for medications'
};

// Run the validation on the resource
result = fhir.validate(resource);

// Use the validation result
if(result.errors.length > 0) {
	throw { errors: result.errors, message: 'The given resource is invalid. There were ' + result.errors.length + ' errors.' };
}

Keywords

fhir

FAQs

Package last updated on 22 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts