@icure/be-fhc-api 0.5.10 → 0.5.12
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/package.json +1 -1
- package/x-api/message-x-api.js +9 -9
- package/x-api/receipt-x-api.js +1 -1
package/package.json
CHANGED
package/x-api/message-x-api.js
CHANGED
|
@@ -50,7 +50,7 @@ class MessageXApi {
|
|
|
50
50
|
name: `${msg.subject}_content.json`
|
|
51
51
|
})
|
|
52
52
|
.then(doc => this.documentXApi.createDocument(doc))
|
|
53
|
-
.then(doc => this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.
|
|
53
|
+
.then(doc => this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(req))), ["public.json"]))
|
|
54
54
|
.then(() => msg);
|
|
55
55
|
});
|
|
56
56
|
}
|
|
@@ -359,7 +359,7 @@ class MessageXApi {
|
|
|
359
359
|
name: `${msg.subject}_content.json`
|
|
360
360
|
})
|
|
361
361
|
.then(doc => docXApi.createDocument(doc))
|
|
362
|
-
.then(doc => docXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.
|
|
362
|
+
.then(doc => docXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(dmgMessage))), ["public.json"]))
|
|
363
363
|
.then(() => msg);
|
|
364
364
|
});
|
|
365
365
|
}
|
|
@@ -489,7 +489,7 @@ class MessageXApi {
|
|
|
489
489
|
efactMessage.tack.reference
|
|
490
490
|
].filter(x => x != null)
|
|
491
491
|
}))
|
|
492
|
-
.then((rcpt) => this.receiptXApi.iccApi.setReceiptAttachmentForBlobType(rcpt.id, rcpt.rev, "tack", (0, api_1.ua2ab)((0, api_1.
|
|
492
|
+
.then((rcpt) => this.receiptXApi.iccApi.setReceiptAttachmentForBlobType(rcpt.id, rcpt.rev, "tack", (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(efactMessage)))))
|
|
493
493
|
.then(() => {
|
|
494
494
|
parentMessage.status = parentMessage.status | (1 << 8); /*STATUS_SUBMITTED*/
|
|
495
495
|
// Reset error
|
|
@@ -645,9 +645,9 @@ class MessageXApi {
|
|
|
645
645
|
this.documentXApi.createDocument(jsonParsedDoc)
|
|
646
646
|
]))
|
|
647
647
|
.then(([doc, jsonDoc, jsonParsedDoc]) => Promise.all([
|
|
648
|
-
this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.
|
|
649
|
-
this.documentXApi.setClearDocumentAttachment(jsonDoc, (0, api_1.ua2ab)((0, api_1.
|
|
650
|
-
this.documentXApi.setClearDocumentAttachment(jsonParsedDoc, (0, api_1.ua2ab)((0, api_1.
|
|
648
|
+
this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.utf8_2ua)(efactMessage.detail)), ["public.plain-text"]),
|
|
649
|
+
this.documentXApi.setClearDocumentAttachment(jsonDoc, (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(efactMessage))), ["public.json"]),
|
|
650
|
+
this.documentXApi.setClearDocumentAttachment(jsonParsedDoc, (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(parsedRecords))), ["public.json"])
|
|
651
651
|
]))
|
|
652
652
|
.then(() => ["920999", "920099", "920900"].includes(messageType)
|
|
653
653
|
? this.invoiceXApi.getInvoices(new api_1.ListOfIds({ ids: parentMessage.invoiceIds }))
|
|
@@ -911,8 +911,8 @@ class MessageXApi {
|
|
|
911
911
|
this.documentXApi.createDocument(doc)
|
|
912
912
|
]))
|
|
913
913
|
.then(([jsonDoc, doc]) => Promise.all([
|
|
914
|
-
this.documentXApi.setClearDocumentAttachment(jsonDoc, (0, api_1.ua2ab)((0, api_1.
|
|
915
|
-
this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.
|
|
914
|
+
this.documentXApi.setClearDocumentAttachment(jsonDoc, (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(res.records))), ["public.json"]),
|
|
915
|
+
this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.utf8_2ua)(res.detail)), [
|
|
916
916
|
"public.plain-text"
|
|
917
917
|
])
|
|
918
918
|
]))
|
|
@@ -920,7 +920,7 @@ class MessageXApi {
|
|
|
920
920
|
`mycarenet:efact:inputReference:${res.inputReference}`,
|
|
921
921
|
res.tack.appliesTo,
|
|
922
922
|
res.tack.reference
|
|
923
|
-
].filter(x => x != null), "tack", (0, api_1.ua2ab)((0, api_1.
|
|
923
|
+
].filter(x => x != null), "tack", (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(res.tack)))));
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
exports.MessageXApi = MessageXApi;
|
package/x-api/receipt-x-api.js
CHANGED
|
@@ -37,7 +37,7 @@ class ReceiptXApi {
|
|
|
37
37
|
throw new Error(`Receipt has no rev: ${rcpt}`);
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
|
-
return this.iccApi.setReceiptAttachmentForBlobType(rcpt.id, rcpt.rev, "soapConversation", (0, api_1.ua2ab)((0, api_1.
|
|
40
|
+
return this.iccApi.setReceiptAttachmentForBlobType(rcpt.id, rcpt.rev, "soapConversation", (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(object.mycarenetConversation))));
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
}
|