@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.umd.js
CHANGED
|
@@ -6982,9 +6982,11 @@
|
|
|
6982
6982
|
function hashUriParam(uri, lowercase = false) {
|
|
6983
6983
|
return murmur64Signed(lowercase ? uri.toLowerCase() : uri);
|
|
6984
6984
|
}
|
|
6985
|
-
const
|
|
6986
|
-
const
|
|
6987
|
-
const
|
|
6985
|
+
const specPath1 = "./dist/";
|
|
6986
|
+
const specPath2 = "./node_modules/@nsshunt/stsfhirpg/dist/";
|
|
6987
|
+
const resourcesPath = "fhir-spec/profiles-resources.json";
|
|
6988
|
+
const typesPath = "fhir-spec/profiles-types.json";
|
|
6989
|
+
const searchParamsPath = "fhir-spec/search-parameters.json";
|
|
6988
6990
|
class ResourceHelper {
|
|
6989
6991
|
#definitions;
|
|
6990
6992
|
static instance;
|
|
@@ -6997,9 +6999,15 @@
|
|
|
6997
6999
|
return ResourceHelper.instance;
|
|
6998
7000
|
}
|
|
6999
7001
|
#LoadDefinitions = () => {
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7002
|
+
let usePath = "";
|
|
7003
|
+
if (fs.existsSync(`${specPath1}${resourcesPath}`)) {
|
|
7004
|
+
usePath = specPath1;
|
|
7005
|
+
} else {
|
|
7006
|
+
usePath = specPath2;
|
|
7007
|
+
}
|
|
7008
|
+
const __resources = JSON.parse(fs.readFileSync(`${usePath}${resourcesPath}`, "utf-8"));
|
|
7009
|
+
const __types = JSON.parse(fs.readFileSync(`${usePath}${typesPath}`, "utf-8"));
|
|
7010
|
+
const __searchParams = JSON.parse(fs.readFileSync(`${usePath}${searchParamsPath}`, "utf-8"));
|
|
7003
7011
|
if (!this.#definitions) {
|
|
7004
7012
|
this.#definitions = {
|
|
7005
7013
|
resources: {},
|