@eka-care/medical-records-ui 1.2.46 → 1.2.49

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.
Files changed (45) hide show
  1. package/dist/{OriginalRecordPanel-7ABSRLHL.js → OriginalRecordPanel-ACJA42N4.js} +19 -19
  2. package/dist/{OriginalRecordPanel-7ABSRLHL.js.map → OriginalRecordPanel-ACJA42N4.js.map} +1 -1
  3. package/dist/{OriginalRecordPanel-TXXNII2B.mjs → OriginalRecordPanel-OLTPTY67.mjs} +3 -3
  4. package/dist/{SmartUploadModal-T6X23MO6.mjs → SmartUploadModal-GFZJXN2W.mjs} +3 -3
  5. package/dist/SmartUploadModal-PBOXKS7G.js +11 -0
  6. package/dist/{SmartUploadModal-XPONUCRC.js.map → SmartUploadModal-PBOXKS7G.js.map} +1 -1
  7. package/dist/VitalHistoryPanel-EP4LHE7S.mjs +12 -0
  8. package/dist/VitalHistoryPanel-HXSUVAHK.js +12 -0
  9. package/dist/{VitalHistoryPanel-3QHLYRCV.js.map → VitalHistoryPanel-HXSUVAHK.js.map} +1 -1
  10. package/dist/{chunk-O3OIK3TY.mjs → chunk-2JNAVITH.mjs} +2 -2
  11. package/dist/{chunk-Y5RVZY4E.js → chunk-6MSNQKP7.js} +14 -14
  12. package/dist/{chunk-Y5RVZY4E.js.map → chunk-6MSNQKP7.js.map} +1 -1
  13. package/dist/{chunk-2Y2R64Q7.mjs → chunk-BSDXRKXE.mjs} +3 -3
  14. package/dist/{chunk-V4FEDCZC.js → chunk-E2ZFUVV7.js} +11 -11
  15. package/dist/{chunk-V4FEDCZC.js.map → chunk-E2ZFUVV7.js.map} +1 -1
  16. package/dist/{chunk-Y2TQED3H.mjs → chunk-GRCZLZX3.mjs} +8 -7
  17. package/dist/chunk-GRCZLZX3.mjs.map +1 -0
  18. package/dist/{chunk-GLUFA2DL.mjs → chunk-KDMB3N57.mjs} +2 -2
  19. package/dist/{chunk-ZSF36NZD.js → chunk-SOOIC3M7.js} +21 -21
  20. package/dist/{chunk-ZSF36NZD.js.map → chunk-SOOIC3M7.js.map} +1 -1
  21. package/dist/{chunk-2VELBQXA.js → chunk-Z4DDE6TT.js} +20 -19
  22. package/dist/chunk-Z4DDE6TT.js.map +1 -0
  23. package/dist/index.d.mts +3 -1
  24. package/dist/index.d.ts +3 -1
  25. package/dist/index.js +157 -151
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +27 -21
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/widgets-6IXHASJD.js +53 -0
  30. package/dist/{widgets-LBIWPOYW.js.map → widgets-6IXHASJD.js.map} +1 -1
  31. package/dist/{widgets-Q6QVESWZ.mjs → widgets-CRBIN732.mjs} +2 -2
  32. package/package.json +2 -2
  33. package/dist/SmartUploadModal-XPONUCRC.js +0 -11
  34. package/dist/VitalHistoryPanel-3QHLYRCV.js +0 -12
  35. package/dist/VitalHistoryPanel-YKJY5WB3.mjs +0 -12
  36. package/dist/chunk-2VELBQXA.js.map +0 -1
  37. package/dist/chunk-Y2TQED3H.mjs.map +0 -1
  38. package/dist/widgets-LBIWPOYW.js +0 -53
  39. /package/dist/{OriginalRecordPanel-TXXNII2B.mjs.map → OriginalRecordPanel-OLTPTY67.mjs.map} +0 -0
  40. /package/dist/{SmartUploadModal-T6X23MO6.mjs.map → SmartUploadModal-GFZJXN2W.mjs.map} +0 -0
  41. /package/dist/{VitalHistoryPanel-YKJY5WB3.mjs.map → VitalHistoryPanel-EP4LHE7S.mjs.map} +0 -0
  42. /package/dist/{chunk-O3OIK3TY.mjs.map → chunk-2JNAVITH.mjs.map} +0 -0
  43. /package/dist/{chunk-2Y2R64Q7.mjs.map → chunk-BSDXRKXE.mjs.map} +0 -0
  44. /package/dist/{chunk-GLUFA2DL.mjs.map → chunk-KDMB3N57.mjs.map} +0 -0
  45. /package/dist/{widgets-Q6QVESWZ.mjs.map → widgets-CRBIN732.mjs.map} +0 -0
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
- require('./chunk-Y5RVZY4E.js');
3
- require('./chunk-ZSF36NZD.js');
2
+ require('./chunk-6MSNQKP7.js');
3
+ require('./chunk-SOOIC3M7.js');
4
4
 
5
5
 
6
6
 
@@ -12,7 +12,7 @@ var _chunkMVWFPQXZjs = require('./chunk-MVWFPQXZ.js');
12
12
 
13
13
 
14
14
 
15
- var _chunkV4FEDCZCjs = require('./chunk-V4FEDCZC.js');
15
+ var _chunkE2ZFUVV7js = require('./chunk-E2ZFUVV7.js');
16
16
 
17
17
 
18
18
  var _chunkGDE4LXTRjs = require('./chunk-GDE4LXTR.js');
@@ -57,7 +57,7 @@ var _chunkGDE4LXTRjs = require('./chunk-GDE4LXTR.js');
57
57
 
58
58
 
59
59
 
60
- var _chunk2VELBQXAjs = require('./chunk-2VELBQXA.js');
60
+ var _chunkZ4DDE6TTjs = require('./chunk-Z4DDE6TT.js');
61
61
 
62
62
 
63
63
  var _chunkKOOLUMNAjs = require('./chunk-KOOLUMNA.js');
@@ -672,8 +672,8 @@ function NoPatientPlaceholder() {
672
672
  ] })
673
673
  ] }),
674
674
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__empty-text", children: [
675
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "heading", children: "No patient selected" }),
676
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "muted", children: "Select a patient to view their medical records." })
675
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "heading", children: "No patient selected" }),
676
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "muted", children: "Select a patient to view their medical records." })
677
677
  ] })
678
678
  ] });
679
679
  }
