diff --git a/.gitignore b/.gitignore index 11573ed1..e48a4c64 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,6 @@ packaging/ansible/server_cert.pem packaging/ansible/server_key.pem server/certificates/server_cert.pem.bak server/certificates/server_key.pem.bak - # client key/cert examples for ansible ansible_key.pem ansible_cert.pem @@ -32,4 +31,4 @@ ansible.p12 .DS_Store # venv -venv/ \ No newline at end of file +venv/ diff --git a/resources/Relationships/PatientRelationship.json b/resources/Relationships/PatientRelationship.json deleted file mode 100644 index b2992af8..00000000 --- a/resources/Relationships/PatientRelationship.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "resourceType": "Basic", - "id": "patientreport", - "meta": { - "versionId": "1", - "lastUpdated": "2019-07-30T07:34:24.098+00:00", - "profile": [ - "http://ihris.org/fhir/StructureDefinition/iHRISRelationship" - ] - }, - "extension": [ - { - "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportDetails", - "extension": [ - { - "url": "label", - "valueString": "Patient Report" - }, - { - "url": "name", - "valueString": "patients" - }, - { - "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", - "extension": [ - { - "url": "label", - "valueString": "gender" - }, - { - "url": "name", - "valueString": "gender" - } - ] - }, - { - "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", - "extension": [ - { - "url": "label", - "valueString": "birthDate" - }, - { - "url": "name", - "valueString": "birthDate" - } - ] - }, - { - "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", - "extension": [ - { - "url": "label", - "valueString": "given" - }, - { - "url": "name", - "valueString": "name.where(use='official').last().given" - } - ] - }, - { - "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", - "extension": [ - { - "url": "label", - "valueString": "family" - }, - { - "url": "name", - "valueString": "name.where(use='official').last().family" - } - ] - }, - { - "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", - "extension": [ - { - "url": "label", - "valueString": "fullname" - }, - { - "url": "name", - "valueString": "name.where(use='official').last().text" - } - ] - }, - { - "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", - "extension": [ - { - "url": "label", - "valueString": "phone" - }, - { - "url": "name", - "valueString": "telecom.where(system='phone').value" - } - ] - }, - { - "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", - "extension": [ - { - "url": "label", - "valueString": "nationalid" - }, - { - "url": "name", - "valueString": "identifier.where(system='http://clientregistry.org/nationalid').last().value" - } - ] - }, - { - "url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement", - "extension": [ - { - "url": "label", - "valueString": "art" - }, - { - "url": "name", - "valueString": "identifier.where(system='http://clientregistry.org/artnumber').value" - } - ] - } - ] - } - ], - "code": { - "coding": [ - { - "system": "http://ihris.org/fhir/ValueSet/ihris-resource", - "code": "iHRISRelationship" - } - ], - "text": "iHRISRelationship" - }, - "subject": { - "reference": "StructureDefinition/Patient" - } -} \ No newline at end of file diff --git a/server/config/decisionRules.json b/server/config/decisionRules.json deleted file mode 100644 index 68ee359d..00000000 --- a/server/config/decisionRules.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "__comments": { - "path": "Its a fhir path, for syntax refer to https://www.hl7.org/fhir/fhirpath.html", - "matchingType": "Must be specified, it can either", - "threshold": { - "levenshtein": "Lower the number, the closer the match, 0 being exact match, max threshold is 2", - "jaro-winkler": "number between 0 and 1, where 0 for no match and 1 for exact match" - }, - "supported_algorithms": { - "elasticsearch": ["https://github.com/intrahealth/similarity-scoring"] - } - }, - "rules": [{ - "matchingType": "deterministic", - "fields": { - "given": { - "algorithm": "jaro-winkler-similarity", - "threshold": 0.8, - "fhirpath": "name.where(use='official').given", - "null_handling": "moderate", - "null_handling_both": "moderate", - "espath": "given" - }, - "family": { - "algorithm": "jaro-winkler-similarity", - "threshold": 0.9, - "fhirpath": "name.where(use='official').family", - "null_handling": "moderate", - "null_handling_both": "moderate", - "espath": "family" - }, - "birthdate": { - "algorithm": "exact", - "fhirpath": "birthDate", - "null_handling": "moderate", - "null_handling_both": "moderate", - "espath": "birthDate" - }, - "phone": { - "algorithm": "exact", - "fhirpath": "telecom.where(system='phone').value", - "null_handling": "moderate", - "null_handling_both": "moderate", - "espath": "phone" - }, - "nationalid": { - "algorithm": "exact", - "fhirpath": "identifier.where(system='http://clientregistry.org/nationalid').value", - "null_handling": "moderate", - "null_handling_both": "moderate", - "espath": "nationalid" - }, - "art": { - "algorithm": "exact", - "fhirpath": "identifier.where(system='http://clientregistry.org/artnumber').value", - "null_handling": "moderate", - "null_handling_both": "moderate", - "espath": "art" - } - }, - "potentialMatchThreshold": 4, - "autoMatchThreshold": 6, - "filters": { - "gender": { - "fhirpath": "gender", - "espath": "gender" - } - } - }] -} \ No newline at end of file diff --git a/server/lib/esMatching.js b/server/lib/esMatching.js index dfc45115..77c86c2a 100644 --- a/server/lib/esMatching.js +++ b/server/lib/esMatching.js @@ -3,13 +3,12 @@ const request = require('request'); const URI = require('urijs'); const async = require('async'); const _ = require('lodash'); -const Fhir = require('fhir').Fhir; +const fhirpath = require('fhirpath'); const fhirWrapper = require('./fhir')(); const logger = require('./winston'); const config = require('./config'); const generalMixin = require('./mixins/generalMixin'); const axios = require('axios'); -const fhir = new Fhir(); const refreshIndex = (callback) => { logger.info('Refreshing index ' + config.get('elastic:index')); @@ -78,7 +77,7 @@ const buildQuery = (sourceResource, decisionRule) => { null_handling_both = decisionRule.null_handling_both; } let path = rule.espath; - let pathValue = fhir.evaluate(sourceResource, rule.fhirpath); + let pathValue = fhirpath.evaluate(sourceResource, rule.fhirpath); const values = []; if (Array.isArray(pathValue) && !(pathValue.length === 1 && pathValue[0] === undefined)) { if (pathValue.length === 0) { @@ -155,7 +154,7 @@ const buildQuery = (sourceResource, decisionRule) => { const block = decisionRule.filters[filterField]; const term = {}; const path = block.espath; - let pathValue = fhir.evaluate(sourceResource, block.fhirpath); + let pathValue = fhirpath.evaluate(sourceResource, block.fhirpath); if (Array.isArray(pathValue) && !(pathValue.length === 1 && pathValue[0] === undefined)) { if (pathValue.length === 0) { term[path] = ''; diff --git a/server/lib/tools/cacheFHIR.js b/server/lib/tools/cacheFHIR.js index ea0074b1..aecb223a 100644 --- a/server/lib/tools/cacheFHIR.js +++ b/server/lib/tools/cacheFHIR.js @@ -2,16 +2,14 @@ const axios = require('axios'); const async = require('async'); const URI = require('urijs'); const moment = require('moment'); +const fhirpath = require('fhirpath'); const generalMixin = require('../mixins/generalMixin'); -const Fhir = require('fhir').Fhir; const fhirWrapper = require('../fhir')(); const structureDefinition = require('./structureDefinition'); const config = require('../config'); const logger = require('../winston'); const slashes = require('slashes'); -const fhir = new Fhir(); - const fhirToEsDataType = { valueString: 'text', valueBoolean: 'boolean', @@ -605,7 +603,7 @@ const fhir2ES = ({ const limits = query.split('='); const limitParameters = limits[0]; const limitValue = limits[1]; - const resourceValue = fhir.evaluate( + const resourceValue = fhirpath.evaluate( data.resource, limitParameters ); @@ -640,7 +638,7 @@ const fhir2ES = ({ fieldAutogenerated = value; } } - const displayData = fhir.evaluate( + const displayData = fhirpath.evaluate( data.resource, fieldName ); diff --git a/server/package-lock.json b/server/package-lock.json index 0c08d384..591bdf90 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -18,6 +18,7 @@ "express": "^4.17.1", "fast-levenshtein": "^2.0.6", "fhir": "^4.7.0", + "fhirpath": "^3.3.1", "formidable": "^1.2.1", "is-json": "^2.0.1", "jaro-winkler": "^0.2.8", @@ -1251,6 +1252,23 @@ "node": ">=8" } }, + "node_modules/@lhncbc/ucum-lhc": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@lhncbc/ucum-lhc/-/ucum-lhc-4.1.7.tgz", + "integrity": "sha512-KU6agJSPq/ZEy3t1XitVuyKfI18MBO4QFuZ3zUxqzK502p6akc9GfNOmJRWx7qmhSIBrqq7eq8x0p8qYoaro/A==", + "dependencies": { + "coffeescript": "^2.7.0", + "csv-parse": "^4.4.6", + "csv-stringify": "^1.0.4", + "escape-html": "^1.0.3", + "is-integer": "^1.0.6", + "jsonfile": "^2.2.3", + "stream": "0.0.2", + "stream-transform": "^0.1.1", + "string-to-stream": "^1.1.0", + "xmldoc": "^0.4.0" + } + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -1718,6 +1736,14 @@ "node": ">=4" } }, + "node_modules/antlr4": { + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.9.3.tgz", + "integrity": "sha512-qNy2odgsa0skmNMCuxzXhM4M8J1YDaPv3TI+vCdnOAanu0N982wBrSqziDKRDctEZLZy9VffqIZXc0UGjjSP/g==", + "engines": { + "node": ">=14" + } + }, "node_modules/anymatch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", @@ -2542,6 +2568,18 @@ "node": ">=0.10.0" } }, + "node_modules/coffeescript": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-2.7.0.tgz", + "integrity": "sha512-hzWp6TUE2d/jCcN67LrW1eh5b/rSDKQK6oD6VMLlggYVUUFexgTH9z3dNYihzX4RMhze5FTUsUmOXViJKFQR/A==", + "bin": { + "cake": "bin/cake", + "coffee": "bin/coffee" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/collect-v8-coverage": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", @@ -2813,6 +2851,19 @@ "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==" }, + "node_modules/csv-parse": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.16.3.tgz", + "integrity": "sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==" + }, + "node_modules/csv-stringify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/csv-stringify/-/csv-stringify-1.1.2.tgz", + "integrity": "sha512-3NmNhhd+AkYs5YtM1GEh01VR6PKj6qch2ayfQaltx5xpcAdThjnbbI5eT8CzRVpXfGKAxnmrSYLsNl/4f3eWiw==", + "dependencies": { + "lodash.get": "~4.4.2" + } + }, "node_modules/cucumber-messages": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/cucumber-messages/-/cucumber-messages-8.0.0.tgz", @@ -2853,6 +2904,11 @@ "node": ">=10" } }, + "node_modules/date-fns": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", + "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==" + }, "node_modules/dayjs": { "version": "1.10.4", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.4.tgz", @@ -3109,6 +3165,11 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, + "node_modules/emitter-component": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/emitter-component/-/emitter-component-1.1.1.tgz", + "integrity": "sha512-G+mpdiAySMuB7kesVRLuyvYRqDmshB7ReKEVuyBPkzQlmiDiLrt7hHHIy4Aff552bgknVN7B2/d3lzhGO5dvpQ==" + }, "node_modules/emittery": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.1.tgz", @@ -4134,6 +4195,29 @@ "xml-js": "bin/cli.js" } }, + "node_modules/fhirpath": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fhirpath/-/fhirpath-3.3.1.tgz", + "integrity": "sha512-uWSLPs8VBQsn3aGUs52KaXXPGQLATbz+0FbqxmLCz84uK58nWKBSznwQHmiZY0K5L2ioiZ9GXvRtMrb+OqVzjw==", + "dependencies": { + "@lhncbc/ucum-lhc": "^4.1.3", + "antlr4": "~4.9.3", + "commander": "^2.18.0", + "date-fns": "^1.30.1", + "js-yaml": "^3.13.1" + }, + "bin": { + "fhirpath": "bin/fhirpath" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/fhirpath/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, "node_modules/figures": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", @@ -5078,6 +5162,17 @@ "node": ">=0.10.0" } }, + "node_modules/is-finite": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", @@ -5109,6 +5204,14 @@ "node": ">=0.10.0" } }, + "node_modules/is-integer": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-integer/-/is-integer-1.0.7.tgz", + "integrity": "sha512-RPQc/s9yBHSvpi+hs9dYiJ2cuFeU6x3TyyIp8O2H6SKEltIvJOzRj9ToyvcStDvPR/pS4rxgr1oBFajQjZ2Szg==", + "dependencies": { + "is-finite": "^1.0.0" + } + }, "node_modules/is-json": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-json/-/is-json-2.0.1.tgz", @@ -7603,6 +7706,14 @@ "node": ">=6" } }, + "node_modules/jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/jsonwebtoken": { "version": "8.5.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", @@ -7862,6 +7973,11 @@ "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" }, + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==" + }, "node_modules/lodash.groupby": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", @@ -9515,6 +9631,11 @@ "node": ">=0.10.0" } }, + "node_modules/sax": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.1.6.tgz", + "integrity": "sha512-8zci48uUQyfqynGDSkUMD7FCJB96hwLnlZOXlgs1l3TX+LW27t3psSWKUxC0fxVgA86i8tL4NwGcY1h/6t3ESg==" + }, "node_modules/saxes": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", @@ -10015,6 +10136,19 @@ "node": ">=0.10.0" } }, + "node_modules/stream": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stream/-/stream-0.0.2.tgz", + "integrity": "sha512-gCq3NDI2P35B2n6t76YJuOp7d6cN/C7Rt0577l91wllh0sY9ZBuw9KaSGqH/b0hzn3CWWJbpbW0W0WvQ1H/Q7g==", + "dependencies": { + "emitter-component": "^1.1.1" + } + }, + "node_modules/stream-transform": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/stream-transform/-/stream-transform-0.1.2.tgz", + "integrity": "sha512-3HXId/0W8sktQnQM6rOZf2LuDDMbakMgAjpViLk758/h0br+iGqZFFfUxxJSqEvGvT742PyFr4v/TBXUtowdCg==" + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -10059,6 +10193,37 @@ "node": ">=8" } }, + "node_modules/string-to-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string-to-stream/-/string-to-stream-1.1.1.tgz", + "integrity": "sha512-QySF2+3Rwq0SdO3s7BAp4x+c3qsClpPQ6abAmb0DGViiSBAkT5kL6JT2iyzEVP+T1SmzHrQD1TwlP9QAHCc+Sw==", + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.1.0" + } + }, + "node_modules/string-to-stream/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/string-to-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -11084,6 +11249,14 @@ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, + "node_modules/xmldoc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/xmldoc/-/xmldoc-0.4.0.tgz", + "integrity": "sha512-rJ/+/UzYCSlFNuAzGuRyYgkH2G5agdX1UQn4+5siYw9pkNC3Hu/grYNDx/dqYLreeSjnY5oKg74CMBKxJHSg6Q==", + "dependencies": { + "sax": "~1.1.1" + } + }, "node_modules/y18n": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", @@ -12117,6 +12290,23 @@ } } }, + "@lhncbc/ucum-lhc": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@lhncbc/ucum-lhc/-/ucum-lhc-4.1.7.tgz", + "integrity": "sha512-KU6agJSPq/ZEy3t1XitVuyKfI18MBO4QFuZ3zUxqzK502p6akc9GfNOmJRWx7qmhSIBrqq7eq8x0p8qYoaro/A==", + "requires": { + "coffeescript": "^2.7.0", + "csv-parse": "^4.4.6", + "csv-stringify": "^1.0.4", + "escape-html": "^1.0.3", + "is-integer": "^1.0.6", + "jsonfile": "^2.2.3", + "stream": "0.0.2", + "stream-transform": "^0.1.1", + "string-to-stream": "^1.1.0", + "xmldoc": "^0.4.0" + } + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -12527,6 +12717,11 @@ "color-convert": "^1.9.0" } }, + "antlr4": { + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.9.3.tgz", + "integrity": "sha512-qNy2odgsa0skmNMCuxzXhM4M8J1YDaPv3TI+vCdnOAanu0N982wBrSqziDKRDctEZLZy9VffqIZXc0UGjjSP/g==" + }, "anymatch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", @@ -13159,6 +13354,11 @@ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, + "coffeescript": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-2.7.0.tgz", + "integrity": "sha512-hzWp6TUE2d/jCcN67LrW1eh5b/rSDKQK6oD6VMLlggYVUUFexgTH9z3dNYihzX4RMhze5FTUsUmOXViJKFQR/A==" + }, "collect-v8-coverage": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", @@ -13385,6 +13585,19 @@ } } }, + "csv-parse": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.16.3.tgz", + "integrity": "sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==" + }, + "csv-stringify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/csv-stringify/-/csv-stringify-1.1.2.tgz", + "integrity": "sha512-3NmNhhd+AkYs5YtM1GEh01VR6PKj6qch2ayfQaltx5xpcAdThjnbbI5eT8CzRVpXfGKAxnmrSYLsNl/4f3eWiw==", + "requires": { + "lodash.get": "~4.4.2" + } + }, "cucumber-messages": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/cucumber-messages/-/cucumber-messages-8.0.0.tgz", @@ -13419,6 +13632,11 @@ "whatwg-url": "^8.0.0" } }, + "date-fns": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", + "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==" + }, "dayjs": { "version": "1.10.4", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.4.tgz", @@ -13626,6 +13844,11 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, + "emitter-component": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/emitter-component/-/emitter-component-1.1.1.tgz", + "integrity": "sha512-G+mpdiAySMuB7kesVRLuyvYRqDmshB7ReKEVuyBPkzQlmiDiLrt7hHHIy4Aff552bgknVN7B2/d3lzhGO5dvpQ==" + }, "emittery": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.1.tgz", @@ -14421,6 +14644,25 @@ } } }, + "fhirpath": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fhirpath/-/fhirpath-3.3.1.tgz", + "integrity": "sha512-uWSLPs8VBQsn3aGUs52KaXXPGQLATbz+0FbqxmLCz84uK58nWKBSznwQHmiZY0K5L2ioiZ9GXvRtMrb+OqVzjw==", + "requires": { + "@lhncbc/ucum-lhc": "^4.1.3", + "antlr4": "~4.9.3", + "commander": "^2.18.0", + "date-fns": "^1.30.1", + "js-yaml": "^3.13.1" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + } + } + }, "figures": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", @@ -15119,6 +15361,11 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, + "is-finite": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==" + }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", @@ -15141,6 +15388,14 @@ "is-extglob": "^2.1.1" } }, + "is-integer": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-integer/-/is-integer-1.0.7.tgz", + "integrity": "sha512-RPQc/s9yBHSvpi+hs9dYiJ2cuFeU6x3TyyIp8O2H6SKEltIvJOzRj9ToyvcStDvPR/pS4rxgr1oBFajQjZ2Szg==", + "requires": { + "is-finite": "^1.0.0" + } + }, "is-json": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-json/-/is-json-2.0.1.tgz", @@ -17010,6 +17265,14 @@ "minimist": "^1.2.5" } }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", + "requires": { + "graceful-fs": "^4.1.6" + } + }, "jsonwebtoken": { "version": "8.5.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", @@ -17241,6 +17504,11 @@ "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==" + }, "lodash.groupby": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz", @@ -18525,6 +18793,11 @@ } } }, + "sax": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.1.6.tgz", + "integrity": "sha512-8zci48uUQyfqynGDSkUMD7FCJB96hwLnlZOXlgs1l3TX+LW27t3psSWKUxC0fxVgA86i8tL4NwGcY1h/6t3ESg==" + }, "saxes": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", @@ -18932,6 +19205,19 @@ "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" }, + "stream": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stream/-/stream-0.0.2.tgz", + "integrity": "sha512-gCq3NDI2P35B2n6t76YJuOp7d6cN/C7Rt0577l91wllh0sY9ZBuw9KaSGqH/b0hzn3CWWJbpbW0W0WvQ1H/Q7g==", + "requires": { + "emitter-component": "^1.1.1" + } + }, + "stream-transform": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/stream-transform/-/stream-transform-0.1.2.tgz", + "integrity": "sha512-3HXId/0W8sktQnQM6rOZf2LuDDMbakMgAjpViLk758/h0br+iGqZFFfUxxJSqEvGvT742PyFr4v/TBXUtowdCg==" + }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -18971,6 +19257,39 @@ } } }, + "string-to-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string-to-stream/-/string-to-stream-1.1.1.tgz", + "integrity": "sha512-QySF2+3Rwq0SdO3s7BAp4x+c3qsClpPQ6abAmb0DGViiSBAkT5kL6JT2iyzEVP+T1SmzHrQD1TwlP9QAHCc+Sw==", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.1.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -19790,6 +20109,14 @@ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, + "xmldoc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/xmldoc/-/xmldoc-0.4.0.tgz", + "integrity": "sha512-rJ/+/UzYCSlFNuAzGuRyYgkH2G5agdX1UQn4+5siYw9pkNC3Hu/grYNDx/dqYLreeSjnY5oKg74CMBKxJHSg6Q==", + "requires": { + "sax": "~1.1.1" + } + }, "y18n": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", diff --git a/server/package.json b/server/package.json index b15fc888..e4974715 100644 --- a/server/package.json +++ b/server/package.json @@ -25,6 +25,7 @@ "express": "^4.17.1", "fast-levenshtein": "^2.0.6", "fhir": "^4.7.0", + "fhirpath": "^3.3.1", "formidable": "^1.2.1", "is-json": "^2.0.1", "jaro-winkler": "^0.2.8",