@nsshunt/stsfhirclient 2.0.2 → 2.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.
@@ -9229,7 +9229,6 @@ function GetAboveHierarchy(uri2) {
9229
9229
  }
9230
9230
  return hierarchy.reverse().map((u) => u.replace(/\/+$/, ""));
9231
9231
  }
9232
- const stsfhirapiroot = "/stsfhirv2/r5";
9233
9232
  class FhirRouteError extends Error {
9234
9233
  status;
9235
9234
  details;
@@ -14785,7 +14784,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
14785
14784
  "Prefer": "return=representation"
14786
14785
  },
14787
14786
  opts: {
14788
- basePath: stsfhirapiroot
14787
+ basePath: this.options.fhirapiroot
14789
14788
  },
14790
14789
  url: new URL(`${this.options.baseUrl}/${resource}`),
14791
14790
  body: domainResource,
@@ -14807,7 +14806,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
14807
14806
  "If-Match": versionIdETag
14808
14807
  },
14809
14808
  opts: {
14810
- basePath: stsfhirapiroot
14809
+ basePath: this.options.fhirapiroot
14811
14810
  },
14812
14811
  url: new URL(`${this.options.baseUrl}/${resource}/${domainResource.id}`),
14813
14812
  body: domainResource,
@@ -14831,7 +14830,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
14831
14830
  // application/json-patch+json or application/merge-patch+json
14832
14831
  },
14833
14832
  opts: {
14834
- basePath: stsfhirapiroot
14833
+ basePath: this.options.fhirapiroot
14835
14834
  },
14836
14835
  url: new URL(`${this.options.baseUrl}/${resource}/${resourceId}`),
14837
14836
  body: domainResource,
@@ -14854,7 +14853,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
14854
14853
  //'content-type': contentType // application/json-patch+json or application/merge-patch+json
14855
14854
  },
14856
14855
  opts: {
14857
- basePath: stsfhirapiroot
14856
+ basePath: this.options.fhirapiroot
14858
14857
  },
14859
14858
  url: new URL(`${this.options.baseUrl}/${resource}/${resourceId}`),
14860
14859
  //body: domainResource,
@@ -14877,7 +14876,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
14877
14876
  //'content-type': contentType // application/json-patch+json or application/merge-patch+json
14878
14877
  },
14879
14878
  opts: {
14880
- basePath: stsfhirapiroot
14879
+ basePath: this.options.fhirapiroot
14881
14880
  },
14882
14881
  url: new URL(`${this.options.baseUrl}/${resource}/${resourceId}`),
14883
14882
  //body: domainResource,
@@ -14901,7 +14900,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
14901
14900
  //'content-type': contentType // application/json-patch+json or application/merge-patch+json
14902
14901
  },
14903
14902
  opts: {
14904
- basePath: stsfhirapiroot
14903
+ basePath: this.options.fhirapiroot
14905
14904
  },
14906
14905
  url: new URL(`${this.options.baseUrl}/${resource}/${resourceId}/_history/${versionId}`),
14907
14906
  //body: domainResource,
@@ -14924,7 +14923,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
14924
14923
  //'content-type': contentType // application/json-patch+json or application/merge-patch+json
14925
14924
  },
14926
14925
  opts: {
14927
- basePath: stsfhirapiroot
14926
+ basePath: this.options.fhirapiroot
14928
14927
  },
14929
14928
  url: searchUrl,
14930
14929
  //body: domainResource,
@@ -14971,7 +14970,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
14971
14970
  //'content-type': contentType // application/json-patch+json or application/merge-patch+json
14972
14971
  },
14973
14972
  opts: {
14974
- basePath: stsfhirapiroot
14973
+ basePath: this.options.fhirapiroot
14975
14974
  },
14976
14975
  url: new URL(`${this.options.baseUrl}/metadata`),
14977
14976
  //body: bundle,
@@ -15001,7 +15000,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
15001
15000
  "content-type": "application/fhir+json"
15002
15001
  },
15003
15002
  opts: {
15004
- basePath: stsfhirapiroot
15003
+ basePath: this.options.fhirapiroot
15005
15004
  },
15006
15005
  url: new URL(`${this.options.baseUrl}`),
15007
15006
  body: bundle,
@@ -15108,7 +15107,7 @@ class FhirSocketClientIndividual extends FhirSocketClient {
15108
15107
  // url = [base]/[resourceType]?query
15109
15108
  GetResources = (searchUrl) => {
15110
15109
  return this.options.GetAccessToken().then((accessToken) => {
15111
- const fhirParts = splitUnderBase(searchUrl.pathname, stsfhirapiroot);
15110
+ const fhirParts = splitUnderBase(searchUrl.pathname, this.options.fhirapiroot);
15112
15111
  const resourceType = fhirParts[0];
15113
15112
  this.WithAccessToken(accessToken);
15114
15113
  return this.EmitCommand("getFhirResources", {
@@ -15125,7 +15124,7 @@ class FhirSocketClientIndividual extends FhirSocketClient {
15125
15124
  // url = [base]/[resourceType]/[resourceId]/_history
15126
15125
  GetHistoryFhirResource = (searchUrl) => {
15127
15126
  return this.options.GetAccessToken().then((accessToken) => {
15128
- const fhirParts = splitUnderBase(searchUrl.pathname, stsfhirapiroot);
15127
+ const fhirParts = splitUnderBase(searchUrl.pathname, this.options.fhirapiroot);
15129
15128
  const resourceType = fhirParts[0];
15130
15129
  const resourceId = fhirParts[1];
15131
15130
  this.WithAccessToken(accessToken);
@@ -15144,7 +15143,7 @@ class FhirSocketClientIndividual extends FhirSocketClient {
15144
15143
  // url = [base]/[resourceType]/_history
15145
15144
  GetHistoryFhirResources = (searchUrl) => {
15146
15145
  return this.options.GetAccessToken().then((accessToken) => {
15147
- const fhirParts = splitUnderBase(searchUrl.pathname, stsfhirapiroot);
15146
+ const fhirParts = splitUnderBase(searchUrl.pathname, this.options.fhirapiroot);
15148
15147
  const resourceType = fhirParts[0];
15149
15148
  this.WithAccessToken(accessToken);
15150
15149
  return this.EmitCommand("getHistoryFhirResources", {
@@ -15223,7 +15222,6 @@ export {
15223
15222
  getBaseResource,
15224
15223
  isAbsoluteUrl,
15225
15224
  normalizeUri,
15226
- splitUnderBase,
15227
- stsfhirapiroot
15225
+ splitUnderBase
15228
15226
  };
15229
15227
  //# sourceMappingURL=stsfhirclient.mjs.map