@@ -685,13 +685,14 @@ function SdkProviderInner({
685
685
  config,
686
686
  bid,
687
687
  patientId,
688
+ linkedPatientIds,
688
689
  documentTypes,
689
690
  onUnknownDocumentType,
690
691
  children
691
692
  }) {
692
- _chunk2VELBQXAjs.initWorkerClient.call(void 0, config, patientId);
693
+ _chunkZ4DDE6TTjs.initWorkerClient.call(void 0, config, patientId);
693
694
  _react.useEffect.call(void 0, () => {
694
- _chunk2VELBQXAjs.setAuthToken.call(void 0, config.accessToken);
695
+ _chunkZ4DDE6TTjs.setAuthToken.call(void 0, config.accessToken);
695
696
  }, [config.accessToken]);
696
697
  const store = _react.useMemo.call(void 0,
697
698
  () => createPatientStore(bid, patientId),
@@ -700,17 +701,17 @@ function SdkProviderInner({
700
701
  _react.useEffect.call(void 0, () => () => store.getState().__cleanup(), [store]);
701
702
  _react.useEffect.call(void 0, () => {
702
703
  const handleOnline = () => {
703
- void _chunk2VELBQXAjs.getCore.call(void 0, ).sync();
704
+ void _chunkZ4DDE6TTjs.getCore.call(void 0, ).sync();
704
705
  };
705
706
  window.addEventListener("online", handleOnline);
706
707
  return () => window.removeEventListener("online", handleOnline);
707
708
  }, []);
708
709
  const labelOf = _react.useMemo.call(void 0,
709
- () => _chunk2VELBQXAjs.createDocumentTypeLabelResolver.call(void 0, documentTypes, onUnknownDocumentType),
710
+ () => _chunkZ4DDE6TTjs.createDocumentTypeLabelResolver.call(void 0, documentTypes, onUnknownDocumentType),
710
711
  [documentTypes, onUnknownDocumentType]
711
712
  );
712
713
  const docTypes = _react.useMemo.call(void 0,
713
- () => _nullishCoalesce(documentTypes, () => ( Object.entries(_chunk2VELBQXAjs.DOCUMENT_TYPE_LABELS).map(([id, display_name]) => ({
714
+ () => _nullishCoalesce(documentTypes, () => ( Object.entries(_chunkZ4DDE6TTjs.DOCUMENT_TYPE_LABELS).map(([id, display_name]) => ({
714
715
  id,
715
716
  display_name
716
717
  })))),
@@ -720,19 +721,21 @@ function SdkProviderInner({
720
721
  () => ({
721
722
  bid,
722
723
  patientId,
724
+ linkedPatientIds,
723
725
  store,
724
726
  labelOf,
725
727
  documentTypes: docTypes,
726
728
  environment: config.environment
727
729
  }),
728
- [bid, patientId, store, labelOf, docTypes, config.environment]
730
+ [bid, patientId, linkedPatientIds, store, labelOf, docTypes, config.environment]
729
731
  );
730
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.SdkContext.Provider, { value, children });
732
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.SdkContext.Provider, { value, children });
731
733
  }
732
734
  function SdkProvider({
733
735
  config,
734
736
  bid,
735
737
  patientId,
738
+ linkedPatientIds,
736
739
  documentTypes,
737
740
  onUnknownDocumentType,
738
741
  children
@@ -744,6 +747,7 @@ function SdkProvider({
744
747
  config,
745
748
  bid,
746
749
  patientId,
750
+ linkedPatientIds,
747
751
  documentTypes,
748
752
  onUnknownDocumentType,
749
753
  children
@@ -969,7 +973,7 @@ var FileCard = _react.memo.call(void 0, function FileCard2({
969
973
  ] }) }),
970
974
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-cf-card__info", children: [
971
975
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-cf-card__title-row", children: [
972
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.TruncatedText, { text: record.title, className: "mr-cf-card__title" }),
976
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.TruncatedText, { text: record.title, className: "mr-cf-card__title" }),
973
977
  smartLabel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mr-sv__smart-anchor", "aria-hidden": true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "mr-sv__smart-pill", children: [
974
978
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMVWFPQXZjs.SmartSparkles_default, { "aria-hidden": true }),
975
979
  smartLabel
@@ -996,7 +1000,7 @@ var FileCard = _react.memo.call(void 0, function FileCard2({
996
1000
  // src/views/containers/care-panel/CareFilesPanel.tsx
997
1001
 
998
1002
  function CareFilesPanel({ caseId }) {
999
- const { store } = _chunk2VELBQXAjs.useSdk.call(void 0, );
1003
+ const { store } = _chunkZ4DDE6TTjs.useSdk.call(void 0, );
1000
1004
  const recordsById = _zustand.useStore.call(void 0, store, (s) => s.records.byId);
1001
1005
  const filterTypes = _zustand.useStore.call(void 0, store, (s) => s.filters.types);
1002
1006
  const {
@@ -1004,7 +1008,7 @@ function CareFilesPanel({ caseId }) {
1004
1008
  openSmartRecord,
1005
1009
  requestDelete,
1006
1010
  onToast: onToastAction
1007
- } = _chunkV4FEDCZCjs.useSmartRecordsActions.call(void 0, );
1011
+ } = _chunkE2ZFUVV7js.useSmartRecordsActions.call(void 0, );
1008
1012
  const tabScrollRef = _react.useRef.call(void 0, null);
1009
1013
  const [activeTab, setActiveTab] = _react.useState.call(void 0, "all");
1010
1014
  const allRecords = _react.useMemo.call(void 0,
@@ -1120,10 +1124,10 @@ function CareFilesPanel({ caseId }) {
1120
1124
  // src/views/containers/care-panel/CareContextPanel.tsx
1121
1125
 
1122
1126
  function CareContextPanel({ caseId, onBack }) {
1123
- const { store } = _chunk2VELBQXAjs.useSdk.call(void 0, );
1127
+ const { store } = _chunkZ4DDE6TTjs.useSdk.call(void 0, );
1124
1128
  const recordsById = _zustand.useStore.call(void 0, store, (s) => s.records.byId);
1125
1129
  const casesById = _zustand.useStore.call(void 0, store, (s) => s.cases.byId);
1126
- const { requestDelete, attachToContext, selectRecord, onCopyToNote, onToast: onToastAction } = _chunkV4FEDCZCjs.useSmartRecordsActions.call(void 0, );
1130
+ const { requestDelete, attachToContext, selectRecord, onCopyToNote, onToast: onToastAction } = _chunkE2ZFUVV7js.useSmartRecordsActions.call(void 0, );
1127
1131
  const onToast = _react.useCallback.call(void 0,
1128
1132
  (message, type) => _optionalChain([onToastAction, 'optionalCall', _19 => _19(message, _nullishCoalesce(type, () => ( "success")))]),
1129
1133
  [onToastAction]
@@ -1173,7 +1177,7 @@ function CareContextPanel({ caseId, onBack }) {
1173
1177
  const countLabel = `${fileCount} record${fileCount !== 1 ? "s" : ""}`;
1174
1178
  if (isUngrouped || fileCount === 0) return countLabel;
1175
1179
  const newest = records.reduce((max, r) => Math.max(max, r.createdAtEpoch), 0);
1176
- return newest ? `Updated ${_chunk2VELBQXAjs.epochToDisplay.call(void 0, newest)} \xB7 ${countLabel}` : countLabel;
1180
+ return newest ? `Updated ${_chunkZ4DDE6TTjs.epochToDisplay.call(void 0, newest)} \xB7 ${countLabel}` : countLabel;
1177
1181
  }, [records, fileCount, isUngrouped]);
1178
1182
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RecordsActionsProvider, { value: careContextActions, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__panel mr-sv__care-context-panel", children: [
1179
1183
  recordIds.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
@@ -1184,7 +1188,7 @@ function CareContextPanel({ caseId, onBack }) {
1184
1188
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-cc-panel__header", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-cc-panel__header-left", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-cc-panel__info", children: [
1185
1189
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-cc-panel__name-row", children: [
1186
1190
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1187
- _chunk2VELBQXAjs.Typography_default,
1191
+ _chunkZ4DDE6TTjs.Typography_default,
1188
1192
  {
1189
1193
  variant: "label",
1190
1194
  as: "span",
@@ -1192,16 +1196,16 @@ function CareContextPanel({ caseId, onBack }) {
1192
1196
  children: isUngrouped ? "No care context" : _optionalChain([c, 'optionalAccess', _22 => _22.name]) || "Untitled"
1193
1197
  }
1194
1198
  ),
1195
- _optionalChain([c, 'optionalAccess', _23 => _23.typeCode]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mr-cc-panel__badge", children: _nullishCoalesce(_optionalChain([_chunk2VELBQXAjs.CASE_TYPE_OPTIONS, 'access', _24 => _24.find, 'call', _25 => _25((o) => o.value === c.typeCode), 'optionalAccess', _26 => _26.label]), () => ( c.typeCode)) })
1199
+ _optionalChain([c, 'optionalAccess', _23 => _23.typeCode]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mr-cc-panel__badge", children: _nullishCoalesce(_optionalChain([_chunkZ4DDE6TTjs.CASE_TYPE_OPTIONS, 'access', _24 => _24.find, 'call', _25 => _25((o) => o.value === c.typeCode), 'optionalAccess', _26 => _26.label]), () => ( c.typeCode)) })
1196
1200
  ] }),
1197
1201
  subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mr-cc-panel__sub", children: subtitle })
1198
1202
  ] }) }) })
1199
1203
  ] }),
1200
1204
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-sv__panel-body", children: recordIds.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__empty", children: [
1201
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.EmptyIllustration, {}),
1205
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.EmptyIllustration, {}),
1202
1206
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__empty-text", children: [
1203
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "heading", children: "No records" }),
1204
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "muted", children: "No records have been added to this care context." })
1207
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "heading", children: "No records" }),
1208
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "muted", children: "No records have been added to this care context." })
1205
1209
  ] })
1206
1210
  ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CareFilesPanel, { caseId }) })
1207
1211
  ] }) });
@@ -1222,10 +1226,10 @@ function SmartRecordPreviewPanel({
1222
1226
  onBack,
1223
1227
  preview: loadedPreview
1224
1228
  }) {
1225
- const { store } = _chunk2VELBQXAjs.useSdk.call(void 0, );
1226
- const { hideOpenInNewTab, hasCopyToNote, onCopyToNote, onCopyVitalsToNote, onToast } = _chunkV4FEDCZCjs.useSmartRecordsActions.call(void 0, );
1229
+ const { store } = _chunkZ4DDE6TTjs.useSdk.call(void 0, );
1230
+ const { hideOpenInNewTab, hasCopyToNote, onCopyToNote, onCopyVitalsToNote, onToast } = _chunkE2ZFUVV7js.useSmartRecordsActions.call(void 0, );
1227
1231
  const record = _zustand.useStore.call(void 0, store, (s) => s.records.byId[recordId]);
1228
- const ownPreview = _chunkV4FEDCZCjs.useRecordPreview.call(void 0, loadedPreview ? null : recordId);
1232
+ const ownPreview = _chunkE2ZFUVV7js.useRecordPreview.call(void 0, loadedPreview ? null : recordId);
1229
1233
  const preview = _nullishCoalesce(loadedPreview, () => ( ownPreview));
1230
1234
  const isBlockedHttp = preview.files.length > 0 && _chunkGDE4LXTRjs.isHttpUrl.call(void 0, preview.files[0].url);
1231
1235
  const [previewLoadUnavailable, setPreviewLoadUnavailable] = _react.useState.call(void 0, false);
@@ -1265,7 +1269,7 @@ function SmartRecordPreviewPanel({
1265
1269
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__panel-header", children: [
1266
1270
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__panel-left", children: [
1267
1271
  onBack && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1268
- _chunk2VELBQXAjs.IconButton,
1272
+ _chunkZ4DDE6TTjs.IconButton,
1269
1273
  {
1270
1274
  icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { size: 16, "aria-hidden": true }),
1271
1275
  label: "Back",
@@ -1275,8 +1279,8 @@ function SmartRecordPreviewPanel({
1275
1279
  }
1276
1280
  ),
1277
1281
  record && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__panel-info mr-sv__panel-info--start", children: [
1278
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "label", as: "span", className: "mr-sv__panel-name", children: record.title }),
1279
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "hint", as: "span", className: "mr-sv__panel-meta-text", children: _chunk2VELBQXAjs.epochToDisplay.call(void 0, record.createdAtEpoch) })
1282
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "label", as: "span", className: "mr-sv__panel-name", children: record.title }),
1283
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "hint", as: "span", className: "mr-sv__panel-meta-text", children: _chunkZ4DDE6TTjs.epochToDisplay.call(void 0, record.createdAtEpoch) })
1280
1284
  ] })
1281
1285
  ] }),
1282
1286
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-orig__header-actions", children: [
@@ -1295,7 +1299,7 @@ function SmartRecordPreviewPanel({
1295
1299
  }
1296
1300
  ),
1297
1301
  preview.status === "loaded" && preview.files.length > 0 && !previewUnavailable && !hideOpenInNewTab && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1298
- _chunk2VELBQXAjs.IconButton,
1302
+ _chunkZ4DDE6TTjs.IconButton,
1299
1303
  {
1300
1304
  icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { size: 16, "aria-hidden": true }),
1301
1305
  label: "Open in new tab",
@@ -1326,14 +1330,14 @@ function SmartRecordPreviewPanel({
1326
1330
  children: [
1327
1331
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.LoaderCircle, { size: 44, className: "mr-sv__loading-spinner", "aria-hidden": true }),
1328
1332
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__empty-text", children: [
1329
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "heading", children: "Loading preview..." }),
1330
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "muted", children: "Fetching document" })
1333
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "heading", children: "Loading preview..." }),
1334
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "muted", children: "Fetching document" })
1331
1335
  ] })
1332
1336
  ]
1333
1337
  }
1334
1338
  ),
1335
- preview.status === "error" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "muted", className: "mr-sv__panel-empty", children: "Failed to load document preview." }),
1336
- preview.status === "loaded" && preview.files.length === 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "muted", className: "mr-sv__panel-empty", children: "No preview available for this record." }),
1339
+ preview.status === "error" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "muted", className: "mr-sv__panel-empty", children: "Failed to load document preview." }),
1340
+ preview.status === "loaded" && preview.files.length === 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "muted", className: "mr-sv__panel-empty", children: "No preview available for this record." }),
1337
1341
  preview.status === "loaded" && preview.files.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1338
