@nsshunt/stsfhirpg 1.0.1 → 1.0.2

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.
@@ -6982,14 +6982,21 @@
6982
6982
  function hashUriParam(uri, lowercase = false) {
6983
6983
  return murmur64Signed(lowercase ? uri.toLowerCase() : uri);
6984
6984
  }
6985
- const resourcesPath = "./dist/fhir-spec/profiles-resources.json";
6986
- const typesPath = "./dist/fhir-spec/profiles-types.json";
6987
- const searchParamsPath = "./dist/fhir-spec/search-parameters.json";
6985
+ const resourcesPath = "fhir-spec/profiles-resources.json";
6986
+ const typesPath = "fhir-spec/profiles-types.json";
6987
+ const searchParamsPath = "fhir-spec/search-parameters.json";
6988
6988
  class ResourceHelper {
6989
6989
  #definitions;
6990
6990
  static instance;
6991
+ static specPath = "./dist/";
6991
6992
  constructor() {
6992
6993
  }
6994
+ static setSpecPath(sPath) {
6995
+ ResourceHelper.specPath = sPath;
6996
+ }
6997
+ static getSpecPath() {
6998
+ return ResourceHelper.specPath;
6999
+ }
6993
7000
  static getInstance() {
6994
7001
  if (!ResourceHelper.instance) {
6995
7002
  ResourceHelper.instance = new ResourceHelper();
@@ -6997,9 +7004,9 @@
6997
7004
  return ResourceHelper.instance;
6998
7005
  }
6999
7006
  #LoadDefinitions = () => {
7000
- const __resources = JSON.parse(fs.readFileSync(resourcesPath, "utf-8"));
7001
- const __types = JSON.parse(fs.readFileSync(typesPath, "utf-8"));
7002
- const __searchParams = JSON.parse(fs.readFileSync(searchParamsPath, "utf-8"));
7007
+ const __resources = JSON.parse(fs.readFileSync(`${ResourceHelper.specPath}${resourcesPath}`, "utf-8"));
7008
+ const __types = JSON.parse(fs.readFileSync(`${ResourceHelper.specPath}${typesPath}`, "utf-8"));
7009
+ const __searchParams = JSON.parse(fs.readFileSync(`${ResourceHelper.specPath}${searchParamsPath}`, "utf-8"));
7003
7010
  if (!this.#definitions) {
7004
7011
  this.#definitions = {
7005
7012
  resources: {},