Comparing version 1.0.3 to 1.0.4
14
fhir.js
var xml2js = require('xml2js'); | ||
var Q = require('q'); | ||
var fs = require('fs'); | ||
var profiles = require('./profiles'); | ||
var profiles = {}; | ||
var profileFiles = fs.readdirSync('./profiles'); | ||
for (var i in profileFiles) { | ||
var profileJSON = fs.readFileSync('./profiles/' + profileFiles[i]).toString(); | ||
var profile = JSON.parse(profileJSON); | ||
if (profile.structure && profile.structure.length > 0 && profile.structure[0].type) { | ||
profiles[profile.structure[0].type] = profile; | ||
} | ||
} | ||
var Fhir = function(version) { | ||
@@ -18,0 +6,0 @@ var self = this; |
{ | ||
"name": "fhir", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Node.JS library for serializing/deserializing FHIR resources between JS/JSON and XML using various node.js XML libraries", | ||
@@ -34,3 +34,4 @@ "readme": "README.md", | ||
"scripts": { | ||
"test": "mocha test/*.js" | ||
"test": "mocha test/*.js", | ||
"prepublish": "node packageProfiles.js" | ||
}, | ||
@@ -37,0 +38,0 @@ "author": "Sean McIlvenna", |
@@ -9,2 +9,7 @@ # FHIR.js | ||
# Installation | ||
``` | ||
npm install fhir | ||
``` | ||
# Documentation | ||
@@ -11,0 +16,0 @@ ## ctor(version) |
3663845
71
43047
80