@nsshunt/stsfhirpg 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stsfhirpg.mjs
CHANGED
|
@@ -6993,9 +6993,11 @@ function hashReferenceParam(reference) {
|
|
|
6993
6993
|
function hashUriParam(uri, lowercase = false) {
|
|
6994
6994
|
return murmur64Signed(lowercase ? uri.toLowerCase() : uri);
|
|
6995
6995
|
}
|
|
6996
|
-
const
|
|
6997
|
-
const
|
|
6998
|
-
const
|
|
6996
|
+
const specPath1 = "./dist/";
|
|
6997
|
+
const specPath2 = "./node_modules/@nsshunt/stsfhirpg/dist/";
|
|
6998
|
+
const resourcesPath = "fhir-spec/profiles-resources.json";
|
|
6999
|
+
const typesPath = "fhir-spec/profiles-types.json";
|
|
7000
|
+
const searchParamsPath = "fhir-spec/search-parameters.json";
|
|
6999
7001
|
class ResourceHelper {
|
|
7000
7002
|
#definitions;
|
|
7001
7003
|
static instance;
|
|
@@ -7008,9 +7010,15 @@ class ResourceHelper {
|
|
|
7008
7010
|
return ResourceHelper.instance;
|
|
7009
7011
|
}
|
|
7010
7012
|
#LoadDefinitions = () => {
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7013
|
+
let usePath = "";
|
|
7014
|
+
if (fs.existsSync(`${specPath1}${resourcesPath}`)) {
|
|
7015
|
+
usePath = specPath1;
|
|
7016
|
+
} else {
|
|
7017
|
+
usePath = specPath2;
|
|
7018
|
+
}
|
|
7019
|
+
const __resources = JSON.parse(fs.readFileSync(`${usePath}${resourcesPath}`, "utf-8"));
|
|
7020
|
+
const __types = JSON.parse(fs.readFileSync(`${usePath}${typesPath}`, "utf-8"));
|
|
7021
|
+
const __searchParams = JSON.parse(fs.readFileSync(`${usePath}${searchParamsPath}`, "utf-8"));
|
|
7014
7022
|
if (!this.#definitions) {
|
|
7015
7023
|
this.#definitions = {
|
|
7016
7024
|
resources: {},
|