1342
  "div",
1339
1343
  {
@@ -1390,9 +1394,9 @@ function fetchTrend(ekaId, bid, patientId, fallbackUnit) {
1390
1394
  const inFlightKey = `${bid}:${patientId}:${ekaId}`;
1391
1395
  const existing = inFlight.get(inFlightKey);
1392
1396
  if (existing) return existing;
1393
- const promise = withLimit(() => _chunk2VELBQXAjs.getCore.call(void 0, ).getParameterTrend({ parameterId: ekaId, bid, patientId })).then((data) => {
1397
+ const promise = withLimit(() => _chunkZ4DDE6TTjs.getCore.call(void 0, ).getParameterTrend({ parameterId: ekaId, bid, patientId })).then((data) => {
1394
1398
  const cells = _chunkMVWFPQXZjs.latestTrendCells.call(void 0, data, fallbackUnit, TREND_COUNT);
1395
- _chunk2VELBQXAjs.writeVitalTrendCache.call(void 0, bid, patientId, ekaId, cells);
1399
+ _chunkZ4DDE6TTjs.writeVitalTrendCache.call(void 0, bid, patientId, ekaId, cells);
1396
1400
  return cells;
1397
1401
  }).finally(() => {
1398
1402
  inFlight.delete(inFlightKey);
@@ -1407,7 +1411,7 @@ function removeFromSet(prev, ekaId) {
1407
1411
  return next;
1408
1412
  }
1409
1413
  function useVitalTrendPrefetch(rows, visibleEkaIds) {
1410
- const { bid, patientId } = _chunk2VELBQXAjs.useSdk.call(void 0, );
1414
+ const { bid, patientId } = _chunkZ4DDE6TTjs.useSdk.call(void 0, );
1411
1415
  const [trendByEka, setTrendByEka] = _react.useState.call(void 0, /* @__PURE__ */ new Map());
1412
1416
  const [pendingEkaIds, setPendingEkaIds] = _react.useState.call(void 0, /* @__PURE__ */ new Set());
1413
1417
  const timersRef = _react.useRef.call(void 0, /* @__PURE__ */ new Map());
@@ -1427,7 +1431,7 @@ function useVitalTrendPrefetch(rows, visibleEkaIds) {
1427
1431
  }
1428
1432
  for (const ekaId of visibleEkaIds) {
1429
1433
  if (!ekaId || resolved.has(ekaId)) continue;
1430
- const cached = _chunk2VELBQXAjs.readVitalTrendCache.call(void 0, bid, patientId, ekaId);
1434
+ const cached = _chunkZ4DDE6TTjs.readVitalTrendCache.call(void 0, bid, patientId, ekaId);
1431
1435
  if (cached) {
1432
1436
  resolved.add(ekaId);
1433
1437
  setTrendByEka((prev) => new Map(prev).set(ekaId, cached));
@@ -1617,7 +1621,7 @@ function VitalsPanelGrid({
1617
1621
  children: [
1618
1622
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-cc-table__controls", children: [
1619
1623
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1620
- _chunk2VELBQXAjs.SearchInput_default,
1624
+ _chunkZ4DDE6TTjs.SearchInput_default,
1621
1625
  {
1622
1626
  className: "mr-cc-table__search",
1623
1627
  iconSize: 16,
@@ -1664,7 +1668,7 @@ function VitalsPanelGrid({
1664
1668
  ]
1665
1669
  }
1666
1670
  ),
1667
- filteredRows.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-cc-table__empty", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "muted", children: "No vitals match." }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { height: `${rowVirtualizer.getTotalSize()}px`, minWidth: gridMinWidth, position: "relative" }, children: rowVirtualizer.getVirtualItems().map((virtualRow) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1671
+ filteredRows.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-cc-table__empty", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "muted", children: "No vitals match." }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: { height: `${rowVirtualizer.getTotalSize()}px`, minWidth: gridMinWidth, position: "relative" }, children: rowVirtualizer.getVirtualItems().map((virtualRow) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1668
1672
  "div",
1669
1673
  {
1670
1674
  "data-index": virtualRow.index,
@@ -1868,11 +1872,11 @@ function SmartRecordSmartPanel({
1868
1872
  caseId,
1869
1873
  onBack
1870
1874
  }) {
1871
- const { store } = _chunk2VELBQXAjs.useSdk.call(void 0, );
1875
+ const { store } = _chunkZ4DDE6TTjs.useSdk.call(void 0, );
1872
1876
  const record = _zustand.useStore.call(void 0, store, (s) => s.records.byId[recordId]);
1873
1877
  const caseName = _zustand.useStore.call(void 0, store, (s) => caseId ? _optionalChain([s, 'access', _53 => _53.cases, 'access', _54 => _54.byId, 'access', _55 => _55[caseId], 'optionalAccess', _56 => _56.name]) : void 0);
1874
- const { onCopyToNote, openHistory, openOriginal, onCopyVitalsToNote } = _chunkV4FEDCZCjs.useSmartRecordsActions.call(void 0, );
1875
- const { status, table } = _chunkV4FEDCZCjs.useRecordPanelTable.call(void 0, recordId);
1878
+ const { onCopyToNote, openHistory, openOriginal, onCopyVitalsToNote } = _chunkE2ZFUVV7js.useSmartRecordsActions.call(void 0, );
1879
+ const { status, table } = _chunkE2ZFUVV7js.useRecordPanelTable.call(void 0, recordId);
1876
1880
  const [visibleEkaIds, setVisibleEkaIds] = _react.useState.call(void 0, []);
1877
1881
  const { rows: rowsWithTrend, pendingEkaIds } = useVitalTrendPrefetch(table.rows, visibleEkaIds);
1878
1882
  const hasTrendableVitals = table.rows.some((r) => r.ekaId);
@@ -1886,7 +1890,7 @@ function SmartRecordSmartPanel({
1886
1890
  [openOriginal, recordId, caseId]
1887
1891
  );
1888
1892
  const meta = record ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1889
- _chunk2VELBQXAjs.epochToDisplay.call(void 0, record.createdAtEpoch),
1893
+ _chunkZ4DDE6TTjs.epochToDisplay.call(void 0, record.createdAtEpoch),
1890
1894
  record.totalVitals > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1891
1895
  " \xB7 ",
1892
1896
  record.totalVitals,
@@ -1900,8 +1904,8 @@ function SmartRecordSmartPanel({
1900
1904
  ] }) }),
1901
1905
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-cc-panel__header", children: [
1902
1906
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-cc-panel__header-left", children: record && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-cc-panel__info", children: [
1903
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-cc-panel__name-row", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "label", as: "span", className: "mr-cc-panel__name", children: record.title }) }),
1904
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mr-cc-panel__sub", children: caseName ? `${caseName} \xB7 ${_chunk2VELBQXAjs.epochToDisplay.call(void 0, record.createdAtEpoch)}` : meta })
1907
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-cc-panel__name-row", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "label", as: "span", className: "mr-cc-panel__name", children: record.title }) }),
1908
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mr-cc-panel__sub", children: caseName ? `${caseName} \xB7 ${_chunkZ4DDE6TTjs.epochToDisplay.call(void 0, record.createdAtEpoch)}` : meta })
1905
1909
  ] }) }),
1906
1910
  record && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { type: "button", className: "mr-sv__ghost-link-btn", onClick: handleViewOriginal, children: [
1907
1911
  "View original",
@@ -1911,10 +1915,10 @@ function SmartRecordSmartPanel({
1911
1915
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__panel-body", children: [
1912
1916
  status === "loading" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-cc-table mr-cc-table--state", children: [
1913
1917
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.LoaderCircle, { size: 20, className: "mr-sv__loading-spinner", "aria-hidden": true }),
1914
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "muted", children: "Building vitals summary\u2026" })
1918
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "muted", children: "Building vitals summary\u2026" })
1915
1919
  ] }),
1916
- status === "error" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-cc-table mr-cc-table--state", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "muted", children: "Couldn't load vitals summary." }) }),
1917
- status === "loaded" && table.rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "muted", className: "mr-sv__panel-empty", children: "No vitals to show." }),
1920
+ status === "error" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-cc-table mr-cc-table--state", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "muted", children: "Couldn't load vitals summary." }) }),
1921
+ status === "loaded" && table.rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "muted", className: "mr-sv__panel-empty", children: "No vitals to show." }),
1918
1922
  status === "loaded" && table.rows.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1919
1923
  VitalsPanelGrid,
1920
1924
  {
@@ -3160,7 +3164,7 @@ function SinceText({ text, since }) {
3160
3164
  if (!since || at < 0 || since.label === since.date) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: text });
3161
3165
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3162
3166
  text.slice(0, at),
3163
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Tooltip, { content: since.date, children: since.label }),
3167
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Tooltip, { content: since.date, children: since.label }),
3164
3168
  text.slice(at + since.label.length)
3165
3169
  ] });
3166
3170
  }
@@ -3335,7 +3339,7 @@ var PrescriptionSectionCard = _react.memo.call(void 0, function PrescriptionSect
3335
3339
  }
3336
3340
  ),
3337
3341
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mr-rx-card__title", children: section.display_name }),
3338
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Tooltip, { content: copied ? "Copied" : "Copy section as plain text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3342
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Tooltip, { content: copied ? "Copied" : "Copy section as plain text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3339
3343
  "button",
3340
3344
  {
3341
3345
  type: "button",
@@ -3434,7 +3438,7 @@ function PrescriptionPanel({ conversion, title, typeCode, source, onBack, onView
3434
3438
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-cc-panel__header", children: [
3435
3439
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-cc-panel__header-left", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-cc-panel__info", children: [
3436
3440
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-cc-panel__name-row", children: [
3437
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "label", as: "span", className: "mr-cc-panel__name", children: title }),
3441
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "label", as: "span", className: "mr-cc-panel__name", children: title }),
3438
3442
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SourceBadge, { typeCode, source })
3439
3443
  ] }),
3440
3444
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mr-cc-panel__sub", children: meta })
@@ -3445,10 +3449,10 @@ function PrescriptionPanel({ conversion, title, typeCode, source, onBack, onView
3445
3449
  ] })
3446
3450
  ] }),
