@natoe/colab 0.1.10 → 0.1.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/dist/index.js +21 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1292,6 +1292,11 @@ var Z_INDEX = {
|
|
|
1292
1292
|
/** Portaled message-actions menu — must sit above the dialog. */
|
|
1293
1293
|
menu: 1e4
|
|
1294
1294
|
};
|
|
1295
|
+
function resolveDisplayName(patientData, displayName) {
|
|
1296
|
+
const localComplete = !!patientData.labName && !!patientData.displayOrderId;
|
|
1297
|
+
if (localComplete) return buildChannelName(patientData);
|
|
1298
|
+
return displayName ?? buildChannelName(patientData);
|
|
1299
|
+
}
|
|
1295
1300
|
function PatientHeader({
|
|
1296
1301
|
patientData,
|
|
1297
1302
|
onOpenDicom,
|
|
@@ -1325,7 +1330,7 @@ function PatientHeader({
|
|
|
1325
1330
|
children: /* @__PURE__ */ jsx(BackIcon, { size: 22, color: COLOR.neutral800 })
|
|
1326
1331
|
}
|
|
1327
1332
|
),
|
|
1328
|
-
/* @__PURE__ */ jsx("span", { style: styles.nameText, children:
|
|
1333
|
+
/* @__PURE__ */ jsx("span", { style: styles.nameText, children: resolveDisplayName(patientData, displayName) })
|
|
1329
1334
|
] }),
|
|
1330
1335
|
meta.length > 0 && /* @__PURE__ */ jsx("div", { style: styles.metaRow, children: meta.map((item) => /* @__PURE__ */ jsxs("span", { style: styles.metaItem, children: [
|
|
1331
1336
|
/* @__PURE__ */ jsxs("span", { style: styles.metaLabel, children: [
|
|
@@ -5359,8 +5364,18 @@ function CollabInbox({
|
|
|
5359
5364
|
);
|
|
5360
5365
|
}
|
|
5361
5366
|
function buildPatientData(item) {
|
|
5362
|
-
|
|
5363
|
-
|
|
5367
|
+
const parsed = parseChannelName(item.name, item.orderId);
|
|
5368
|
+
if (item.patientSnapshot) {
|
|
5369
|
+
return {
|
|
5370
|
+
...item.patientSnapshot,
|
|
5371
|
+
labName: item.patientSnapshot.labName ?? parsed.labName,
|
|
5372
|
+
displayOrderId: item.patientSnapshot.displayOrderId ?? parsed.displayOrderId
|
|
5373
|
+
};
|
|
5374
|
+
}
|
|
5375
|
+
return parsed;
|
|
5376
|
+
}
|
|
5377
|
+
function parseChannelName(name, orderId) {
|
|
5378
|
+
const parts = name.split(" - ");
|
|
5364
5379
|
if (parts.length >= 3) {
|
|
5365
5380
|
const last4 = parts[parts.length - 1];
|
|
5366
5381
|
const labName = parts[parts.length - 2];
|
|
@@ -5368,13 +5383,13 @@ function buildPatientData(item) {
|
|
|
5368
5383
|
return {
|
|
5369
5384
|
patientName,
|
|
5370
5385
|
labName: labName || void 0,
|
|
5371
|
-
orderId
|
|
5386
|
+
orderId,
|
|
5372
5387
|
displayOrderId: last4
|
|
5373
5388
|
};
|
|
5374
5389
|
}
|
|
5375
5390
|
return {
|
|
5376
|
-
patientName:
|
|
5377
|
-
orderId
|
|
5391
|
+
patientName: name,
|
|
5392
|
+
orderId
|
|
5378
5393
|
};
|
|
5379
5394
|
}
|
|
5380
5395
|
function EmptyState({ hasAny }) {
|