@d4l/collect-lib 1.9.0 → 1.10.1
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/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5113,6 +5113,7 @@ var getPeriod = (progress) => {
|
|
|
5113
5113
|
// src/fhir/seenDisplay.ts
|
|
5114
5114
|
import { Buffer as Buffer10 } from "buffer/";
|
|
5115
5115
|
function generateFHIRSeenDisplay(id, seenDisplay) {
|
|
5116
|
+
var _a;
|
|
5116
5117
|
const contentCodeableConcept = {
|
|
5117
5118
|
coding: [
|
|
5118
5119
|
{
|
|
@@ -5122,6 +5123,17 @@ function generateFHIRSeenDisplay(id, seenDisplay) {
|
|
|
5122
5123
|
}
|
|
5123
5124
|
]
|
|
5124
5125
|
};
|
|
5126
|
+
const hasBlocks = ((_a = seenDisplay.content) == null ? void 0 : _a.blocks) && seenDisplay.content.blocks.length > 0;
|
|
5127
|
+
let contentData;
|
|
5128
|
+
if (hasBlocks) {
|
|
5129
|
+
contentData = JSON.stringify(seenDisplay.content.blocks);
|
|
5130
|
+
} else {
|
|
5131
|
+
contentData = getText(
|
|
5132
|
+
seenDisplay.content,
|
|
5133
|
+
"default.message",
|
|
5134
|
+
seenDisplay.lng
|
|
5135
|
+
);
|
|
5136
|
+
}
|
|
5125
5137
|
const payload = seenDisplay.content ? [
|
|
5126
5138
|
{
|
|
5127
5139
|
contentAttachment: {
|
|
@@ -5132,9 +5144,7 @@ function generateFHIRSeenDisplay(id, seenDisplay) {
|
|
|
5132
5144
|
"default.title",
|
|
5133
5145
|
seenDisplay.lng
|
|
5134
5146
|
),
|
|
5135
|
-
data: Buffer10.from(
|
|
5136
|
-
getText(seenDisplay.content, "default.message", seenDisplay.lng)
|
|
5137
|
-
).toString("base64")
|
|
5147
|
+
data: Buffer10.from(contentData).toString("base64")
|
|
5138
5148
|
},
|
|
5139
5149
|
contentCodeableConcept
|
|
5140
5150
|
}
|