3447
3451
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-sv__panel-body mr-rx-body", children: isEmpty ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__empty", children: [
3448
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.EmptyIllustration, {}),
3452
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.EmptyIllustration, {}),
3449
3453
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__empty-text", children: [
3450
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "heading", children: "No structured data" }),
3451
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "muted", children: "This prescription has no sections to show here." })
3454
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "heading", children: "No structured data" }),
3455
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "muted", children: "This prescription has no sections to show here." })
3452
3456
  ] })
3453
3457
  ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-rx-scroll", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-rx-cards", children: sections.map((section) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3454
3458
  PrescriptionSectionCard,
@@ -3510,7 +3514,7 @@ function ScribeDocumentPanel({
3510
3514
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-cc-panel__header", children: [
3511
3515
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-cc-panel__header-left", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-cc-panel__info", children: [
3512
3516
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-cc-panel__name-row", children: [
3513
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "label", as: "span", className: "mr-cc-panel__name", children: title }),
3517
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "label", as: "span", className: "mr-cc-panel__name", children: title }),
3514
3518
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SourceBadge, { typeCode, source })
3515
3519
  ] }),
3516
3520
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mr-cc-panel__sub", children: date })
@@ -3538,11 +3542,11 @@ function ScribeDocumentPanel({
3538
3542
 
3539
3543
  var SCRIBE_SOURCE2 = "scribe";
3540
3544
  function RecordPanel({ recordId, caseId, onBack }) {
3541
- const { store, labelOf } = _chunk2VELBQXAjs.useSdk.call(void 0, );
3545
+ const { store, labelOf } = _chunkZ4DDE6TTjs.useSdk.call(void 0, );
3542
3546
  const record = _zustand.useStore.call(void 0, store, (s) => s.records.byId[recordId]);
3543
3547
  const title = labelOf(_nullishCoalesce(_optionalChain([record, 'optionalAccess', _267 => _267.typeCode]), () => ( "")));
3544
- const { openOriginal, attachToContext, onCopyPrescriptionSections, renderScribeDocument } = _chunkV4FEDCZCjs.useSmartRecordsActions.call(void 0, );
3545
- const preview = _chunkV4FEDCZCjs.useRecordPreview.call(void 0, recordId);
3548
+ const { openOriginal, attachToContext, onCopyPrescriptionSections, renderScribeDocument } = _chunkE2ZFUVV7js.useSmartRecordsActions.call(void 0, );
3549
+ const preview = _chunkE2ZFUVV7js.useRecordPreview.call(void 0, recordId);
3546
3550
  const source = _nullishCoalesce(_optionalChain([record, 'optionalAccess', _268 => _268.source]), () => ( preview.source));
3547
3551
  const [unavailableFor, setUnavailableFor] = _react.useState.call(void 0, null);
3548
3552
  _react.useEffect.call(void 0, () => setUnavailableFor(null), [recordId]);
@@ -3564,8 +3568,8 @@ function RecordPanel({ recordId, caseId, onBack }) {
3564
3568
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-sv__panel", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-sv__panel-body", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__loading-panel", children: [
3565
3569
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.LoaderCircle, { size: 44, className: "mr-sv__loading-spinner", "aria-hidden": true }),
3566
3570
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__empty-text", children: [
3567
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "heading", children: "Loading record..." }),
3568
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "muted", children: "Fetching the record details" })
3571
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "heading", children: "Loading record..." }),
3572
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "muted", children: "Fetching the record details" })
3569
3573
  ] })
3570
3574
  ] }) }) });
3571
3575
  }
