@icure/be-fhc-api 0.4.7 → 0.4.8

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/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  export * from "./fhcApi";
2
2
  export * from "./model/models";
3
+ export * from "./x-api/message-x-api";
4
+ export * from "./x-api/receipt-x-api";
3
5
  export { XHR } from "./api/XHR";
package/index.js CHANGED
@@ -13,5 +13,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.XHR = void 0;
14
14
  __exportStar(require("./fhcApi"), exports);
15
15
  __exportStar(require("./model/models"), exports);
16
+ __exportStar(require("./x-api/message-x-api"), exports);
17
+ __exportStar(require("./x-api/receipt-x-api"), exports);
16
18
  var XHR_1 = require("./api/XHR");
17
19
  Object.defineProperty(exports, "XHR", { enumerable: true, get: function () { return XHR_1.XHR; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icure/be-fhc-api",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Typescript version of Freehealth Connector standalone API client",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -0,0 +1,35 @@
1
+ import { HealthcareParty, IccCryptoXApi, IccDocumentXApi, IccEntityrefApi, IccInsuranceApi, IccInvoiceXApi, IccMessageXApi, IccPatientXApi, Insurance, Invoice, Message, Receipt, User } from "@icure/api";
2
+ import { InvoiceWithPatient } from "./utils/efact-util";
3
+ import { DmgsList, EfactMessage, EfactSendResponse, ErrorDetail, GenAsyncResponse } from "../model/models";
4
+ import { fhcEfactApi } from "../api/fhcEfactApi";
5
+ import { ReceiptXApi } from "./receipt-x-api";
6
+ declare class EfactSendResponseWithError extends EfactSendResponse {
7
+ error: string | undefined;
8
+ constructor(json: JSON);
9
+ }
10
+ export declare class MessageXApi {
11
+ private api;
12
+ private crypto;
13
+ private insuranceApi;
14
+ private entityReferenceApi;
15
+ private receiptXApi;
16
+ private invoiceXApi;
17
+ private documentXApi;
18
+ private patientApi;
19
+ constructor(api: IccMessageXApi, crypto: IccCryptoXApi, documentXApi: IccDocumentXApi, insuranceApi: IccInsuranceApi, entityReferenceApi: IccEntityrefApi, fhcReceiptXApi: ReceiptXApi, invoiceXApi: IccInvoiceXApi, patientApi: IccPatientXApi);
20
+ saveDmgsListRequest(user: User, req: GenAsyncResponse, requestDate?: number): Promise<Message>;
21
+ processDmgMessagesList(user: User, hcp: HealthcareParty, list: DmgsList, docXApi: IccDocumentXApi): Promise<Array<Array<string>>>;
22
+ private makeHcp;
23
+ private saveMessageInDb;
24
+ saveDmgListRequestInDb(user: User, tack: string, resultMajor: string, appliesTo: string, hcp: HealthcareParty, date?: Date, inss?: string): Promise<Message>;
25
+ extractErrorMessage(error?: ErrorDetail): string | undefined;
26
+ extractErrors(parsedRecords: any): string[];
27
+ processTack(user: User, hcp: HealthcareParty, efactMessage: EfactMessage): Promise<Receipt>;
28
+ processEfactMessage(user: User, hcp: HealthcareParty, efactMessage: EfactMessage, invoicePrefix?: string, invoicePrefixer?: (invoice: Invoice, hcpId: string) => Promise<string>): Promise<{
29
+ message: Message;
30
+ invoices: Array<Invoice>;
31
+ }>;
32
+ sendBatch(user: User, hcp: HealthcareParty, invoices: Array<InvoiceWithPatient>, xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, efactApi: fhcEfactApi, fhcServer?: string | undefined, prefixer?: (fed: Insurance, hcpId: string) => Promise<string>, isConnectedAsPmg?: boolean, medicalLocationId?: string | null): Promise<Message>;
33
+ saveMessageAttachment(user: User, msg: Message, res: EfactSendResponseWithError): Promise<Receipt>;
34
+ }
35
+ export {};