@nsshunt/stsfhirclient 2.0.1 → 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.
- package/dist/stsfhirclient.cjs +12 -14
- package/dist/stsfhirclient.cjs.map +1 -1
- package/dist/stsfhirclient.mjs +13 -15
- package/dist/stsfhirclient.mjs.map +1 -1
- package/package.json +8 -8
- package/types/cv2/commonTypes.d.ts +0 -1
- package/types/cv2/commonTypes.d.ts.map +1 -1
- package/types/cv2/fhirSocketClient.d.ts +1 -0
- package/types/cv2/fhirSocketClient.d.ts.map +1 -1
- package/types/cv2/fhirSocketClientAllInOne.d.ts.map +1 -1
- package/types/cv2/fhirSocketClientIndividual.d.ts.map +1 -1
package/dist/stsfhirclient.cjs
CHANGED
|
@@ -9231,7 +9231,6 @@ function GetAboveHierarchy(uri2) {
|
|
|
9231
9231
|
}
|
|
9232
9232
|
return hierarchy.reverse().map((u) => u.replace(/\/+$/, ""));
|
|
9233
9233
|
}
|
|
9234
|
-
const stsfhirapiroot = "/stsfhirv2/r5";
|
|
9235
9234
|
class FhirRouteError extends Error {
|
|
9236
9235
|
status;
|
|
9237
9236
|
details;
|
|
@@ -14787,7 +14786,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
|
|
|
14787
14786
|
"Prefer": "return=representation"
|
|
14788
14787
|
},
|
|
14789
14788
|
opts: {
|
|
14790
|
-
basePath:
|
|
14789
|
+
basePath: this.options.fhirapiroot
|
|
14791
14790
|
},
|
|
14792
14791
|
url: new URL(`${this.options.baseUrl}/${resource}`),
|
|
14793
14792
|
body: domainResource,
|
|
@@ -14809,7 +14808,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
|
|
|
14809
14808
|
"If-Match": versionIdETag
|
|
14810
14809
|
},
|
|
14811
14810
|
opts: {
|
|
14812
|
-
basePath:
|
|
14811
|
+
basePath: this.options.fhirapiroot
|
|
14813
14812
|
},
|
|
14814
14813
|
url: new URL(`${this.options.baseUrl}/${resource}/${domainResource.id}`),
|
|
14815
14814
|
body: domainResource,
|
|
@@ -14833,7 +14832,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
|
|
|
14833
14832
|
// application/json-patch+json or application/merge-patch+json
|
|
14834
14833
|
},
|
|
14835
14834
|
opts: {
|
|
14836
|
-
basePath:
|
|
14835
|
+
basePath: this.options.fhirapiroot
|
|
14837
14836
|
},
|
|
14838
14837
|
url: new URL(`${this.options.baseUrl}/${resource}/${resourceId}`),
|
|
14839
14838
|
body: domainResource,
|
|
@@ -14856,7 +14855,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
|
|
|
14856
14855
|
//'content-type': contentType // application/json-patch+json or application/merge-patch+json
|
|
14857
14856
|
},
|
|
14858
14857
|
opts: {
|
|
14859
|
-
basePath:
|
|
14858
|
+
basePath: this.options.fhirapiroot
|
|
14860
14859
|
},
|
|
14861
14860
|
url: new URL(`${this.options.baseUrl}/${resource}/${resourceId}`),
|
|
14862
14861
|
//body: domainResource,
|
|
@@ -14879,7 +14878,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
|
|
|
14879
14878
|
//'content-type': contentType // application/json-patch+json or application/merge-patch+json
|
|
14880
14879
|
},
|
|
14881
14880
|
opts: {
|
|
14882
|
-
basePath:
|
|
14881
|
+
basePath: this.options.fhirapiroot
|
|
14883
14882
|
},
|
|
14884
14883
|
url: new URL(`${this.options.baseUrl}/${resource}/${resourceId}`),
|
|
14885
14884
|
//body: domainResource,
|
|
@@ -14903,7 +14902,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
|
|
|
14903
14902
|
//'content-type': contentType // application/json-patch+json or application/merge-patch+json
|
|
14904
14903
|
},
|
|
14905
14904
|
opts: {
|
|
14906
|
-
basePath:
|
|
14905
|
+
basePath: this.options.fhirapiroot
|
|
14907
14906
|
},
|
|
14908
14907
|
url: new URL(`${this.options.baseUrl}/${resource}/${resourceId}/_history/${versionId}`),
|
|
14909
14908
|
//body: domainResource,
|
|
@@ -14926,7 +14925,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
|
|
|
14926
14925
|
//'content-type': contentType // application/json-patch+json or application/merge-patch+json
|
|
14927
14926
|
},
|
|
14928
14927
|
opts: {
|
|
14929
|
-
basePath:
|
|
14928
|
+
basePath: this.options.fhirapiroot
|
|
14930
14929
|
},
|
|
14931
14930
|
url: searchUrl,
|
|
14932
14931
|
//body: domainResource,
|
|
@@ -14973,7 +14972,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
|
|
|
14973
14972
|
//'content-type': contentType // application/json-patch+json or application/merge-patch+json
|
|
14974
14973
|
},
|
|
14975
14974
|
opts: {
|
|
14976
|
-
basePath:
|
|
14975
|
+
basePath: this.options.fhirapiroot
|
|
14977
14976
|
},
|
|
14978
14977
|
url: new URL(`${this.options.baseUrl}/metadata`),
|
|
14979
14978
|
//body: bundle,
|
|
@@ -15003,7 +15002,7 @@ class FhirSocketClientAllInOne extends FhirSocketClient {
|
|
|
15003
15002
|
"content-type": "application/fhir+json"
|
|
15004
15003
|
},
|
|
15005
15004
|
opts: {
|
|
15006
|
-
basePath:
|
|
15005
|
+
basePath: this.options.fhirapiroot
|
|
15007
15006
|
},
|
|
15008
15007
|
url: new URL(`${this.options.baseUrl}`),
|
|
15009
15008
|
body: bundle,
|
|
@@ -15110,7 +15109,7 @@ class FhirSocketClientIndividual extends FhirSocketClient {
|
|
|
15110
15109
|
// url = [base]/[resourceType]?query
|
|
15111
15110
|
GetResources = (searchUrl) => {
|
|
15112
15111
|
return this.options.GetAccessToken().then((accessToken) => {
|
|
15113
|
-
const fhirParts = splitUnderBase(searchUrl.pathname,
|
|
15112
|
+
const fhirParts = splitUnderBase(searchUrl.pathname, this.options.fhirapiroot);
|
|
15114
15113
|
const resourceType = fhirParts[0];
|
|
15115
15114
|
this.WithAccessToken(accessToken);
|
|
15116
15115
|
return this.EmitCommand("getFhirResources", {
|
|
@@ -15127,7 +15126,7 @@ class FhirSocketClientIndividual extends FhirSocketClient {
|
|
|
15127
15126
|
// url = [base]/[resourceType]/[resourceId]/_history
|
|
15128
15127
|
GetHistoryFhirResource = (searchUrl) => {
|
|
15129
15128
|
return this.options.GetAccessToken().then((accessToken) => {
|
|
15130
|
-
const fhirParts = splitUnderBase(searchUrl.pathname,
|
|
15129
|
+
const fhirParts = splitUnderBase(searchUrl.pathname, this.options.fhirapiroot);
|
|
15131
15130
|
const resourceType = fhirParts[0];
|
|
15132
15131
|
const resourceId = fhirParts[1];
|
|
15133
15132
|
this.WithAccessToken(accessToken);
|
|
@@ -15146,7 +15145,7 @@ class FhirSocketClientIndividual extends FhirSocketClient {
|
|
|
15146
15145
|
// url = [base]/[resourceType]/_history
|
|
15147
15146
|
GetHistoryFhirResources = (searchUrl) => {
|
|
15148
15147
|
return this.options.GetAccessToken().then((accessToken) => {
|
|
15149
|
-
const fhirParts = splitUnderBase(searchUrl.pathname,
|
|
15148
|
+
const fhirParts = splitUnderBase(searchUrl.pathname, this.options.fhirapiroot);
|
|
15150
15149
|
const resourceType = fhirParts[0];
|
|
15151
15150
|
this.WithAccessToken(accessToken);
|
|
15152
15151
|
return this.EmitCommand("getHistoryFhirResources", {
|
|
@@ -15225,5 +15224,4 @@ exports.getBaseResource = getBaseResource;
|
|
|
15225
15224
|
exports.isAbsoluteUrl = isAbsoluteUrl;
|
|
15226
15225
|
exports.normalizeUri = normalizeUri;
|
|
15227
15226
|
exports.splitUnderBase = splitUnderBase;
|
|
15228
|
-
exports.stsfhirapiroot = stsfhirapiroot;
|
|
15229
15227
|
//# sourceMappingURL=stsfhirclient.cjs.map
|