@@ -3577,7 +3581,7 @@ function RecordPanel({ recordId, caseId, onBack }) {
3577
3581
  documentId,
3578
3582
  recordId,
3579
3583
  title,
3580
- date: record ? _chunk2VELBQXAjs.epochToDisplay.call(void 0, record.createdAtEpoch) : "",
3584
+ date: record ? _chunkZ4DDE6TTjs.epochToDisplay.call(void 0, record.createdAtEpoch) : "",
3581
3585
  typeCode: _optionalChain([record, 'optionalAccess', _270 => _270.typeCode]),
3582
3586
  source: _nullishCoalesce(source, () => ( void 0)),
3583
3587
  renderDocument: renderScribeDocument,
@@ -3839,7 +3843,7 @@ function countRecordItems(groups) {
3839
3843
 
3840
3844
  // src/views/hooks/smart-records/useSidebarCollection.ts
3841
3845
  function useSidebarCollection({ limit } = {}) {
3842
- const { store, labelOf } = _chunk2VELBQXAjs.useSdk.call(void 0, );
3846
+ const { store, labelOf } = _chunkZ4DDE6TTjs.useSdk.call(void 0, );
3843
3847
  const groups = _zustand.useStore.call(void 0, store, (s) => s.collection.groups);
3844
3848
  const filters = _zustand.useStore.call(void 0, store, (s) => s.filters);
3845
3849
  const searched = _react.useMemo.call(void 0, () => searchCollection(groups, filters.search, labelOf), [groups, filters.search, labelOf]);
@@ -3858,15 +3862,15 @@ function useSidebarCollection({ limit } = {}) {
3858
3862
  // src/connection/useRecordsConnection.ts
3859
3863
 
3860
3864
  function useRecordsConnection() {
3861
- const { bid, patientId, store, labelOf } = _chunk2VELBQXAjs.useSdk.call(void 0, );
3865
+ const { bid, patientId, linkedPatientIds, store, labelOf } = _chunkZ4DDE6TTjs.useSdk.call(void 0, );
3862
3866
  const toMs = (s) => s != null ? s * 1e3 : null;
3863
3867
  const [sourceRefreshedAt, setSourceRefreshedAt] = _react.useState.call(void 0,
3864
- () => toMs(_chunk2VELBQXAjs.getCore.call(void 0, ).sourceRefreshedAt)
3868
+ () => toMs(_chunkZ4DDE6TTjs.getCore.call(void 0, ).sourceRefreshedAt)
3865
3869
  );
3866
3870
  const loadedKeyRef = _react.useRef.call(void 0, null);
3867
3871
  const applyItems = _react.useCallback.call(void 0,
3868
3872
  (items) => {
3869
- store.getState().records.setAll(items.map((d) => _chunk2VELBQXAjs.documentItemToUi.call(void 0, d, labelOf)));
3873
+ store.getState().records.setAll(items.map((d) => _chunkZ4DDE6TTjs.documentItemToUi.call(void 0, d, labelOf)));
3870
3874
  },
3871
3875
  [store, labelOf]
3872
3876
  );
@@ -3874,9 +3878,10 @@ function useRecordsConnection() {
3874
3878
  const records = store.getState().records;
3875
3879
  records.setStatus("loading");
3876
3880
  try {
3877
- const fresh = await _chunk2VELBQXAjs.getCore.call(void 0, ).listDocuments({
3881
+ const fresh = await _chunkZ4DDE6TTjs.getCore.call(void 0, ).listDocuments({
3878
3882
  bid,
3879
3883
  patientId,
3884
+ linkedPatientIds,
3880
3885
  preferenceType: "HTML",
3881
3886
  onStale: (cached) => {
3882
3887
  applyItems(cached);
@@ -3888,24 +3893,24 @@ function useRecordsConnection() {
3888
3893
  } catch (e5) {
3889
3894
  records.setStatus("idle");
3890
3895
  }
3891
- }, [bid, patientId, store, applyItems]);
3896
+ }, [bid, patientId, linkedPatientIds, store, applyItems]);
3892
3897
  _react.useEffect.call(void 0, () => {
3893
- const key = `${bid}::${patientId}`;
3898
+ const key = `${bid}::${patientId}::${_nullishCoalesce(_optionalChain([linkedPatientIds, 'optionalAccess', _292 => _292.join, 'call', _293 => _293(",")]), () => ( ""))}`;
3894
3899
  if (loadedKeyRef.current === key) return;
3895
3900
  loadedKeyRef.current = key;
3896
3901
  void load();
3897
- }, [bid, patientId, load]);
3902
+ }, [bid, patientId, linkedPatientIds, load]);
3898
3903
  _react.useEffect.call(void 0, () => {
3899
- const unsubscribe = _chunk2VELBQXAjs.getCore.call(void 0, ).subscribe("documents:changed", () => {
3900
- _chunk2VELBQXAjs.clearVitalTrendCacheForPatient.call(void 0, bid, patientId);
3901
- void _chunk2VELBQXAjs.getCore.call(void 0, ).listLocalDocuments({ bid, patientId }).then(applyItems).catch(() => {
3904
+ const unsubscribe = _chunkZ4DDE6TTjs.getCore.call(void 0, ).subscribe("documents:changed", () => {
3905
+ _chunkZ4DDE6TTjs.clearVitalTrendCacheForPatient.call(void 0, bid, patientId);
3906
+ void _chunkZ4DDE6TTjs.getCore.call(void 0, ).listLocalDocuments({ bid, patientId, linkedPatientIds }).then(applyItems).catch(() => {
3902
3907
  });
3903
3908
  });
3904
3909
  return unsubscribe;
3905
- }, [bid, patientId, applyItems]);
3910
+ }, [bid, patientId, linkedPatientIds, applyItems]);
3906
3911
  const editRecord = _react.useCallback.call(void 0,
3907
3912
  async (documentId, data) => {
3908
- await _chunk2VELBQXAjs.getCore.call(void 0, ).editDocument({ documentId, data, bid, patientId });
3913
+ await _chunkZ4DDE6TTjs.getCore.call(void 0, ).editDocument({ documentId, data, bid, patientId });
3909
3914
  },
3910
3915
  [bid, patientId]
3911
3916
  );
@@ -3914,7 +3919,7 @@ function useRecordsConnection() {
3914
3919
  const records = store.getState().records;
3915
3920
  records.markPending(documentId);
3916
3921
  try {
3917
- await _chunk2VELBQXAjs.getCore.call(void 0, ).deleteDocument({ documentId, bid, patientId });
3922
+ await _chunkZ4DDE6TTjs.getCore.call(void 0, ).deleteDocument({ documentId, bid, patientId });
3918
3923
  records.remove(documentId);
3919
3924
  records.unmarkPending(documentId);
3920
3925
  } catch (e) {
@@ -3927,10 +3932,10 @@ function useRecordsConnection() {
3927
3932
  const refresh = _react.useCallback.call(void 0, async () => {
3928
3933
  store.getState().records.setStatus("loading");
3929
3934
  try {
3930
- const fresh = await _chunk2VELBQXAjs.getCore.call(void 0, ).refreshDocumentSource({ bid, patientId, preferenceType: "HTML" });
3931
- _chunk2VELBQXAjs.clearVitalTrendCacheForPatient.call(void 0, bid, patientId);
3935
+ const fresh = await _chunkZ4DDE6TTjs.getCore.call(void 0, ).refreshDocumentSource({ bid, patientId, preferenceType: "HTML" });
3936
+ _chunkZ4DDE6TTjs.clearVitalTrendCacheForPatient.call(void 0, bid, patientId);
3932
3937
  if (fresh.length > 0) applyItems(fresh);
3933
- setSourceRefreshedAt(toMs(_chunk2VELBQXAjs.getCore.call(void 0, ).sourceRefreshedAt));
3938
+ setSourceRefreshedAt(toMs(_chunkZ4DDE6TTjs.getCore.call(void 0, ).sourceRefreshedAt));
3934
3939
  store.getState().records.setStatus("fresh");
3935
3940
  } catch (e6) {
3936
3941
  store.getState().records.setStatus("stale");
@@ -3955,7 +3960,7 @@ function useRecordsConnection() {
3955
3960
 
3956
3961
 
3957
3962
  function useCollectionConnection(enabled = true) {
3958
- const { bid, patientId, store } = _chunk2VELBQXAjs.useSdk.call(void 0, );
3963
+ const { bid, patientId, linkedPatientIds, store } = _chunkZ4DDE6TTjs.useSdk.call(void 0, );
3959
3964
  const loadedKeyRef = _react.useRef.call(void 0, null);
3960
3965
  const types = _zustand.useStore.call(void 0, store, (s) => s.filters.types);
3961
3966
  const documentDateFrom = _zustand.useStore.call(void 0, store, (s) => s.filters.documentDateFrom);
@@ -3970,9 +3975,10 @@ function useCollectionConnection(enabled = true) {
3970
3975
  const collection = store.getState().collection;
3971
3976
  collection.setStatus("loading");
3972
3977
  try {
3973
- const fresh = await _chunk2VELBQXAjs.getCore.call(void 0, ).groupCollectionItems({
3978
+ const fresh = await _chunkZ4DDE6TTjs.getCore.call(void 0, ).groupCollectionItems({
3974
3979
  bid,
3975
3980
  patientId,
3981
+ linkedPatientIds,
3976
3982
  filter: filterRef.current,
3977
3983
  onStale: (cached) => {
3978
3984
  apply(cached);
@@ -3984,20 +3990,20 @@ function useCollectionConnection(enabled = true) {
3984
3990
  } catch (e) {
3985
3991
  store.getState().collection.setError(e instanceof Error ? e.message : "Failed to load records");
3986
3992
  }
3987
- }, [bid, patientId, store, apply]);
3993
+ }, [bid, patientId, linkedPatientIds, store, apply]);
3988
3994
  const reload = _react.useCallback.call(void 0, () => {
3989
- void _chunk2VELBQXAjs.getCore.call(void 0, ).groupCollectionItems({ bid, patientId, localOnly: true, filter: filterRef.current }).then((groups) => {
3995
+ void _chunkZ4DDE6TTjs.getCore.call(void 0, ).groupCollectionItems({ bid, patientId, linkedPatientIds, localOnly: true, filter: filterRef.current }).then((groups) => {
3990
3996
  apply(groups);
3991
3997
  }).catch(() => {
3992
3998
  });
3993
- }, [bid, patientId, apply]);
3999
+ }, [bid, patientId, linkedPatientIds, apply]);
3994
4000
  _react.useEffect.call(void 0, () => {
3995
4001
  if (!enabled) return;
3996
- const key = `${bid}::${patientId}`;
4002
+ const key = `${bid}::${patientId}::${_nullishCoalesce(_optionalChain([linkedPatientIds, 'optionalAccess', _294 => _294.join, 'call', _295 => _295(",")]), () => ( ""))}`;
3997
4003
  if (loadedKeyRef.current === key) return;
3998
4004
  loadedKeyRef.current = key;
3999
4005
  void load();
4000
- }, [enabled, bid, patientId, load]);
4006
+ }, [enabled, bid, patientId, linkedPatientIds, load]);
4001
4007
  const firstFilterRef = _react.useRef.call(void 0, true);
4002
4008
  _react.useEffect.call(void 0, () => {
4003
4009
  if (!enabled) return;
@@ -4009,8 +4015,8 @@ function useCollectionConnection(enabled = true) {
4009
4015
  }, [enabled, types, documentDateFrom, documentDateTo, reload]);
4010
4016
  _react.useEffect.call(void 0, () => {
4011
4017
  if (!enabled) return;
4012
- const unsubscribeDocs = _chunk2VELBQXAjs.getCore.call(void 0, ).subscribe("documents:changed", reload);
4013
- const unsubscribeCases = _chunk2VELBQXAjs.getCore.call(void 0, ).subscribe("cases:changed", reload);
4018
+ const unsubscribeDocs = _chunkZ4DDE6TTjs.getCore.call(void 0, ).subscribe("documents:changed", reload);
4019
+ const unsubscribeCases = _chunkZ4DDE6TTjs.getCore.call(void 0, ).subscribe("cases:changed", reload);
4014
4020
  return () => {
4015
4021
  unsubscribeDocs();
4016
4022
  unsubscribeCases();
@@ -4026,21 +4032,21 @@ function resolveContentType(file) {
4026
4032
  if (t === "image/jpeg" || t === "image/jpg" || t === "image/png" || t === "application/pdf") {
4027
4033
  return t;
4028
4034
  }
4029
- const ext = _optionalChain([file, 'access', _292 => _292.name, 'access', _293 => _293.split, 'call', _294 => _294("."), 'access', _295 => _295.pop, 'call', _296 => _296(), 'optionalAccess', _297 => _297.toLowerCase, 'call', _298 => _298()]);
4035
+ const ext = _optionalChain([file, 'access', _296 => _296.name, 'access', _297 => _297.split, 'call', _298 => _298("."), 'access', _299 => _299.pop, 'call', _300 => _300(), 'optionalAccess', _301 => _301.toLowerCase, 'call', _302 => _302()]);
4030
4036
  if (ext === "pdf") return "application/pdf";
4031
4037
  if (ext === "png") return "image/png";
4032
4038
  if (ext === "jpg" || ext === "jpeg") return "image/jpeg";
4033
4039
  return "application/pdf";
4034
4040
  }
4035
4041
  function useUploadConnection() {
4036
- const { bid, patientId, store } = _chunk2VELBQXAjs.useSdk.call(void 0, );
4042
+ const { bid, patientId, store } = _chunkZ4DDE6TTjs.useSdk.call(void 0, );
4037
4043
  const seq = _react.useRef.call(void 0, 0);
4038
4044
  const upload = _react.useCallback.call(void 0,
4039
4045
  async (items) => {
4040
4046
  if (items.length === 0) return;
4041
4047
  const localIds = items.map(({ file }) => {
4042
4048
  const id = `upload-${seq.current += 1}-${file.name}`;
4043
- store.getState().uploadQueue.add(_chunk2VELBQXAjs.fileToQueueItem.call(void 0, id, file));
4049
+ store.getState().uploadQueue.add(_chunkZ4DDE6TTjs.fileToQueueItem.call(void 0, id, file));
4044
4050
  return id;
4045
4051
  });
4046
4052
  const batchRequests = items.map((it) => ({
@@ -4057,7 +4063,7 @@ function useUploadConnection() {
4057
4063
  }));
4058
4064
  localIds.forEach((id) => store.getState().uploadQueue.updateProgress(id, 0));
4059
4065
  try {
4060
- const res = await _chunk2VELBQXAjs.getCore.call(void 0, ).addDocument({
4066
+ const res = await _chunkZ4DDE6TTjs.getCore.call(void 0, ).addDocument({
4061
4067
  batchRequests,
4062
4068
  files: items.map((it) => [it.file]),
4063
4069
  filenames: items.map((it) => [it.file.name]),
@@ -4065,12 +4071,12 @@ function useUploadConnection() {
4065
4071
  patientId
4066
4072
  });
4067
4073
  const queue2 = store.getState().uploadQueue;
4068
- if (res.message === "queued_offline" || !_optionalChain([res, 'access', _299 => _299.batch_response, 'optionalAccess', _300 => _300.length])) {
4074
+ if (res.message === "queued_offline" || !_optionalChain([res, 'access', _303 => _303.batch_response, 'optionalAccess', _304 => _304.length])) {
4069
4075
  throw new Error("No internet connection. Your upload will retry automatically when you're back online.");
4070
4076
  }
4071
4077
  localIds.forEach((id, i) => {
4072
- const documentId = _nullishCoalesce(_optionalChain([res, 'access', _301 => _301.batch_response, 'optionalAccess', _302 => _302[i], 'optionalAccess', _303 => _303.document_id]), () => ( ""));
4073
- const errorDetails = _optionalChain([res, 'access', _304 => _304.batch_response, 'optionalAccess', _305 => _305[i], 'optionalAccess', _306 => _306.error_details]);
4078
+ const documentId = _nullishCoalesce(_optionalChain([res, 'access', _305 => _305.batch_response, 'optionalAccess', _306 => _306[i], 'optionalAccess', _307 => _307.document_id]), () => ( ""));
4079
+ const errorDetails = _optionalChain([res, 'access', _308 => _308.batch_response, 'optionalAccess', _309 => _309[i], 'optionalAccess', _310 => _310.error_details]);
4074
4080
  if (errorDetails) {
4075
4081
  queue2.markFailed(id);
4076
4082
  } else {
@@ -4094,7 +4100,7 @@ function useUploadConnection() {
4094
4100
 
4095
4101
  function useLogout() {
4096
4102
  return _react.useCallback.call(void 0, () => {
4097
- _chunk2VELBQXAjs.teardownWorkerClient.call(void 0, );
4103
+ _chunkZ4DDE6TTjs.teardownWorkerClient.call(void 0, );
4098
4104
  }, []);
4099
4105
  }
4100
4106
 
@@ -4179,31 +4185,31 @@ function useFilteredRecordIds(store) {
4179
4185
 
4180
4186
  // src/connection/useRecordSelectors.ts
4181
4187
  function useRecordById2(id) {
4182
- return useRecordById(_chunk2VELBQXAjs.useSdk.call(void 0, ).store, id);
4188
+ return useRecordById(_chunkZ4DDE6TTjs.useSdk.call(void 0, ).store, id);
4183
4189
  }
4184
4190
  function useRecordIdRange2(start, end) {
4185
- return useRecordIdRange(_chunk2VELBQXAjs.useSdk.call(void 0, ).store, start, end);
4191
+ return useRecordIdRange(_chunkZ4DDE6TTjs.useSdk.call(void 0, ).store, start, end);
4186
4192
  }
4187
4193
  function useRecordsCount2() {
4188
- return useRecordsCount(_chunk2VELBQXAjs.useSdk.call(void 0, ).store);
4194
+ return useRecordsCount(_chunkZ4DDE6TTjs.useSdk.call(void 0, ).store);
4189
4195
  }
4190
4196
  function useRecordsStatus2() {
4191
- return useRecordsStatus(_chunk2VELBQXAjs.useSdk.call(void 0, ).store);
4197
+ return useRecordsStatus(_chunkZ4DDE6TTjs.useSdk.call(void 0, ).store);
4192
4198
  }
4193
4199
  function useIsSelected2(id) {
4194
- return useIsSelected(_chunk2VELBQXAjs.useSdk.call(void 0, ).store, id);
4200
+ return useIsSelected(_chunkZ4DDE6TTjs.useSdk.call(void 0, ).store, id);
4195
4201
  }
4196
4202
  function useCaseById2(id) {
4197
- return useCaseById(_chunk2VELBQXAjs.useSdk.call(void 0, ).store, id);
4203
+ return useCaseById(_chunkZ4DDE6TTjs.useSdk.call(void 0, ).store, id);
4198
4204
  }
4199
4205
  function useCaseIds2() {
4200
- return useCaseIds(_chunk2VELBQXAjs.useSdk.call(void 0, ).store);
4206
+ return useCaseIds(_chunkZ4DDE6TTjs.useSdk.call(void 0, ).store);
4201
4207
  }
4202
4208
  function useCasesStatus2() {
4203
- return useCasesStatus(_chunk2VELBQXAjs.useSdk.call(void 0, ).store);
4209
+ return useCasesStatus(_chunkZ4DDE6TTjs.useSdk.call(void 0, ).store);
4204
4210
  }
4205
4211
  function useFilteredRecordIds2() {
4206
- return useFilteredRecordIds(_chunk2VELBQXAjs.useSdk.call(void 0, ).store);
4212
+ return useFilteredRecordIds(_chunkZ4DDE6TTjs.useSdk.call(void 0, ).store);
4207
4213
  }
4208
4214
 
4209
4215
  // src/views/containers/smart-records/components/SidebarCaseItem.tsx
@@ -4214,7 +4220,7 @@ function useFilteredRecordIds2() {
4214
4220
 
4215
4221
 
4216
4222
  var HighlightedText = _react.memo.call(void 0, function HighlightedText2({ text, query }) {
4217
- const q = _nullishCoalesce(_optionalChain([query, 'optionalAccess', _307 => _307.trim, 'call', _308 => _308(), 'access', _309 => _309.toLowerCase, 'call', _310 => _310()]), () => ( ""));
4223
+ const q = _nullishCoalesce(_optionalChain([query, 'optionalAccess', _311 => _311.trim, 'call', _312 => _312(), 'access', _313 => _313.toLowerCase, 'call', _314 => _314()]), () => ( ""));
4218
4224
  const start = q ? text.toLowerCase().indexOf(q) : -1;
4219
4225
  if (start < 0) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: text });
4220
4226
  const end = start + q.length;
@@ -4253,7 +4259,7 @@ var SidebarCaseItem = _react.memo.call(void 0, function SidebarCaseItem2({
4253
4259
  );
4254
4260
  const isEmpty = count === 0;
4255
4261
  const countLabel = `${count} record${count !== 1 ? "s" : ""}`;
4256
- const subline = isEmpty ? "No records available" : matchCount !== void 0 ? `${matchCount} of ${countLabel} match` : dateEpoch ? `Updated ${_chunk2VELBQXAjs.epochToDisplay.call(void 0, dateEpoch)} \xB7 ${countLabel}` : countLabel;
4262
+ const subline = isEmpty ? "No records available" : matchCount !== void 0 ? `${matchCount} of ${countLabel} match` : dateEpoch ? `Updated ${_chunkZ4DDE6TTjs.epochToDisplay.call(void 0, dateEpoch)} \xB7 ${countLabel}` : countLabel;
4257
4263
  const interactive = isEmpty ? { "aria-disabled": true } : { role: "button", tabIndex: 0, "aria-selected": isActive, onClick: handleClick, onKeyDown: handleKeyDown };
4258
4264
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
4259
4265
  "div",
@@ -4265,7 +4271,7 @@ var SidebarCaseItem = _react.memo.call(void 0, function SidebarCaseItem2({
4265
4271
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-sv__case-avatar", children: typeCode ? avatarLabel(typeCode) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Folder, { size: 18, strokeWidth: 2, "aria-hidden": true, "data-testid": "case-avatar-folder" }) }),
4266
4272
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__record-text", children: [
4267
4273
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "mr-sv__record-row-title", children: [
4268
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.TruncatedText, { text: name, className: "mr-sv__record-name", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HighlightedText, { text: name, query: highlight }) }),
4274
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.TruncatedText, { text: name, className: "mr-sv__record-name", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HighlightedText, { text: name, query: highlight }) }),
4269
4275
  isLatest && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mr-sv__latest-badge", children: "Latest" })
4270
4276
  ] }),
4271
4277
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-sv__record-sub", children: subline })
@@ -4326,10 +4332,10 @@ var SidebarRecordRow = _react.memo.call(void 0, function SidebarRecordRow2({
4326
4332
  onClick: handleClick,
4327
4333
  onKeyDown: handleKeyDown,
4328
4334
  children: [
4329
- dateEpoch !== null ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.DateTile_default, { epoch: dateEpoch, sub: "month" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-date-tile", "aria-hidden": true }),
4335
+ dateEpoch !== null ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.DateTile_default, { epoch: dateEpoch, sub: "month" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-date-tile", "aria-hidden": true }),
4330
4336
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__record-text", children: [
4331
4337
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "mr-sv__record-row-title", children: [
4332
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.TruncatedText, { text: title, className: "mr-sv__record-row-name", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HighlightedText, { text: title, query: highlight }) }),
4338
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.TruncatedText, { text: title, className: "mr-sv__record-row-name", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HighlightedText, { text: title, query: highlight }) }),
4333
4339
  smartLabel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SmartStar, { label: smartLabel }),
4334
4340
  isLatest && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mr-sv__latest-badge", children: "Latest" })
4335
4341
  ] }),
@@ -4389,7 +4395,7 @@ var SidebarSearchField = _react.memo.call(void 0, function SidebarSearchField2({
4389
4395
  function summarize(options, value) {
4390
4396
  if (value.length === 0) return "All";
4391
4397
  if (value.length > 2) return `${value.length} types`;
4392
- return value.map((id) => _nullishCoalesce(_optionalChain([options, 'access', _311 => _311.find, 'call', _312 => _312((o) => o.id === id), 'optionalAccess', _313 => _313.display_name]), () => ( id))).join(", ");
4398
+ return value.map((id) => _nullishCoalesce(_optionalChain([options, 'access', _315 => _315.find, 'call', _316 => _316((o) => o.id === id), 'optionalAccess', _317 => _317.display_name]), () => ( id))).join(", ");
4393
4399
  }
4394
4400
  function SidebarTypeSelect({ options, value, onChange }) {
4395
4401
  const [open, setOpen] = _react.useState.call(void 0, false);
@@ -4398,7 +4404,7 @@ function SidebarTypeSelect({ options, value, onChange }) {
4398
4404
  _react.useEffect.call(void 0, () => {
4399
4405
  if (!open) return;
4400
4406
  const onMouseDown = (e) => {
4401
- if (!_optionalChain([rootRef, 'access', _314 => _314.current, 'optionalAccess', _315 => _315.contains, 'call', _316 => _316(e.target)])) setOpen(false);
4407
+ if (!_optionalChain([rootRef, 'access', _318 => _318.current, 'optionalAccess', _319 => _319.contains, 'call', _320 => _320(e.target)])) setOpen(false);
4402
4408
  };
4403
4409
  document.addEventListener("mousedown", onMouseDown);
4404
4410
  return () => document.removeEventListener("mousedown", onMouseDown);
@@ -4462,17 +4468,17 @@ function SidebarTypeSelect({ options, value, onChange }) {
4462
4468
 
4463
4469
  var EMPTY_DRAFT = { preset: "anytime", from: "", to: "", types: [] };
4464
4470
  function SidebarFilterPopover({ containerRef, onClose }) {
4465
- const { store, documentTypes } = _chunk2VELBQXAjs.useSdk.call(void 0, );
4471
+ const { store, documentTypes } = _chunkZ4DDE6TTjs.useSdk.call(void 0, );
4466
4472
  const applied = _zustand.useStore.call(void 0, store, (s) => s.filters);
4467
4473
  const [draft, setDraft] = _react.useState.call(void 0, () => ({
4468
4474
  preset: applied.documentDatePreset,
4469
- from: applied.documentDatePreset === "custom" ? _chunk2VELBQXAjs.epochToDateInput.call(void 0, applied.documentDateFrom) : "",
4470
- to: applied.documentDatePreset === "custom" ? _chunk2VELBQXAjs.epochToDateInput.call(void 0, applied.documentDateTo) : "",
4475
+ from: applied.documentDatePreset === "custom" ? _chunkZ4DDE6TTjs.epochToDateInput.call(void 0, applied.documentDateFrom) : "",
4476
+ to: applied.documentDatePreset === "custom" ? _chunkZ4DDE6TTjs.epochToDateInput.call(void 0, applied.documentDateTo) : "",
4471
4477
  types: applied.types
4472
4478
  }));
4473
4479
  _react.useEffect.call(void 0, () => {
4474
4480
  const handler = (e) => {
4475
- if (_optionalChain([containerRef, 'access', _317 => _317.current, 'optionalAccess', _318 => _318.contains, 'call', _319 => _319(e.target)])) return;
4481
+ if (_optionalChain([containerRef, 'access', _321 => _321.current, 'optionalAccess', _322 => _322.contains, 'call', _323 => _323(e.target)])) return;
4476
4482
  onClose();
4477
4483
  };
4478
4484
  document.addEventListener("mousedown", handler);
@@ -4487,8 +4493,8 @@ function SidebarFilterPopover({ containerRef, onClose }) {
4487
4493
  const handleTypes = _react.useCallback.call(void 0, (types) => setDraft((d) => ({ ...d, types })), []);
4488
4494
  const handleClearAll = _react.useCallback.call(void 0, () => setDraft(EMPTY_DRAFT), []);
4489
4495
  const handleApply = _react.useCallback.call(void 0, () => {
4490
- const customTo = _chunk2VELBQXAjs.dateInputToEpoch.call(void 0, draft.to);
4491
- const range = draft.preset === "custom" ? { from: _chunk2VELBQXAjs.dateInputToEpoch.call(void 0, draft.from), to: customTo === null ? null : _chunk2VELBQXAjs.endOfDay.call(void 0, customTo) } : _chunk2VELBQXAjs.presetRange.call(void 0, draft.preset);
4496
+ const customTo = _chunkZ4DDE6TTjs.dateInputToEpoch.call(void 0, draft.to);
4497
+ const range = draft.preset === "custom" ? { from: _chunkZ4DDE6TTjs.dateInputToEpoch.call(void 0, draft.from), to: customTo === null ? null : _chunkZ4DDE6TTjs.endOfDay.call(void 0, customTo) } : _chunkZ4DDE6TTjs.presetRange.call(void 0, draft.preset);
4492
4498
  store.getState().filters.applyPopoverFilters({
4493
4499
  documentDateFrom: range.from,
4494
4500
  documentDateTo: range.to,
@@ -4504,25 +4510,25 @@ function SidebarFilterPopover({ containerRef, onClose }) {
4504
4510
  }, [draft, store, onClose]);
4505
4511
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__filter-popover", role: "dialog", "aria-label": "Filter", children: [
4506
4512
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__filter-head", children: [
4507
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "label", as: "span", children: "Filter" }),
4513
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "label", as: "span", children: "Filter" }),
4508
4514
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "mr-sv__ghost-link-btn", onClick: handleClearAll, children: "Clear all" })
4509
4515
  ] }),
4510
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "eyebrow", className: "mr-sv__filter-label", children: "Date" }),
4511
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-sv__filter-presets", children: _chunk2VELBQXAjs.DATE_PRESET_OPTIONS.map((o) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "label", { className: "mr-sv__filter-preset", children: [
4516
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "eyebrow", className: "mr-sv__filter-label", children: "Date" }),
4517
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-sv__filter-presets", children: _chunkZ4DDE6TTjs.DATE_PRESET_OPTIONS.map((o) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "label", { className: "mr-sv__filter-preset", children: [
4512
4518
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { type: "radio", name: "mr-sv-date-preset", value: o.value, checked: draft.preset === o.value, onChange: handlePreset }),
4513
4519
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: o.label })
4514
4520
  ] }, o.value)) }),
4515
4521
  draft.preset === "custom" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__filter-range", children: [
4516
4522
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__filter-range-field", children: [
4517
4523
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mr-sv__filter-to", children: "From" }),
4518
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.DateField_default, { label: "From", value: draft.from, max: draft.to || void 0, onChange: handleFrom })
4524
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.DateField_default, { label: "From", value: draft.from, max: draft.to || void 0, onChange: handleFrom })
4519
4525
  ] }),
4520
4526
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__filter-range-field", children: [
4521
4527
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mr-sv__filter-to", children: "To" }),
4522
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.DateField_default, { label: "To", value: draft.to, min: draft.from || void 0, onChange: handleTo })
4528
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.DateField_default, { label: "To", value: draft.to, min: draft.from || void 0, onChange: handleTo })
4523
4529
  ] })
4524
4530
  ] }),
4525
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "eyebrow", className: "mr-sv__filter-label", children: "Type" }),
4531
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "eyebrow", className: "mr-sv__filter-label", children: "Type" }),
4526
4532
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SidebarTypeSelect, { options: documentTypes, value: draft.types, onChange: handleTypes }),
4527
4533
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__filter-actions", children: [
4528
4534
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "mr-sv__filter-cancel", onClick: onClose, children: "Cancel" }),
@@ -4537,10 +4543,10 @@ function SidebarFilterPopover({ containerRef, onClose }) {
4537
4543
 
4538
4544
 
4539
4545
  var SidebarFilterChips = _react.memo.call(void 0, function SidebarFilterChips2({ count }) {
4540
- const { store, labelOf } = _chunk2VELBQXAjs.useSdk.call(void 0, );
4546
+ const { store, labelOf } = _chunkZ4DDE6TTjs.useSdk.call(void 0, );
4541
4547
  const filters = _zustand.useStore.call(void 0, store, (s) => s.filters);
4542
4548
  const hasDate = filters.documentDateFrom != null || filters.documentDateTo != null;
4543
- const dateLabel = filters.documentDatePreset === "custom" ? _chunk2VELBQXAjs.customRangeLabel.call(void 0, filters.documentDateFrom, filters.documentDateTo) : _chunk2VELBQXAjs.presetLabel.call(void 0, filters.documentDatePreset);
4549
+ const dateLabel = filters.documentDatePreset === "custom" ? _chunkZ4DDE6TTjs.customRangeLabel.call(void 0, filters.documentDateFrom, filters.documentDateTo) : _chunkZ4DDE6TTjs.presetLabel.call(void 0, filters.documentDatePreset);
4544
4550
  const write = _react.useCallback.call(void 0,
4545
4551
  (patch) => {
4546
4552
  const f = store.getState().filters;
@@ -4601,8 +4607,8 @@ var SmartRecordsSidebar = _react.memo.call(void 0, function SmartRecordsSidebar2
4601
4607
  onRefresh,
4602
4608
  isRefreshing
4603
4609
  }) {
4604
- const { store } = _chunk2VELBQXAjs.useSdk.call(void 0, );
4605
- const { selectRecord } = _chunkV4FEDCZCjs.useSmartRecordsActions.call(void 0, );
4610
+ const { store } = _chunkZ4DDE6TTjs.useSdk.call(void 0, );
4611
+ const { selectRecord } = _chunkE2ZFUVV7js.useSmartRecordsActions.call(void 0, );
4606
4612
  const collectionStatus = _zustand.useStore.call(void 0, store, (s) => s.collection.status);
4607
4613
  const filterTypes = _zustand.useStore.call(void 0, store, (s) => s.filters.types);
4608
4614
  const filterFrom = _zustand.useStore.call(void 0, store, (s) => s.filters.documentDateFrom);
@@ -4707,7 +4713,7 @@ var SmartRecordsSidebar = _react.memo.call(void 0, function SmartRecordsSidebar2
4707
4713
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "mr-sv__ghost-link-btn", onClick: clearFilters, children: "Clear filters" })
4708
4714
  ] });
4709
4715
  }
4710
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "muted", className: "mr-sv__sidebar-empty", children: "No records yet." });
4716
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "muted", className: "mr-sv__sidebar-empty", children: "No records yet." });
4711
4717
  };
4712
4718
  const renderSkeleton = () => SKELETON_ROWS.map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__list-skeleton", "aria-hidden": true, children: [
4713
4719
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-sv__list-skeleton-date" }),
@@ -4756,10 +4762,10 @@ var SmartRecordsSidebar = _react.memo.call(void 0, function SmartRecordsSidebar2
4756
4762
 
4757
4763
  function CareContextEmptyState({ noCareContext }) {
4758
4764
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__empty", children: [
4759
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.EmptyIllustration, {}),
4765
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.EmptyIllustration, {}),
4760
4766
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mr-sv__empty-text", children: [
4761
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "heading", as: "h2", children: noCareContext ? "Select a record" : "Select a care context" }),
4762
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.Typography_default, { variant: "muted", children: noCareContext ? "Pick a record on the left, or use the search bar to find one." : "Pick a record on the left to see its vitals or use the search bar." })
4767
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "heading", as: "h2", children: noCareContext ? "Select a record" : "Select a care context" }),
4768
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.Typography_default, { variant: "muted", children: noCareContext ? "Pick a record on the left, or use the search bar to find one." : "Pick a record on the left to see its vitals or use the search bar." })
4763
4769
  ] })
