@icure/be-fhc-api 0.4.11 → 0.4.14
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.js +1 -0
- package/x-api/utils/efact-util.js +50 -10
|
@@ -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.js
CHANGED
|
@@ -352,6 +352,7 @@ class MessageXApi {
|
|
|
352
352
|
const parentMessage = msgsForHcp[0];
|
|
353
353
|
return this.receiptXApi.iccApi
|
|
354
354
|
.createReceipt(new api_1.Receipt({
|
|
355
|
+
id: this.crypto.randomUuid(),
|
|
355
356
|
documentId: parentMessage.id,
|
|
356
357
|
references: [
|
|
357
358
|
`mycarenet:efact:inputReference:${ref}`,
|
|
@@ -126,9 +126,21 @@ function toInvoiceBatch(invoicesWithPatient, hcp, batchRef, batchNumber, fileRef
|
|
|
126
126
|
return toInvoice(hcp.nihii, invoice, invWithPat.patient, insurance, relatedInvoiceInfo, flatrateInvoice);
|
|
127
127
|
});
|
|
128
128
|
const now = new Date();
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
const invoiceDates = _.groupBy(invoicesWithPatient.map(inv => { var _a, _b; return ((_b = (_a = inv === null || inv === void 0 ? void 0 : inv.invoice) === null || _a === void 0 ? void 0 : _a.invoiceDate) !== null && _b !== void 0 ? _b : 100001).toString().substring(0, 6) + "01"; }));
|
|
130
|
+
//The invoiceMonth/Year of the batch must be equal to the most recent month/year of the invoices that has the highest count within the batch.
|
|
131
|
+
//From the INAMI Rules: (https://www.riziv.fgov.be/SiteCollectionDocuments/instructions_facturation_electronique_2021.pdf page 213)
|
|
132
|
+
// In deze zone bedoelt men de maand waarin het merendeel der prestaties, die op deze factuur staan,
|
|
133
|
+
// werden verricht. Deze maand kan verschillend zijn van de maand waarin de factuur werd opgemaakt
|
|
134
|
+
//Examples:
|
|
135
|
+
//A. 10 invoices 02/2020, 10 invoices 03/2020, 5 invoices 04/2020 --> 03/2020
|
|
136
|
+
//B. 10 invoices 02/2020; 9 invoices 03/2020, 5 invoices 04/2020 --> 02/2020
|
|
137
|
+
let dateCounts = [];
|
|
138
|
+
_.forOwn(invoiceDates, function (val, key) {
|
|
139
|
+
dateCounts.push({ date: key, count: val.length });
|
|
140
|
+
});
|
|
141
|
+
const invoiceDate = (0, formatting_util_1.toMoment)(_.get(_.head(_.orderBy(dateCounts, ["count", "date"], ["desc", "desc"])), "date", invoicesWithPatient[0].invoice.invoiceDate));
|
|
142
|
+
const invoicingMonth = !!invoiceDate ? invoiceDate.month() + 1 : 0;
|
|
143
|
+
const invoicingYear = !!invoiceDate ? invoiceDate.year() : 0;
|
|
132
144
|
// The OA 500, matches the monthYear (zone 300) to check the batch sending number
|
|
133
145
|
// Use sending year to prevent duplicate sending number in case of invoices made
|
|
134
146
|
// on the previous year
|
|
@@ -180,18 +192,26 @@ function toInvoice(nihiiHealthcareProvider, invoice, patient, insurance, related
|
|
|
180
192
|
if (flatrateInvoice) {
|
|
181
193
|
efactInvoice.startOfCoveragePeriod = invoice.invoicingCodes[0].contractDate;
|
|
182
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
|
+
}
|
|
183
200
|
return efactInvoice;
|
|
184
201
|
}
|
|
185
202
|
function toInvoiceItem(nihiiHealthcareProvider, patient, invoice, invoicingCode, flatrateInvoice = false) {
|
|
186
203
|
const invoiceItem = new models_1.InvoiceItem({});
|
|
187
204
|
invoiceItem.codeNomenclature = Number(invoicingCode.tarificationId.split("|")[1]);
|
|
188
205
|
invoiceItem.dateCode = (0, formatting_util_1.dateEncode)((0, formatting_util_1.toMoment)(invoicingCode.dateCode).toDate());
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
.
|
|
194
|
-
.
|
|
206
|
+
// Only applies to flatrate invoicing (https://medispring.atlassian.net/wiki/spaces/EN/pages/2536013825/Behavior+of+diabetes+pre-care+pathways+flatrate+invoicing)
|
|
207
|
+
if (flatrateInvoice) {
|
|
208
|
+
invoiceItem.endDateCode =
|
|
209
|
+
invoiceItem.codeNomenclature === 109594 // Diabetes pre-care pathways
|
|
210
|
+
? (0, formatting_util_1.dateEncode)((0, formatting_util_1.toMoment)(invoicingCode.dateCode).toDate())
|
|
211
|
+
: (0, formatting_util_1.dateEncode)((0, formatting_util_1.toMoment)(invoicingCode.dateCode)
|
|
212
|
+
.endOf("month")
|
|
213
|
+
.toDate());
|
|
214
|
+
}
|
|
195
215
|
invoiceItem.doctorIdentificationNumber = nihiiHealthcareProvider;
|
|
196
216
|
invoiceItem.doctorSupplement = Number(((invoicingCode.doctorSupplement || 0) * 100).toFixed(0));
|
|
197
217
|
if (invoicingCode.eidReadingHour && invoicingCode.eidReadingValue) {
|
|
@@ -209,10 +229,11 @@ function toInvoiceItem(nihiiHealthcareProvider, patient, invoice, invoicingCode,
|
|
|
209
229
|
invoiceItem.invoiceRef = uuidBase36(invoicingCode.id);
|
|
210
230
|
invoiceItem.override3rdPayerCode = invoicingCode.override3rdPayerCode;
|
|
211
231
|
invoiceItem.patientFee = Number(((invoicingCode.patientIntervention || 0) * 100).toFixed(0));
|
|
212
|
-
invoiceItem.percentNorm =
|
|
232
|
+
invoiceItem.percentNorm = getPercentNorm(invoicingCode.percentNorm || 0);
|
|
213
233
|
invoiceItem.personalInterventionCoveredByThirdPartyCode =
|
|
214
234
|
invoicingCode.cancelPatientInterventionReason;
|
|
215
235
|
invoiceItem.prescriberNihii = invoicingCode.prescriberNihii;
|
|
236
|
+
invoiceItem.prescriptionDate = invoicingCode.prescriptionDate;
|
|
216
237
|
invoiceItem.prescriberNorm = getPrescriberNorm(invoicingCode.prescriberNorm || 0);
|
|
217
238
|
invoiceItem.reimbursedAmount = Number(((invoicingCode.reimbursement || 0) * 100).toFixed(0));
|
|
218
239
|
invoiceItem.relatedCode = Number(invoicingCode.relatedCode || 0);
|
|
@@ -223,6 +244,25 @@ function toInvoiceItem(nihiiHealthcareProvider, patient, invoice, invoicingCode,
|
|
|
223
244
|
invoiceItem.internshipNihii = invoice.internshipNihii;
|
|
224
245
|
return invoiceItem;
|
|
225
246
|
}
|
|
247
|
+
function getPercentNorm(norm) {
|
|
248
|
+
return norm === 0
|
|
249
|
+
? models_1.InvoiceItem.PercentNormEnum.None
|
|
250
|
+
: norm === 1
|
|
251
|
+
? models_1.InvoiceItem.PercentNormEnum.SurgicalAid1
|
|
252
|
+
: norm === 2
|
|
253
|
+
? models_1.InvoiceItem.PercentNormEnum.SurgicalAid2
|
|
254
|
+
: norm === 3
|
|
255
|
+
? models_1.InvoiceItem.PercentNormEnum.ReducedFee
|
|
256
|
+
: norm === 4
|
|
257
|
+
? models_1.InvoiceItem.PercentNormEnum.Ah1n1
|
|
258
|
+
: norm === 5
|
|
259
|
+
? models_1.InvoiceItem.PercentNormEnum.HalfPriceSecondAct
|
|
260
|
+
: norm === 6
|
|
261
|
+
? models_1.InvoiceItem.PercentNormEnum.InvoiceException
|
|
262
|
+
: norm === 7
|
|
263
|
+
? models_1.InvoiceItem.PercentNormEnum.ForInformation
|
|
264
|
+
: models_1.InvoiceItem.PercentNormEnum.None;
|
|
265
|
+
}
|
|
226
266
|
function getSideCode(code) {
|
|
227
267
|
return code === 0
|
|
228
268
|
? models_1.InvoiceItem.SideCodeEnum.None
|