@icure/be-fhc-api 0.4.7 → 0.4.11
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/fhcDataAttributeServiceApi.js +4 -2
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +1 -1
- package/x-api/index.d.ts +10 -0
- package/x-api/index.js +22 -0
- package/x-api/message-x-api.d.ts +35 -0
- package/x-api/message-x-api.js +790 -0
- package/x-api/receipt-x-api.d.ts +10 -0
- package/x-api/receipt-x-api.js +42 -0
- package/x-api/utils/efact-parser.d.ts +234 -0
- package/x-api/utils/efact-parser.js +1121 -0
- package/x-api/utils/efact-util.d.ts +28 -0
- package/x-api/utils/efact-util.js +316 -0
- package/x-api/utils/fhc-invoice-sender-util.d.ts +3 -0
- package/x-api/utils/fhc-invoice-sender-util.js +31 -0
- package/x-api/utils/fhc-patient-util.d.ts +3 -0
- package/x-api/utils/fhc-patient-util.js +20 -0
- package/x-api/utils/formatting-util.d.ts +76 -0
- package/x-api/utils/formatting-util.js +218 -0
- package/x-api/utils/hcp-util.d.ts +16 -0
- package/x-api/utils/hcp-util.js +131 -0
- package/x-api/utils/insurability-util.d.ts +22 -0
- package/x-api/utils/insurability-util.js +56 -0
- package/x-api/utils/uuid-encoder.d.ts +44 -0
- package/x-api/utils/uuid-encoder.js +110 -0
|
@@ -51,8 +51,10 @@ 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
|
-
|
|
54
|
+
(prolongation !== undefined
|
|
55
|
+
? "&prolongation=" + encodeURIComponent(String(prolongation))
|
|
56
|
+
: "") +
|
|
57
|
+
(total !== undefined ? "&total=" + encodeURIComponent(String(total)) : "");
|
|
56
58
|
let headers = this.headers;
|
|
57
59
|
xFHCKeystoreId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)));
|
|
58
60
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -13,5 +13,6 @@ 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"), exports);
|
|
16
17
|
var XHR_1 = require("./api/XHR");
|
|
17
18
|
Object.defineProperty(exports, "XHR", { enumerable: true, get: function () { return XHR_1.XHR; } });
|
package/package.json
CHANGED
package/x-api/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./utils/efact-util";
|
|
2
|
+
export * from "./utils/formatting-util";
|
|
3
|
+
export * from "./utils/insurability-util";
|
|
4
|
+
export * from "./utils/hcp-util";
|
|
5
|
+
export * from "./utils/fhc-patient-util";
|
|
6
|
+
export * from "./utils/efact-parser";
|
|
7
|
+
export * from "./utils/hcp-util";
|
|
8
|
+
export * from "./utils/uuid-encoder";
|
|
9
|
+
export * from "./receipt-x-api";
|
|
10
|
+
export * from "./message-x-api";
|
package/x-api/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./utils/efact-util"), exports);
|
|
14
|
+
__exportStar(require("./utils/formatting-util"), exports);
|
|
15
|
+
__exportStar(require("./utils/insurability-util"), exports);
|
|
16
|
+
__exportStar(require("./utils/hcp-util"), exports);
|
|
17
|
+
__exportStar(require("./utils/fhc-patient-util"), exports);
|
|
18
|
+
__exportStar(require("./utils/efact-parser"), exports);
|
|
19
|
+
__exportStar(require("./utils/hcp-util"), exports);
|
|
20
|
+
__exportStar(require("./utils/uuid-encoder"), exports);
|
|
21
|
+
__exportStar(require("./receipt-x-api"), exports);
|
|
22
|
+
__exportStar(require("./message-x-api"), exports);
|
|
@@ -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 {};
|