4764
4770
  ] });
4765
4771
  }
@@ -4768,12 +4774,12 @@ function CareContextEmptyState({ noCareContext }) {
4768
4774
 
4769
4775
 
4770
4776
  var VitalHistoryPanel2 = _react.lazy.call(void 0,
4771
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./VitalHistoryPanel-3QHLYRCV.js"))).then((m) => ({
4777
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./VitalHistoryPanel-HXSUVAHK.js"))).then((m) => ({
4772
4778
  default: m.VitalHistoryPanel
4773
4779
  }))
4774
4780
  );
4775
4781
  var OriginalRecordPanel = _react.lazy.call(void 0,
4776
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./OriginalRecordPanel-7ABSRLHL.js"))).then((m) => ({
4782
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./OriginalRecordPanel-ACJA42N4.js"))).then((m) => ({
4777
4783
  default: m.OriginalRecordPanel
4778
4784
  }))
4779
4785
  );
@@ -4782,7 +4788,7 @@ var MainPanel = _react.memo.call(void 0, function MainPanel2({
4782
4788
  canGoBack,
4783
4789
  onBack
4784
4790
  }) {
4785
- if (mainView.kind === "empty") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.EmptyState, {});
4791
+ if (mainView.kind === "empty") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.EmptyState, {});
4786
4792
  if (mainView.kind === "smart")
