@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.
@@ -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
+ }
@@ -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 fhcDataAttributeserviceApi {
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.fhcDataAttributeserviceApi = void 0;
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 fhcDataAttributeserviceApi {
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 !== undefined
55
- ? "&prolongation=" + encodeURIComponent(String(prolongation))
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.fhcDataAttributeserviceApi = fhcDataAttributeserviceApi;
65
+ exports.fhcDataAttributeServiceApi = fhcDataAttributeServiceApi;
@@ -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: Array<string>): Promise<MemberDataList>;
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
  }
@@ -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)) : "") +
@@ -20,7 +20,7 @@ export declare class fhcSchematronApi {
20
20
  handleError(e: XHR.XHRError): never;
21
21
  /**
22
22
  *
23
- * @summary getDinRoutingInfo
23
+ * @summary validateUsingShematron
24
24
  * @param body body
25
25
  * @param xFHCTokenId X-FHC-tokenId
26
26
  * @param schema schema
@@ -28,7 +28,7 @@ class fhcSchematronApi {
28
28
  }
29
29
  /**
30
30
  *
31
- * @summary getDinRoutingInfo
31
+ * @summary validateUsingShematron
32
32
  * @param body body
33
33
  * @param xFHCTokenId X-FHC-tokenId
34
34
  * @param schema schema
package/fhcApi.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./api/fhcAddressbookApi";
2
2
  export * from "./api/fhcAdminApi";
3
+ export * from "./api/fhcApbApi";
3
4
  export * from "./api/fhcChapter4Api";
4
5
  export * from "./api/fhcConsentApi";
5
6
  export * from "./api/fhcConsultrnApi";
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);
@@ -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";
@@ -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
  }
@@ -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;
@@ -30,4 +30,5 @@ export declare class PrescriptionRequest {
30
30
  vendorEmail?: string;
31
31
  vendorPhone?: string;
32
32
  vision?: string;
33
+ lang?: string;
33
34
  }
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icure/be-fhc-api",
3
- "version": "0.4.11",
3
+ "version": "0.4.14",
4
4
  "description": "Typescript version of Freehealth Connector standalone API client",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -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 invoiceDate = (0, formatting_util_1.toMoment)(invoicesWithPatient[0].invoice.invoiceDate);
130
- const invoicingMonth = invoiceDate.month() + 1;
131
- const invoicingYear = invoiceDate.year();
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
- invoiceItem.endDateCode =
190
- invoiceItem.codeNomenclature === 109594
191
- ? (0, formatting_util_1.dateEncode)((0, formatting_util_1.toMoment)(invoicingCode.dateCode).toDate())
192
- : (0, formatting_util_1.dateEncode)((0, formatting_util_1.toMoment)(invoicingCode.dateCode)
193
- .endOf("month")
194
- .toDate());
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 = models_1.InvoiceItem.PercentNormEnum.None;
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