0.5.1 • Published 7 years ago

fhir-validator v0.5.1

Weekly downloads
6
License
Apache-2.0
Repository
github
Last release
7 years ago

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.' };
}
0.5.1

7 years ago

0.5.0

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.0

8 years ago

0.1.0

8 years ago