4787
4793
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RecordPanel, { recordId: mainView.recordId, caseId: mainView.caseId, onBack: canGoBack ? onBack : void 0 });
4788
4794
  if (mainView.kind === "preview")
@@ -4805,10 +4811,10 @@ var MainPanel = _react.memo.call(void 0, function MainPanel2({
4805
4811
  // src/views/SmartRecordsView/SmartRecordsView.tsx
4806
4812
 
4807
4813
  var DeleteConfirmModal = _react.lazy.call(void 0,
4808
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./widgets-LBIWPOYW.js"))).then((m) => ({ default: m.DeleteConfirmModal }))
4814
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./widgets-6IXHASJD.js"))).then((m) => ({ default: m.DeleteConfirmModal }))
4809
4815
  );
4810
4816
  var SmartUploadModal2 = _react.lazy.call(void 0,
4811
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./SmartUploadModal-XPONUCRC.js"))).then((m) => ({
4817
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./SmartUploadModal-PBOXKS7G.js"))).then((m) => ({
4812
4818
  default: m.SmartUploadModal
4813
4819
  }))
4814
4820
  );
@@ -4850,9 +4856,9 @@ function SmartRecordsViewInner({
4850
4856
  cancelDelete
4851
4857
  } = useSmartRecordsView({ onViewOriginalRecord, onDeleteRecord });
4852
4858
  const { refresh, deleteRecord } = useRecordsConnection();
4853
- _chunk2VELBQXAjs.useCasesConnection.call(void 0, );
4859
+ _chunkZ4DDE6TTjs.useCasesConnection.call(void 0, );
4854
4860
  const { refresh: refreshCollection } = useCollectionConnection();
4855
- const { store, labelOf } = _chunk2VELBQXAjs.useSdk.call(void 0, );
4861
+ const { store, labelOf } = _chunkZ4DDE6TTjs.useSdk.call(void 0, );
4856
4862
  const { upload } = useUploadConnection();
4857
4863
  const recordsStatus = _zustand.useStore.call(void 0, store, (s) => s.records.status);
4858
4864
  const recordsCount = _zustand.useStore.call(void 0, store, (s) => s.records.ids.length);
@@ -4878,32 +4884,32 @@ function SmartRecordsViewInner({
4878
4884
  onViewChangeRef.current = onViewChange;
4879
4885
  renderScribeDocumentRef.current = renderScribeDocument;
4880
4886
  _react.useEffect.call(void 0, () => {
4881
- _optionalChain([onViewChangeRef, 'access', _320 => _320.current, 'optionalCall', _321 => _321(mainView)]);
4887
+ _optionalChain([onViewChangeRef, 'access', _324 => _324.current, 'optionalCall', _325 => _325(mainView)]);
4882
4888
  }, [mainView]);
4883
4889
  const [selectedCaseId, setSelectedCaseId] = _react.useState.call(void 0, null);
4884
4890
  const [uploadOpen, setUploadOpen] = _react.useState.call(void 0, false);
4885
4891
  const stableCopyToNote = _react.useCallback.call(void 0,
4886
- (text, anchor, vitalsRows) => _optionalChain([onCopyToNoteRef, 'access', _322 => _322.current, 'optionalCall', _323 => _323(text, anchor, vitalsRows)]),
4892
+ (text, anchor, vitalsRows) => _optionalChain([onCopyToNoteRef, 'access', _326 => _326.current, 'optionalCall', _327 => _327(text, anchor, vitalsRows)]),
4887
4893
  []
4888
4894
  );
4889
4895
  const stableCopyPrescriptionSections = _react.useCallback.call(void 0,
4890
- (sections, anchor) => _optionalChain([onCopyPrescriptionSectionsRef, 'access', _324 => _324.current, 'optionalCall', _325 => _325(sections, anchor)]),
4896
+ (sections, anchor) => _optionalChain([onCopyPrescriptionSectionsRef, 'access', _328 => _328.current, 'optionalCall', _329 => _329(sections, anchor)]),
4891
4897
  []
4892
4898
  );
4893
4899
  const stableCopyVitalsToNote = _react.useCallback.call(void 0,
4894
- (text) => _optionalChain([onCopyVitalsToNoteRef, 'access', _326 => _326.current, 'optionalCall', _327 => _327(text)]),
4900
+ (text) => _optionalChain([onCopyVitalsToNoteRef, 'access', _330 => _330.current, 'optionalCall', _331 => _331(text)]),
4895
4901
  []
4896
4902
  );
4897
4903
  const stableToast = _react.useCallback.call(void 0,
4898
- (message, type) => _optionalChain([onToastRef, 'access', _328 => _328.current, 'optionalCall', _329 => _329(message, type)]),
4904
+ (message, type) => _optionalChain([onToastRef, 'access', _332 => _332.current, 'optionalCall', _333 => _333(message, type)]),
4899
4905
  []
4900
4906
  );
4901
4907
  const stableRenderScribeDocument = _react.useCallback.call(void 0,
4902
- (args) => _nullishCoalesce(_optionalChain([renderScribeDocumentRef, 'access', _330 => _330.current, 'optionalCall', _331 => _331(args)]), () => ( null)),
4908
+ (args) => _nullishCoalesce(_optionalChain([renderScribeDocumentRef, 'access', _334 => _334.current, 'optionalCall', _335 => _335(args)]), () => ( null)),
4903
4909
  []
4904
4910
  );
4905
4911
  const attachToContext = _react.useCallback.call(void 0, (documentId, name, visitId) => {
4906
- void _optionalChain([onAddToContextRef, 'access', _332 => _332.current, 'optionalCall', _333 => _333([visitId ? { documentId, name, visitId } : { documentId, name }])]);
4912
+ void _optionalChain([onAddToContextRef, 'access', _336 => _336.current, 'optionalCall', _337 => _337([visitId ? { documentId, name, visitId } : { documentId, name }])]);
4907
4913
  }, []);
4908
4914
  const handleSelectCase = _react.useCallback.call(void 0,
4909
4915
  (caseId) => {
@@ -5008,13 +5014,13 @@ function SmartRecordsViewInner({
5008
5014
  ]
5009
5015
  );
5010
5016
  if ((recordsStatus === "idle" || recordsStatus === "loading" || recordsStatus === "stale") && recordsCount === 0)
5011
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: rootClass, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.RecordsLoadingState, { patientName }) });
5017
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: rootClass, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.RecordsLoadingState, { patientName }) });
5012
5018
  if (recordsCount === 0)
