@icure/be-fhc-api 0.4.44 → 0.5.2
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/model/InvoiceItem.d.ts +2 -1
- package/model/InvoiceItem.js +2 -1
- package/package.json +2 -2
- package/x-api/message-x-api.js +12 -12
- package/x-api/receipt-x-api.js +4 -1
package/model/InvoiceItem.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export declare namespace InvoiceItem {
|
|
|
48
48
|
SecondPrestationOfDay: DerogationMaxNumberEnum;
|
|
49
49
|
ThirdAndNextPrestationOfDay: DerogationMaxNumberEnum;
|
|
50
50
|
};
|
|
51
|
-
type PercentNormEnum = "None" | "SurgicalAid1" | "SurgicalAid2" | "ReducedFee" | "Ah1n1" | "HalfPriceSecondAct" | "InvoiceException" | "ForInformation";
|
|
51
|
+
type PercentNormEnum = "None" | "SurgicalAid1" | "SurgicalAid2" | "ReducedFee" | "Ah1n1" | "HalfPriceSecondAct" | "InvoiceException" | "ForInformation" | "PseudoCodeProthesis";
|
|
52
52
|
const PercentNormEnum: {
|
|
53
53
|
None: PercentNormEnum;
|
|
54
54
|
SurgicalAid1: PercentNormEnum;
|
|
@@ -58,6 +58,7 @@ export declare namespace InvoiceItem {
|
|
|
58
58
|
HalfPriceSecondAct: PercentNormEnum;
|
|
59
59
|
InvoiceException: PercentNormEnum;
|
|
60
60
|
ForInformation: PercentNormEnum;
|
|
61
|
+
PseudoCodeProthesis: PercentNormEnum;
|
|
61
62
|
};
|
|
62
63
|
type PrescriberNormEnum = "None" | "OnePrescriber" | "SelfPrescriber" | "AddedCode" | "OnePrescriberSubstituted" | "ManyPrescribersSubstituted" | "ManyPrescribers";
|
|
63
64
|
const PrescriberNormEnum: {
|
package/model/InvoiceItem.js
CHANGED
|
@@ -23,7 +23,8 @@ exports.InvoiceItem = InvoiceItem;
|
|
|
23
23
|
Ah1n1: "Ah1n1",
|
|
24
24
|
HalfPriceSecondAct: "HalfPriceSecondAct",
|
|
25
25
|
InvoiceException: "InvoiceException",
|
|
26
|
-
ForInformation: "ForInformation"
|
|
26
|
+
ForInformation: "ForInformation",
|
|
27
|
+
PseudoCodeProthesis: "PseudoCodeProthesis"
|
|
27
28
|
};
|
|
28
29
|
InvoiceItem.PrescriberNormEnum = {
|
|
29
30
|
None: "None",
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icure/be-fhc-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Typescript version of Freehealth Connector standalone API client",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@icure/api": "^
|
|
8
|
+
"@icure/api": "^8.0.61",
|
|
9
9
|
"lodash": "^4.17.20"
|
|
10
10
|
},
|
|
11
11
|
"author": "Taktik sa",
|
package/x-api/message-x-api.js
CHANGED
|
@@ -51,7 +51,7 @@ class MessageXApi {
|
|
|
51
51
|
name: `${msg.subject}_content.json`
|
|
52
52
|
})
|
|
53
53
|
.then(doc => this.documentXApi.createDocument(doc))
|
|
54
|
-
.then(doc => this.documentXApi.
|
|
54
|
+
.then(doc => this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(req)))))
|
|
55
55
|
.then(() => msg);
|
|
56
56
|
});
|
|
57
57
|
}
|
|
@@ -361,7 +361,7 @@ class MessageXApi {
|
|
|
361
361
|
name: `${msg.subject}_content.json`
|
|
362
362
|
})
|
|
363
363
|
.then(doc => docXApi.createDocument(doc))
|
|
364
|
-
.then(doc => docXApi.
|
|
364
|
+
.then(doc => docXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(dmgMessage)))))
|
|
365
365
|
.then(() => msg);
|
|
366
366
|
});
|
|
367
367
|
}
|
|
@@ -483,7 +483,7 @@ class MessageXApi {
|
|
|
483
483
|
const parentMessage = msgsForHcp[0];
|
|
484
484
|
return this.receiptXApi.iccApi
|
|
485
485
|
.createReceipt(new api_1.Receipt({
|
|
486
|
-
id: this.crypto.randomUuid(),
|
|
486
|
+
id: this.crypto.primitives.randomUuid(),
|
|
487
487
|
documentId: parentMessage.id,
|
|
488
488
|
references: [
|
|
489
489
|
`mycarenet:efact:inputReference:${ref}`,
|
|
@@ -491,7 +491,7 @@ class MessageXApi {
|
|
|
491
491
|
efactMessage.tack.reference
|
|
492
492
|
]
|
|
493
493
|
}))
|
|
494
|
-
.then((rcpt) => this.receiptXApi.iccApi.
|
|
494
|
+
.then((rcpt) => this.receiptXApi.iccApi.setReceiptAttachmentForBlobType(rcpt.id, rcpt.rev, "tack", (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(efactMessage)))))
|
|
495
495
|
.then(() => {
|
|
496
496
|
parentMessage.status = parentMessage.status | (1 << 8); /*STATUS_SUBMITTED*/
|
|
497
497
|
// Reset error
|
|
@@ -650,9 +650,9 @@ class MessageXApi {
|
|
|
650
650
|
this.documentXApi.createDocument(jsonParsedDoc)
|
|
651
651
|
]))
|
|
652
652
|
.then(([doc, jsonDoc, jsonParsedDoc]) => Promise.all([
|
|
653
|
-
this.documentXApi.
|
|
654
|
-
this.documentXApi.
|
|
655
|
-
this.documentXApi.
|
|
653
|
+
this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.string2ua)(efactMessage.detail))),
|
|
654
|
+
this.documentXApi.setClearDocumentAttachment(jsonDoc, (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(efactMessage)))),
|
|
655
|
+
this.documentXApi.setClearDocumentAttachment(jsonParsedDoc, (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(parsedRecords))))
|
|
656
656
|
]))
|
|
657
657
|
.then(() => ["920999", "920099", "920900"].includes(messageType)
|
|
658
658
|
? this.invoiceXApi.getInvoices(new api_1.ListOfIds({ ids: parentMessage.invoiceIds }))
|
|
@@ -699,7 +699,7 @@ class MessageXApi {
|
|
|
699
699
|
ic.paid = zone114amount ? Number((zone114amount / 100).toFixed(2)) : 0;
|
|
700
700
|
newInvoicePromise = (newInvoicePromise ||
|
|
701
701
|
this.patientXApi
|
|
702
|
-
.getPatientIdOfChildDocumentForHcpAndHcpParents(iv, user.healthcarePartyId)
|
|
702
|
+
.getPatientIdOfChildDocumentForHcpAndHcpParents(iv, user.healthcarePartyId, api_1.EntityWithDelegationTypeName.Invoice)
|
|
703
703
|
.then(patientId => this.patientXApi.getPatientWithUser(user, patientId))
|
|
704
704
|
.then(pat => this.invoiceXApi.newInstance(user, pat, _.omit(iv, [
|
|
705
705
|
"id",
|
|
@@ -724,7 +724,7 @@ class MessageXApi {
|
|
|
724
724
|
return niv;
|
|
725
725
|
})).then(niv => {
|
|
726
726
|
niv.invoicingCodes = (niv.invoicingCodes || []).concat(_.assign({}, ic, {
|
|
727
|
-
id: this.crypto.randomUuid(),
|
|
727
|
+
id: this.crypto.primitives.randomUuid(),
|
|
728
728
|
accepted: false,
|
|
729
729
|
canceled: false,
|
|
730
730
|
pending: true,
|
|
@@ -797,7 +797,7 @@ class MessageXApi {
|
|
|
797
797
|
});
|
|
798
798
|
}
|
|
799
799
|
sendBatch(user, hcp, invoices, xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, efactApi, fhcServer = undefined, prefixer, isConnectedAsPmg = false, medicalLocationId = null, speciality = "doctor", professionCode = "10") {
|
|
800
|
-
const uuid = this.crypto.randomUuid();
|
|
800
|
+
const uuid = this.crypto.primitives.randomUuid();
|
|
801
801
|
const smallBase36 = (0, efact_util_1.uuidBase36Half)(uuid);
|
|
802
802
|
const fullBase36 = (0, efact_util_1.uuidBase36)(uuid);
|
|
803
803
|
const sentDate = +new Date();
|
|
@@ -917,8 +917,8 @@ class MessageXApi {
|
|
|
917
917
|
this.documentXApi.createDocument(doc)
|
|
918
918
|
]))
|
|
919
919
|
.then(([jsonDoc, doc]) => Promise.all([
|
|
920
|
-
this.documentXApi.
|
|
921
|
-
this.documentXApi.
|
|
920
|
+
this.documentXApi.setClearDocumentAttachment(jsonDoc, (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(res.records)))),
|
|
921
|
+
this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.string2ua)(res.detail)))
|
|
922
922
|
]))
|
|
923
923
|
.then(() => this.receiptXApi.iccApi.logReceipt(user, msg.id, [
|
|
924
924
|
`mycarenet:efact:inputReference:${res.inputReference}`,
|
package/x-api/receipt-x-api.js
CHANGED
|
@@ -33,8 +33,11 @@ class ReceiptXApi {
|
|
|
33
33
|
if (!rcpt.id) {
|
|
34
34
|
throw new Error(`Receipt has no id: ${rcpt}`);
|
|
35
35
|
}
|
|
36
|
+
else if (!rcpt.rev) {
|
|
37
|
+
throw new Error(`Receipt has no rev: ${rcpt}`);
|
|
38
|
+
}
|
|
36
39
|
else {
|
|
37
|
-
return this.iccApi.
|
|
40
|
+
return this.iccApi.setReceiptAttachmentForBlobType(rcpt.id, rcpt.rev, "soapConversation", (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(object.mycarenetConversation))));
|
|
38
41
|
}
|
|
39
42
|
});
|
|
40
43
|
}
|