@natoe/colab 0.1.9 → 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.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +29 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1292,11 +1292,18 @@ 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,
|
|
1298
1303
|
onOpenSettings,
|
|
1299
1304
|
onBack,
|
|
1305
|
+
hideName = false,
|
|
1306
|
+
displayName,
|
|
1300
1307
|
className
|
|
1301
1308
|
}) {
|
|
1302
1309
|
const hasDicom = !!(patientData.studyId && patientData.storageId);
|
|
@@ -1311,7 +1318,7 @@ function PatientHeader({
|
|
|
1311
1318
|
meta.push({ label: "Ref", value: patientData.referringPhysician });
|
|
1312
1319
|
}
|
|
1313
1320
|
return /* @__PURE__ */ jsxs("div", { className, style: styles.container, children: [
|
|
1314
|
-
/* @__PURE__ */ jsxs("div", { style: styles.nameRow, children: [
|
|
1321
|
+
!hideName && /* @__PURE__ */ jsxs("div", { style: styles.nameRow, children: [
|
|
1315
1322
|
onBack && /* @__PURE__ */ jsx(
|
|
1316
1323
|
"button",
|
|
1317
1324
|
{
|
|
@@ -1323,7 +1330,7 @@ function PatientHeader({
|
|
|
1323
1330
|
children: /* @__PURE__ */ jsx(BackIcon, { size: 22, color: COLOR.neutral800 })
|
|
1324
1331
|
}
|
|
1325
1332
|
),
|
|
1326
|
-
/* @__PURE__ */ jsx("span", { style: styles.nameText, children:
|
|
1333
|
+
/* @__PURE__ */ jsx("span", { style: styles.nameText, children: resolveDisplayName(patientData, displayName) })
|
|
1327
1334
|
] }),
|
|
1328
1335
|
meta.length > 0 && /* @__PURE__ */ jsx("div", { style: styles.metaRow, children: meta.map((item) => /* @__PURE__ */ jsxs("span", { style: styles.metaItem, children: [
|
|
1329
1336
|
/* @__PURE__ */ jsxs("span", { style: styles.metaLabel, children: [
|
|
@@ -3752,6 +3759,7 @@ function CollabPanel({
|
|
|
3752
3759
|
participantIds,
|
|
3753
3760
|
showSeenBy = true,
|
|
3754
3761
|
onBack,
|
|
3762
|
+
hidePatientName = false,
|
|
3755
3763
|
className,
|
|
3756
3764
|
style
|
|
3757
3765
|
}) {
|
|
@@ -3860,7 +3868,9 @@ function CollabPanel({
|
|
|
3860
3868
|
participants,
|
|
3861
3869
|
onOpenDicom: handleOpenDicom,
|
|
3862
3870
|
onOpenSettings: () => setShowSettings(true),
|
|
3863
|
-
onBack
|
|
3871
|
+
onBack,
|
|
3872
|
+
hideName: hidePatientName,
|
|
3873
|
+
displayName: conversation?.name
|
|
3864
3874
|
}
|
|
3865
3875
|
),
|
|
3866
3876
|
pinnedMessages.length > 0 && /* @__PURE__ */ jsx(
|
|
@@ -4132,7 +4142,7 @@ function CollabPopup({
|
|
|
4132
4142
|
)
|
|
4133
4143
|
] })
|
|
4134
4144
|
] }),
|
|
4135
|
-
!isMinimized && /* @__PURE__ */ jsx("div", { style: styles13.panelWrapper, children: /* @__PURE__ */ jsx(CollabPanel, { orderId, patientData, participantIds }) })
|
|
4145
|
+
!isMinimized && /* @__PURE__ */ jsx("div", { style: styles13.panelWrapper, children: /* @__PURE__ */ jsx(CollabPanel, { orderId, patientData, participantIds, hidePatientName: true }) })
|
|
4136
4146
|
]
|
|
4137
4147
|
}
|
|
4138
4148
|
);
|
|
@@ -5354,8 +5364,18 @@ function CollabInbox({
|
|
|
5354
5364
|
);
|
|
5355
5365
|
}
|
|
5356
5366
|
function buildPatientData(item) {
|
|
5357
|
-
|
|
5358
|
-
|
|
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(" - ");
|
|
5359
5379
|
if (parts.length >= 3) {
|
|
5360
5380
|
const last4 = parts[parts.length - 1];
|
|
5361
5381
|
const labName = parts[parts.length - 2];
|
|
@@ -5363,13 +5383,13 @@ function buildPatientData(item) {
|
|
|
5363
5383
|
return {
|
|
5364
5384
|
patientName,
|
|
5365
5385
|
labName: labName || void 0,
|
|
5366
|
-
orderId
|
|
5386
|
+
orderId,
|
|
5367
5387
|
displayOrderId: last4
|
|
5368
5388
|
};
|
|
5369
5389
|
}
|
|
5370
5390
|
return {
|
|
5371
|
-
patientName:
|
|
5372
|
-
orderId
|
|
5391
|
+
patientName: name,
|
|
5392
|
+
orderId
|
|
5373
5393
|
};
|
|
5374
5394
|
}
|
|
5375
5395
|
function EmptyState({ hasAny }) {
|