@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.js
CHANGED
|
@@ -1298,6 +1298,11 @@ var Z_INDEX = {
|
|
|
1298
1298
|
/** Portaled message-actions menu — must sit above the dialog. */
|
|
1299
1299
|
menu: 1e4
|
|
1300
1300
|
};
|
|
1301
|
+
function resolveDisplayName(patientData, displayName) {
|
|
1302
|
+
const localComplete = !!patientData.labName && !!patientData.displayOrderId;
|
|
1303
|
+
if (localComplete) return buildChannelName(patientData);
|
|
1304
|
+
return displayName ?? buildChannelName(patientData);
|
|
1305
|
+
}
|
|
1301
1306
|
function PatientHeader({
|
|
1302
1307
|
patientData,
|
|
1303
1308
|
onOpenDicom,
|
|
@@ -1331,7 +1336,7 @@ function PatientHeader({
|
|
|
1331
1336
|
children: /* @__PURE__ */ jsxRuntime.jsx(BackIcon, { size: 22, color: COLOR.neutral800 })
|
|
1332
1337
|
}
|
|
1333
1338
|
),
|
|
1334
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: styles.nameText, children:
|
|
1339
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: styles.nameText, children: resolveDisplayName(patientData, displayName) })
|
|
1335
1340
|
] }),
|
|
1336
1341
|
meta.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: styles.metaRow, children: meta.map((item) => /* @__PURE__ */ jsxRuntime.jsxs("span", { style: styles.metaItem, children: [
|
|
1337
1342
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: styles.metaLabel, children: [
|
|
@@ -5365,8 +5370,18 @@ function CollabInbox({
|
|
|
5365
5370
|
);
|
|
5366
5371
|
}
|
|
5367
5372
|
function buildPatientData(item) {
|
|
5368
|
-
|
|
5369
|
-
|
|
5373
|
+
const parsed = parseChannelName(item.name, item.orderId);
|
|
5374
|
+
if (item.patientSnapshot) {
|
|
5375
|
+
return {
|
|
5376
|
+
...item.patientSnapshot,
|
|
5377
|
+
labName: item.patientSnapshot.labName ?? parsed.labName,
|
|
5378
|
+
displayOrderId: item.patientSnapshot.displayOrderId ?? parsed.displayOrderId
|
|
5379
|
+
};
|
|
5380
|
+
}
|
|
5381
|
+
return parsed;
|
|
5382
|
+
}
|
|
5383
|
+
function parseChannelName(name, orderId) {
|
|
5384
|
+
const parts = name.split(" - ");
|
|
5370
5385
|
if (parts.length >= 3) {
|
|
5371
5386
|
const last4 = parts[parts.length - 1];
|
|
5372
5387
|
const labName = parts[parts.length - 2];
|
|
@@ -5374,13 +5389,13 @@ function buildPatientData(item) {
|
|
|
5374
5389
|
return {
|
|
5375
5390
|
patientName,
|
|
5376
5391
|
labName: labName || void 0,
|
|
5377
|
-
orderId
|
|
5392
|
+
orderId,
|
|
5378
5393
|
displayOrderId: last4
|
|
5379
5394
|
};
|
|
5380
5395
|
}
|
|
5381
5396
|
return {
|
|
5382
|
-
patientName:
|
|
5383
|
-
orderId
|
|
5397
|
+
patientName: name,
|
|
5398
|
+
orderId
|
|
5384
5399
|
};
|
|
5385
5400
|
}
|
|
5386
5401
|
function EmptyState({ hasAny }) {
|