@icure/be-fhc-api 0.4.13 → 0.4.16
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/api/fhcApbApi.d.ts +31 -0
- package/api/fhcApbApi.js +54 -0
- package/api/fhcDataAttributeServiceApi.d.ts +1 -1
- package/api/fhcDataAttributeServiceApi.js +5 -7
- package/api/fhcHubApi.d.ts +2 -1
- package/api/fhcHubApi.js +4 -2
- package/api/fhcMemberDataApi.d.ts +11 -4
- package/api/fhcMemberDataApi.js +20 -6
- package/api/fhcSchematronApi.d.ts +1 -1
- package/api/fhcSchematronApi.js +1 -1
- package/fhcApi.d.ts +1 -0
- package/fhcApi.js +1 -0
- package/model/Invoice.d.ts +3 -0
- package/model/Medication.d.ts +2 -1
- package/model/Medication.js +2 -1
- package/model/MemberDataBatchResponse.d.ts +2 -0
- package/model/PrescriptionRequest.d.ts +1 -0
- package/model/models.d.ts +0 -4
- package/model/models.js +0 -4
- package/package.json +1 -1
- package/x-api/message-x-api.d.ts +2 -1
- package/x-api/message-x-api.js +52 -16
- package/x-api/utils/efact-util.js +8 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Api Documentation
|
|
3
|
+
* Api Documentation
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { XHR } from "./XHR";
|
|
13
|
+
import { TokenResponse } from "../model/TokenResponse";
|
|
14
|
+
export declare class fhcApbApi {
|
|
15
|
+
host: string;
|
|
16
|
+
headers: Array<XHR.Header>;
|
|
17
|
+
fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
18
|
+
constructor(host: string, headers: any, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>);
|
|
19
|
+
setHeaders(h: Array<XHR.Header>): void;
|
|
20
|
+
handleError(e: XHR.XHRError): never;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @summary getAPBBearerToken
|
|
24
|
+
*/
|
|
25
|
+
getAPBBearerTokenUsingGET(): Promise<TokenResponse>;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @summary getFTMBearerToken
|
|
29
|
+
*/
|
|
30
|
+
getFTMBearerTokenUsingGET(): Promise<TokenResponse>;
|
|
31
|
+
}
|
package/api/fhcApbApi.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fhcApbApi = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Api Documentation
|
|
6
|
+
* Api Documentation
|
|
7
|
+
*
|
|
8
|
+
* OpenAPI spec version: 1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
12
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
const XHR_1 = require("./XHR");
|
|
16
|
+
const TokenResponse_1 = require("../model/TokenResponse");
|
|
17
|
+
class fhcApbApi {
|
|
18
|
+
constructor(host, headers, fetchImpl) {
|
|
19
|
+
this.host = host;
|
|
20
|
+
this.headers = Object.keys(headers).map(k => new XHR_1.XHR.Header(k, headers[k]));
|
|
21
|
+
this.fetchImpl = fetchImpl;
|
|
22
|
+
}
|
|
23
|
+
setHeaders(h) {
|
|
24
|
+
this.headers = h;
|
|
25
|
+
}
|
|
26
|
+
handleError(e) {
|
|
27
|
+
throw e;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @summary getAPBBearerToken
|
|
32
|
+
*/
|
|
33
|
+
getAPBBearerTokenUsingGET() {
|
|
34
|
+
let _body = null;
|
|
35
|
+
const _url = this.host + `/apb/token/bearer` + "?ts=" + new Date().getTime();
|
|
36
|
+
let headers = this.headers;
|
|
37
|
+
return XHR_1.XHR.sendCommand("GET", _url, headers, _body, this.fetchImpl)
|
|
38
|
+
.then(doc => new TokenResponse_1.TokenResponse(doc.body))
|
|
39
|
+
.catch(err => this.handleError(err));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @summary getFTMBearerToken
|
|
44
|
+
*/
|
|
45
|
+
getFTMBearerTokenUsingGET() {
|
|
46
|
+
let _body = null;
|
|
47
|
+
const _url = this.host + `/apb/token/bearer/ftm` + "?ts=" + new Date().getTime();
|
|
48
|
+
let headers = this.headers;
|
|
49
|
+
return XHR_1.XHR.sendCommand("GET", _url, headers, _body, this.fetchImpl)
|
|
50
|
+
.then(doc => new TokenResponse_1.TokenResponse(doc.body))
|
|
51
|
+
.catch(err => this.handleError(err));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.fhcApbApi = fhcApbApi;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { XHR } from "./XHR";
|
|
13
13
|
import { DaasResponse } from "../model/DaasResponse";
|
|
14
|
-
export declare class
|
|
14
|
+
export declare class fhcDataAttributeServiceApi {
|
|
15
15
|
host: string;
|
|
16
16
|
headers: Array<XHR.Header>;
|
|
17
17
|
fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.fhcDataAttributeServiceApi = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Api Documentation
|
|
6
6
|
* Api Documentation
|
|
@@ -14,7 +14,7 @@ exports.fhcDataAttributeserviceApi = void 0;
|
|
|
14
14
|
*/
|
|
15
15
|
const XHR_1 = require("./XHR");
|
|
16
16
|
const DaasResponse_1 = require("../model/DaasResponse");
|
|
17
|
-
class
|
|
17
|
+
class fhcDataAttributeServiceApi {
|
|
18
18
|
constructor(host, headers, fetchImpl) {
|
|
19
19
|
this.host = host;
|
|
20
20
|
this.headers = Object.keys(headers).map(k => new XHR_1.XHR.Header(k, headers[k]));
|
|
@@ -51,10 +51,8 @@ class fhcDataAttributeserviceApi {
|
|
|
51
51
|
(from ? "&from=" + encodeURIComponent(String(from)) : "") +
|
|
52
52
|
(to ? "&to=" + encodeURIComponent(String(to)) : "") +
|
|
53
53
|
(cause ? "&cause=" + encodeURIComponent(String(cause)) : "") +
|
|
54
|
-
(prolongation
|
|
55
|
-
|
|
56
|
-
: "") +
|
|
57
|
-
(total !== undefined ? "&total=" + encodeURIComponent(String(total)) : "");
|
|
54
|
+
(prolongation ? "&prolongation=" + encodeURIComponent(String(prolongation)) : "") +
|
|
55
|
+
(total ? "&total=" + encodeURIComponent(String(total)) : "");
|
|
58
56
|
let headers = this.headers;
|
|
59
57
|
xFHCKeystoreId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)));
|
|
60
58
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
|
@@ -64,4 +62,4 @@ class fhcDataAttributeserviceApi {
|
|
|
64
62
|
.catch(err => this.handleError(err));
|
|
65
63
|
}
|
|
66
64
|
}
|
|
67
|
-
exports.
|
|
65
|
+
exports.fhcDataAttributeServiceApi = fhcDataAttributeServiceApi;
|
package/api/fhcHubApi.d.ts
CHANGED
|
@@ -256,8 +256,9 @@ export declare class fhcHubApi {
|
|
|
256
256
|
* @param authorSsin authorSsin
|
|
257
257
|
* @param isGlobal isGlobal
|
|
258
258
|
* @param breakTheGlassReason breakTheGlassReason
|
|
259
|
+
* @param transactionTypes transactionTypes
|
|
259
260
|
*/
|
|
260
|
-
getTransactionsListUsingGET(endpoint: string, xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpLastName: string, hcpFirstName: string, hcpNihii: string, hcpSsin: string, hcpZip: string, patientSsin: string, hubPackageId?: string, from?: number, to?: number, authorNihii?: string, authorSsin?: string, isGlobal?: boolean, breakTheGlassReason?: string): Promise<Array<TransactionSummaryDto>>;
|
|
261
|
+
getTransactionsListUsingGET(endpoint: string, xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpLastName: string, hcpFirstName: string, hcpNihii: string, hcpSsin: string, hcpZip: string, patientSsin: string, hubPackageId?: string, from?: number, to?: number, authorNihii?: string, authorSsin?: string, isGlobal?: boolean, breakTheGlassReason?: string, transactionTypes?: Array<string>): Promise<Array<TransactionSummaryDto>>;
|
|
261
262
|
/**
|
|
262
263
|
*
|
|
263
264
|
* @summary putAccessRight
|
package/api/fhcHubApi.js
CHANGED
|
@@ -515,8 +515,9 @@ class fhcHubApi {
|
|
|
515
515
|
* @param authorSsin authorSsin
|
|
516
516
|
* @param isGlobal isGlobal
|
|
517
517
|
* @param breakTheGlassReason breakTheGlassReason
|
|
518
|
+
* @param transactionTypes transactionTypes
|
|
518
519
|
*/
|
|
519
|
-
getTransactionsListUsingGET(endpoint, xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpLastName, hcpFirstName, hcpNihii, hcpSsin, hcpZip, patientSsin, hubPackageId, from, to, authorNihii, authorSsin, isGlobal, breakTheGlassReason) {
|
|
520
|
+
getTransactionsListUsingGET(endpoint, xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpLastName, hcpFirstName, hcpNihii, hcpSsin, hcpZip, patientSsin, hubPackageId, from, to, authorNihii, authorSsin, isGlobal, breakTheGlassReason, transactionTypes) {
|
|
520
521
|
let _body = null;
|
|
521
522
|
const _url = this.host +
|
|
522
523
|
`/hub/list/${encodeURIComponent(String(patientSsin))}` +
|
|
@@ -536,7 +537,8 @@ class fhcHubApi {
|
|
|
536
537
|
(isGlobal ? "&isGlobal=" + encodeURIComponent(String(isGlobal)) : "") +
|
|
537
538
|
(breakTheGlassReason
|
|
538
539
|
? "&breakTheGlassReason=" + encodeURIComponent(String(breakTheGlassReason))
|
|
539
|
-
: "")
|
|
540
|
+
: "") +
|
|
541
|
+
(transactionTypes ? "&transactionTypes=" + encodeURIComponent(String(transactionTypes)) : "");
|
|
540
542
|
let headers = this.headers;
|
|
541
543
|
xFHCKeystoreId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)));
|
|
542
544
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
|
@@ -31,8 +31,10 @@ export declare class fhcMemberDataApi {
|
|
|
31
31
|
* @param xFHCPassPhrase X-FHC-passPhrase
|
|
32
32
|
* @param hcpNihii hcpNihii
|
|
33
33
|
* @param hcpName hcpName
|
|
34
|
+
* @param hcpQuality hcpQuality
|
|
35
|
+
* @param hcpSsin hcpSsin
|
|
34
36
|
*/
|
|
35
|
-
confirmMemberDataAcksAsyncUsingPOST(xFHCTokenId: string, xFHCKeystoreId: string, xFHCPassPhrase: string, hcpNihii: string, hcpName: string, body?: Array<string>): Promise<boolean>;
|
|
37
|
+
confirmMemberDataAcksAsyncUsingPOST(xFHCTokenId: string, xFHCKeystoreId: string, xFHCPassPhrase: string, hcpNihii: string, hcpName: string, hcpQuality?: string, hcpSsin?: string, body?: Array<string>): Promise<boolean>;
|
|
36
38
|
/**
|
|
37
39
|
*
|
|
38
40
|
* @summary confirmMemberDataMessagesAsync
|
|
@@ -42,8 +44,10 @@ export declare class fhcMemberDataApi {
|
|
|
42
44
|
* @param xFHCPassPhrase X-FHC-passPhrase
|
|
43
45
|
* @param hcpNihii hcpNihii
|
|
44
46
|
* @param hcpName hcpName
|
|
47
|
+
* @param hcpQuality hcpQuality
|
|
48
|
+
* @param hcpSsin hcpSsin
|
|
45
49
|
*/
|
|
46
|
-
confirmMemberDataMessagesAsyncUsingPOST(xFHCTokenId: string, xFHCKeystoreId: string, xFHCPassPhrase: string, hcpNihii: string, hcpName: string, body?: Array<string>): Promise<boolean>;
|
|
50
|
+
confirmMemberDataMessagesAsyncUsingPOST(xFHCTokenId: string, xFHCKeystoreId: string, xFHCPassPhrase: string, hcpNihii: string, hcpName: string, hcpQuality?: string, hcpSsin?: string, body?: Array<string>): Promise<boolean>;
|
|
47
51
|
/**
|
|
48
52
|
*
|
|
49
53
|
* @summary getMemberDataByMembership
|
|
@@ -70,9 +74,11 @@ export declare class fhcMemberDataApi {
|
|
|
70
74
|
* @param xFHCPassPhrase X-FHC-passPhrase
|
|
71
75
|
* @param hcpNihii hcpNihii
|
|
72
76
|
* @param hcpName hcpName
|
|
77
|
+
* @param hcpQuality hcpQuality
|
|
78
|
+
* @param hcpSsin hcpSsin
|
|
73
79
|
* @param messageNames messageNames
|
|
74
80
|
*/
|
|
75
|
-
getMemberDataMessageAsyncUsingPOST(xFHCTokenId: string, xFHCKeystoreId: string, xFHCPassPhrase: string, hcpNihii: string, hcpName: string, messageNames
|
|
81
|
+
getMemberDataMessageAsyncUsingPOST(xFHCTokenId: string, xFHCKeystoreId: string, xFHCPassPhrase: string, hcpNihii: string, hcpName: string, hcpQuality?: string, hcpSsin?: string, messageNames?: Array<string>): Promise<MemberDataList>;
|
|
76
82
|
/**
|
|
77
83
|
*
|
|
78
84
|
* @summary getMemberData
|
|
@@ -137,10 +143,11 @@ export declare class fhcMemberDataApi {
|
|
|
137
143
|
* @param hcpNihii hcpNihii
|
|
138
144
|
* @param hcpName hcpName
|
|
139
145
|
* @param hcpQuality hcpQuality
|
|
146
|
+
* @param hcpSsin hcpSsin
|
|
140
147
|
* @param date date
|
|
141
148
|
* @param endDate endDate
|
|
142
149
|
* @param hospitalized hospitalized
|
|
143
150
|
* @param requestType requestType
|
|
144
151
|
*/
|
|
145
|
-
sendMemberDataRequestAsyncUsingPOST(xFHCTokenId: string, xFHCKeystoreId: string, xFHCPassPhrase: string, hcpNihii: string, hcpName: string, hcpQuality?: string, date?: number, endDate?: number, hospitalized?: boolean, requestType?: string, body?: MemberDataBatchRequestDto): Promise<GenAsyncResponse>;
|
|
152
|
+
sendMemberDataRequestAsyncUsingPOST(xFHCTokenId: string, xFHCKeystoreId: string, xFHCPassPhrase: string, hcpNihii: string, hcpName: string, hcpQuality?: string, hcpSsin?: string, date?: number, endDate?: number, hospitalized?: boolean, requestType?: string, body?: MemberDataBatchRequestDto): Promise<GenAsyncResponse>;
|
|
146
153
|
}
|
package/api/fhcMemberDataApi.js
CHANGED
|
@@ -37,8 +37,10 @@ class fhcMemberDataApi {
|
|
|
37
37
|
* @param xFHCPassPhrase X-FHC-passPhrase
|
|
38
38
|
* @param hcpNihii hcpNihii
|
|
39
39
|
* @param hcpName hcpName
|
|
40
|
+
* @param hcpQuality hcpQuality
|
|
41
|
+
* @param hcpSsin hcpSsin
|
|
40
42
|
*/
|
|
41
|
-
confirmMemberDataAcksAsyncUsingPOST(xFHCTokenId, xFHCKeystoreId, xFHCPassPhrase, hcpNihii, hcpName, body) {
|
|
43
|
+
confirmMemberDataAcksAsyncUsingPOST(xFHCTokenId, xFHCKeystoreId, xFHCPassPhrase, hcpNihii, hcpName, hcpQuality, hcpSsin, body) {
|
|
42
44
|
let _body = null;
|
|
43
45
|
_body = body;
|
|
44
46
|
const _url = this.host +
|
|
@@ -46,7 +48,9 @@ class fhcMemberDataApi {
|
|
|
46
48
|
"?ts=" +
|
|
47
49
|
new Date().getTime() +
|
|
48
50
|
(hcpNihii ? "&hcpNihii=" + encodeURIComponent(String(hcpNihii)) : "") +
|
|
49
|
-
(hcpName ? "&hcpName=" + encodeURIComponent(String(hcpName)) : "")
|
|
51
|
+
(hcpName ? "&hcpName=" + encodeURIComponent(String(hcpName)) : "") +
|
|
52
|
+
(hcpQuality ? "&hcpQuality=" + encodeURIComponent(String(hcpQuality)) : "") +
|
|
53
|
+
(hcpSsin ? "&hcpSsin=" + encodeURIComponent(String(hcpSsin)) : "");
|
|
50
54
|
let headers = this.headers;
|
|
51
55
|
headers = headers
|
|
52
56
|
.filter(h => h.header !== "Content-Type")
|
|
@@ -67,8 +71,10 @@ class fhcMemberDataApi {
|
|
|
67
71
|
* @param xFHCPassPhrase X-FHC-passPhrase
|
|
68
72
|
* @param hcpNihii hcpNihii
|
|
69
73
|
* @param hcpName hcpName
|
|
74
|
+
* @param hcpQuality hcpQuality
|
|
75
|
+
* @param hcpSsin hcpSsin
|
|
70
76
|
*/
|
|
71
|
-
confirmMemberDataMessagesAsyncUsingPOST(xFHCTokenId, xFHCKeystoreId, xFHCPassPhrase, hcpNihii, hcpName, body) {
|
|
77
|
+
confirmMemberDataMessagesAsyncUsingPOST(xFHCTokenId, xFHCKeystoreId, xFHCPassPhrase, hcpNihii, hcpName, hcpQuality, hcpSsin, body) {
|
|
72
78
|
let _body = null;
|
|
73
79
|
_body = body;
|
|
74
80
|
const _url = this.host +
|
|
@@ -76,7 +82,9 @@ class fhcMemberDataApi {
|
|
|
76
82
|
"?ts=" +
|
|
77
83
|
new Date().getTime() +
|
|
78
84
|
(hcpNihii ? "&hcpNihii=" + encodeURIComponent(String(hcpNihii)) : "") +
|
|
79
|
-
(hcpName ? "&hcpName=" + encodeURIComponent(String(hcpName)) : "")
|
|
85
|
+
(hcpName ? "&hcpName=" + encodeURIComponent(String(hcpName)) : "") +
|
|
86
|
+
(hcpQuality ? "&hcpQuality=" + encodeURIComponent(String(hcpQuality)) : "") +
|
|
87
|
+
(hcpSsin ? "&hcpSsin=" + encodeURIComponent(String(hcpSsin)) : "");
|
|
80
88
|
let headers = this.headers;
|
|
81
89
|
headers = headers
|
|
82
90
|
.filter(h => h.header !== "Content-Type")
|
|
@@ -135,9 +143,11 @@ class fhcMemberDataApi {
|
|
|
135
143
|
* @param xFHCPassPhrase X-FHC-passPhrase
|
|
136
144
|
* @param hcpNihii hcpNihii
|
|
137
145
|
* @param hcpName hcpName
|
|
146
|
+
* @param hcpQuality hcpQuality
|
|
147
|
+
* @param hcpSsin hcpSsin
|
|
138
148
|
* @param messageNames messageNames
|
|
139
149
|
*/
|
|
140
|
-
getMemberDataMessageAsyncUsingPOST(xFHCTokenId, xFHCKeystoreId, xFHCPassPhrase, hcpNihii, hcpName, messageNames) {
|
|
150
|
+
getMemberDataMessageAsyncUsingPOST(xFHCTokenId, xFHCKeystoreId, xFHCPassPhrase, hcpNihii, hcpName, hcpQuality, hcpSsin, messageNames) {
|
|
141
151
|
let _body = null;
|
|
142
152
|
const _url = this.host +
|
|
143
153
|
`/mda/async/messages` +
|
|
@@ -145,6 +155,8 @@ class fhcMemberDataApi {
|
|
|
145
155
|
new Date().getTime() +
|
|
146
156
|
(hcpNihii ? "&hcpNihii=" + encodeURIComponent(String(hcpNihii)) : "") +
|
|
147
157
|
(hcpName ? "&hcpName=" + encodeURIComponent(String(hcpName)) : "") +
|
|
158
|
+
(hcpQuality ? "&hcpQuality=" + encodeURIComponent(String(hcpQuality)) : "") +
|
|
159
|
+
(hcpSsin ? "&hcpSsin=" + encodeURIComponent(String(hcpSsin)) : "") +
|
|
148
160
|
(messageNames ? "&messageNames=" + encodeURIComponent(String(messageNames)) : "");
|
|
149
161
|
let headers = this.headers;
|
|
150
162
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
|
@@ -289,12 +301,13 @@ class fhcMemberDataApi {
|
|
|
289
301
|
* @param hcpNihii hcpNihii
|
|
290
302
|
* @param hcpName hcpName
|
|
291
303
|
* @param hcpQuality hcpQuality
|
|
304
|
+
* @param hcpSsin hcpSsin
|
|
292
305
|
* @param date date
|
|
293
306
|
* @param endDate endDate
|
|
294
307
|
* @param hospitalized hospitalized
|
|
295
308
|
* @param requestType requestType
|
|
296
309
|
*/
|
|
297
|
-
sendMemberDataRequestAsyncUsingPOST(xFHCTokenId, xFHCKeystoreId, xFHCPassPhrase, hcpNihii, hcpName, hcpQuality, date, endDate, hospitalized, requestType, body) {
|
|
310
|
+
sendMemberDataRequestAsyncUsingPOST(xFHCTokenId, xFHCKeystoreId, xFHCPassPhrase, hcpNihii, hcpName, hcpQuality, hcpSsin, date, endDate, hospitalized, requestType, body) {
|
|
298
311
|
let _body = null;
|
|
299
312
|
_body = body;
|
|
300
313
|
const _url = this.host +
|
|
@@ -304,6 +317,7 @@ class fhcMemberDataApi {
|
|
|
304
317
|
(hcpNihii ? "&hcpNihii=" + encodeURIComponent(String(hcpNihii)) : "") +
|
|
305
318
|
(hcpName ? "&hcpName=" + encodeURIComponent(String(hcpName)) : "") +
|
|
306
319
|
(hcpQuality ? "&hcpQuality=" + encodeURIComponent(String(hcpQuality)) : "") +
|
|
320
|
+
(hcpSsin ? "&hcpSsin=" + encodeURIComponent(String(hcpSsin)) : "") +
|
|
307
321
|
(date ? "&date=" + encodeURIComponent(String(date)) : "") +
|
|
308
322
|
(endDate ? "&endDate=" + encodeURIComponent(String(endDate)) : "") +
|
|
309
323
|
(hospitalized ? "&hospitalized=" + encodeURIComponent(String(hospitalized)) : "") +
|
package/api/fhcSchematronApi.js
CHANGED
package/fhcApi.d.ts
CHANGED
package/fhcApi.js
CHANGED
|
@@ -12,6 +12,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./api/fhcAddressbookApi"), exports);
|
|
14
14
|
__exportStar(require("./api/fhcAdminApi"), exports);
|
|
15
|
+
__exportStar(require("./api/fhcApbApi"), exports);
|
|
15
16
|
__exportStar(require("./api/fhcChapter4Api"), exports);
|
|
16
17
|
__exportStar(require("./api/fhcConsentApi"), exports);
|
|
17
18
|
__exportStar(require("./api/fhcConsultrnApi"), exports);
|
package/model/Invoice.d.ts
CHANGED
|
@@ -29,6 +29,9 @@ export declare class Invoice {
|
|
|
29
29
|
relatedInvoiceIoCode?: string;
|
|
30
30
|
relatedInvoiceNumber?: number;
|
|
31
31
|
startOfCoveragePeriod?: number;
|
|
32
|
+
admissionDate?: number;
|
|
33
|
+
locationNihii?: string;
|
|
34
|
+
locationService?: number;
|
|
32
35
|
}
|
|
33
36
|
export declare namespace Invoice {
|
|
34
37
|
type ReasonEnum = "Chimiotherapy" | "ProfessionalDisease" | "WorkAccident" | "Accident" | "Other";
|
package/model/Medication.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export declare class Medication {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
export declare namespace Medication {
|
|
46
|
-
type InstructionsForReimbursementEnum = "PAYING_THIRD_PARTY" | "FIRST_DOSE" | "SECOND_DOSE" | "THIRD_DOSE" | "CHRONIC_KINDEY_DISEASE" | "DIABETES_TREATMENT" | "DIABETES_CONVENTION" | "NOT_REIMBURSABLE";
|
|
46
|
+
type InstructionsForReimbursementEnum = "PAYING_THIRD_PARTY" | "FIRST_DOSE" | "SECOND_DOSE" | "THIRD_DOSE" | "CHRONIC_KINDEY_DISEASE" | "DIABETES_TREATMENT" | "DIABETES_CONVENTION" | "NOT_REIMBURSABLE" | "EXPLAIN_MEDICATION";
|
|
47
47
|
const InstructionsForReimbursementEnum: {
|
|
48
48
|
PAYINGTHIRDPARTY: InstructionsForReimbursementEnum;
|
|
49
49
|
FIRSTDOSE: InstructionsForReimbursementEnum;
|
|
@@ -53,5 +53,6 @@ export declare namespace Medication {
|
|
|
53
53
|
DIABETESTREATMENT: InstructionsForReimbursementEnum;
|
|
54
54
|
DIABETESCONVENTION: InstructionsForReimbursementEnum;
|
|
55
55
|
NOTREIMBURSABLE: InstructionsForReimbursementEnum;
|
|
56
|
+
EXPLAINMEDICATION: InstructionsForReimbursementEnum;
|
|
56
57
|
};
|
|
57
58
|
}
|
package/model/Medication.js
CHANGED
|
@@ -16,6 +16,7 @@ exports.Medication = Medication;
|
|
|
16
16
|
CHRONICKINDEYDISEASE: "CHRONIC_KINDEY_DISEASE",
|
|
17
17
|
DIABETESTREATMENT: "DIABETES_TREATMENT",
|
|
18
18
|
DIABETESCONVENTION: "DIABETES_CONVENTION",
|
|
19
|
-
NOTREIMBURSABLE: "NOT_REIMBURSABLE"
|
|
19
|
+
NOTREIMBURSABLE: "NOT_REIMBURSABLE",
|
|
20
|
+
EXPLAINMEDICATION: "EXPLAIN_MEDICATION"
|
|
20
21
|
};
|
|
21
22
|
})(Medication = exports.Medication || (exports.Medication = {}));
|
|
@@ -13,11 +13,13 @@ import { Assertion } from "./Assertion";
|
|
|
13
13
|
import { FaultType } from "./FaultType";
|
|
14
14
|
import { MdaStatus } from "./MdaStatus";
|
|
15
15
|
import { MycarenetError } from "./MycarenetError";
|
|
16
|
+
import { XMLGregorianCalendar } from "./XMLGregorianCalendar";
|
|
16
17
|
export declare class MemberDataBatchResponse {
|
|
17
18
|
constructor(json: JSON | any);
|
|
18
19
|
assertions?: Array<Assertion>;
|
|
19
20
|
errors?: Array<FaultType>;
|
|
20
21
|
inResponseTo?: string;
|
|
22
|
+
issueInstant?: XMLGregorianCalendar;
|
|
21
23
|
issuer?: string;
|
|
22
24
|
myCarenetErrors?: Array<MycarenetError>;
|
|
23
25
|
responseId?: string;
|
package/model/models.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export * from "./AccessRightListType";
|
|
|
2
2
|
export * from "./AccessRightType";
|
|
3
3
|
export * from "./AcknowledgeType";
|
|
4
4
|
export * from "./Acknowledgement";
|
|
5
|
-
export * from "./AcknowledgeType";
|
|
6
5
|
export * from "./AcknowledgmentType";
|
|
7
6
|
export * from "./ActType";
|
|
8
7
|
export * from "./ActivePattern";
|
|
@@ -284,7 +283,6 @@ export * from "./MessageOperationResponse";
|
|
|
284
283
|
export * from "./MessageResponse";
|
|
285
284
|
export * from "./MessageStatusOperationResponse";
|
|
286
285
|
export * from "./MessagesResponse";
|
|
287
|
-
export * from "./MessageStatusOperationResponse";
|
|
288
286
|
export * from "./MiddleNameType";
|
|
289
287
|
export * from "./MinimalAddressType";
|
|
290
288
|
export * from "./MinimalAdministratorType";
|
|
@@ -389,7 +387,6 @@ export * from "./ReferenceList";
|
|
|
389
387
|
export * from "./ReferenceType";
|
|
390
388
|
export * from "./RefscopeType";
|
|
391
389
|
export * from "./Refvalue";
|
|
392
|
-
export * from "./Regimen";
|
|
393
390
|
export * from "./RegimenItem";
|
|
394
391
|
export * from "./RegisterPersonDeclarationType";
|
|
395
392
|
export * from "./RegisterPersonResponseDto";
|
|
@@ -489,7 +486,6 @@ export * from "./TransferDto";
|
|
|
489
486
|
export * from "./Transform";
|
|
490
487
|
export * from "./Transforms";
|
|
491
488
|
export * from "./TransformsType";
|
|
492
|
-
export * from "./User";
|
|
493
489
|
export * from "./UUIDType";
|
|
494
490
|
export * from "./UnitType";
|
|
495
491
|
export * from "./UpdateFeedbackFlagResult";
|
package/model/models.js
CHANGED
|
@@ -14,7 +14,6 @@ __exportStar(require("./AccessRightListType"), exports);
|
|
|
14
14
|
__exportStar(require("./AccessRightType"), exports);
|
|
15
15
|
__exportStar(require("./AcknowledgeType"), exports);
|
|
16
16
|
__exportStar(require("./Acknowledgement"), exports);
|
|
17
|
-
__exportStar(require("./AcknowledgeType"), exports);
|
|
18
17
|
__exportStar(require("./AcknowledgmentType"), exports);
|
|
19
18
|
__exportStar(require("./ActType"), exports);
|
|
20
19
|
__exportStar(require("./ActivePattern"), exports);
|
|
@@ -296,7 +295,6 @@ __exportStar(require("./MessageOperationResponse"), exports);
|
|
|
296
295
|
__exportStar(require("./MessageResponse"), exports);
|
|
297
296
|
__exportStar(require("./MessageStatusOperationResponse"), exports);
|
|
298
297
|
__exportStar(require("./MessagesResponse"), exports);
|
|
299
|
-
__exportStar(require("./MessageStatusOperationResponse"), exports);
|
|
300
298
|
__exportStar(require("./MiddleNameType"), exports);
|
|
301
299
|
__exportStar(require("./MinimalAddressType"), exports);
|
|
302
300
|
__exportStar(require("./MinimalAdministratorType"), exports);
|
|
@@ -401,7 +399,6 @@ __exportStar(require("./ReferenceList"), exports);
|
|
|
401
399
|
__exportStar(require("./ReferenceType"), exports);
|
|
402
400
|
__exportStar(require("./RefscopeType"), exports);
|
|
403
401
|
__exportStar(require("./Refvalue"), exports);
|
|
404
|
-
__exportStar(require("./Regimen"), exports);
|
|
405
402
|
__exportStar(require("./RegimenItem"), exports);
|
|
406
403
|
__exportStar(require("./RegisterPersonDeclarationType"), exports);
|
|
407
404
|
__exportStar(require("./RegisterPersonResponseDto"), exports);
|
|
@@ -501,7 +498,6 @@ __exportStar(require("./TransferDto"), exports);
|
|
|
501
498
|
__exportStar(require("./Transform"), exports);
|
|
502
499
|
__exportStar(require("./Transforms"), exports);
|
|
503
500
|
__exportStar(require("./TransformsType"), exports);
|
|
504
|
-
__exportStar(require("./User"), exports);
|
|
505
501
|
__exportStar(require("./UUIDType"), exports);
|
|
506
502
|
__exportStar(require("./UnitType"), exports);
|
|
507
503
|
__exportStar(require("./UpdateFeedbackFlagResult"), exports);
|
package/package.json
CHANGED
package/x-api/message-x-api.d.ts
CHANGED
|
@@ -23,7 +23,8 @@ export declare class MessageXApi {
|
|
|
23
23
|
private saveMessageInDb;
|
|
24
24
|
saveDmgListRequestInDb(user: User, tack: string, resultMajor: string, appliesTo: string, hcp: HealthcareParty, date?: Date, inss?: string): Promise<Message>;
|
|
25
25
|
extractErrorMessage(error?: ErrorDetail): string | undefined;
|
|
26
|
-
extractErrors(parsedRecords: any): string[];
|
|
26
|
+
extractErrors(parsedRecords: any, oa: string): string[];
|
|
27
|
+
isBlockingError(errorDetail: ErrorDetail, oa: string): boolean;
|
|
27
28
|
processTack(user: User, hcp: HealthcareParty, efactMessage: EfactMessage): Promise<Receipt>;
|
|
28
29
|
processEfactMessage(user: User, hcp: HealthcareParty, efactMessage: EfactMessage, invoicePrefix?: string, invoicePrefixer?: (invoice: Invoice, hcpId: string) => Promise<string>): Promise<{
|
|
29
30
|
message: Message;
|
package/x-api/message-x-api.js
CHANGED
|
@@ -306,30 +306,62 @@ class MessageXApi {
|
|
|
306
306
|
.join("; ")
|
|
307
307
|
: undefined;
|
|
308
308
|
}
|
|
309
|
-
extractErrors(parsedRecords) {
|
|
310
|
-
const errors = (parsedRecords.et10 &&
|
|
309
|
+
extractErrors(parsedRecords, oa) {
|
|
310
|
+
const errors = (parsedRecords.et10 &&
|
|
311
|
+
parsedRecords.et10.errorDetail &&
|
|
312
|
+
this.isBlockingError(parsedRecords.et10.errorDetail, oa)
|
|
311
313
|
? [parsedRecords.et10.errorDetail]
|
|
312
314
|
: [])
|
|
313
|
-
.concat(_.flatMap(parsedRecords.records, r => {
|
|
315
|
+
.concat(_.flatMap(parsedRecords.records, (r) => {
|
|
314
316
|
const errors = [];
|
|
315
|
-
if (r.et20 && r.et20.errorDetail) {
|
|
317
|
+
if (r.et20 && r.et20.errorDetail && this.isBlockingError(r.et20.errorDetail, oa)) {
|
|
316
318
|
errors.push(r.et20.errorDetail);
|
|
317
319
|
}
|
|
318
|
-
_.each(r.items, i => {
|
|
319
|
-
if (i.et50 && i.et50.errorDetail)
|
|
320
|
+
_.each(r.items, (i) => {
|
|
321
|
+
if (i.et50 && i.et50.errorDetail && this.isBlockingError(i.et50.errorDetail, oa))
|
|
320
322
|
errors.push(i.et50.errorDetail);
|
|
321
|
-
if (i.et51 && i.et51.errorDetail)
|
|
323
|
+
if (i.et51 && i.et51.errorDetail && this.isBlockingError(i.et51.errorDetail, oa))
|
|
322
324
|
errors.push(i.et51.errorDetail);
|
|
323
|
-
if (i.et52 && i.et52.errorDetail)
|
|
325
|
+
if (i.et52 && i.et52.errorDetail && this.isBlockingError(i.et52.errorDetail, oa))
|
|
324
326
|
errors.push(i.et52.errorDetail);
|
|
325
327
|
});
|
|
326
|
-
if (r.et80 && r.et80.errorDetail) {
|
|
328
|
+
if (r.et80 && r.et80.errorDetail && this.isBlockingError(r.et80.errorDetail, oa)) {
|
|
327
329
|
errors.push(r.et80.errorDetail);
|
|
328
330
|
}
|
|
329
331
|
return errors;
|
|
330
332
|
}))
|
|
331
|
-
.concat(parsedRecords.et90 &&
|
|
332
|
-
|
|
333
|
+
.concat(parsedRecords.et90 &&
|
|
334
|
+
parsedRecords.et90.errorDetail &&
|
|
335
|
+
this.isBlockingError(parsedRecords.et90.errorDetail, oa)
|
|
336
|
+
? [parsedRecords.et90.errorDetail]
|
|
337
|
+
: []);
|
|
338
|
+
return _.compact(_.map(errors, (error) => this.extractErrorMessage(error)));
|
|
339
|
+
}
|
|
340
|
+
isBlockingError(errorDetail, oa) {
|
|
341
|
+
//check : https://medispring.atlassian.net/browse/MS-7967
|
|
342
|
+
const lineNumbersToVerify = ["1", "2", "3"];
|
|
343
|
+
const nonBlockingErrorLetters = ["E"];
|
|
344
|
+
const nonBlockingErrorCodesByOa = {
|
|
345
|
+
"100": [],
|
|
346
|
+
"200": [],
|
|
347
|
+
"300": [],
|
|
348
|
+
"306": [],
|
|
349
|
+
"400": [],
|
|
350
|
+
"500": [],
|
|
351
|
+
"600": ["500524"],
|
|
352
|
+
"700": [],
|
|
353
|
+
"800": [],
|
|
354
|
+
"900": [],
|
|
355
|
+
};
|
|
356
|
+
return lineNumbersToVerify.some((lineNumber) => {
|
|
357
|
+
var _a, _b;
|
|
358
|
+
const rejectionLetter = `${((_a = errorDetail) === null || _a === void 0 ? void 0 : _a["rejectionLetter" + lineNumber]) || ""}`.trim();
|
|
359
|
+
const rejectionCode = `${((_b = errorDetail) === null || _b === void 0 ? void 0 : _b["rejectionCode" + lineNumber]) || ""}`.trim();
|
|
360
|
+
if (!rejectionLetter)
|
|
361
|
+
return false;
|
|
362
|
+
return (!nonBlockingErrorLetters.includes(rejectionLetter) &&
|
|
363
|
+
!(nonBlockingErrorCodesByOa[oa] || []).includes(rejectionCode));
|
|
364
|
+
});
|
|
333
365
|
}
|
|
334
366
|
processTack(user, hcp, efactMessage) {
|
|
335
367
|
if (!efactMessage.tack) {
|
|
@@ -374,6 +406,8 @@ class MessageXApi {
|
|
|
374
406
|
}
|
|
375
407
|
// Pass invoicePrefix if you want to generate the invoice reference from entityRef
|
|
376
408
|
processEfactMessage(user, hcp, efactMessage, invoicePrefix, invoicePrefixer) {
|
|
409
|
+
var _a, _b, _c, _d;
|
|
410
|
+
const oa = (_d = (_c = (((_b = (_a = efactMessage.message) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.zones) || [])) === null || _c === void 0 ? void 0 : _c.find((z) => { var _a, _b; return (_b = (_a = z.zoneDescription) === null || _a === void 0 ? void 0 : _a.zones) === null || _b === void 0 ? void 0 : _b.contains("204"); })) === null || _d === void 0 ? void 0 : _d.value.toString().substring(8, 11);
|
|
377
411
|
const ref = efactMessage.commonOutput.inputReference
|
|
378
412
|
? Number(efactMessage.commonOutput.inputReference) % 10000000000
|
|
379
413
|
: Number(efactMessage.commonOutput.outputReference.replace(/\D+/g, "")) % 10000000000;
|
|
@@ -411,7 +445,7 @@ class MessageXApi {
|
|
|
411
445
|
if (!parentMessage) {
|
|
412
446
|
throw new Error(`Cannot match parent with fileReference for file with ref ${ref}`);
|
|
413
447
|
}
|
|
414
|
-
const errors = this.extractErrors(parsedRecords);
|
|
448
|
+
const errors = this.extractErrors(parsedRecords, oa);
|
|
415
449
|
const statuses = (["920999", "920099"].includes(messageType) ? 1 << 17 /*STATUS_FULL_ERROR*/ : 0) |
|
|
416
450
|
(["920900"].includes(messageType) && errors.length
|
|
417
451
|
? 1 << 16 /*STATUS_PARTIAL_SUCCESS*/
|
|
@@ -547,14 +581,16 @@ class MessageXApi {
|
|
|
547
581
|
.map(e => this.extractErrorMessage(e.error))
|
|
548
582
|
.compact()
|
|
549
583
|
.join("; ") || undefined;
|
|
550
|
-
|
|
584
|
+
// check if it has a blocking error
|
|
585
|
+
const hasBlockingError = invoicingErrors.some((it) => it.itemId === ic.id && this.isBlockingError(it.error, oa));
|
|
586
|
+
const record50 = messageType === "920900" ?
|
|
551
587
|
_.compact(_.flatMap(parsedRecords.records, r => r.items.map(i => _.get(i, "et50.itemReference") &&
|
|
552
588
|
(0, efact_util_1.decodeBase36Uuid)(i.et50.itemReference.trim()) === ic.id &&
|
|
553
|
-
i.et50)))[0];
|
|
589
|
+
i.et50)))[0] : undefined;
|
|
554
590
|
const zone114amount = record50 &&
|
|
555
591
|
_.get(record50, "errorDetail.zone114") &&
|
|
556
592
|
Number(record50.errorDetail.zone114);
|
|
557
|
-
if (rejectAll || codeError) {
|
|
593
|
+
if (rejectAll || (!zone114amount && codeError && hasBlockingError)) {
|
|
558
594
|
ic.accepted = false;
|
|
559
595
|
ic.canceled = true;
|
|
560
596
|
ic.pending = false;
|
|
@@ -603,7 +639,7 @@ class MessageXApi {
|
|
|
603
639
|
ic.canceled = false;
|
|
604
640
|
ic.pending = false;
|
|
605
641
|
ic.resent = false;
|
|
606
|
-
ic.error = undefined;
|
|
642
|
+
ic.error = codeError !== null && codeError !== void 0 ? codeError : undefined;
|
|
607
643
|
ic.paid = zone114amount
|
|
608
644
|
? Number((zone114amount / 100).toFixed(2))
|
|
609
645
|
: ic.reimbursement;
|
|
@@ -192,6 +192,11 @@ function toInvoice(nihiiHealthcareProvider, invoice, patient, insurance, related
|
|
|
192
192
|
if (flatrateInvoice) {
|
|
193
193
|
efactInvoice.startOfCoveragePeriod = invoice.invoicingCodes[0].contractDate;
|
|
194
194
|
}
|
|
195
|
+
if (invoice === null || invoice === void 0 ? void 0 : invoice.locationNihii) {
|
|
196
|
+
efactInvoice.locationNihii = invoice === null || invoice === void 0 ? void 0 : invoice.locationNihii;
|
|
197
|
+
efactInvoice.locationService = invoice === null || invoice === void 0 ? void 0 : invoice.locationService;
|
|
198
|
+
efactInvoice.admissionDate = invoice === null || invoice === void 0 ? void 0 : invoice.admissionDate;
|
|
199
|
+
}
|
|
195
200
|
return efactInvoice;
|
|
196
201
|
}
|
|
197
202
|
function toInvoiceItem(nihiiHealthcareProvider, patient, invoice, invoicingCode, flatrateInvoice = false) {
|
|
@@ -203,7 +208,9 @@ function toInvoiceItem(nihiiHealthcareProvider, patient, invoice, invoicingCode,
|
|
|
203
208
|
invoiceItem.endDateCode =
|
|
204
209
|
invoiceItem.codeNomenclature === 109594 // Diabetes pre-care pathways
|
|
205
210
|
? (0, formatting_util_1.dateEncode)((0, formatting_util_1.toMoment)(invoicingCode.dateCode).toDate())
|
|
206
|
-
: (0, formatting_util_1.dateEncode)((0, formatting_util_1.toMoment)(invoicingCode.dateCode)
|
|
211
|
+
: (0, formatting_util_1.dateEncode)((0, formatting_util_1.toMoment)(invoicingCode.dateCode)
|
|
212
|
+
.endOf("month")
|
|
213
|
+
.toDate());
|
|
207
214
|
}
|
|
208
215
|
invoiceItem.doctorIdentificationNumber = nihiiHealthcareProvider;
|
|
209
216
|
invoiceItem.doctorSupplement = Number(((invoicingCode.doctorSupplement || 0) * 100).toFixed(0));
|