5013
5019
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: rootClass, children: [
5014
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2VELBQXAjs.NoRecordsState, { onUpload: allowUpload ? openUpload : void 0 }),
5020
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZ4DDE6TTjs.NoRecordsState, { onUpload: allowUpload ? openUpload : void 0 }),
5015
5021
  uploadOpen && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Suspense, { fallback: null, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SmartUploadModal2, { onUpload: handleUpload, onClose: closeUpload }) })
5016
5022
  ] });
5017
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkV4FEDCZCjs.SmartRecordsActionsContext.Provider, { value: actions, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { ref: rootRef, className: rootClass, children: [
5023
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkE2ZFUVV7js.SmartRecordsActionsContext.Provider, { value: actions, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { ref: rootRef, className: rootClass, children: [
5018
5024
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-sv__body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mr-sv__card", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
5019
5025
  !hideSidebar && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5020
5026
  SmartRecordsSidebar,
@@ -5082,5 +5088,5 @@ function SmartRecordsViewInner({
5082
5088
 
5083
5089
 
5084
5090
 
5085
- exports.Badge = _chunk2VELBQXAjs.Badge_default; exports.CORE_SDK_AVAILABLE = _chunk2VELBQXAjs.CORE_SDK_AVAILABLE; exports.FilterChip = _chunk2VELBQXAjs.FilterChip_default; exports.IconButton = _chunk2VELBQXAjs.IconButton; exports.PrescriptionPanel = PrescriptionPanel; exports.SHOW_CUSTOM_SECTIONS = SHOW_CUSTOM_SECTIONS; exports.ScribeDocumentPanel = ScribeDocumentPanel; exports.SdkProvider = SdkProvider; exports.SidebarItem = _chunk2VELBQXAjs.SidebarItem_default; exports.Skeleton = _chunk2VELBQXAjs.Skeleton; exports.SmartRecordsView = SmartRecordsView; exports.classifyResource = classifyResource; exports.convertPrescriptionBundle = convertPrescriptionBundle; exports.logoutMedicalRecords = _chunk2VELBQXAjs.logoutMedicalRecords; exports.sectionToText = sectionToText; exports.useCaseById = useCaseById2; exports.useCaseIds = useCaseIds2; exports.useCasesConnection = _chunk2VELBQXAjs.useCasesConnection; exports.useCasesStatus = useCasesStatus2; exports.useCollectionConnection = useCollectionConnection; exports.useFilteredRecordIds = useFilteredRecordIds2; exports.useIsSelected = useIsSelected2; exports.useLogout = useLogout; exports.useRecordById = useRecordById2; exports.useRecordIdRange = useRecordIdRange2; exports.useRecordsConnection = useRecordsConnection; exports.useRecordsCount = useRecordsCount2; exports.useRecordsStatus = useRecordsStatus2; exports.useSdk = _chunk2VELBQXAjs.useSdk; exports.useUploadConnection = useUploadConnection;
5091
+ exports.Badge = _chunkZ4DDE6TTjs.Badge_default; exports.CORE_SDK_AVAILABLE = _chunkZ4DDE6TTjs.CORE_SDK_AVAILABLE; exports.FilterChip = _chunkZ4DDE6TTjs.FilterChip_default; exports.IconButton = _chunkZ4DDE6TTjs.IconButton; exports.PrescriptionPanel = PrescriptionPanel; exports.SHOW_CUSTOM_SECTIONS = SHOW_CUSTOM_SECTIONS; exports.ScribeDocumentPanel = ScribeDocumentPanel; exports.SdkProvider = SdkProvider; exports.SidebarItem = _chunkZ4DDE6TTjs.SidebarItem_default; exports.Skeleton = _chunkZ4DDE6TTjs.Skeleton; exports.SmartRecordsView = SmartRecordsView; exports.classifyResource = classifyResource; exports.convertPrescriptionBundle = convertPrescriptionBundle; exports.logoutMedicalRecords = _chunkZ4DDE6TTjs.logoutMedicalRecords; exports.sectionToText = sectionToText; exports.useCaseById = useCaseById2; exports.useCaseIds = useCaseIds2; exports.useCasesConnection = _chunkZ4DDE6TTjs.useCasesConnection; exports.useCasesStatus = useCasesStatus2; exports.useCollectionConnection = useCollectionConnection; exports.useFilteredRecordIds = useFilteredRecordIds2; exports.useIsSelected = useIsSelected2; exports.useLogout = useLogout; exports.useRecordById = useRecordById2; exports.useRecordIdRange = useRecordIdRange2; exports.useRecordsConnection = useRecordsConnection; exports.useRecordsCount = useRecordsCount2; exports.useRecordsStatus = useRecordsStatus2; exports.useSdk = _chunkZ4DDE6TTjs.useSdk; exports.useUploadConnection = useUploadConnection;
5086
5092
  //# sourceMappingURL=index.js.map