@icure/be-fhc-api 0.6.2 → 0.6.4
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/fhcEagreementApi.d.ts +7 -7
- package/api/fhcEagreementApi.js +26 -18
- package/api/fhcEattestV3Api.d.ts +4 -2
- package/api/fhcEattestV3Api.js +6 -2
- package/api/fhcHubApi.d.ts +354 -352
- package/api/fhcHubApi.js +356 -354
- package/api/fhcMediprimaApi.d.ts +22 -2
- package/api/fhcMediprimaApi.js +56 -2
- package/api/fhcStsApi.d.ts +16 -16
- package/api/fhcStsApi.js +16 -16
- package/model/AgreementResponse.d.ts +1 -1
- package/model/Author.d.ts +19 -0
- package/model/Author.js +20 -0
- package/model/CbssStatusType.d.ts +19 -0
- package/model/CbssStatusType.js +9 -0
- package/model/EAgreementResponse.d.ts +24 -0
- package/model/EAgreementResponse.js +10 -0
- package/model/InsurancyMembership.d.ts +16 -0
- package/model/InsurancyMembership.js +20 -0
- package/model/InsurancyStatus.d.ts +18 -0
- package/model/InsurancyStatus.js +20 -0
- package/model/MedicalCardRegistryMessageType.d.ts +19 -0
- package/model/MedicalCardRegistryMessageType.js +9 -0
- package/model/MedicalCardRegistryStatusType.d.ts +16 -0
- package/model/MedicalCardRegistryStatusType.js +9 -0
- package/model/MediprimaMdaResponse.d.ts +23 -0
- package/model/MediprimaMdaResponse.js +9 -0
- package/model/MediprimaNumber.d.ts +16 -0
- package/model/MediprimaNumber.js +20 -0
- package/model/Prescription.d.ts +2 -2
- package/model/Pswc.d.ts +17 -0
- package/model/Pswc.js +20 -0
- package/model/TarificationMediprimaConsultationResult.d.ts +26 -0
- package/model/TarificationMediprimaConsultationResult.js +9 -0
- package/model/models.d.ts +11 -0
- package/model/models.js +11 -0
- package/package.json +1 -1
- package/x-api/message-x-api.js +1 -1
- package/x-api/utils/efact-util.d.ts +3 -3
- package/x-api/utils/efact-util.js +4 -4
package/model/Pswc.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Api Documentation
|
|
4
|
+
* Api Documentation
|
|
5
|
+
*
|
|
6
|
+
* OpenAPI spec version: 1.0
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
10
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.Pswc = void 0;
|
|
15
|
+
class Pswc {
|
|
16
|
+
constructor(json) {
|
|
17
|
+
Object.assign(this, json);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.Pswc = Pswc;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { Author } from "./Author";
|
|
13
|
+
import { CodeResult } from "./CodeResult";
|
|
14
|
+
import { CommonOutput } from "./CommonOutput";
|
|
15
|
+
import { MycarenetConversation } from "./MycarenetConversation";
|
|
16
|
+
import { MycarenetError } from "./MycarenetError";
|
|
17
|
+
import { Patient } from "./Patient";
|
|
18
|
+
export declare class TarificationMediprimaConsultationResult {
|
|
19
|
+
constructor(json: JSON | any);
|
|
20
|
+
author?: Author;
|
|
21
|
+
codeResults?: Array<CodeResult>;
|
|
22
|
+
commonOutput?: CommonOutput;
|
|
23
|
+
errors?: Array<MycarenetError>;
|
|
24
|
+
mycarenetConversation?: MycarenetConversation;
|
|
25
|
+
patient?: Patient;
|
|
26
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TarificationMediprimaConsultationResult = void 0;
|
|
4
|
+
class TarificationMediprimaConsultationResult {
|
|
5
|
+
constructor(json) {
|
|
6
|
+
Object.assign(this, json);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.TarificationMediprimaConsultationResult = TarificationMediprimaConsultationResult;
|
package/model/models.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export * from "./AltKeystoresList";
|
|
|
26
26
|
export * from "./AnomaliesType";
|
|
27
27
|
export * from "./Appendix";
|
|
28
28
|
export * from "./Assertion";
|
|
29
|
+
export * from "./Author";
|
|
29
30
|
export * from "./AuthorDto";
|
|
30
31
|
export * from "./AuthorType";
|
|
31
32
|
export * from "./AuthorWithPatientDto";
|
|
@@ -96,6 +97,7 @@ export * from "./CarmedContentCareType";
|
|
|
96
97
|
export * from "./CarmedIdentifierType";
|
|
97
98
|
export * from "./CbssPersonRequestType";
|
|
98
99
|
export * from "./CbssPersonResponseType";
|
|
100
|
+
export * from "./CbssStatusType";
|
|
99
101
|
export * from "./CertaintyType";
|
|
100
102
|
export * from "./CertificateInfo";
|
|
101
103
|
export * from "./CipherData";
|
|
@@ -165,6 +167,7 @@ export * from "./Document";
|
|
|
165
167
|
export * from "./DocumentMessage";
|
|
166
168
|
export * from "./Duration";
|
|
167
169
|
export * from "./DurationType";
|
|
170
|
+
export * from "./EAgreementResponse";
|
|
168
171
|
export * from "./EHealthBoxType";
|
|
169
172
|
export * from "./EIDItem";
|
|
170
173
|
export * from "./Eattest";
|
|
@@ -245,6 +248,8 @@ export * from "./Insurability";
|
|
|
245
248
|
export * from "./InsurabilityInfoDto";
|
|
246
249
|
export * from "./InsurabilityItemDto";
|
|
247
250
|
export * from "./InsuranceType";
|
|
251
|
+
export * from "./InsurancyMembership";
|
|
252
|
+
export * from "./InsurancyStatus";
|
|
248
253
|
export * from "./Invoice";
|
|
249
254
|
export * from "./InvoiceItem";
|
|
250
255
|
export * from "./InvoiceSender";
|
|
@@ -277,6 +282,8 @@ export * from "./Mapstringstring";
|
|
|
277
282
|
export * from "./MaxrefType";
|
|
278
283
|
export * from "./MdaStatus";
|
|
279
284
|
export * from "./Measure";
|
|
285
|
+
export * from "./MedicalCardRegistryMessageType";
|
|
286
|
+
export * from "./MedicalCardRegistryStatusType";
|
|
280
287
|
export * from "./MedicalCoverType";
|
|
281
288
|
export * from "./MedicalHouseInfoDto";
|
|
282
289
|
export * from "./MedicalTransportationType";
|
|
@@ -285,6 +292,8 @@ export * from "./MedicationRenewal";
|
|
|
285
292
|
export * from "./MedicationType";
|
|
286
293
|
export * from "./MedicinalProductType";
|
|
287
294
|
export * from "./Medicinalproduct";
|
|
295
|
+
export * from "./MediprimaMdaResponse";
|
|
296
|
+
export * from "./MediprimaNumber";
|
|
288
297
|
export * from "./MemberDataAck";
|
|
289
298
|
export * from "./MemberDataBatchRequestDto";
|
|
290
299
|
export * from "./MemberDataBatchResponse";
|
|
@@ -366,6 +375,7 @@ export * from "./ProfessionCode";
|
|
|
366
375
|
export * from "./ProfessionType";
|
|
367
376
|
export * from "./ProsthesisType";
|
|
368
377
|
export * from "./ProviderList";
|
|
378
|
+
export * from "./Pswc";
|
|
369
379
|
export * from "./PswcSupportType";
|
|
370
380
|
export * from "./PutAccessRightResponse";
|
|
371
381
|
export * from "./PutPatientConsentResponse";
|
|
@@ -491,6 +501,7 @@ export * from "./SupplementTypeListType";
|
|
|
491
501
|
export * from "./TAck";
|
|
492
502
|
export * from "./Takes";
|
|
493
503
|
export * from "./TarificationConsultationResult";
|
|
504
|
+
export * from "./TarificationMediprimaConsultationResult";
|
|
494
505
|
export * from "./Telecom";
|
|
495
506
|
export * from "./TelecomType";
|
|
496
507
|
export * from "./TemporalityType";
|
package/model/models.js
CHANGED
|
@@ -42,6 +42,7 @@ __exportStar(require("./AltKeystoresList"), exports);
|
|
|
42
42
|
__exportStar(require("./AnomaliesType"), exports);
|
|
43
43
|
__exportStar(require("./Appendix"), exports);
|
|
44
44
|
__exportStar(require("./Assertion"), exports);
|
|
45
|
+
__exportStar(require("./Author"), exports);
|
|
45
46
|
__exportStar(require("./AuthorDto"), exports);
|
|
46
47
|
__exportStar(require("./AuthorType"), exports);
|
|
47
48
|
__exportStar(require("./AuthorWithPatientDto"), exports);
|
|
@@ -112,6 +113,7 @@ __exportStar(require("./CarmedContentCareType"), exports);
|
|
|
112
113
|
__exportStar(require("./CarmedIdentifierType"), exports);
|
|
113
114
|
__exportStar(require("./CbssPersonRequestType"), exports);
|
|
114
115
|
__exportStar(require("./CbssPersonResponseType"), exports);
|
|
116
|
+
__exportStar(require("./CbssStatusType"), exports);
|
|
115
117
|
__exportStar(require("./CertaintyType"), exports);
|
|
116
118
|
__exportStar(require("./CertificateInfo"), exports);
|
|
117
119
|
__exportStar(require("./CipherData"), exports);
|
|
@@ -181,6 +183,7 @@ __exportStar(require("./Document"), exports);
|
|
|
181
183
|
__exportStar(require("./DocumentMessage"), exports);
|
|
182
184
|
__exportStar(require("./Duration"), exports);
|
|
183
185
|
__exportStar(require("./DurationType"), exports);
|
|
186
|
+
__exportStar(require("./EAgreementResponse"), exports);
|
|
184
187
|
__exportStar(require("./EHealthBoxType"), exports);
|
|
185
188
|
__exportStar(require("./EIDItem"), exports);
|
|
186
189
|
__exportStar(require("./Eattest"), exports);
|
|
@@ -261,6 +264,8 @@ __exportStar(require("./Insurability"), exports);
|
|
|
261
264
|
__exportStar(require("./InsurabilityInfoDto"), exports);
|
|
262
265
|
__exportStar(require("./InsurabilityItemDto"), exports);
|
|
263
266
|
__exportStar(require("./InsuranceType"), exports);
|
|
267
|
+
__exportStar(require("./InsurancyMembership"), exports);
|
|
268
|
+
__exportStar(require("./InsurancyStatus"), exports);
|
|
264
269
|
__exportStar(require("./Invoice"), exports);
|
|
265
270
|
__exportStar(require("./InvoiceItem"), exports);
|
|
266
271
|
__exportStar(require("./InvoiceSender"), exports);
|
|
@@ -293,6 +298,8 @@ __exportStar(require("./Mapstringstring"), exports);
|
|
|
293
298
|
__exportStar(require("./MaxrefType"), exports);
|
|
294
299
|
__exportStar(require("./MdaStatus"), exports);
|
|
295
300
|
__exportStar(require("./Measure"), exports);
|
|
301
|
+
__exportStar(require("./MedicalCardRegistryMessageType"), exports);
|
|
302
|
+
__exportStar(require("./MedicalCardRegistryStatusType"), exports);
|
|
296
303
|
__exportStar(require("./MedicalCoverType"), exports);
|
|
297
304
|
__exportStar(require("./MedicalHouseInfoDto"), exports);
|
|
298
305
|
__exportStar(require("./MedicalTransportationType"), exports);
|
|
@@ -301,6 +308,8 @@ __exportStar(require("./MedicationRenewal"), exports);
|
|
|
301
308
|
__exportStar(require("./MedicationType"), exports);
|
|
302
309
|
__exportStar(require("./MedicinalProductType"), exports);
|
|
303
310
|
__exportStar(require("./Medicinalproduct"), exports);
|
|
311
|
+
__exportStar(require("./MediprimaMdaResponse"), exports);
|
|
312
|
+
__exportStar(require("./MediprimaNumber"), exports);
|
|
304
313
|
__exportStar(require("./MemberDataAck"), exports);
|
|
305
314
|
__exportStar(require("./MemberDataBatchRequestDto"), exports);
|
|
306
315
|
__exportStar(require("./MemberDataBatchResponse"), exports);
|
|
@@ -382,6 +391,7 @@ __exportStar(require("./ProfessionCode"), exports);
|
|
|
382
391
|
__exportStar(require("./ProfessionType"), exports);
|
|
383
392
|
__exportStar(require("./ProsthesisType"), exports);
|
|
384
393
|
__exportStar(require("./ProviderList"), exports);
|
|
394
|
+
__exportStar(require("./Pswc"), exports);
|
|
385
395
|
__exportStar(require("./PswcSupportType"), exports);
|
|
386
396
|
__exportStar(require("./PutAccessRightResponse"), exports);
|
|
387
397
|
__exportStar(require("./PutPatientConsentResponse"), exports);
|
|
@@ -507,6 +517,7 @@ __exportStar(require("./SupplementTypeListType"), exports);
|
|
|
507
517
|
__exportStar(require("./TAck"), exports);
|
|
508
518
|
__exportStar(require("./Takes"), exports);
|
|
509
519
|
__exportStar(require("./TarificationConsultationResult"), exports);
|
|
520
|
+
__exportStar(require("./TarificationMediprimaConsultationResult"), exports);
|
|
510
521
|
__exportStar(require("./Telecom"), exports);
|
|
511
522
|
__exportStar(require("./TelecomType"), exports);
|
|
512
523
|
__exportStar(require("./TemporalityType"), exports);
|
package/package.json
CHANGED
package/x-api/message-x-api.js
CHANGED
|
@@ -824,7 +824,7 @@ class MessageXApi {
|
|
|
824
824
|
id: prefix + _.padStart("" + (nextSeqNumber % 1000000000), 9, "0"),
|
|
825
825
|
docId: uuid
|
|
826
826
|
})))
|
|
827
|
-
.then(er => (0, efact_util_1.toInvoiceBatch)(invoices, hcp, fullBase36, er && er.id ? Number(er.id.substr(prefix.length)) % 1000 : 0, smallBase36, this.insuranceApi, this.invoiceXApi, this.api, speciality, professionCode))
|
|
827
|
+
.then(er => (0, efact_util_1.toInvoiceBatch)(invoices, user, hcp, fullBase36, er && er.id ? Number(er.id.substr(prefix.length)) % 1000 : 0, smallBase36, this.insuranceApi, this.invoiceXApi, this.api, speciality, professionCode))
|
|
828
828
|
.then(batch => efactApi
|
|
829
829
|
.sendBatchUsingPOST(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, batch)
|
|
830
830
|
//.then(() => { throw "ERREUR FORCEE" })
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HealthcareParty, Invoice, Patient } from "@icure/api";
|
|
1
|
+
import { HealthcareParty, Invoice, Patient, User } from "@icure/api";
|
|
2
2
|
import { IccInvoiceXApi, IccMessageXApi, IccInsuranceApi, Insurance } from "@icure/api";
|
|
3
3
|
import { InvoicesBatch, InvoiceItem } from "../../model/models";
|
|
4
4
|
export interface RelatedInvoiceInfo {
|
|
@@ -15,8 +15,8 @@ export interface InvoiceWithPatient {
|
|
|
15
15
|
aggregatedInvoice?: Invoice;
|
|
16
16
|
}
|
|
17
17
|
export declare function getFederaton(invoices: Array<InvoiceWithPatient>, insuranceApi: IccInsuranceApi): Promise<Insurance>;
|
|
18
|
-
export declare function getRelatedInvoicesInfo(invoicesWithPatient: InvoiceWithPatient[], insuranceApi: IccInsuranceApi, invoiceXApi: IccInvoiceXApi, messageXApi: IccMessageXApi): Promise<RelatedInvoiceInfo[]>;
|
|
19
|
-
export declare function toInvoiceBatch(invoicesWithPatient: Array<InvoiceWithPatient>, hcp: HealthcareParty, batchRef: string, batchNumber: number, fileRef: string, insuranceApi: IccInsuranceApi, invoiceXApi: IccInvoiceXApi, messageXApi: IccMessageXApi, speciality: string, professionCode: string): Promise<InvoicesBatch>;
|
|
18
|
+
export declare function getRelatedInvoicesInfo(user: User, invoicesWithPatient: InvoiceWithPatient[], insuranceApi: IccInsuranceApi, invoiceXApi: IccInvoiceXApi, messageXApi: IccMessageXApi): Promise<RelatedInvoiceInfo[]>;
|
|
19
|
+
export declare function toInvoiceBatch(invoicesWithPatient: Array<InvoiceWithPatient>, user: User, hcp: HealthcareParty, batchRef: string, batchNumber: number, fileRef: string, insuranceApi: IccInsuranceApi, invoiceXApi: IccInvoiceXApi, messageXApi: IccMessageXApi, speciality: string, professionCode: string): Promise<InvoicesBatch>;
|
|
20
20
|
export declare function getDerogationMaxNumber(code: number): InvoiceItem.DerogationMaxNumberEnum;
|
|
21
21
|
export declare function toDerogationMaxNumber(derogation: InvoiceItem.DerogationMaxNumberEnum): number;
|
|
22
22
|
export declare function uuidBase36(uuid: string): string;
|
|
@@ -47,7 +47,7 @@ function getFederaton(invoices, insuranceApi) {
|
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
function getRelatedInvoicesInfo(invoicesWithPatient, insuranceApi, invoiceXApi, messageXApi) {
|
|
50
|
+
function getRelatedInvoicesInfo(user, invoicesWithPatient, insuranceApi, invoiceXApi, messageXApi) {
|
|
51
51
|
// Return the id of the related parentInvoice
|
|
52
52
|
const getRelatedInvoiceId = (iv) => (iv.creditNote && iv.creditNoteRelatedInvoiceId) || iv.correctedInvoiceId;
|
|
53
53
|
return Promise.resolve(invoicesWithPatient).then(invoicesWithPatient => {
|
|
@@ -62,7 +62,7 @@ function getRelatedInvoicesInfo(invoicesWithPatient, insuranceApi, invoiceXApi,
|
|
|
62
62
|
ids: invoices.map(iv => getRelatedInvoiceId(iv))
|
|
63
63
|
});
|
|
64
64
|
return Promise.all([
|
|
65
|
-
messageXApi.
|
|
65
|
+
messageXApi.listMessagesByInvoiceIdsWithUser(user, relatedInvoiceIds),
|
|
66
66
|
invoiceXApi.getInvoices(relatedInvoiceIds)
|
|
67
67
|
]).then(result => {
|
|
68
68
|
const messages = result[0];
|
|
@@ -96,7 +96,7 @@ function getRelatedInvoicesInfo(invoicesWithPatient, insuranceApi, invoiceXApi,
|
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
// Here we trust the invoices argument for grouping validity (month, year and patient)
|
|
99
|
-
function toInvoiceBatch(invoicesWithPatient, hcp, batchRef, batchNumber, fileRef, insuranceApi, invoiceXApi, messageXApi, speciality, professionCode) {
|
|
99
|
+
function toInvoiceBatch(invoicesWithPatient, user, hcp, batchRef, batchNumber, fileRef, insuranceApi, invoiceXApi, messageXApi, speciality, professionCode) {
|
|
100
100
|
return insuranceApi
|
|
101
101
|
.getInsurances(new api_1.ListOfIds({
|
|
102
102
|
ids: _.compact(invoicesWithPatient.map(iwp => iwp.invoice.recipientId))
|
|
@@ -113,7 +113,7 @@ function toInvoiceBatch(invoicesWithPatient, hcp, batchRef, batchNumber, fileRef
|
|
|
113
113
|
if (fedCodes.length > 1) {
|
|
114
114
|
throw "The provided invoices are not addressed to insurances belonging to the same federation";
|
|
115
115
|
}
|
|
116
|
-
return getRelatedInvoicesInfo(invoicesWithPatient, insuranceApi, invoiceXApi, messageXApi).then((relatedInvoicesInfo) => {
|
|
116
|
+
return getRelatedInvoicesInfo(user, invoicesWithPatient, insuranceApi, invoiceXApi, messageXApi).then((relatedInvoicesInfo) => {
|
|
117
117
|
const invoicesBatch = new models_1.InvoicesBatch({});
|
|
118
118
|
invoicesBatch.batchRef = batchRef;
|
|
119
119
|
invoicesBatch.fileRef = fileRef;
|