@mieweb/ui 0.11.0-dev.29 → 0.11.0-dev.30
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/MIGRATION.md +67 -0
- package/README.md +10 -0
- package/dist/EncounterMdyEditor-3SQY4MK2.js +286 -0
- package/dist/EncounterMdyEditor-3SQY4MK2.js.map +1 -0
- package/dist/EncounterMdyEditor-73PTTIRY.cjs +288 -0
- package/dist/EncounterMdyEditor-73PTTIRY.cjs.map +1 -0
- package/dist/chunk-25MPUVTM.js +339 -0
- package/dist/chunk-25MPUVTM.js.map +1 -0
- package/dist/{chunk-2VISTX7O.js → chunk-3NOVISM6.js} +3 -3
- package/dist/{chunk-2VISTX7O.js.map → chunk-3NOVISM6.js.map} +1 -1
- package/dist/{chunk-6GKIISNZ.cjs → chunk-3Y3ZCDNF.cjs} +176 -63
- package/dist/chunk-3Y3ZCDNF.cjs.map +1 -0
- package/dist/{chunk-AK4LHJPC.js → chunk-4JXO5JTE.js} +84 -3
- package/dist/chunk-4JXO5JTE.js.map +1 -0
- package/dist/chunk-4NB4WOGU.cjs +666 -0
- package/dist/chunk-4NB4WOGU.cjs.map +1 -0
- package/dist/{chunk-434L5RYF.js → chunk-4P27Y52M.js} +3 -3
- package/dist/{chunk-434L5RYF.js.map → chunk-4P27Y52M.js.map} +1 -1
- package/dist/{chunk-PRA2V5BP.cjs → chunk-5KGYTNOA.cjs} +7 -7
- package/dist/{chunk-PRA2V5BP.cjs.map → chunk-5KGYTNOA.cjs.map} +1 -1
- package/dist/chunk-5LNLB2XT.js +634 -0
- package/dist/chunk-5LNLB2XT.js.map +1 -0
- package/dist/chunk-5YOT4DVH.js +31 -0
- package/dist/chunk-5YOT4DVH.js.map +1 -0
- package/dist/chunk-7HFZL5V5.js +2425 -0
- package/dist/chunk-7HFZL5V5.js.map +1 -0
- package/dist/{chunk-XZNHS7YQ.cjs → chunk-7XC6E4BT.cjs} +3 -3
- package/dist/{chunk-XZNHS7YQ.cjs.map → chunk-7XC6E4BT.cjs.map} +1 -1
- package/dist/{chunk-JM4YFLO4.js → chunk-AIJYZP7M.js} +3 -3
- package/dist/{chunk-JM4YFLO4.js.map → chunk-AIJYZP7M.js.map} +1 -1
- package/dist/chunk-BBLEGF5L.js +66 -0
- package/dist/chunk-BBLEGF5L.js.map +1 -0
- package/dist/{chunk-MBDT2MGR.js → chunk-BIQIE3VW.js} +4 -4
- package/dist/{chunk-MBDT2MGR.js.map → chunk-BIQIE3VW.js.map} +1 -1
- package/dist/chunk-FSLI5IKP.cjs +54 -0
- package/dist/chunk-FSLI5IKP.cjs.map +1 -0
- package/dist/chunk-GADJASST.js +3 -0
- package/dist/chunk-GADJASST.js.map +1 -0
- package/dist/chunk-IXUIOR4K.cjs +2457 -0
- package/dist/chunk-IXUIOR4K.cjs.map +1 -0
- package/dist/chunk-K2BY7YPJ.cjs +4 -0
- package/dist/chunk-K2BY7YPJ.cjs.map +1 -0
- package/dist/{chunk-H3P7POFC.cjs → chunk-MA3Y6AYA.cjs} +3 -3
- package/dist/{chunk-H3P7POFC.cjs.map → chunk-MA3Y6AYA.cjs.map} +1 -1
- package/dist/chunk-QO4A6U73.cjs +342 -0
- package/dist/chunk-QO4A6U73.cjs.map +1 -0
- package/dist/{chunk-43QBEF6N.js → chunk-QR7B6UPR.js} +176 -63
- package/dist/chunk-QR7B6UPR.js.map +1 -0
- package/dist/chunk-SMPLM6K3.js +4107 -0
- package/dist/chunk-SMPLM6K3.js.map +1 -0
- package/dist/chunk-SV6YGK4U.cjs +88 -0
- package/dist/chunk-SV6YGK4U.cjs.map +1 -0
- package/dist/{chunk-MQ5WJ3NO.js → chunk-UDUYZDTA.js} +14 -72
- package/dist/chunk-UDUYZDTA.js.map +1 -0
- package/dist/{chunk-ZLBNYCYT.cjs → chunk-XPVQI3MM.cjs} +84 -3
- package/dist/chunk-XPVQI3MM.cjs.map +1 -0
- package/dist/{chunk-AQUHEKXL.cjs → chunk-XQHDQ64G.cjs} +4 -4
- package/dist/{chunk-AQUHEKXL.cjs.map → chunk-XQHDQ64G.cjs.map} +1 -1
- package/dist/chunk-Z2OOJGHL.cjs +4155 -0
- package/dist/chunk-Z2OOJGHL.cjs.map +1 -0
- package/dist/{chunk-QKW2QCGI.cjs → chunk-ZK2R6UGF.cjs} +13 -72
- package/dist/chunk-ZK2R6UGF.cjs.map +1 -0
- package/dist/components/ActionPlan/index.cjs +4 -4
- package/dist/components/ActionPlan/index.js +2 -2
- package/dist/components/AlertDialog/index.d.cts +1 -1
- package/dist/components/AlertDialog/index.d.ts +1 -1
- package/dist/components/EmailEditor/index.cjs +13 -12
- package/dist/components/EmailEditor/index.js +4 -3
- package/dist/components/MediaEditor/index.cjs +7 -7
- package/dist/components/MediaEditor/index.js +2 -2
- package/dist/components/RichTextEditor/index.cjs +5 -4
- package/dist/components/RichTextEditor/index.d.cts +34 -0
- package/dist/components/RichTextEditor/index.d.ts +34 -0
- package/dist/components/RichTextEditor/index.js +2 -1
- package/dist/components/SuperChat/index.cjs +10 -9
- package/dist/components/SuperChat/index.cjs.map +1 -1
- package/dist/components/SuperChat/index.js +2 -1
- package/dist/components/SuperChat/index.js.map +1 -1
- package/dist/components/Textarea/index.cjs +6 -5
- package/dist/components/Textarea/index.js +3 -2
- package/dist/esheet.cjs +4237 -25
- package/dist/esheet.cjs.map +1 -1
- package/dist/esheet.d.cts +753 -6
- package/dist/esheet.d.ts +753 -6
- package/dist/esheet.js +4099 -21
- package/dist/esheet.js.map +1 -1
- package/dist/index.cjs +204 -3072
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -9
- package/dist/index.d.ts +71 -9
- package/dist/index.js +38 -2968
- package/dist/index.js.map +1 -1
- package/dist/kerebron.cjs +7 -268
- package/dist/kerebron.cjs.map +1 -1
- package/dist/kerebron.d.cts +7 -1
- package/dist/kerebron.d.ts +7 -1
- package/dist/kerebron.js +6 -270
- package/dist/kerebron.js.map +1 -1
- package/dist/model-WFFZRQMY.js +18 -0
- package/dist/model-WFFZRQMY.js.map +1 -0
- package/dist/model-Y7WRIGGA.cjs +79 -0
- package/dist/model-Y7WRIGGA.cjs.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/tailwind-preset.cjs +4 -4
- package/dist/tailwind-preset.js +1 -1
- package/package.json +30 -9
- package/dist/chunk-43QBEF6N.js.map +0 -1
- package/dist/chunk-6GKIISNZ.cjs.map +0 -1
- package/dist/chunk-AK4LHJPC.js.map +0 -1
- package/dist/chunk-MQ5WJ3NO.js.map +0 -1
- package/dist/chunk-QKW2QCGI.cjs.map +0 -1
- package/dist/chunk-SFSBYC46.js +0 -1596
- package/dist/chunk-SFSBYC46.js.map +0 -1
- package/dist/chunk-ZIJMLRI3.cjs +0 -1633
- package/dist/chunk-ZIJMLRI3.cjs.map +0 -1
- package/dist/chunk-ZLBNYCYT.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -31,7 +31,7 @@ var chunkFYAKUU2A_cjs = require('./chunk-FYAKUU2A.cjs');
|
|
|
31
31
|
var chunkHCIXGFWR_cjs = require('./chunk-HCIXGFWR.cjs');
|
|
32
32
|
var chunkZJCPW6MS_cjs = require('./chunk-ZJCPW6MS.cjs');
|
|
33
33
|
var chunk4QYYWYFD_cjs = require('./chunk-4QYYWYFD.cjs');
|
|
34
|
-
var
|
|
34
|
+
var chunkMA3Y6AYA_cjs = require('./chunk-MA3Y6AYA.cjs');
|
|
35
35
|
var chunk6BNZLN4B_cjs = require('./chunk-6BNZLN4B.cjs');
|
|
36
36
|
require('./chunk-47P5QLX4.cjs');
|
|
37
37
|
var chunkCLQW724U_cjs = require('./chunk-CLQW724U.cjs');
|
|
@@ -45,7 +45,7 @@ var chunkXPWFIDZM_cjs = require('./chunk-XPWFIDZM.cjs');
|
|
|
45
45
|
var chunkYGA35Z2P_cjs = require('./chunk-YGA35Z2P.cjs');
|
|
46
46
|
var chunkAHHFFXJR_cjs = require('./chunk-AHHFFXJR.cjs');
|
|
47
47
|
var chunk7RV6CAP6_cjs = require('./chunk-7RV6CAP6.cjs');
|
|
48
|
-
var
|
|
48
|
+
var chunkZK2R6UGF_cjs = require('./chunk-ZK2R6UGF.cjs');
|
|
49
49
|
var chunkQ6QLGCL7_cjs = require('./chunk-Q6QLGCL7.cjs');
|
|
50
50
|
var chunk2GBVJHWN_cjs = require('./chunk-2GBVJHWN.cjs');
|
|
51
51
|
var chunk3SZQRMHM_cjs = require('./chunk-3SZQRMHM.cjs');
|
|
@@ -58,7 +58,7 @@ var chunkXWZEECEX_cjs = require('./chunk-XWZEECEX.cjs');
|
|
|
58
58
|
var chunk5MXO6PEV_cjs = require('./chunk-5MXO6PEV.cjs');
|
|
59
59
|
var chunkBFVYM6IT_cjs = require('./chunk-BFVYM6IT.cjs');
|
|
60
60
|
var chunkHIYQ3M5V_cjs = require('./chunk-HIYQ3M5V.cjs');
|
|
61
|
-
var
|
|
61
|
+
var chunk7XC6E4BT_cjs = require('./chunk-7XC6E4BT.cjs');
|
|
62
62
|
var chunkGDKOYVX3_cjs = require('./chunk-GDKOYVX3.cjs');
|
|
63
63
|
var chunkAJPFQF3H_cjs = require('./chunk-AJPFQF3H.cjs');
|
|
64
64
|
require('./chunk-GLXTVCHN.cjs');
|
|
@@ -82,7 +82,7 @@ var chunkNGSDBWKA_cjs = require('./chunk-NGSDBWKA.cjs');
|
|
|
82
82
|
var chunk56C7K4MV_cjs = require('./chunk-56C7K4MV.cjs');
|
|
83
83
|
var chunkBWSZ2BHJ_cjs = require('./chunk-BWSZ2BHJ.cjs');
|
|
84
84
|
var chunkRS5VA6QU_cjs = require('./chunk-RS5VA6QU.cjs');
|
|
85
|
-
var
|
|
85
|
+
var chunk5KGYTNOA_cjs = require('./chunk-5KGYTNOA.cjs');
|
|
86
86
|
require('./chunk-BXRQ6HEP.cjs');
|
|
87
87
|
var chunkS7AMZ4RD_cjs = require('./chunk-S7AMZ4RD.cjs');
|
|
88
88
|
var chunkPLMXN23Q_cjs = require('./chunk-PLMXN23Q.cjs');
|
|
@@ -91,7 +91,6 @@ var chunk7C5W744U_cjs = require('./chunk-7C5W744U.cjs');
|
|
|
91
91
|
var chunkHXSA6QC5_cjs = require('./chunk-HXSA6QC5.cjs');
|
|
92
92
|
require('./chunk-RHNPILZQ.cjs');
|
|
93
93
|
var chunkGM32IDVL_cjs = require('./chunk-GM32IDVL.cjs');
|
|
94
|
-
var chunk7AECNMYV_cjs = require('./chunk-7AECNMYV.cjs');
|
|
95
94
|
require('./chunk-L6K4PRZK.cjs');
|
|
96
95
|
var chunkIVGI353O_cjs = require('./chunk-IVGI353O.cjs');
|
|
97
96
|
var chunkL4APW65W_cjs = require('./chunk-L4APW65W.cjs');
|
|
@@ -116,7 +115,7 @@ var chunk254QK722_cjs = require('./chunk-254QK722.cjs');
|
|
|
116
115
|
var chunk7WJ6MBF5_cjs = require('./chunk-7WJ6MBF5.cjs');
|
|
117
116
|
require('./chunk-AT732HC6.cjs');
|
|
118
117
|
var chunkL7YQBSEL_cjs = require('./chunk-L7YQBSEL.cjs');
|
|
119
|
-
var
|
|
118
|
+
var chunkXPVQI3MM_cjs = require('./chunk-XPVQI3MM.cjs');
|
|
120
119
|
var chunkPRGQVUMU_cjs = require('./chunk-PRGQVUMU.cjs');
|
|
121
120
|
require('./chunk-P22YCUVM.cjs');
|
|
122
121
|
var chunkQ3YVLO52_cjs = require('./chunk-Q3YVLO52.cjs');
|
|
@@ -124,18 +123,22 @@ var chunkGKDHMNUA_cjs = require('./chunk-GKDHMNUA.cjs');
|
|
|
124
123
|
var chunk4NCDU5IG_cjs = require('./chunk-4NCDU5IG.cjs');
|
|
125
124
|
var chunkXXVUHLQN_cjs = require('./chunk-XXVUHLQN.cjs');
|
|
126
125
|
var chunkRI56YPED_cjs = require('./chunk-RI56YPED.cjs');
|
|
127
|
-
var
|
|
126
|
+
var chunkZ2OOJGHL_cjs = require('./chunk-Z2OOJGHL.cjs');
|
|
127
|
+
var chunk4NB4WOGU_cjs = require('./chunk-4NB4WOGU.cjs');
|
|
128
128
|
var chunkGLG6UE2H_cjs = require('./chunk-GLG6UE2H.cjs');
|
|
129
|
+
var chunkSV6YGK4U_cjs = require('./chunk-SV6YGK4U.cjs');
|
|
129
130
|
var chunkG7EQ3JPX_cjs = require('./chunk-G7EQ3JPX.cjs');
|
|
130
131
|
var chunkAIJAFPGJ_cjs = require('./chunk-AIJAFPGJ.cjs');
|
|
131
132
|
var chunkPHUTJKHL_cjs = require('./chunk-PHUTJKHL.cjs');
|
|
132
|
-
var
|
|
133
|
-
var
|
|
133
|
+
var chunkXQHDQ64G_cjs = require('./chunk-XQHDQ64G.cjs');
|
|
134
|
+
var chunk3Y3ZCDNF_cjs = require('./chunk-3Y3ZCDNF.cjs');
|
|
135
|
+
require('./chunk-FSLI5IKP.cjs');
|
|
134
136
|
var chunkYP5T6NZD_cjs = require('./chunk-YP5T6NZD.cjs');
|
|
135
137
|
var chunkUPWIJC6I_cjs = require('./chunk-UPWIJC6I.cjs');
|
|
136
138
|
require('./chunk-ZNUMOJOI.cjs');
|
|
137
139
|
var chunkPINIBEIU_cjs = require('./chunk-PINIBEIU.cjs');
|
|
138
140
|
var chunkMJWFNV3L_cjs = require('./chunk-MJWFNV3L.cjs');
|
|
141
|
+
var chunk7AECNMYV_cjs = require('./chunk-7AECNMYV.cjs');
|
|
139
142
|
var chunkLC3JL2HB_cjs = require('./chunk-LC3JL2HB.cjs');
|
|
140
143
|
require('./chunk-I44YNYI6.cjs');
|
|
141
144
|
var chunkZ5S5JEJD_cjs = require('./chunk-Z5S5JEJD.cjs');
|
|
@@ -1456,7 +1459,7 @@ function AIEmptyState({
|
|
|
1456
1459
|
{
|
|
1457
1460
|
"data-slot": "ai-empty-state-icon",
|
|
1458
1461
|
className: "bg-primary-800 dark:bg-primary-800 flex h-16 w-16 items-center justify-center rounded-full text-white",
|
|
1459
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1462
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkZK2R6UGF_cjs.SparklesIcon, { size: "lg", className: "h-8 w-8" })
|
|
1460
1463
|
}
|
|
1461
1464
|
);
|
|
1462
1465
|
const suggestionsAction = suggestions && suggestions.length > 0 && onSuggestionSelect ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6", children: [
|
|
@@ -1623,7 +1626,7 @@ function AIChat({
|
|
|
1623
1626
|
scrollToBottom(prefersReducedMotion ? "auto" : "smooth");
|
|
1624
1627
|
}, [scrollToBottom, prefersReducedMotion]);
|
|
1625
1628
|
const renderMessageItem = (message) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1626
|
-
|
|
1629
|
+
chunkZK2R6UGF_cjs.AIMessageDisplay,
|
|
1627
1630
|
{
|
|
1628
1631
|
message,
|
|
1629
1632
|
userName,
|
|
@@ -1723,7 +1726,7 @@ function AIChat({
|
|
|
1723
1726
|
{
|
|
1724
1727
|
"data-slot": "ai-chat-header-icon",
|
|
1725
1728
|
className: "bg-primary-800 dark:bg-primary-800 flex h-8 w-8 items-center justify-center rounded-full text-white",
|
|
1726
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1729
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkZK2R6UGF_cjs.SparklesIcon, { size: "sm" })
|
|
1727
1730
|
}
|
|
1728
1731
|
),
|
|
1729
1732
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
@@ -1753,7 +1756,7 @@ function AIChat({
|
|
|
1753
1756
|
className: "rounded-lg p-2 text-neutral-500 hover:bg-neutral-100 hover:text-neutral-700 dark:hover:bg-neutral-800 dark:hover:text-neutral-300",
|
|
1754
1757
|
title: "Clear chat",
|
|
1755
1758
|
"aria-label": "Clear chat",
|
|
1756
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1759
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkZK2R6UGF_cjs.RefreshIcon, {})
|
|
1757
1760
|
}
|
|
1758
1761
|
),
|
|
1759
1762
|
onClose && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1764,7 +1767,7 @@ function AIChat({
|
|
|
1764
1767
|
className: "rounded-lg p-2 text-neutral-500 hover:bg-neutral-100 hover:text-neutral-700 dark:hover:bg-neutral-800 dark:hover:text-neutral-300",
|
|
1765
1768
|
title: "Close chat",
|
|
1766
1769
|
"aria-label": "Close chat",
|
|
1767
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1770
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkZK2R6UGF_cjs.CloseIcon, {})
|
|
1768
1771
|
}
|
|
1769
1772
|
)
|
|
1770
1773
|
] })
|
|
@@ -1804,7 +1807,7 @@ function AIChat({
|
|
|
1804
1807
|
}
|
|
1805
1808
|
),
|
|
1806
1809
|
!isAtBottom && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1807
|
-
|
|
1810
|
+
chunkZK2R6UGF_cjs.JumpToBottomButton,
|
|
1808
1811
|
{
|
|
1809
1812
|
dataSlot: "ai-chat-jump-to-bottom",
|
|
1810
1813
|
hasNewMessages: hasNewBelow,
|
|
@@ -4409,7 +4412,7 @@ function AIChatTrigger({
|
|
|
4409
4412
|
children: badge > 9 ? "9+" : badge
|
|
4410
4413
|
}
|
|
4411
4414
|
),
|
|
4412
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4415
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkZK2R6UGF_cjs.SparklesIcon, { size: "lg" })
|
|
4413
4416
|
]
|
|
4414
4417
|
}
|
|
4415
4418
|
);
|
|
@@ -6025,7 +6028,7 @@ function ReconciliationProposalRow({
|
|
|
6025
6028
|
children: [
|
|
6026
6029
|
/* @__PURE__ */ jsxRuntime.jsxs("dt", { className: "text-muted-foreground flex items-center gap-1 text-[11px] tracking-wide uppercase", children: [
|
|
6027
6030
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6028
|
-
|
|
6031
|
+
chunkZK2R6UGF_cjs.SparklesIcon,
|
|
6029
6032
|
{
|
|
6030
6033
|
size: "sm",
|
|
6031
6034
|
className: "text-primary-700 dark:text-primary-400"
|
|
@@ -6081,7 +6084,7 @@ function SourcePill({ source }) {
|
|
|
6081
6084
|
"text-muted-foreground"
|
|
6082
6085
|
),
|
|
6083
6086
|
children: [
|
|
6084
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary-700 dark:text-primary-400 flex items-center", children: source.icon ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6087
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary-700 dark:text-primary-400 flex items-center", children: source.icon ?? /* @__PURE__ */ jsxRuntime.jsx(chunkZK2R6UGF_cjs.SparklesIcon, { size: "sm" }) }),
|
|
6085
6088
|
source.thumbnailUrl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6086
6089
|
"img",
|
|
6087
6090
|
{
|
|
@@ -6738,1515 +6741,6 @@ function AppHeaderUserMenu({
|
|
|
6738
6741
|
}
|
|
6739
6742
|
);
|
|
6740
6743
|
}
|
|
6741
|
-
var GROUP_ORDER = [
|
|
6742
|
-
{
|
|
6743
|
-
key: "active",
|
|
6744
|
-
label: "Active",
|
|
6745
|
-
statuses: ["active", "recurrence", "relapse"]
|
|
6746
|
-
},
|
|
6747
|
-
{ key: "inactive", label: "Inactive", statuses: ["inactive", "remission"] },
|
|
6748
|
-
{ key: "resolved", label: "Resolved", statuses: ["resolved"] }
|
|
6749
|
-
];
|
|
6750
|
-
function concernGroupKey(concern) {
|
|
6751
|
-
if (currentAssertion(concern)?.verificationStatus === "unconfirmed") {
|
|
6752
|
-
return "unconfirmed";
|
|
6753
|
-
}
|
|
6754
|
-
return GROUP_ORDER.find((g) => g.statuses.includes(concern.clinicalStatus))?.key ?? "active";
|
|
6755
|
-
}
|
|
6756
|
-
var CONCERN_STATUS_LABELS = {
|
|
6757
|
-
active: "Active",
|
|
6758
|
-
recurrence: "Recurrence",
|
|
6759
|
-
relapse: "Relapse",
|
|
6760
|
-
inactive: "Inactive",
|
|
6761
|
-
remission: "Remission",
|
|
6762
|
-
resolved: "Resolved"
|
|
6763
|
-
};
|
|
6764
|
-
var CHANGE_TYPE_LABELS = {
|
|
6765
|
-
refinement: "Refined",
|
|
6766
|
-
revision: "Revised",
|
|
6767
|
-
progression: "Progressed",
|
|
6768
|
-
reattribution: "Re-attributed"
|
|
6769
|
-
};
|
|
6770
|
-
var DEFAULT_ACTIONS = [
|
|
6771
|
-
"open",
|
|
6772
|
-
"observe",
|
|
6773
|
-
"refine",
|
|
6774
|
-
"revise",
|
|
6775
|
-
"resolve",
|
|
6776
|
-
"relate",
|
|
6777
|
-
"move-up",
|
|
6778
|
-
"move-down"
|
|
6779
|
-
];
|
|
6780
|
-
var ACTION_META = {
|
|
6781
|
-
open: { label: "Open", icon: chunkL7L5S2HO_cjs.ExternalLink },
|
|
6782
|
-
observe: { label: "Add observation (progress note)", icon: chunkL7L5S2HO_cjs.StickyNote },
|
|
6783
|
-
refine: { label: "Refine (more specific)", icon: chunkL7L5S2HO_cjs.Pencil },
|
|
6784
|
-
revise: { label: "Revise (prior was wrong)", icon: chunkL7L5S2HO_cjs.RefreshCw },
|
|
6785
|
-
resolve: { label: "Resolve", icon: chunkL7L5S2HO_cjs.CheckCircle },
|
|
6786
|
-
relate: { label: "Relate to another problem", icon: chunkL7L5S2HO_cjs.Link },
|
|
6787
|
-
"move-up": { label: "Move up (Alt+\u2191)", icon: chunkL7L5S2HO_cjs.ChevronUp },
|
|
6788
|
-
"move-down": { label: "Move down (Alt+\u2193)", icon: chunkL7L5S2HO_cjs.ChevronDown }
|
|
6789
|
-
};
|
|
6790
|
-
var VERIFICATION_BADGE = {
|
|
6791
|
-
unconfirmed: { label: "Unconfirmed", variant: "outline" },
|
|
6792
|
-
provisional: { label: "Provisional", variant: "warning" },
|
|
6793
|
-
differential: { label: "Differential", variant: "warning" },
|
|
6794
|
-
confirmed: { label: "Confirmed", variant: "success" },
|
|
6795
|
-
refuted: { label: "Refuted", variant: "secondary" },
|
|
6796
|
-
"entered-in-error": { label: "Entered in error", variant: "secondary" }
|
|
6797
|
-
};
|
|
6798
|
-
function currentAssertion(concern) {
|
|
6799
|
-
for (let i = concern.assertions.length - 1; i >= 0; i--) {
|
|
6800
|
-
const a = concern.assertions[i];
|
|
6801
|
-
if (a.verificationStatus !== "refuted" && a.verificationStatus !== "entered-in-error") {
|
|
6802
|
-
return a;
|
|
6803
|
-
}
|
|
6804
|
-
}
|
|
6805
|
-
return concern.assertions[concern.assertions.length - 1];
|
|
6806
|
-
}
|
|
6807
|
-
var UNCERTAIN_FIELD_LABELS = {
|
|
6808
|
-
coding: "Coding",
|
|
6809
|
-
onset: "Onset",
|
|
6810
|
-
severity: "Severity",
|
|
6811
|
-
laterality: "Laterality",
|
|
6812
|
-
bodySite: "Body site"
|
|
6813
|
-
};
|
|
6814
|
-
function describeFieldUncertainty(field, f) {
|
|
6815
|
-
const label = UNCERTAIN_FIELD_LABELS[field];
|
|
6816
|
-
if (!f.known) {
|
|
6817
|
-
const reason = f.reason === "asked-unknown" ? "asked \u2014 unknown" : (f.reason ?? "unknown").replace(/-/g, " ");
|
|
6818
|
-
return `${label}: ${reason}${f.note ? ` (${f.note})` : ""}`;
|
|
6819
|
-
}
|
|
6820
|
-
return `${label}: ${f.confidence ?? "uncertain"} confidence${f.note ? ` (${f.note})` : ""}`;
|
|
6821
|
-
}
|
|
6822
|
-
function CodingChips({ coding }) {
|
|
6823
|
-
if (!coding?.length) return null;
|
|
6824
|
-
const icd = coding.filter((c) => c.system.startsWith("ICD"));
|
|
6825
|
-
const inline = icd.length > 0 ? icd : coding.filter((c) => c.primary);
|
|
6826
|
-
const label = inline.map((c) => c.code).join(", ");
|
|
6827
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6828
|
-
chunkGLG6UE2H_cjs.Tooltip,
|
|
6829
|
-
{
|
|
6830
|
-
content: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex flex-col gap-0.5", children: coding.map((c) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
6831
|
-
c.system,
|
|
6832
|
-
" ",
|
|
6833
|
-
c.code,
|
|
6834
|
-
c.display ? ` \u2014 ${c.display}` : "",
|
|
6835
|
-
c.primary ? " \xB7 primary" : "",
|
|
6836
|
-
c.mappedFrom ? ` \xB7 mapped from ${c.mappedFrom}` : ""
|
|
6837
|
-
] }, `${c.system}:${c.code}`)) }),
|
|
6838
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6839
|
-
"span",
|
|
6840
|
-
{
|
|
6841
|
-
tabIndex: 0,
|
|
6842
|
-
className: "text-muted-foreground focus-visible:ring-ring rounded text-xs whitespace-nowrap focus-visible:ring-2 focus-visible:outline-none",
|
|
6843
|
-
children: [
|
|
6844
|
-
"(",
|
|
6845
|
-
label || "coded",
|
|
6846
|
-
")"
|
|
6847
|
-
]
|
|
6848
|
-
}
|
|
6849
|
-
)
|
|
6850
|
-
}
|
|
6851
|
-
);
|
|
6852
|
-
}
|
|
6853
|
-
function concernHistoryContent(concern) {
|
|
6854
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex max-w-xs flex-col gap-1", children: [
|
|
6855
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: "History" }),
|
|
6856
|
-
[...concern.assertions].reverse().map((a) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
6857
|
-
a.date,
|
|
6858
|
-
" \u2014 ",
|
|
6859
|
-
a.text,
|
|
6860
|
-
a.changeType ? ` (${CHANGE_TYPE_LABELS[a.changeType].toLowerCase()})` : "",
|
|
6861
|
-
a.verificationStatus === "refuted" ? " \u2014 refuted" : ""
|
|
6862
|
-
] }, a.id)),
|
|
6863
|
-
concern.observations && concern.observations.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6864
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 font-semibold", children: "Observations" }),
|
|
6865
|
-
[...concern.observations].reverse().slice(0, 3).map((o) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
6866
|
-
o.date,
|
|
6867
|
-
" \u2014 ",
|
|
6868
|
-
o.text
|
|
6869
|
-
] }, o.id))
|
|
6870
|
-
] }),
|
|
6871
|
-
(currentAssertion(concern)?.coding?.length ?? 0) > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6872
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 font-semibold", children: "Coding" }),
|
|
6873
|
-
currentAssertion(concern).coding.map((c) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
6874
|
-
c.system,
|
|
6875
|
-
" ",
|
|
6876
|
-
c.code,
|
|
6877
|
-
c.display ? ` \u2014 ${c.display}` : ""
|
|
6878
|
-
] }, `${c.system}:${c.code}`))
|
|
6879
|
-
] })
|
|
6880
|
-
] });
|
|
6881
|
-
}
|
|
6882
|
-
function UncertaintyBadge({
|
|
6883
|
-
uncertainty
|
|
6884
|
-
}) {
|
|
6885
|
-
if (!uncertainty) return null;
|
|
6886
|
-
const fieldEntries = Object.entries(uncertainty.fields ?? {});
|
|
6887
|
-
const overall = uncertainty.overall && uncertainty.overall !== "confirmed" ? uncertainty.overall : null;
|
|
6888
|
-
if (!overall && fieldEntries.length === 0) return null;
|
|
6889
|
-
const lines = [
|
|
6890
|
-
...overall ? [`Overall certainty: ${overall}`] : [],
|
|
6891
|
-
...fieldEntries.map(([field, f]) => describeFieldUncertainty(field, f))
|
|
6892
|
-
];
|
|
6893
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkGLG6UE2H_cjs.Tooltip, { content: lines.join(" \xB7 "), children: /* @__PURE__ */ jsxRuntime.jsxs(chunk7E46YDOT_cjs.Badge, { variant: "warning", size: "sm", className: "gap-1", children: [
|
|
6894
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.HelpCircle, { size: 10 }),
|
|
6895
|
-
overall ? `${overall} certainty` : `${fieldEntries.length} uncertain`
|
|
6896
|
-
] }) });
|
|
6897
|
-
}
|
|
6898
|
-
function AssertionTimeline({ concern }) {
|
|
6899
|
-
const items = [...concern.assertions].reverse();
|
|
6900
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6901
|
-
"ol",
|
|
6902
|
-
{
|
|
6903
|
-
"aria-label": "Assertion history",
|
|
6904
|
-
className: "border-border ms-1.5 mt-2 space-y-2 border-s ps-4",
|
|
6905
|
-
children: items.map((a) => {
|
|
6906
|
-
const refuted = a.verificationStatus === "refuted" || a.verificationStatus === "entered-in-error";
|
|
6907
|
-
const verification = VERIFICATION_BADGE[a.verificationStatus];
|
|
6908
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "relative text-sm", children: [
|
|
6909
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6910
|
-
"span",
|
|
6911
|
-
{
|
|
6912
|
-
"aria-hidden": true,
|
|
6913
|
-
className: "bg-border absolute -start-5 top-1.5 h-2 w-2 rounded-full"
|
|
6914
|
-
}
|
|
6915
|
-
),
|
|
6916
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
|
|
6917
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-xs tabular-nums", children: a.date }),
|
|
6918
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6919
|
-
"span",
|
|
6920
|
-
{
|
|
6921
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
6922
|
-
"text-foreground font-medium",
|
|
6923
|
-
refuted && "text-muted-foreground line-through"
|
|
6924
|
-
),
|
|
6925
|
-
children: a.text
|
|
6926
|
-
}
|
|
6927
|
-
),
|
|
6928
|
-
a.changeType && /* @__PURE__ */ jsxRuntime.jsx(chunk7E46YDOT_cjs.Badge, { variant: "secondary", size: "sm", children: CHANGE_TYPE_LABELS[a.changeType] }),
|
|
6929
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunk7E46YDOT_cjs.Badge, { variant: verification.variant, size: "sm", children: verification.label }),
|
|
6930
|
-
/* @__PURE__ */ jsxRuntime.jsx(UncertaintyBadge, { uncertainty: a.uncertainty }),
|
|
6931
|
-
/* @__PURE__ */ jsxRuntime.jsx(CodingChips, { coding: a.coding })
|
|
6932
|
-
] }),
|
|
6933
|
-
a.note && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-0.5 text-xs", children: a.note })
|
|
6934
|
-
] }, a.id);
|
|
6935
|
-
})
|
|
6936
|
-
}
|
|
6937
|
-
);
|
|
6938
|
-
}
|
|
6939
|
-
function ConcernRow({
|
|
6940
|
-
concern,
|
|
6941
|
-
actions,
|
|
6942
|
-
readOnly,
|
|
6943
|
-
canReorder,
|
|
6944
|
-
drag,
|
|
6945
|
-
onAction
|
|
6946
|
-
}) {
|
|
6947
|
-
const [expanded, setExpanded] = React13__namespace.useState(false);
|
|
6948
|
-
const current = currentAssertion(concern);
|
|
6949
|
-
const hasHistory = concern.assertions.length > 1;
|
|
6950
|
-
const visibleActions = actions.filter(
|
|
6951
|
-
(a) => canReorder || a !== "move-up" && a !== "move-down"
|
|
6952
|
-
);
|
|
6953
|
-
const handleRowKeyDown = (e) => {
|
|
6954
|
-
if (e.target !== e.currentTarget) return;
|
|
6955
|
-
if (e.altKey && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
|
|
6956
|
-
if (!canReorder) return;
|
|
6957
|
-
e.preventDefault();
|
|
6958
|
-
onAction?.(concern, e.key === "ArrowUp" ? "move-up" : "move-down");
|
|
6959
|
-
} else if (e.key === "ArrowUp" || e.key === "ArrowDown") {
|
|
6960
|
-
e.preventDefault();
|
|
6961
|
-
const list = e.currentTarget.closest("ul");
|
|
6962
|
-
if (!list) return;
|
|
6963
|
-
const rows = Array.from(
|
|
6964
|
-
list.querySelectorAll("li[data-concern-id]")
|
|
6965
|
-
);
|
|
6966
|
-
const i = rows.indexOf(e.currentTarget);
|
|
6967
|
-
rows[e.key === "ArrowUp" ? Math.max(0, i - 1) : Math.min(rows.length - 1, i + 1)]?.focus();
|
|
6968
|
-
} else if ((e.key === "Enter" || e.key === " ") && hasHistory) {
|
|
6969
|
-
e.preventDefault();
|
|
6970
|
-
setExpanded((v) => !v);
|
|
6971
|
-
}
|
|
6972
|
-
};
|
|
6973
|
-
if (!current) return null;
|
|
6974
|
-
return (
|
|
6975
|
-
// Roving-focus row (WAI-ARIA listbox-like keyboard pattern): the row is a
|
|
6976
|
-
// legitimate focus stop so ↑/↓ navigate rows, Enter toggles history, and
|
|
6977
|
-
// Alt+↑/↓ reorders — required for 508 keyboard operability.
|
|
6978
|
-
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/no-noninteractive-tabindex */
|
|
6979
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6980
|
-
"li",
|
|
6981
|
-
{
|
|
6982
|
-
"data-slot": "clinical-list-row",
|
|
6983
|
-
"data-concern-id": concern.concernId,
|
|
6984
|
-
tabIndex: 0,
|
|
6985
|
-
onKeyDown: handleRowKeyDown,
|
|
6986
|
-
...drag.rowProps(concern.concernId),
|
|
6987
|
-
"aria-label": `${current.text}. ${hasHistory ? "Press Enter to toggle history. " : ""}${canReorder ? "Alt plus arrow keys to reorder." : ""}`,
|
|
6988
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
6989
|
-
"group border-border/60 relative border-b px-1 py-2",
|
|
6990
|
-
"focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none",
|
|
6991
|
-
drag.enabled && "cursor-grab active:cursor-grabbing",
|
|
6992
|
-
chunkGF2BE4FB_cjs.dragIndicatorClasses(drag, concern.concernId)
|
|
6993
|
-
),
|
|
6994
|
-
children: [
|
|
6995
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-9 flex-wrap items-center gap-x-2 gap-y-1", children: [
|
|
6996
|
-
drag.enabled ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6997
|
-
chunkL7L5S2HO_cjs.GripVertical,
|
|
6998
|
-
{
|
|
6999
|
-
size: 14,
|
|
7000
|
-
"aria-hidden": true,
|
|
7001
|
-
className: "text-muted-foreground/50 shrink-0"
|
|
7002
|
-
}
|
|
7003
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/60 select-none", children: "\u2022" }),
|
|
7004
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkGLG6UE2H_cjs.Tooltip, { content: concernHistoryContent(concern), children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground font-medium", children: current.text }) }),
|
|
7005
|
-
/* @__PURE__ */ jsxRuntime.jsx(CodingChips, { coding: current.coding }),
|
|
7006
|
-
current.verificationStatus !== "confirmed" && current.verificationStatus !== "unconfirmed" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7007
|
-
chunk7E46YDOT_cjs.Badge,
|
|
7008
|
-
{
|
|
7009
|
-
variant: VERIFICATION_BADGE[current.verificationStatus].variant,
|
|
7010
|
-
size: "sm",
|
|
7011
|
-
children: VERIFICATION_BADGE[current.verificationStatus].label
|
|
7012
|
-
}
|
|
7013
|
-
),
|
|
7014
|
-
/* @__PURE__ */ jsxRuntime.jsx(UncertaintyBadge, { uncertainty: current.uncertainty }),
|
|
7015
|
-
concern.relationships?.map((r) => /* @__PURE__ */ jsxRuntime.jsxs(chunk7E46YDOT_cjs.Badge, { variant: "outline", size: "sm", children: [
|
|
7016
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.Link, { size: 10, className: "me-1" }),
|
|
7017
|
-
r.type.replace(/-/g, " "),
|
|
7018
|
-
r.display ? `: ${r.display}` : ""
|
|
7019
|
-
] }, `${r.type}:${r.concernId}`)),
|
|
7020
|
-
hasHistory && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7021
|
-
chunkANMX7YDL_cjs.Button,
|
|
7022
|
-
{
|
|
7023
|
-
variant: "ghost",
|
|
7024
|
-
size: "sm",
|
|
7025
|
-
onClick: () => setExpanded((v) => !v),
|
|
7026
|
-
"aria-expanded": expanded,
|
|
7027
|
-
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.History, { size: 12 }),
|
|
7028
|
-
rightIcon: expanded ? /* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.ChevronUp, { size: 12 }) : /* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.ChevronDown, { size: 12 }),
|
|
7029
|
-
className: "text-muted-foreground h-auto px-1.5 py-0.5 text-xs",
|
|
7030
|
-
children: [
|
|
7031
|
-
concern.assertions.length,
|
|
7032
|
-
" assertions"
|
|
7033
|
-
]
|
|
7034
|
-
}
|
|
7035
|
-
),
|
|
7036
|
-
!readOnly && /* @__PURE__ */ jsxRuntime.jsx(chunkZIJMLRI3_cjs.RowActionToolbar, { label: `Actions for ${current.text}`, align: "top", children: visibleActions.map((action) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7037
|
-
chunkZIJMLRI3_cjs.RowIconButton,
|
|
7038
|
-
{
|
|
7039
|
-
label: ACTION_META[action].label,
|
|
7040
|
-
icon: ACTION_META[action].icon,
|
|
7041
|
-
onClick: () => onAction?.(concern, action)
|
|
7042
|
-
},
|
|
7043
|
-
action
|
|
7044
|
-
)) })
|
|
7045
|
-
] }),
|
|
7046
|
-
expanded && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7047
|
-
/* @__PURE__ */ jsxRuntime.jsx(AssertionTimeline, { concern }),
|
|
7048
|
-
concern.observations && concern.observations.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ms-1.5 mt-2 ps-4", children: [
|
|
7049
|
-
/* @__PURE__ */ jsxRuntime.jsx("h5", { className: "text-muted-foreground text-xs font-semibold tracking-wide uppercase", children: "Observations" }),
|
|
7050
|
-
/* @__PURE__ */ jsxRuntime.jsx("ol", { "aria-label": "Observations", className: "mt-1 space-y-1", children: [...concern.observations].reverse().map((o) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex flex-wrap gap-x-2 text-sm", children: [
|
|
7051
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-xs tabular-nums", children: o.date }),
|
|
7052
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground", children: o.text }),
|
|
7053
|
-
o.author && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground text-xs", children: [
|
|
7054
|
-
"\u2014 ",
|
|
7055
|
-
o.author
|
|
7056
|
-
] })
|
|
7057
|
-
] }, o.id)) })
|
|
7058
|
-
] })
|
|
7059
|
-
] })
|
|
7060
|
-
]
|
|
7061
|
-
}
|
|
7062
|
-
)
|
|
7063
|
-
);
|
|
7064
|
-
}
|
|
7065
|
-
var ProblemList = React13__namespace.forwardRef(
|
|
7066
|
-
({
|
|
7067
|
-
concerns,
|
|
7068
|
-
title = "Problem list",
|
|
7069
|
-
onAction,
|
|
7070
|
-
onAddProblem,
|
|
7071
|
-
onReorder,
|
|
7072
|
-
actions = DEFAULT_ACTIONS,
|
|
7073
|
-
readOnly = false,
|
|
7074
|
-
emptyMessage = "No problems recorded.",
|
|
7075
|
-
className,
|
|
7076
|
-
"data-testid": dataTestId,
|
|
7077
|
-
...props
|
|
7078
|
-
}, ref) => {
|
|
7079
|
-
const [draft, setDraft] = React13__namespace.useState("");
|
|
7080
|
-
const [announcement, setAnnouncement] = chunkCPDNX3LS_cjs.useLiveAnnouncement();
|
|
7081
|
-
const submitDraft = () => {
|
|
7082
|
-
const text = draft.trim();
|
|
7083
|
-
if (!text) return;
|
|
7084
|
-
onAddProblem?.(text);
|
|
7085
|
-
setDraft("");
|
|
7086
|
-
};
|
|
7087
|
-
const moveConcern = React13__namespace.useCallback(
|
|
7088
|
-
(concern, dir) => {
|
|
7089
|
-
if (!onReorder || readOnly) return;
|
|
7090
|
-
const groupKey = concernGroupKey(concern);
|
|
7091
|
-
const ids = concerns.map((c) => c.concernId);
|
|
7092
|
-
const from = ids.indexOf(concern.concernId);
|
|
7093
|
-
let to = from + dir;
|
|
7094
|
-
while (to >= 0 && to < concerns.length && concernGroupKey(concerns[to]) !== groupKey) {
|
|
7095
|
-
to += dir;
|
|
7096
|
-
}
|
|
7097
|
-
if (to < 0 || to >= concerns.length) return;
|
|
7098
|
-
[ids[from], ids[to]] = [ids[to], ids[from]];
|
|
7099
|
-
const current = currentAssertion(concern);
|
|
7100
|
-
setAnnouncement(
|
|
7101
|
-
`${current?.text ?? concern.concernId} moved ${dir === -1 ? "up" : "down"}`
|
|
7102
|
-
);
|
|
7103
|
-
onReorder(ids);
|
|
7104
|
-
},
|
|
7105
|
-
[concerns, onReorder, readOnly, setAnnouncement]
|
|
7106
|
-
);
|
|
7107
|
-
const handleAction = React13__namespace.useCallback(
|
|
7108
|
-
(concern, action) => {
|
|
7109
|
-
if (action === "move-up") moveConcern(concern, -1);
|
|
7110
|
-
else if (action === "move-down") moveConcern(concern, 1);
|
|
7111
|
-
else onAction?.(concern, action);
|
|
7112
|
-
},
|
|
7113
|
-
[moveConcern, onAction]
|
|
7114
|
-
);
|
|
7115
|
-
const groupById = React13__namespace.useMemo(
|
|
7116
|
-
() => new Map(
|
|
7117
|
-
concerns.map((c) => [c.concernId, concernGroupKey(c)])
|
|
7118
|
-
),
|
|
7119
|
-
[concerns]
|
|
7120
|
-
);
|
|
7121
|
-
const groupOf = React13__namespace.useCallback(
|
|
7122
|
-
(id) => groupById.get(id),
|
|
7123
|
-
[groupById]
|
|
7124
|
-
);
|
|
7125
|
-
const drag = chunkGF2BE4FB_cjs.useDragReorder({
|
|
7126
|
-
ids: concerns.map((c) => c.concernId),
|
|
7127
|
-
onReorder: readOnly || !onReorder ? void 0 : (newIds) => {
|
|
7128
|
-
setAnnouncement("Problem list reordered");
|
|
7129
|
-
onReorder(newIds);
|
|
7130
|
-
},
|
|
7131
|
-
canDropOn: (dragged, target) => groupOf(dragged) === groupOf(target)
|
|
7132
|
-
});
|
|
7133
|
-
const groups = [
|
|
7134
|
-
{
|
|
7135
|
-
key: "unconfirmed",
|
|
7136
|
-
label: "Unconfirmed",
|
|
7137
|
-
items: concerns.filter((c) => concernGroupKey(c) === "unconfirmed")
|
|
7138
|
-
},
|
|
7139
|
-
...GROUP_ORDER.map(({ key, label }) => ({
|
|
7140
|
-
key,
|
|
7141
|
-
label,
|
|
7142
|
-
items: concerns.filter((c) => concernGroupKey(c) === key)
|
|
7143
|
-
}))
|
|
7144
|
-
// Active stays visible as the empty state only when nothing is recorded
|
|
7145
|
-
// at all — an empty Active section next to populated groups would
|
|
7146
|
-
// misleadingly read "No problems recorded".
|
|
7147
|
-
].filter(
|
|
7148
|
-
(g) => g.items.length > 0 || g.key === "active" && concerns.length === 0
|
|
7149
|
-
);
|
|
7150
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7151
|
-
chunkMJWFNV3L_cjs.Card,
|
|
7152
|
-
{
|
|
7153
|
-
ref,
|
|
7154
|
-
padding: "none",
|
|
7155
|
-
className: chunkS5RVSXDV_cjs.cn("w-full", className),
|
|
7156
|
-
"data-testid": dataTestId,
|
|
7157
|
-
...props,
|
|
7158
|
-
children: [
|
|
7159
|
-
title !== null && /* @__PURE__ */ jsxRuntime.jsx(chunkMJWFNV3L_cjs.CardHeader, { className: "border-border bg-muted/50 border-b px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-foreground text-sm font-semibold tracking-wide uppercase", children: title }) }),
|
|
7160
|
-
/* @__PURE__ */ jsxRuntime.jsxs(chunkMJWFNV3L_cjs.CardContent, { className: "space-y-6 px-4 py-4", children: [
|
|
7161
|
-
groups.map(({ key, label, items }) => /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": label, children: [
|
|
7162
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7163
|
-
"h4",
|
|
7164
|
-
{
|
|
7165
|
-
"data-slot": "clinical-list-heading",
|
|
7166
|
-
className: "border-border text-foreground border-b pb-1 text-sm font-semibold tracking-wide uppercase",
|
|
7167
|
-
children: label
|
|
7168
|
-
}
|
|
7169
|
-
),
|
|
7170
|
-
items.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "mt-1", children: items.map((concern) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7171
|
-
ConcernRow,
|
|
7172
|
-
{
|
|
7173
|
-
concern,
|
|
7174
|
-
actions,
|
|
7175
|
-
readOnly,
|
|
7176
|
-
canReorder: drag.enabled,
|
|
7177
|
-
drag,
|
|
7178
|
-
onAction: handleAction
|
|
7179
|
-
},
|
|
7180
|
-
concern.concernId
|
|
7181
|
-
)) }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-2 text-sm", children: emptyMessage })
|
|
7182
|
-
] }, key)),
|
|
7183
|
-
!readOnly && onAddProblem && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
7184
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7185
|
-
"input",
|
|
7186
|
-
{
|
|
7187
|
-
type: "text",
|
|
7188
|
-
"data-slot": "input",
|
|
7189
|
-
value: draft,
|
|
7190
|
-
onChange: (e) => setDraft(e.target.value),
|
|
7191
|
-
onKeyDown: (e) => {
|
|
7192
|
-
if (e.key === "Enter") submitDraft();
|
|
7193
|
-
},
|
|
7194
|
-
placeholder: "Add problem (name is enough)\u2026",
|
|
7195
|
-
"aria-label": "Add problem",
|
|
7196
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
7197
|
-
"border-border bg-background text-foreground placeholder:text-muted-foreground",
|
|
7198
|
-
"h-8 flex-1 rounded-md border px-2.5 text-sm",
|
|
7199
|
-
"focus:ring-ring focus:ring-2 focus:outline-none"
|
|
7200
|
-
)
|
|
7201
|
-
}
|
|
7202
|
-
),
|
|
7203
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7204
|
-
chunkANMX7YDL_cjs.Button,
|
|
7205
|
-
{
|
|
7206
|
-
variant: "outline",
|
|
7207
|
-
size: "sm",
|
|
7208
|
-
onClick: submitDraft,
|
|
7209
|
-
disabled: !draft.trim(),
|
|
7210
|
-
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.Plus, { size: 12 }),
|
|
7211
|
-
className: "h-8",
|
|
7212
|
-
children: "Add"
|
|
7213
|
-
}
|
|
7214
|
-
)
|
|
7215
|
-
] })
|
|
7216
|
-
] }),
|
|
7217
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-live": "polite", className: "sr-only", children: announcement })
|
|
7218
|
-
]
|
|
7219
|
-
}
|
|
7220
|
-
);
|
|
7221
|
-
}
|
|
7222
|
-
);
|
|
7223
|
-
ProblemList.displayName = "ProblemList";
|
|
7224
|
-
function orderTypeForCodetype(codetype) {
|
|
7225
|
-
const ct = codetype.toUpperCase();
|
|
7226
|
-
if (["RXNORM", "FDB", "FDB MEDNAME", "NDC", "CVX"].includes(ct)) {
|
|
7227
|
-
return "medication";
|
|
7228
|
-
}
|
|
7229
|
-
if (ct.startsWith("LOINC") || ct.endsWith("ORDER")) return "lab";
|
|
7230
|
-
return "procedure";
|
|
7231
|
-
}
|
|
7232
|
-
function contextOrderSearch(ctx) {
|
|
7233
|
-
const ContextOrderSearch = ({
|
|
7234
|
-
domains,
|
|
7235
|
-
preferDomains,
|
|
7236
|
-
preferCodetypes,
|
|
7237
|
-
billableOnly,
|
|
7238
|
-
placeholder,
|
|
7239
|
-
onPick,
|
|
7240
|
-
onFreeText
|
|
7241
|
-
}) => {
|
|
7242
|
-
const Lookup = ctx.component;
|
|
7243
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7244
|
-
Lookup,
|
|
7245
|
-
{
|
|
7246
|
-
indexUrl: ctx.indexUrl,
|
|
7247
|
-
locale: ctx.locale,
|
|
7248
|
-
domains,
|
|
7249
|
-
preferDomains,
|
|
7250
|
-
preferCodetypes,
|
|
7251
|
-
billableOnly,
|
|
7252
|
-
bare: true,
|
|
7253
|
-
clearOnSelect: true,
|
|
7254
|
-
placeholder,
|
|
7255
|
-
onSelect: (result) => onPick({
|
|
7256
|
-
fullid: result.fullid,
|
|
7257
|
-
label: result.label,
|
|
7258
|
-
codetype: result.codetype,
|
|
7259
|
-
fullcode: result.fullcode
|
|
7260
|
-
}),
|
|
7261
|
-
onFreeText
|
|
7262
|
-
}
|
|
7263
|
-
);
|
|
7264
|
-
};
|
|
7265
|
-
return ContextOrderSearch;
|
|
7266
|
-
}
|
|
7267
|
-
function isConditionCodetype(codetype) {
|
|
7268
|
-
const ct = codetype.toUpperCase();
|
|
7269
|
-
return ct === "ICD10" || ct === "ICD9" || ct === "SNOMED US" || ct === "OSHA" || ct === "FMCSA" || ct === "NFPA" || ct === "FAA";
|
|
7270
|
-
}
|
|
7271
|
-
var ORDER_TYPE_SEARCH_DOMAINS = {
|
|
7272
|
-
medication: ["med", "vaccine"],
|
|
7273
|
-
lab: ["lab"],
|
|
7274
|
-
imaging: ["procedure"],
|
|
7275
|
-
procedure: ["procedure"],
|
|
7276
|
-
referral: ["procedure"]
|
|
7277
|
-
};
|
|
7278
|
-
var ORDER_TYPE_PLACEHOLDERS = {
|
|
7279
|
-
auto: "Search medications, labs, imaging, procedures\u2026",
|
|
7280
|
-
medication: 'Search medications\u2026 (try "lasix")',
|
|
7281
|
-
lab: 'Search labs\u2026 (try "a1c")',
|
|
7282
|
-
imaging: 'Search imaging\u2026 (try "chest x")',
|
|
7283
|
-
procedure: "Search procedures\u2026",
|
|
7284
|
-
referral: "Search referrals & consults\u2026"
|
|
7285
|
-
};
|
|
7286
|
-
var ORDER_TYPE_META = {
|
|
7287
|
-
medication: { label: "Medication", icon: chunkL7L5S2HO_cjs.Pill },
|
|
7288
|
-
lab: { label: "Lab", icon: chunkL7L5S2HO_cjs.TestTube2 },
|
|
7289
|
-
imaging: { label: "Imaging", icon: chunkL7L5S2HO_cjs.Scan },
|
|
7290
|
-
procedure: { label: "Procedure", icon: chunkL7L5S2HO_cjs.Stethoscope },
|
|
7291
|
-
referral: { label: "Referral", icon: chunkL7L5S2HO_cjs.Send }
|
|
7292
|
-
};
|
|
7293
|
-
var ACTION_META2 = {
|
|
7294
|
-
refine: { label: "Refine (more specific)", icon: chunkL7L5S2HO_cjs.Pencil },
|
|
7295
|
-
revise: { label: "Revise (prior was wrong)", icon: chunkL7L5S2HO_cjs.RefreshCw },
|
|
7296
|
-
"add-order": { label: "Add order", icon: chunkL7L5S2HO_cjs.Plus }
|
|
7297
|
-
};
|
|
7298
|
-
function OrderContent({ order }) {
|
|
7299
|
-
const meta = ORDER_TYPE_META[order.type];
|
|
7300
|
-
const Icon = meta.icon;
|
|
7301
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground flex items-center gap-2 text-sm", children: [
|
|
7302
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkGLG6UE2H_cjs.Tooltip, { content: meta.label, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 14 }) }),
|
|
7303
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: meta.label }),
|
|
7304
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground", children: order.display }),
|
|
7305
|
-
order.priority && order.priority !== "routine" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7306
|
-
chunk7E46YDOT_cjs.Badge,
|
|
7307
|
-
{
|
|
7308
|
-
variant: order.priority === "stat" ? "danger" : "warning",
|
|
7309
|
-
size: "sm",
|
|
7310
|
-
children: order.priority
|
|
7311
|
-
}
|
|
7312
|
-
),
|
|
7313
|
-
order.detail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs", children: order.detail }),
|
|
7314
|
-
order.timing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs", children: order.timing })
|
|
7315
|
-
] });
|
|
7316
|
-
}
|
|
7317
|
-
function OrderRow({
|
|
7318
|
-
order,
|
|
7319
|
-
drag,
|
|
7320
|
-
controls
|
|
7321
|
-
}) {
|
|
7322
|
-
const interactive = Boolean(
|
|
7323
|
-
controls?.moveWithin || controls?.moveToProblem || controls?.edit || controls?.editStart || controls?.remove
|
|
7324
|
-
);
|
|
7325
|
-
const canEdit = Boolean(controls?.edit || controls?.editStart);
|
|
7326
|
-
const [editing, setEditing] = React13__namespace.useState(null);
|
|
7327
|
-
const [menuOpen, setMenuOpen] = React13__namespace.useState(false);
|
|
7328
|
-
const pick = (fn) => () => {
|
|
7329
|
-
setMenuOpen(false);
|
|
7330
|
-
fn();
|
|
7331
|
-
};
|
|
7332
|
-
const beginEdit = () => {
|
|
7333
|
-
if (controls?.editStart?.(order)) return;
|
|
7334
|
-
if (controls?.edit) {
|
|
7335
|
-
setEditing({ display: order.display, detail: order.detail ?? "" });
|
|
7336
|
-
}
|
|
7337
|
-
};
|
|
7338
|
-
const saveEdit = () => {
|
|
7339
|
-
if (!editing) return;
|
|
7340
|
-
const display = editing.display.trim();
|
|
7341
|
-
if (display) {
|
|
7342
|
-
controls?.edit?.(order, {
|
|
7343
|
-
display,
|
|
7344
|
-
detail: editing.detail.trim() || void 0
|
|
7345
|
-
});
|
|
7346
|
-
}
|
|
7347
|
-
setEditing(null);
|
|
7348
|
-
};
|
|
7349
|
-
const handleKeyDown = (e) => {
|
|
7350
|
-
if (e.target !== e.currentTarget || !controls) return;
|
|
7351
|
-
if (e.altKey && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
|
|
7352
|
-
e.preventDefault();
|
|
7353
|
-
controls.moveWithin?.(order, e.key === "ArrowUp" ? -1 : 1);
|
|
7354
|
-
} else if (e.altKey && (e.key === "ArrowLeft" || e.key === "ArrowRight")) {
|
|
7355
|
-
e.preventDefault();
|
|
7356
|
-
const back = chunkZ3WMDVMR_cjs.isRtl(e.currentTarget) ? "ArrowRight" : "ArrowLeft";
|
|
7357
|
-
const adj = controls.adjacentProblem(order, e.key === back ? -1 : 1);
|
|
7358
|
-
if (adj) controls.moveToProblem?.(order, adj.concernId);
|
|
7359
|
-
} else if (e.key === "ArrowUp" || e.key === "ArrowDown") {
|
|
7360
|
-
e.preventDefault();
|
|
7361
|
-
const list = e.currentTarget.closest("ul");
|
|
7362
|
-
if (!list) return;
|
|
7363
|
-
const rows = Array.from(
|
|
7364
|
-
list.querySelectorAll("li[data-order-id]")
|
|
7365
|
-
);
|
|
7366
|
-
const i = rows.indexOf(e.currentTarget);
|
|
7367
|
-
rows[e.key === "ArrowUp" ? Math.max(0, i - 1) : Math.min(rows.length - 1, i + 1)]?.focus();
|
|
7368
|
-
}
|
|
7369
|
-
};
|
|
7370
|
-
return (
|
|
7371
|
-
// Order rows are focus stops so the drag interactions have a full keyboard
|
|
7372
|
-
// equivalent: Alt+↑/↓ reorders, Alt+←/→ moves between problems (508).
|
|
7373
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7374
|
-
"li",
|
|
7375
|
-
{
|
|
7376
|
-
"data-order-id": order.orderId,
|
|
7377
|
-
tabIndex: interactive && !editing ? 0 : void 0,
|
|
7378
|
-
onKeyDown: interactive && !editing ? handleKeyDown : void 0,
|
|
7379
|
-
"aria-label": interactive && !editing ? `${order.display}. Alt plus up or down to reorder; Alt plus left or right to move to another problem.` : void 0,
|
|
7380
|
-
...editing ? {} : drag.rowProps(order),
|
|
7381
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
7382
|
-
"group/order relative flex items-center gap-1.5 py-1",
|
|
7383
|
-
"focus-visible:ring-ring rounded focus-visible:ring-2 focus-visible:outline-none",
|
|
7384
|
-
drag.enabled && !editing && "cursor-grab active:cursor-grabbing",
|
|
7385
|
-
drag.draggingId === order.orderId && "opacity-40",
|
|
7386
|
-
drag.over?.type === "order" && drag.over.id === order.orderId && (drag.over.after ? "shadow-[inset_0_-2px_0_0_var(--color-primary-500,#3b82f6)]" : "shadow-[inset_0_2px_0_0_var(--color-primary-500,#3b82f6)]")
|
|
7387
|
-
),
|
|
7388
|
-
children: [
|
|
7389
|
-
drag.enabled && !editing && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7390
|
-
chunkL7L5S2HO_cjs.GripVertical,
|
|
7391
|
-
{
|
|
7392
|
-
size: 12,
|
|
7393
|
-
"aria-hidden": true,
|
|
7394
|
-
className: "text-muted-foreground/40 shrink-0"
|
|
7395
|
-
}
|
|
7396
|
-
),
|
|
7397
|
-
editing ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7398
|
-
"div",
|
|
7399
|
-
{
|
|
7400
|
-
role: "form",
|
|
7401
|
-
"aria-label": `Edit order ${order.display}`,
|
|
7402
|
-
className: "flex flex-1 flex-wrap items-center gap-1.5",
|
|
7403
|
-
children: [
|
|
7404
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-40 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7405
|
-
chunkZ5S5JEJD_cjs.Input,
|
|
7406
|
-
{
|
|
7407
|
-
autoFocus: true,
|
|
7408
|
-
size: "sm",
|
|
7409
|
-
value: editing.display,
|
|
7410
|
-
onChange: (e) => setEditing(
|
|
7411
|
-
(prev) => prev ? { ...prev, display: e.target.value } : prev
|
|
7412
|
-
),
|
|
7413
|
-
onKeyDown: (e) => {
|
|
7414
|
-
if (e.key === "Enter") saveEdit();
|
|
7415
|
-
else if (e.key === "Escape") setEditing(null);
|
|
7416
|
-
},
|
|
7417
|
-
"aria-label": "Order description",
|
|
7418
|
-
className: "h-7"
|
|
7419
|
-
}
|
|
7420
|
-
) }),
|
|
7421
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-40", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7422
|
-
chunkZ5S5JEJD_cjs.Input,
|
|
7423
|
-
{
|
|
7424
|
-
size: "sm",
|
|
7425
|
-
value: editing.detail,
|
|
7426
|
-
onChange: (e) => setEditing(
|
|
7427
|
-
(prev) => prev ? { ...prev, detail: e.target.value } : prev
|
|
7428
|
-
),
|
|
7429
|
-
onKeyDown: (e) => {
|
|
7430
|
-
if (e.key === "Enter") saveEdit();
|
|
7431
|
-
else if (e.key === "Escape") setEditing(null);
|
|
7432
|
-
},
|
|
7433
|
-
placeholder: "detail (sig, timing\u2026)",
|
|
7434
|
-
"aria-label": "Order detail",
|
|
7435
|
-
className: "h-7 text-xs"
|
|
7436
|
-
}
|
|
7437
|
-
) }),
|
|
7438
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7439
|
-
chunkANMX7YDL_cjs.Button,
|
|
7440
|
-
{
|
|
7441
|
-
variant: "outline",
|
|
7442
|
-
size: "sm",
|
|
7443
|
-
onClick: saveEdit,
|
|
7444
|
-
disabled: !editing.display.trim(),
|
|
7445
|
-
className: "h-7 text-xs",
|
|
7446
|
-
children: "Save"
|
|
7447
|
-
}
|
|
7448
|
-
),
|
|
7449
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7450
|
-
chunkANMX7YDL_cjs.Button,
|
|
7451
|
-
{
|
|
7452
|
-
variant: "ghost",
|
|
7453
|
-
size: "sm",
|
|
7454
|
-
onClick: () => setEditing(null),
|
|
7455
|
-
className: "h-7 text-xs",
|
|
7456
|
-
children: "Cancel"
|
|
7457
|
-
}
|
|
7458
|
-
)
|
|
7459
|
-
]
|
|
7460
|
-
}
|
|
7461
|
-
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7462
|
-
/* @__PURE__ */ jsxRuntime.jsx(OrderContent, { order }),
|
|
7463
|
-
interactive && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7464
|
-
chunkZIJMLRI3_cjs.RowActionToolbar,
|
|
7465
|
-
{
|
|
7466
|
-
label: `Actions for ${order.display}`,
|
|
7467
|
-
group: "order",
|
|
7468
|
-
children: [
|
|
7469
|
-
canEdit && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7470
|
-
chunkZIJMLRI3_cjs.RowIconButton,
|
|
7471
|
-
{
|
|
7472
|
-
label: "Edit",
|
|
7473
|
-
icon: chunkL7L5S2HO_cjs.Pencil,
|
|
7474
|
-
size: "sm",
|
|
7475
|
-
onClick: beginEdit
|
|
7476
|
-
}
|
|
7477
|
-
),
|
|
7478
|
-
(controls?.moveWithin || controls?.moveToProblem && controls.targets.some(
|
|
7479
|
-
(t) => t.concernId !== order.concernId
|
|
7480
|
-
)) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7481
|
-
chunkPINIBEIU_cjs.Dropdown,
|
|
7482
|
-
{
|
|
7483
|
-
open: menuOpen,
|
|
7484
|
-
onOpenChange: setMenuOpen,
|
|
7485
|
-
trigger: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7486
|
-
chunkANMX7YDL_cjs.Button,
|
|
7487
|
-
{
|
|
7488
|
-
variant: "ghost",
|
|
7489
|
-
size: "icon",
|
|
7490
|
-
"aria-label": `Move ${order.display}`,
|
|
7491
|
-
className: "h-7 w-7 shrink-0",
|
|
7492
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.MoreVertical, { size: 14 })
|
|
7493
|
-
}
|
|
7494
|
-
),
|
|
7495
|
-
placement: "bottom-end",
|
|
7496
|
-
children: [
|
|
7497
|
-
controls?.moveWithin && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7498
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7499
|
-
chunkPINIBEIU_cjs.DropdownItem,
|
|
7500
|
-
{
|
|
7501
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.ChevronUp, { size: 14 }),
|
|
7502
|
-
onClick: pick(() => controls.moveWithin?.(order, -1)),
|
|
7503
|
-
children: "Move up"
|
|
7504
|
-
}
|
|
7505
|
-
),
|
|
7506
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7507
|
-
chunkPINIBEIU_cjs.DropdownItem,
|
|
7508
|
-
{
|
|
7509
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.ChevronDown, { size: 14 }),
|
|
7510
|
-
onClick: pick(() => controls.moveWithin?.(order, 1)),
|
|
7511
|
-
children: "Move down"
|
|
7512
|
-
}
|
|
7513
|
-
)
|
|
7514
|
-
] }),
|
|
7515
|
-
controls?.moveToProblem && controls.targets.some(
|
|
7516
|
-
(t) => t.concernId !== order.concernId
|
|
7517
|
-
) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7518
|
-
controls.moveWithin && /* @__PURE__ */ jsxRuntime.jsx(chunkPINIBEIU_cjs.DropdownSeparator, {}),
|
|
7519
|
-
controls.targets.filter((t) => t.concernId !== order.concernId).map((t) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7520
|
-
chunkPINIBEIU_cjs.DropdownItem,
|
|
7521
|
-
{
|
|
7522
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.Link, { size: 14 }),
|
|
7523
|
-
onClick: pick(
|
|
7524
|
-
() => controls.moveToProblem?.(order, t.concernId)
|
|
7525
|
-
),
|
|
7526
|
-
children: [
|
|
7527
|
-
"Move to: ",
|
|
7528
|
-
t.label
|
|
7529
|
-
]
|
|
7530
|
-
},
|
|
7531
|
-
t.concernId
|
|
7532
|
-
))
|
|
7533
|
-
] })
|
|
7534
|
-
]
|
|
7535
|
-
}
|
|
7536
|
-
),
|
|
7537
|
-
controls?.remove && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7538
|
-
chunkZIJMLRI3_cjs.RowIconButton,
|
|
7539
|
-
{
|
|
7540
|
-
label: "Remove",
|
|
7541
|
-
icon: chunkL7L5S2HO_cjs.Trash2,
|
|
7542
|
-
size: "sm",
|
|
7543
|
-
onClick: () => controls.remove?.(order)
|
|
7544
|
-
}
|
|
7545
|
-
)
|
|
7546
|
-
]
|
|
7547
|
-
}
|
|
7548
|
-
)
|
|
7549
|
-
] })
|
|
7550
|
-
]
|
|
7551
|
-
}
|
|
7552
|
-
)
|
|
7553
|
-
);
|
|
7554
|
-
}
|
|
7555
|
-
function AddOrderForm({
|
|
7556
|
-
id,
|
|
7557
|
-
problemText,
|
|
7558
|
-
onSubmit,
|
|
7559
|
-
onCancel,
|
|
7560
|
-
renderSearch
|
|
7561
|
-
}) {
|
|
7562
|
-
const [type, setType] = React13__namespace.useState(
|
|
7563
|
-
renderSearch ? "auto" : "medication"
|
|
7564
|
-
);
|
|
7565
|
-
const [display, setDisplay] = React13__namespace.useState("");
|
|
7566
|
-
const inputRef = React13__namespace.useRef(null);
|
|
7567
|
-
React13__namespace.useEffect(() => {
|
|
7568
|
-
inputRef.current?.focus();
|
|
7569
|
-
}, []);
|
|
7570
|
-
const submit = () => {
|
|
7571
|
-
const text = display.trim();
|
|
7572
|
-
if (!text) return;
|
|
7573
|
-
onSubmit({ type: type === "auto" ? "procedure" : type, display: text });
|
|
7574
|
-
setDisplay("");
|
|
7575
|
-
inputRef.current?.focus();
|
|
7576
|
-
};
|
|
7577
|
-
const handlePick = (pick) => {
|
|
7578
|
-
onSubmit({
|
|
7579
|
-
type: type === "auto" ? orderTypeForCodetype(pick.codetype) : type,
|
|
7580
|
-
display: pick.label,
|
|
7581
|
-
code: {
|
|
7582
|
-
fullid: pick.fullid,
|
|
7583
|
-
codetype: pick.codetype,
|
|
7584
|
-
fullcode: pick.fullcode
|
|
7585
|
-
}
|
|
7586
|
-
});
|
|
7587
|
-
};
|
|
7588
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7589
|
-
"div",
|
|
7590
|
-
{
|
|
7591
|
-
id,
|
|
7592
|
-
role: "form",
|
|
7593
|
-
"aria-label": `Add order for ${problemText}`,
|
|
7594
|
-
className: "border-border bg-muted/40 ms-2.5 mt-1.5 flex flex-wrap items-center gap-1.5 rounded-md border border-dashed p-2",
|
|
7595
|
-
children: [
|
|
7596
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7597
|
-
"select",
|
|
7598
|
-
{
|
|
7599
|
-
"aria-label": "Order type filter",
|
|
7600
|
-
"data-slot": "select-trigger",
|
|
7601
|
-
value: type,
|
|
7602
|
-
onChange: (e) => setType(e.target.value),
|
|
7603
|
-
onKeyDown: (e) => {
|
|
7604
|
-
if (e.key === "Escape") onCancel();
|
|
7605
|
-
},
|
|
7606
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
7607
|
-
"border-border bg-background text-foreground rounded-md border px-1.5 text-sm",
|
|
7608
|
-
renderSearch ? "h-10" : "h-8",
|
|
7609
|
-
"focus:ring-ring focus:ring-2 focus:outline-none"
|
|
7610
|
-
),
|
|
7611
|
-
children: [
|
|
7612
|
-
renderSearch && /* @__PURE__ */ jsxRuntime.jsx("option", { value: "auto", children: "Auto" }),
|
|
7613
|
-
Object.keys(ORDER_TYPE_META).map((t) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: t, children: ORDER_TYPE_META[t].label }, t))
|
|
7614
|
-
]
|
|
7615
|
-
}
|
|
7616
|
-
),
|
|
7617
|
-
renderSearch ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-64 flex-1", children: renderSearch({
|
|
7618
|
-
domains: type === "auto" ? void 0 : ORDER_TYPE_SEARCH_DOMAINS[type],
|
|
7619
|
-
placeholder: ORDER_TYPE_PLACEHOLDERS[type],
|
|
7620
|
-
onPick: handlePick,
|
|
7621
|
-
onFreeText: (text) => {
|
|
7622
|
-
const t = text.trim();
|
|
7623
|
-
if (!t) return;
|
|
7624
|
-
onSubmit({
|
|
7625
|
-
type: type === "auto" ? "procedure" : type,
|
|
7626
|
-
display: t
|
|
7627
|
-
});
|
|
7628
|
-
}
|
|
7629
|
-
}) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7630
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-48 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7631
|
-
chunkZ5S5JEJD_cjs.Input,
|
|
7632
|
-
{
|
|
7633
|
-
ref: inputRef,
|
|
7634
|
-
size: "sm",
|
|
7635
|
-
value: display,
|
|
7636
|
-
onChange: (e) => setDisplay(e.target.value),
|
|
7637
|
-
onKeyDown: (e) => {
|
|
7638
|
-
if (e.key === "Enter") submit();
|
|
7639
|
-
else if (e.key === "Escape") onCancel();
|
|
7640
|
-
},
|
|
7641
|
-
placeholder: "e.g. lisinopril 10 mg tablet \u2014 1 po daily",
|
|
7642
|
-
"aria-label": "Order description"
|
|
7643
|
-
}
|
|
7644
|
-
) }),
|
|
7645
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7646
|
-
chunkANMX7YDL_cjs.Button,
|
|
7647
|
-
{
|
|
7648
|
-
variant: "outline",
|
|
7649
|
-
size: "sm",
|
|
7650
|
-
onClick: submit,
|
|
7651
|
-
disabled: !display.trim(),
|
|
7652
|
-
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.Plus, { size: 12 }),
|
|
7653
|
-
className: "h-8",
|
|
7654
|
-
children: "Add"
|
|
7655
|
-
}
|
|
7656
|
-
)
|
|
7657
|
-
] }),
|
|
7658
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7659
|
-
chunkANMX7YDL_cjs.Button,
|
|
7660
|
-
{
|
|
7661
|
-
variant: "ghost",
|
|
7662
|
-
size: "sm",
|
|
7663
|
-
onClick: onCancel,
|
|
7664
|
-
className: renderSearch ? "h-10" : "h-8",
|
|
7665
|
-
children: "Done"
|
|
7666
|
-
}
|
|
7667
|
-
)
|
|
7668
|
-
]
|
|
7669
|
-
}
|
|
7670
|
-
);
|
|
7671
|
-
}
|
|
7672
|
-
var Assessment = React13__namespace.forwardRef(
|
|
7673
|
-
({
|
|
7674
|
-
concerns,
|
|
7675
|
-
items,
|
|
7676
|
-
orders = [],
|
|
7677
|
-
title = "Assessment & plan",
|
|
7678
|
-
showPlan = true,
|
|
7679
|
-
onShowPlanChange,
|
|
7680
|
-
onAction,
|
|
7681
|
-
rowActions = [
|
|
7682
|
-
...Object.keys(ACTION_META2),
|
|
7683
|
-
"remove",
|
|
7684
|
-
"move"
|
|
7685
|
-
],
|
|
7686
|
-
orderActions = ["edit", "remove", "move"],
|
|
7687
|
-
addModes,
|
|
7688
|
-
onRemoveAssessment,
|
|
7689
|
-
onAddOrder,
|
|
7690
|
-
onAddAssessment,
|
|
7691
|
-
onLinkOrder,
|
|
7692
|
-
onEditOrderStart,
|
|
7693
|
-
onEditOrder,
|
|
7694
|
-
onRemoveOrder,
|
|
7695
|
-
onReorderItems,
|
|
7696
|
-
onReorderOrders,
|
|
7697
|
-
renderOrderSearch,
|
|
7698
|
-
readOnly = false,
|
|
7699
|
-
defaultAddMode = "auto",
|
|
7700
|
-
billableOnly = false,
|
|
7701
|
-
className,
|
|
7702
|
-
"data-testid": dataTestId,
|
|
7703
|
-
...props
|
|
7704
|
-
}, ref) => {
|
|
7705
|
-
const instanceId = React13__namespace.useId();
|
|
7706
|
-
const [addingFor, setAddingFor] = React13__namespace.useState(null);
|
|
7707
|
-
const requestedAddModes = addModes ?? [
|
|
7708
|
-
"auto",
|
|
7709
|
-
"problem",
|
|
7710
|
-
"order"
|
|
7711
|
-
];
|
|
7712
|
-
const availableAddModes = requestedAddModes.filter((mode) => {
|
|
7713
|
-
if (mode === "problem") return Boolean(onAddAssessment);
|
|
7714
|
-
if (mode === "order") return Boolean(onAddOrder);
|
|
7715
|
-
return Boolean(onAddAssessment && onAddOrder);
|
|
7716
|
-
});
|
|
7717
|
-
const initialAddMode = availableAddModes.includes(defaultAddMode) ? defaultAddMode : availableAddModes[0] ?? defaultAddMode;
|
|
7718
|
-
const [selectedAddMode, setSelectedAddMode] = React13__namespace.useState(initialAddMode);
|
|
7719
|
-
const addMode = availableAddModes.includes(selectedAddMode) ? selectedAddMode : availableAddModes[0] ?? defaultAddMode;
|
|
7720
|
-
const [pendingFreeText, setPendingFreeText] = React13__namespace.useState(
|
|
7721
|
-
null
|
|
7722
|
-
);
|
|
7723
|
-
React13__namespace.useEffect(() => {
|
|
7724
|
-
if (addMode !== "auto") setPendingFreeText(null);
|
|
7725
|
-
}, [addMode]);
|
|
7726
|
-
const [announcement, setAnnouncement] = chunkCPDNX3LS_cjs.useLiveAnnouncement();
|
|
7727
|
-
const ambientCodeLookup = chunkZIJMLRI3_cjs.useCodeLookupConfig();
|
|
7728
|
-
const effectiveRenderOrderSearch = renderOrderSearch === false ? void 0 : renderOrderSearch ?? (ambientCodeLookup ? contextOrderSearch(ambientCodeLookup) : void 0);
|
|
7729
|
-
const concernById = React13__namespace.useMemo(
|
|
7730
|
-
() => new Map(concerns.map((c) => [c.concernId, c])),
|
|
7731
|
-
[concerns]
|
|
7732
|
-
);
|
|
7733
|
-
const assertionOf = (item) => concernById.get(item.concernId)?.assertions.find((a) => a.id === item.assertionId);
|
|
7734
|
-
const unlinkedOrders = orders.filter(
|
|
7735
|
-
(o) => !o.concernId || !items.some((i) => i.concernId === o.concernId)
|
|
7736
|
-
);
|
|
7737
|
-
const toolbarActions = rowActions.filter(
|
|
7738
|
-
(action) => action in ACTION_META2 && (action === "add-order" ? Boolean(onAddOrder || onAction) : Boolean(onAction))
|
|
7739
|
-
);
|
|
7740
|
-
const showConcernToolbar = toolbarActions.length > 0 || rowActions.includes("remove") && Boolean(onRemoveAssessment);
|
|
7741
|
-
const drag = chunkGF2BE4FB_cjs.useDragReorder({
|
|
7742
|
-
ids: items.map((i) => i.concernId),
|
|
7743
|
-
onReorder: readOnly || !rowActions.includes("move") || !onReorderItems ? void 0 : (ids) => {
|
|
7744
|
-
setAnnouncement("Assessment concerns reordered");
|
|
7745
|
-
onReorderItems(ids);
|
|
7746
|
-
}
|
|
7747
|
-
});
|
|
7748
|
-
const problemLabel = React13__namespace.useCallback(
|
|
7749
|
-
(concernId) => concernById.get(concernId)?.assertions.find(
|
|
7750
|
-
(a) => items.some(
|
|
7751
|
-
(i) => i.concernId === concernId && i.assertionId === a.id
|
|
7752
|
-
)
|
|
7753
|
-
)?.text ?? concernId,
|
|
7754
|
-
[concernById, items]
|
|
7755
|
-
);
|
|
7756
|
-
const orderControls = readOnly ? void 0 : {
|
|
7757
|
-
moveWithin: orderActions.includes("move") && onReorderOrders ? (order, dir) => {
|
|
7758
|
-
const planIds = orders.filter((o) => o.concernId === order.concernId).map((o) => o.orderId);
|
|
7759
|
-
const i = planIds.indexOf(order.orderId);
|
|
7760
|
-
const target = planIds[i + dir];
|
|
7761
|
-
if (!target) return;
|
|
7762
|
-
onReorderOrders(
|
|
7763
|
-
chunkGF2BE4FB_cjs.reorderIds(
|
|
7764
|
-
orders.map((o) => o.orderId),
|
|
7765
|
-
order.orderId,
|
|
7766
|
-
target,
|
|
7767
|
-
dir === 1
|
|
7768
|
-
)
|
|
7769
|
-
);
|
|
7770
|
-
setAnnouncement(
|
|
7771
|
-
`${order.display} moved ${dir === -1 ? "up" : "down"}`
|
|
7772
|
-
);
|
|
7773
|
-
} : void 0,
|
|
7774
|
-
moveToProblem: orderActions.includes("move") && onLinkOrder ? (order, concernId) => {
|
|
7775
|
-
onLinkOrder(order, concernId);
|
|
7776
|
-
setAnnouncement(
|
|
7777
|
-
`${order.display} moved to ${problemLabel(concernId)}`
|
|
7778
|
-
);
|
|
7779
|
-
} : void 0,
|
|
7780
|
-
edit: orderActions.includes("edit") && onEditOrder ? (order, changes) => {
|
|
7781
|
-
onEditOrder(order, changes);
|
|
7782
|
-
setAnnouncement(`${changes.display} updated`);
|
|
7783
|
-
} : void 0,
|
|
7784
|
-
editStart: orderActions.includes("edit") ? onEditOrderStart : void 0,
|
|
7785
|
-
remove: orderActions.includes("remove") && onRemoveOrder ? (order) => {
|
|
7786
|
-
onRemoveOrder(order);
|
|
7787
|
-
setAnnouncement(`${order.display} removed`);
|
|
7788
|
-
} : void 0,
|
|
7789
|
-
adjacentProblem: (order, dir) => {
|
|
7790
|
-
const i = items.findIndex((it) => it.concernId === order.concernId);
|
|
7791
|
-
const adj = items[i + dir];
|
|
7792
|
-
return adj ? { concernId: adj.concernId, label: problemLabel(adj.concernId) } : null;
|
|
7793
|
-
},
|
|
7794
|
-
targets: items.map((it) => ({
|
|
7795
|
-
concernId: it.concernId,
|
|
7796
|
-
label: problemLabel(it.concernId)
|
|
7797
|
-
}))
|
|
7798
|
-
};
|
|
7799
|
-
const orderDragEnabled = !readOnly && orderActions.includes("move") && Boolean(onReorderOrders || onLinkOrder);
|
|
7800
|
-
const [draggingOrderId, setDraggingOrderId] = React13__namespace.useState(
|
|
7801
|
-
null
|
|
7802
|
-
);
|
|
7803
|
-
const draggingOrderRef = React13__namespace.useRef(null);
|
|
7804
|
-
const [orderOver, setOrderOver] = React13__namespace.useState(null);
|
|
7805
|
-
const resetOrderDrag = () => {
|
|
7806
|
-
draggingOrderRef.current = null;
|
|
7807
|
-
setDraggingOrderId(null);
|
|
7808
|
-
setOrderOver(null);
|
|
7809
|
-
};
|
|
7810
|
-
const dropOnOrder = (dragged, target, after) => {
|
|
7811
|
-
if (dragged.concernId !== target.concernId && target.concernId) {
|
|
7812
|
-
onLinkOrder?.(dragged, target.concernId);
|
|
7813
|
-
setAnnouncement(
|
|
7814
|
-
`${dragged.display} moved to ${problemLabel(target.concernId)}`
|
|
7815
|
-
);
|
|
7816
|
-
} else {
|
|
7817
|
-
setAnnouncement(`${dragged.display} reordered`);
|
|
7818
|
-
}
|
|
7819
|
-
onReorderOrders?.(
|
|
7820
|
-
chunkGF2BE4FB_cjs.reorderIds(
|
|
7821
|
-
orders.map((o) => o.orderId),
|
|
7822
|
-
dragged.orderId,
|
|
7823
|
-
target.orderId,
|
|
7824
|
-
after
|
|
7825
|
-
)
|
|
7826
|
-
);
|
|
7827
|
-
};
|
|
7828
|
-
const orderDrag = {
|
|
7829
|
-
enabled: orderDragEnabled,
|
|
7830
|
-
draggingId: draggingOrderId,
|
|
7831
|
-
over: orderOver,
|
|
7832
|
-
rowProps: (order) => orderDragEnabled ? {
|
|
7833
|
-
draggable: true,
|
|
7834
|
-
onDragStart: (e) => {
|
|
7835
|
-
e.stopPropagation();
|
|
7836
|
-
e.dataTransfer.effectAllowed = "move";
|
|
7837
|
-
e.dataTransfer.setData("text/plain", order.orderId);
|
|
7838
|
-
draggingOrderRef.current = order.orderId;
|
|
7839
|
-
setDraggingOrderId(order.orderId);
|
|
7840
|
-
},
|
|
7841
|
-
onDragEnd: (e) => {
|
|
7842
|
-
e.stopPropagation();
|
|
7843
|
-
resetOrderDrag();
|
|
7844
|
-
},
|
|
7845
|
-
onDragOver: (e) => {
|
|
7846
|
-
const dragged = draggingOrderRef.current;
|
|
7847
|
-
if (!dragged || dragged === order.orderId) return;
|
|
7848
|
-
e.preventDefault();
|
|
7849
|
-
e.stopPropagation();
|
|
7850
|
-
e.dataTransfer.dropEffect = "move";
|
|
7851
|
-
const r = e.currentTarget.getBoundingClientRect();
|
|
7852
|
-
const after = e.clientY > r.top + r.height / 2;
|
|
7853
|
-
setOrderOver({ type: "order", id: order.orderId, after });
|
|
7854
|
-
},
|
|
7855
|
-
onDrop: (e) => {
|
|
7856
|
-
const draggedId = draggingOrderRef.current ?? e.dataTransfer.getData("text/plain");
|
|
7857
|
-
const dragged = orders.find((o) => o.orderId === draggedId);
|
|
7858
|
-
if (!dragged || dragged.orderId === order.orderId) return;
|
|
7859
|
-
e.preventDefault();
|
|
7860
|
-
e.stopPropagation();
|
|
7861
|
-
const r = e.currentTarget.getBoundingClientRect();
|
|
7862
|
-
const after = e.clientY > r.top + r.height / 2;
|
|
7863
|
-
dropOnOrder(dragged, order, after);
|
|
7864
|
-
resetOrderDrag();
|
|
7865
|
-
}
|
|
7866
|
-
} : {}
|
|
7867
|
-
};
|
|
7868
|
-
const blockProps = (concernId) => {
|
|
7869
|
-
const itemProps = drag.rowProps(concernId);
|
|
7870
|
-
if (!orderDragEnabled) return itemProps;
|
|
7871
|
-
return {
|
|
7872
|
-
...itemProps,
|
|
7873
|
-
onDragOver: (e) => {
|
|
7874
|
-
const draggingOrder = draggingOrderRef.current;
|
|
7875
|
-
if (draggingOrder) {
|
|
7876
|
-
const dragged = orders.find((o) => o.orderId === draggingOrder);
|
|
7877
|
-
if (dragged?.concernId === concernId) return;
|
|
7878
|
-
e.preventDefault();
|
|
7879
|
-
e.dataTransfer.dropEffect = "move";
|
|
7880
|
-
setOrderOver({ type: "concern", concernId });
|
|
7881
|
-
return;
|
|
7882
|
-
}
|
|
7883
|
-
itemProps.onDragOver?.(e);
|
|
7884
|
-
},
|
|
7885
|
-
onDragLeave: (e) => {
|
|
7886
|
-
if (draggingOrderRef.current) {
|
|
7887
|
-
setOrderOver(
|
|
7888
|
-
(prev) => prev?.type === "concern" && prev.concernId === concernId ? null : prev
|
|
7889
|
-
);
|
|
7890
|
-
return;
|
|
7891
|
-
}
|
|
7892
|
-
itemProps.onDragLeave?.(e);
|
|
7893
|
-
},
|
|
7894
|
-
onDrop: (e) => {
|
|
7895
|
-
const payload = draggingOrderRef.current ?? e.dataTransfer.getData("text/plain");
|
|
7896
|
-
const dragged = orders.find((o) => o.orderId === payload);
|
|
7897
|
-
if (dragged) {
|
|
7898
|
-
e.preventDefault();
|
|
7899
|
-
if (dragged.concernId !== concernId) {
|
|
7900
|
-
onLinkOrder?.(dragged, concernId);
|
|
7901
|
-
setAnnouncement(
|
|
7902
|
-
`${dragged.display} moved to ${problemLabel(concernId)}`
|
|
7903
|
-
);
|
|
7904
|
-
}
|
|
7905
|
-
resetOrderDrag();
|
|
7906
|
-
return;
|
|
7907
|
-
}
|
|
7908
|
-
itemProps.onDrop?.(e);
|
|
7909
|
-
}
|
|
7910
|
-
};
|
|
7911
|
-
};
|
|
7912
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7913
|
-
chunkMJWFNV3L_cjs.Card,
|
|
7914
|
-
{
|
|
7915
|
-
ref,
|
|
7916
|
-
padding: "none",
|
|
7917
|
-
className: chunkS5RVSXDV_cjs.cn("w-full", className),
|
|
7918
|
-
"data-testid": dataTestId,
|
|
7919
|
-
...props,
|
|
7920
|
-
children: [
|
|
7921
|
-
title !== null && /* @__PURE__ */ jsxRuntime.jsxs(chunkMJWFNV3L_cjs.CardHeader, { className: "border-border bg-muted/50 flex flex-row items-center justify-between border-b px-4 py-3", children: [
|
|
7922
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-foreground text-sm font-semibold tracking-wide uppercase", children: title }),
|
|
7923
|
-
onShowPlanChange && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7924
|
-
chunk7AECNMYV_cjs.Checkbox,
|
|
7925
|
-
{
|
|
7926
|
-
size: "sm",
|
|
7927
|
-
checked: showPlan,
|
|
7928
|
-
onChange: (e) => onShowPlanChange(e.target.checked),
|
|
7929
|
-
label: "Show plan"
|
|
7930
|
-
}
|
|
7931
|
-
)
|
|
7932
|
-
] }),
|
|
7933
|
-
/* @__PURE__ */ jsxRuntime.jsxs(chunkMJWFNV3L_cjs.CardContent, { className: "space-y-4 px-4 py-4", children: [
|
|
7934
|
-
items.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: "No problems assessed this visit." }),
|
|
7935
|
-
/* @__PURE__ */ jsxRuntime.jsx("ol", { className: "space-y-3", children: items.map((item, index) => {
|
|
7936
|
-
const assertion = assertionOf(item);
|
|
7937
|
-
if (!assertion) return null;
|
|
7938
|
-
const linkedOrders = orders.filter(
|
|
7939
|
-
(o) => o.concernId === item.concernId
|
|
7940
|
-
);
|
|
7941
|
-
const bp = blockProps(item.concernId);
|
|
7942
|
-
const formOpen = addingFor === item.concernId;
|
|
7943
|
-
const addOrderFormId = `${instanceId}-add-order-${item.concernId}`;
|
|
7944
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7945
|
-
"li",
|
|
7946
|
-
{
|
|
7947
|
-
"data-slot": "assessment-problem",
|
|
7948
|
-
"data-concern-id": item.concernId,
|
|
7949
|
-
...bp,
|
|
7950
|
-
draggable: drag.enabled && !formOpen,
|
|
7951
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
7952
|
-
"group border-border/60 relative rounded-md border px-3 py-2",
|
|
7953
|
-
drag.enabled && !formOpen && "cursor-grab active:cursor-grabbing",
|
|
7954
|
-
chunkGF2BE4FB_cjs.dragIndicatorClasses(drag, item.concernId),
|
|
7955
|
-
orderOver?.type === "concern" && orderOver.concernId === item.concernId && "ring-primary-400 bg-primary-50/50 dark:bg-primary-950/50 ring-2"
|
|
7956
|
-
),
|
|
7957
|
-
children: [
|
|
7958
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7959
|
-
"div",
|
|
7960
|
-
{
|
|
7961
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
7962
|
-
"flex flex-wrap items-center gap-x-2 gap-y-1",
|
|
7963
|
-
drag.enabled && formOpen && "cursor-grab active:cursor-grabbing"
|
|
7964
|
-
),
|
|
7965
|
-
draggable: drag.enabled && formOpen,
|
|
7966
|
-
onDragStart: formOpen ? bp.onDragStart : void 0,
|
|
7967
|
-
onDragEnd: formOpen ? bp.onDragEnd : void 0,
|
|
7968
|
-
children: [
|
|
7969
|
-
drag.enabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7970
|
-
chunkL7L5S2HO_cjs.GripVertical,
|
|
7971
|
-
{
|
|
7972
|
-
size: 14,
|
|
7973
|
-
"aria-hidden": true,
|
|
7974
|
-
className: "text-muted-foreground/50 shrink-0"
|
|
7975
|
-
}
|
|
7976
|
-
),
|
|
7977
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground text-sm font-semibold tabular-nums", children: [
|
|
7978
|
-
index + 1,
|
|
7979
|
-
"."
|
|
7980
|
-
] }),
|
|
7981
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground font-medium", children: assertion.text }),
|
|
7982
|
-
assertion.verificationStatus !== "confirmed" && /* @__PURE__ */ jsxRuntime.jsx(chunk7E46YDOT_cjs.Badge, { variant: "warning", size: "sm", children: assertion.verificationStatus }),
|
|
7983
|
-
/* @__PURE__ */ jsxRuntime.jsx(CodingChips, { coding: assertion.coding }),
|
|
7984
|
-
!readOnly && showConcernToolbar && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7985
|
-
chunkZIJMLRI3_cjs.RowActionToolbar,
|
|
7986
|
-
{
|
|
7987
|
-
label: `Actions for ${assertion.text}`,
|
|
7988
|
-
align: "top",
|
|
7989
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
7990
|
-
"pointer-fine:group-has-[[data-order-id]:hover]:pointer-events-none",
|
|
7991
|
-
"pointer-fine:group-has-[[data-order-id]:hover]:opacity-0",
|
|
7992
|
-
"pointer-fine:group-has-[[data-order-id]:focus-within]:pointer-events-none",
|
|
7993
|
-
"pointer-fine:group-has-[[data-order-id]:focus-within]:opacity-0"
|
|
7994
|
-
),
|
|
7995
|
-
children: [
|
|
7996
|
-
toolbarActions.map((action) => {
|
|
7997
|
-
const meta = ACTION_META2[action];
|
|
7998
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7999
|
-
chunkZIJMLRI3_cjs.RowIconButton,
|
|
8000
|
-
{
|
|
8001
|
-
label: meta.label,
|
|
8002
|
-
icon: meta.icon,
|
|
8003
|
-
size: "sm",
|
|
8004
|
-
expanded: action === "add-order" && onAddOrder ? addingFor === item.concernId : void 0,
|
|
8005
|
-
controls: action === "add-order" && onAddOrder ? addOrderFormId : void 0,
|
|
8006
|
-
onClick: () => {
|
|
8007
|
-
if (action === "add-order" && onAddOrder) {
|
|
8008
|
-
setAddingFor(
|
|
8009
|
-
(prev) => prev === item.concernId ? null : item.concernId
|
|
8010
|
-
);
|
|
8011
|
-
} else {
|
|
8012
|
-
onAction?.(item, action);
|
|
8013
|
-
}
|
|
8014
|
-
}
|
|
8015
|
-
},
|
|
8016
|
-
action
|
|
8017
|
-
);
|
|
8018
|
-
}),
|
|
8019
|
-
rowActions.includes("remove") && onRemoveAssessment && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8020
|
-
chunkZIJMLRI3_cjs.RowIconButton,
|
|
8021
|
-
{
|
|
8022
|
-
label: `Remove ${assertion.text} from assessment`,
|
|
8023
|
-
icon: chunkL7L5S2HO_cjs.Trash2,
|
|
8024
|
-
size: "sm",
|
|
8025
|
-
onClick: () => {
|
|
8026
|
-
onRemoveAssessment(item);
|
|
8027
|
-
setAnnouncement(
|
|
8028
|
-
`${assertion.text} removed from assessment`
|
|
8029
|
-
);
|
|
8030
|
-
}
|
|
8031
|
-
}
|
|
8032
|
-
)
|
|
8033
|
-
]
|
|
8034
|
-
}
|
|
8035
|
-
)
|
|
8036
|
-
]
|
|
8037
|
-
}
|
|
8038
|
-
),
|
|
8039
|
-
item.note && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-1 ps-6 text-sm", children: item.note }),
|
|
8040
|
-
showPlan && linkedOrders.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8041
|
-
"ul",
|
|
8042
|
-
{
|
|
8043
|
-
"aria-label": `Plan for ${assertion.text}`,
|
|
8044
|
-
className: "border-border ms-2.5 mt-1.5 border-s ps-4",
|
|
8045
|
-
children: linkedOrders.map((order) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8046
|
-
OrderRow,
|
|
8047
|
-
{
|
|
8048
|
-
order,
|
|
8049
|
-
drag: orderDrag,
|
|
8050
|
-
controls: orderControls
|
|
8051
|
-
},
|
|
8052
|
-
order.orderId
|
|
8053
|
-
))
|
|
8054
|
-
}
|
|
8055
|
-
),
|
|
8056
|
-
!readOnly && onAddOrder && addingFor === item.concernId && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8057
|
-
AddOrderForm,
|
|
8058
|
-
{
|
|
8059
|
-
id: addOrderFormId,
|
|
8060
|
-
problemText: assertion.text,
|
|
8061
|
-
onSubmit: (order) => {
|
|
8062
|
-
onAddOrder(item, order);
|
|
8063
|
-
setAnnouncement(
|
|
8064
|
-
`${order.display} added to ${assertion.text}`
|
|
8065
|
-
);
|
|
8066
|
-
setAddingFor(null);
|
|
8067
|
-
},
|
|
8068
|
-
onCancel: () => setAddingFor(null),
|
|
8069
|
-
renderSearch: effectiveRenderOrderSearch
|
|
8070
|
-
}
|
|
8071
|
-
)
|
|
8072
|
-
]
|
|
8073
|
-
},
|
|
8074
|
-
item.concernId
|
|
8075
|
-
);
|
|
8076
|
-
}) }),
|
|
8077
|
-
!readOnly && availableAddModes.length > 0 && effectiveRenderOrderSearch && (onAddAssessment || onAddOrder) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8078
|
-
"div",
|
|
8079
|
-
{
|
|
8080
|
-
role: "form",
|
|
8081
|
-
"aria-label": "Add concern or order",
|
|
8082
|
-
className: "border-border bg-muted/40 flex flex-wrap items-center gap-2 rounded-md border border-dashed p-2",
|
|
8083
|
-
children: [
|
|
8084
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8085
|
-
"select",
|
|
8086
|
-
{
|
|
8087
|
-
"aria-label": "What to add",
|
|
8088
|
-
"data-slot": "select-trigger",
|
|
8089
|
-
value: addMode,
|
|
8090
|
-
onChange: (e) => {
|
|
8091
|
-
setSelectedAddMode(e.target.value);
|
|
8092
|
-
setPendingFreeText(null);
|
|
8093
|
-
},
|
|
8094
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
8095
|
-
"border-border bg-background text-foreground h-10 rounded-md border px-1.5 text-sm",
|
|
8096
|
-
"focus:ring-ring focus:ring-2 focus:outline-none"
|
|
8097
|
-
),
|
|
8098
|
-
children: [
|
|
8099
|
-
availableAddModes.includes("auto") && /* @__PURE__ */ jsxRuntime.jsx("option", { value: "auto", children: "Add (auto)" }),
|
|
8100
|
-
availableAddModes.includes("problem") && onAddAssessment && /* @__PURE__ */ jsxRuntime.jsx("option", { value: "problem", children: "Add concern" }),
|
|
8101
|
-
availableAddModes.includes("order") && onAddOrder && /* @__PURE__ */ jsxRuntime.jsx("option", { value: "order", children: "Add order" })
|
|
8102
|
-
]
|
|
8103
|
-
}
|
|
8104
|
-
),
|
|
8105
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-64 flex-1", children: effectiveRenderOrderSearch({
|
|
8106
|
-
domains: addMode === "problem" ? ["condition", "occupational"] : addMode === "order" ? ["med", "lab", "procedure", "vaccine"] : void 0,
|
|
8107
|
-
// auto: everything — the pick decides
|
|
8108
|
-
// auto: concerns rank ahead of orders — surveillance
|
|
8109
|
-
// programs first (rare, high-value hits like "dot" or
|
|
8110
|
-
// "hearing"), then diagnoses, then meds/labs/procedures.
|
|
8111
|
-
// concern mode: programs still lead the diagnoses.
|
|
8112
|
-
preferDomains: addMode === "auto" ? ["occupational", "condition"] : addMode === "problem" ? ["occupational"] : void 0,
|
|
8113
|
-
// assessments code in ICD-10: boost it over SNOMED
|
|
8114
|
-
preferCodetypes: addMode !== "order" ? ["ICD10"] : void 0,
|
|
8115
|
-
billableOnly: addMode !== "order" && billableOnly,
|
|
8116
|
-
placeholder: addMode === "problem" ? 'Search diagnoses & programs\u2026 (try "chf" or "hearing conservation")' : addMode === "order" ? "Search medications, labs, imaging, procedures\u2026" : "Add concern or order\u2026 (a diagnosis or surveillance program becomes a concern; meds, labs & imaging become orders)",
|
|
8117
|
-
onPick: (pick) => {
|
|
8118
|
-
const asProblem = addMode === "problem" || addMode === "auto" && isConditionCodetype(pick.codetype) && Boolean(onAddAssessment);
|
|
8119
|
-
if (asProblem) {
|
|
8120
|
-
onAddAssessment?.({
|
|
8121
|
-
label: pick.label,
|
|
8122
|
-
code: {
|
|
8123
|
-
fullid: pick.fullid,
|
|
8124
|
-
codetype: pick.codetype,
|
|
8125
|
-
fullcode: pick.fullcode
|
|
8126
|
-
}
|
|
8127
|
-
});
|
|
8128
|
-
} else {
|
|
8129
|
-
onAddOrder?.(null, {
|
|
8130
|
-
type: orderTypeForCodetype(pick.codetype),
|
|
8131
|
-
display: pick.label,
|
|
8132
|
-
code: {
|
|
8133
|
-
fullid: pick.fullid,
|
|
8134
|
-
codetype: pick.codetype,
|
|
8135
|
-
fullcode: pick.fullcode
|
|
8136
|
-
}
|
|
8137
|
-
});
|
|
8138
|
-
}
|
|
8139
|
-
},
|
|
8140
|
-
onFreeText: (text) => {
|
|
8141
|
-
if (addMode === "problem") {
|
|
8142
|
-
onAddAssessment?.({ label: text });
|
|
8143
|
-
} else if (addMode === "order") {
|
|
8144
|
-
onAddOrder?.(null, {
|
|
8145
|
-
type: "procedure",
|
|
8146
|
-
display: text
|
|
8147
|
-
});
|
|
8148
|
-
} else {
|
|
8149
|
-
setPendingFreeText(text);
|
|
8150
|
-
}
|
|
8151
|
-
}
|
|
8152
|
-
}) }),
|
|
8153
|
-
addMode === "auto" && pendingFreeText !== null && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8154
|
-
"div",
|
|
8155
|
-
{
|
|
8156
|
-
role: "group",
|
|
8157
|
-
"aria-label": `Add "${pendingFreeText}" as`,
|
|
8158
|
-
className: "flex w-full flex-wrap items-center gap-1.5 ps-1",
|
|
8159
|
-
children: [
|
|
8160
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground text-sm", children: [
|
|
8161
|
-
"Add",
|
|
8162
|
-
" ",
|
|
8163
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-foreground font-medium", children: [
|
|
8164
|
-
"\u201C",
|
|
8165
|
-
pendingFreeText,
|
|
8166
|
-
"\u201D"
|
|
8167
|
-
] }),
|
|
8168
|
-
" ",
|
|
8169
|
-
"as:"
|
|
8170
|
-
] }),
|
|
8171
|
-
onAddAssessment && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8172
|
-
chunkANMX7YDL_cjs.Button,
|
|
8173
|
-
{
|
|
8174
|
-
variant: "outline",
|
|
8175
|
-
size: "sm",
|
|
8176
|
-
className: "h-7 text-xs",
|
|
8177
|
-
onClick: () => {
|
|
8178
|
-
onAddAssessment({ label: pendingFreeText });
|
|
8179
|
-
setPendingFreeText(null);
|
|
8180
|
-
},
|
|
8181
|
-
children: "Concern"
|
|
8182
|
-
}
|
|
8183
|
-
),
|
|
8184
|
-
onAddOrder && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8185
|
-
chunkANMX7YDL_cjs.Button,
|
|
8186
|
-
{
|
|
8187
|
-
variant: "outline",
|
|
8188
|
-
size: "sm",
|
|
8189
|
-
className: "h-7 text-xs",
|
|
8190
|
-
onClick: () => {
|
|
8191
|
-
onAddOrder(null, {
|
|
8192
|
-
type: "procedure",
|
|
8193
|
-
display: pendingFreeText
|
|
8194
|
-
});
|
|
8195
|
-
setPendingFreeText(null);
|
|
8196
|
-
},
|
|
8197
|
-
children: "Order"
|
|
8198
|
-
}
|
|
8199
|
-
),
|
|
8200
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8201
|
-
chunkANMX7YDL_cjs.Button,
|
|
8202
|
-
{
|
|
8203
|
-
variant: "ghost",
|
|
8204
|
-
size: "sm",
|
|
8205
|
-
className: "h-7 text-xs",
|
|
8206
|
-
onClick: () => setPendingFreeText(null),
|
|
8207
|
-
children: "Cancel"
|
|
8208
|
-
}
|
|
8209
|
-
)
|
|
8210
|
-
]
|
|
8211
|
-
}
|
|
8212
|
-
)
|
|
8213
|
-
]
|
|
8214
|
-
}
|
|
8215
|
-
),
|
|
8216
|
-
showPlan && unlinkedOrders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8217
|
-
"section",
|
|
8218
|
-
{
|
|
8219
|
-
"aria-label": "Orders not linked to a concern",
|
|
8220
|
-
className: "rounded-md border border-amber-300 bg-amber-50 px-3 py-2 dark:border-amber-700 dark:bg-amber-950",
|
|
8221
|
-
children: [
|
|
8222
|
-
/* @__PURE__ */ jsxRuntime.jsxs("h4", { className: "flex items-center gap-1.5 text-sm font-semibold text-amber-900 dark:text-amber-200", children: [
|
|
8223
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.AlertCircle, { size: 14 }),
|
|
8224
|
-
"Orders not linked to a concern"
|
|
8225
|
-
] }),
|
|
8226
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "mt-1", children: unlinkedOrders.map((order) => (
|
|
8227
|
-
// Same row component as linked orders: focusable, Alt+arrow
|
|
8228
|
-
// keyboard moves, and the Move menu (508 parity with drag)
|
|
8229
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8230
|
-
OrderRow,
|
|
8231
|
-
{
|
|
8232
|
-
order,
|
|
8233
|
-
drag: orderDrag,
|
|
8234
|
-
controls: orderControls
|
|
8235
|
-
},
|
|
8236
|
-
order.orderId
|
|
8237
|
-
)
|
|
8238
|
-
)) })
|
|
8239
|
-
]
|
|
8240
|
-
}
|
|
8241
|
-
)
|
|
8242
|
-
] }),
|
|
8243
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-live": "polite", className: "sr-only", children: announcement })
|
|
8244
|
-
]
|
|
8245
|
-
}
|
|
8246
|
-
);
|
|
8247
|
-
}
|
|
8248
|
-
);
|
|
8249
|
-
Assessment.displayName = "Assessment";
|
|
8250
6744
|
var DEFAULT_SOCIAL_PROVIDERS = [
|
|
8251
6745
|
{ id: "google", name: "Google", color: "#4285F4" },
|
|
8252
6746
|
{ id: "microsoft", name: "Microsoft", color: "#00A4EF" },
|
|
@@ -11560,7 +10054,7 @@ var CaseManagementHeader = React13__namespace.forwardRef(
|
|
|
11560
10054
|
(onAddCaseNote || onCloseCase || actions) && // Horizontal always: long labels truncate (Button's built-in
|
|
11561
10055
|
// ellipsis) instead of stacking or starving the identity block.
|
|
11562
10056
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11563
|
-
|
|
10057
|
+
chunkSV6YGK4U_cjs.ButtonGroup,
|
|
11564
10058
|
{
|
|
11565
10059
|
orientation: "horizontal",
|
|
11566
10060
|
className: "max-w-[60%] min-w-0 gap-2",
|
|
@@ -11631,645 +10125,6 @@ var CaseManagementHeader = React13__namespace.forwardRef(
|
|
|
11631
10125
|
}
|
|
11632
10126
|
);
|
|
11633
10127
|
CaseManagementHeader.displayName = "CaseManagementHeader";
|
|
11634
|
-
var MODE_META = {
|
|
11635
|
-
add: { title: "Add problem", changeType: void 0 },
|
|
11636
|
-
observe: { title: "Progress observation", changeType: void 0 },
|
|
11637
|
-
refine: { title: "Refine problem", changeType: "refinement" },
|
|
11638
|
-
revise: { title: "Revise problem", changeType: "revision" },
|
|
11639
|
-
relate: { title: "Relate problem", changeType: void 0 }
|
|
11640
|
-
};
|
|
11641
|
-
var CODING_SYSTEMS = ["SNOMED", "ICD-10-CM", "ICD-11"];
|
|
11642
|
-
var VERIFICATION_OPTIONS = [
|
|
11643
|
-
{ value: "unconfirmed", label: "Unconfirmed" },
|
|
11644
|
-
{ value: "provisional", label: "Provisional" },
|
|
11645
|
-
{ value: "differential", label: "Differential" },
|
|
11646
|
-
{ value: "confirmed", label: "Confirmed" }
|
|
11647
|
-
];
|
|
11648
|
-
var RELATIONSHIP_OPTIONS = [
|
|
11649
|
-
{ value: "caused-by", label: "Caused by" },
|
|
11650
|
-
{ value: "evolved-from", label: "Evolved from" },
|
|
11651
|
-
{ value: "differential-sibling", label: "Differential sibling" },
|
|
11652
|
-
{ value: "complication-of", label: "Complication of" }
|
|
11653
|
-
];
|
|
11654
|
-
var SEVERITIES = ["mild", "moderate", "severe"];
|
|
11655
|
-
var CONFIDENCES = ["low", "medium", "high"];
|
|
11656
|
-
function normalizeConditionCodingSystem(codetype) {
|
|
11657
|
-
const ct = codetype.toUpperCase().replace(/[^A-Z0-9]/g, "");
|
|
11658
|
-
if (ct === "ICD10" || ct === "ICD10CM") return "ICD-10-CM";
|
|
11659
|
-
if (ct === "ICD11") return "ICD-11";
|
|
11660
|
-
if (ct === "SNOMED" || ct === "SNOMEDCT" || ct === "SNOMEDUS") {
|
|
11661
|
-
return "SNOMED";
|
|
11662
|
-
}
|
|
11663
|
-
return codetype;
|
|
11664
|
-
}
|
|
11665
|
-
function withSinglePrimary(coding) {
|
|
11666
|
-
if (coding.length === 0) return coding;
|
|
11667
|
-
const primaryIndex = coding.findIndex((entry) => entry.primary);
|
|
11668
|
-
const selectedIndex = primaryIndex >= 0 ? primaryIndex : 0;
|
|
11669
|
-
return coding.map((entry, index) => ({
|
|
11670
|
-
...entry,
|
|
11671
|
-
primary: index === selectedIndex
|
|
11672
|
-
}));
|
|
11673
|
-
}
|
|
11674
|
-
function contextConditionCodeSearch(ctx) {
|
|
11675
|
-
const ContextConditionCodeSearch = ({
|
|
11676
|
-
placeholder,
|
|
11677
|
-
onPick,
|
|
11678
|
-
onFreeText
|
|
11679
|
-
}) => {
|
|
11680
|
-
const Lookup = ctx.component;
|
|
11681
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11682
|
-
Lookup,
|
|
11683
|
-
{
|
|
11684
|
-
indexUrl: ctx.indexUrl,
|
|
11685
|
-
locale: ctx.locale,
|
|
11686
|
-
domains: ["condition"],
|
|
11687
|
-
preferCodetypes: ["ICD10"],
|
|
11688
|
-
bare: true,
|
|
11689
|
-
clearOnSelect: false,
|
|
11690
|
-
placeholder,
|
|
11691
|
-
onSelect: (result) => onPick({
|
|
11692
|
-
fullid: result.fullid,
|
|
11693
|
-
label: result.label,
|
|
11694
|
-
codetype: result.codetype,
|
|
11695
|
-
fullcode: result.fullcode
|
|
11696
|
-
}),
|
|
11697
|
-
onFreeText
|
|
11698
|
-
}
|
|
11699
|
-
);
|
|
11700
|
-
};
|
|
11701
|
-
return ContextConditionCodeSearch;
|
|
11702
|
-
}
|
|
11703
|
-
function FieldFlag({
|
|
11704
|
-
label,
|
|
11705
|
-
value,
|
|
11706
|
-
onChange,
|
|
11707
|
-
hasValue
|
|
11708
|
-
}) {
|
|
11709
|
-
const unknown = value?.known === false;
|
|
11710
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11711
|
-
"span",
|
|
11712
|
-
{
|
|
11713
|
-
role: "group",
|
|
11714
|
-
"aria-label": `Certainty for ${label}`,
|
|
11715
|
-
className: "flex items-center gap-1",
|
|
11716
|
-
children: [
|
|
11717
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11718
|
-
"button",
|
|
11719
|
-
{
|
|
11720
|
-
type: "button",
|
|
11721
|
-
"aria-pressed": unknown,
|
|
11722
|
-
onClick: () => onChange(
|
|
11723
|
-
unknown ? void 0 : { known: false, reason: "asked-unknown" }
|
|
11724
|
-
),
|
|
11725
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
11726
|
-
"rounded-full border px-2 py-0.5 text-[11px] font-medium transition-colors",
|
|
11727
|
-
unknown ? "border-warning/50 bg-warning/10 text-warning-800 dark:text-warning-200" : "border-border text-muted-foreground hover:text-foreground"
|
|
11728
|
-
),
|
|
11729
|
-
children: "Unknown"
|
|
11730
|
-
}
|
|
11731
|
-
),
|
|
11732
|
-
hasValue && !unknown && CONFIDENCES.map((c) => {
|
|
11733
|
-
const active = value?.known !== false && value?.confidence === c;
|
|
11734
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11735
|
-
"button",
|
|
11736
|
-
{
|
|
11737
|
-
type: "button",
|
|
11738
|
-
"aria-pressed": active,
|
|
11739
|
-
"aria-label": `${label} confidence ${c}`,
|
|
11740
|
-
onClick: () => onChange(active ? void 0 : { known: true, confidence: c }),
|
|
11741
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
11742
|
-
"rounded-full border px-1.5 py-0.5 text-[11px] transition-colors",
|
|
11743
|
-
active ? "border-primary-400 bg-primary-100 text-primary-900 dark:border-primary-600 dark:bg-primary-950 dark:text-primary-200" : "border-border text-muted-foreground hover:text-foreground"
|
|
11744
|
-
),
|
|
11745
|
-
children: c
|
|
11746
|
-
},
|
|
11747
|
-
c
|
|
11748
|
-
);
|
|
11749
|
-
})
|
|
11750
|
-
]
|
|
11751
|
-
}
|
|
11752
|
-
);
|
|
11753
|
-
}
|
|
11754
|
-
function ObservationHistory({ concern }) {
|
|
11755
|
-
const observations = concern?.observations;
|
|
11756
|
-
if (!observations?.length) return null;
|
|
11757
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": "Past observations", className: "space-y-1", children: [
|
|
11758
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-muted-foreground text-xs font-semibold tracking-wide uppercase", children: "Observations" }),
|
|
11759
|
-
/* @__PURE__ */ jsxRuntime.jsx("ol", { className: "border-border max-h-40 space-y-1.5 overflow-y-auto rounded-md border p-2", children: [...observations].reverse().map((o) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex flex-wrap gap-x-2 text-sm", children: [
|
|
11760
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-xs tabular-nums", children: o.date }),
|
|
11761
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground flex-1", children: o.text }),
|
|
11762
|
-
o.author && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground text-xs", children: [
|
|
11763
|
-
"\u2014 ",
|
|
11764
|
-
o.author
|
|
11765
|
-
] })
|
|
11766
|
-
] }, o.id)) })
|
|
11767
|
-
] });
|
|
11768
|
-
}
|
|
11769
|
-
function ConditionEditor({
|
|
11770
|
-
mode,
|
|
11771
|
-
open,
|
|
11772
|
-
onOpenChange,
|
|
11773
|
-
concern,
|
|
11774
|
-
relatableConcerns = [],
|
|
11775
|
-
onSave,
|
|
11776
|
-
onRelate,
|
|
11777
|
-
onAddObservation,
|
|
11778
|
-
renderCodeSearch,
|
|
11779
|
-
className,
|
|
11780
|
-
"data-testid": dataTestId
|
|
11781
|
-
}) {
|
|
11782
|
-
const prior = concern ? currentAssertion(concern) : void 0;
|
|
11783
|
-
const ambientCodeLookup = chunkZIJMLRI3_cjs.useCodeLookupConfig();
|
|
11784
|
-
const effectiveRenderCodeSearch = renderCodeSearch === false ? void 0 : renderCodeSearch ?? (ambientCodeLookup ? contextConditionCodeSearch(ambientCodeLookup) : void 0);
|
|
11785
|
-
const [text, setText] = React13__namespace.useState("");
|
|
11786
|
-
const [coding, setCoding] = React13__namespace.useState([]);
|
|
11787
|
-
const [verification, setVerification] = React13__namespace.useState("confirmed");
|
|
11788
|
-
const [severity, setSeverity] = React13__namespace.useState();
|
|
11789
|
-
const [onsetDate, setOnsetDate] = React13__namespace.useState("");
|
|
11790
|
-
const [onsetFuzzy, setOnsetFuzzy] = React13__namespace.useState("");
|
|
11791
|
-
const [note, setNote] = React13__namespace.useState("");
|
|
11792
|
-
const [progression, setProgression] = React13__namespace.useState(false);
|
|
11793
|
-
const [fields, setFields] = React13__namespace.useState({});
|
|
11794
|
-
const [relType, setRelType] = React13__namespace.useState("caused-by");
|
|
11795
|
-
const [relTarget, setRelTarget] = React13__namespace.useState("");
|
|
11796
|
-
const [observation, setObservation] = React13__namespace.useState("");
|
|
11797
|
-
React13__namespace.useEffect(() => {
|
|
11798
|
-
if (!open) return;
|
|
11799
|
-
setText(prior?.text ?? "");
|
|
11800
|
-
setCoding(withSinglePrimary(prior?.coding ?? []));
|
|
11801
|
-
setVerification(
|
|
11802
|
-
mode === "add" ? "unconfirmed" : prior?.verificationStatus ?? "confirmed"
|
|
11803
|
-
);
|
|
11804
|
-
setSeverity(prior?.severity);
|
|
11805
|
-
const priorOnsetDate = prior?.onset?.date;
|
|
11806
|
-
setOnsetDate(priorOnsetDate ? chunkCW75IKA6_cjs.dateToDisplayFormat(priorOnsetDate) : "");
|
|
11807
|
-
setOnsetFuzzy(priorOnsetDate ? "" : prior?.onset?.fuzzy ?? "");
|
|
11808
|
-
setNote("");
|
|
11809
|
-
setProgression(false);
|
|
11810
|
-
setFields(prior?.uncertainty?.fields ?? {});
|
|
11811
|
-
setRelType("caused-by");
|
|
11812
|
-
setRelTarget("");
|
|
11813
|
-
setObservation("");
|
|
11814
|
-
}, [open, mode, prior]);
|
|
11815
|
-
const setField = (field) => (f) => setFields((prev) => {
|
|
11816
|
-
const next = { ...prev };
|
|
11817
|
-
if (f) next[field] = f;
|
|
11818
|
-
else delete next[field];
|
|
11819
|
-
return next;
|
|
11820
|
-
});
|
|
11821
|
-
const updateCoding = (i, patch) => setCoding((prev) => prev.map((c, j) => j === i ? { ...c, ...patch } : c));
|
|
11822
|
-
const codingUnknown = fields.coding?.known === false;
|
|
11823
|
-
const hasInvalidOnsetDate = fields.onset?.known !== false && Boolean(onsetDate) && !chunkCW75IKA6_cjs.isValidDate(onsetDate);
|
|
11824
|
-
const handleCodePick = (pick) => {
|
|
11825
|
-
const system = normalizeConditionCodingSystem(pick.codetype);
|
|
11826
|
-
setCoding(
|
|
11827
|
-
(prev) => prev.some((c) => c.system === system && c.code === pick.fullcode) ? prev : withSinglePrimary([
|
|
11828
|
-
...prev,
|
|
11829
|
-
{ system, code: pick.fullcode, display: pick.label }
|
|
11830
|
-
])
|
|
11831
|
-
);
|
|
11832
|
-
setText((prev) => prev || pick.label);
|
|
11833
|
-
setFields((prev) => {
|
|
11834
|
-
if (prev.coding?.known !== false) return prev;
|
|
11835
|
-
const next = { ...prev };
|
|
11836
|
-
delete next.coding;
|
|
11837
|
-
return next;
|
|
11838
|
-
});
|
|
11839
|
-
};
|
|
11840
|
-
const handleSave = () => {
|
|
11841
|
-
if (mode === "relate") {
|
|
11842
|
-
if (!relTarget) return;
|
|
11843
|
-
onRelate?.({ type: relType, concernId: relTarget });
|
|
11844
|
-
onOpenChange(false);
|
|
11845
|
-
return;
|
|
11846
|
-
}
|
|
11847
|
-
if (mode === "observe") {
|
|
11848
|
-
if (!observation.trim()) return;
|
|
11849
|
-
onAddObservation?.(observation.trim());
|
|
11850
|
-
onOpenChange(false);
|
|
11851
|
-
return;
|
|
11852
|
-
}
|
|
11853
|
-
if (!text.trim() || hasInvalidOnsetDate) return;
|
|
11854
|
-
if (observation.trim()) onAddObservation?.(observation.trim());
|
|
11855
|
-
const uncertainty = Object.keys(fields).length > 0 ? { fields } : void 0;
|
|
11856
|
-
onSave?.({
|
|
11857
|
-
text: text.trim(),
|
|
11858
|
-
// write the trimmed values back — whitespace in codes breaks equality
|
|
11859
|
-
// checks downstream. A field marked explicitly unknown must not carry a
|
|
11860
|
-
// value (e.g. one seeded from the prior assertion): value + "unknown"
|
|
11861
|
-
// would be contradictory, so unknown wins and the value is dropped.
|
|
11862
|
-
coding: fields.coding?.known === false ? [] : withSinglePrimary(
|
|
11863
|
-
coding.filter((c) => c.code.trim()).map((c) => ({
|
|
11864
|
-
...c,
|
|
11865
|
-
code: c.code.trim(),
|
|
11866
|
-
display: c.display?.trim() || void 0,
|
|
11867
|
-
mappedFrom: c.mappedFrom?.trim() || void 0
|
|
11868
|
-
}))
|
|
11869
|
-
),
|
|
11870
|
-
verificationStatus: verification,
|
|
11871
|
-
changeType: mode === "refine" ? progression ? "progression" : "refinement" : MODE_META[mode].changeType,
|
|
11872
|
-
supersedes: prior?.id,
|
|
11873
|
-
severity: fields.severity?.known === false ? void 0 : severity,
|
|
11874
|
-
onset: fields.onset?.known === false ? void 0 : onsetDate || onsetFuzzy ? {
|
|
11875
|
-
date: onsetDate ? chunkCW75IKA6_cjs.displayFormatToDateString(onsetDate) : void 0,
|
|
11876
|
-
fuzzy: onsetFuzzy || void 0
|
|
11877
|
-
} : void 0,
|
|
11878
|
-
uncertainty,
|
|
11879
|
-
note: note.trim() || void 0
|
|
11880
|
-
});
|
|
11881
|
-
onOpenChange(false);
|
|
11882
|
-
};
|
|
11883
|
-
const saveDisabled = mode === "relate" ? !relTarget : mode === "observe" ? !observation.trim() : !text.trim() || hasInvalidOnsetDate;
|
|
11884
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11885
|
-
chunkLC3JL2HB_cjs.Modal,
|
|
11886
|
-
{
|
|
11887
|
-
open,
|
|
11888
|
-
onOpenChange,
|
|
11889
|
-
size: "2xl",
|
|
11890
|
-
className,
|
|
11891
|
-
children: [
|
|
11892
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkLC3JL2HB_cjs.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkLC3JL2HB_cjs.ModalTitle, { children: [
|
|
11893
|
-
MODE_META[mode].title,
|
|
11894
|
-
prior ? ` \u2014 ${prior.text}` : ""
|
|
11895
|
-
] }) }),
|
|
11896
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkLC3JL2HB_cjs.ModalBody, { "data-testid": dataTestId, className: "space-y-5", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
11897
|
-
mode === "revise" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11898
|
-
"div",
|
|
11899
|
-
{
|
|
11900
|
-
role: "alert",
|
|
11901
|
-
className: "border-warning/30 bg-warning/10 text-warning-800 dark:text-warning-200 flex items-start gap-2 rounded-md border px-3 py-2 text-sm",
|
|
11902
|
-
children: [
|
|
11903
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.AlertTriangle, { size: 16 }),
|
|
11904
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
11905
|
-
"Revising marks the prior assertion ",
|
|
11906
|
-
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "refuted" }),
|
|
11907
|
-
" (it was never true) \u2014 history is preserved on the timeline. Use",
|
|
11908
|
-
" ",
|
|
11909
|
-
/* @__PURE__ */ jsxRuntime.jsx("em", { children: "Refine" }),
|
|
11910
|
-
" instead if the prior was correct but less specific."
|
|
11911
|
-
] })
|
|
11912
|
-
]
|
|
11913
|
-
}
|
|
11914
|
-
),
|
|
11915
|
-
mode === "relate" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11916
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11917
|
-
chunkUPWIJC6I_cjs.Select,
|
|
11918
|
-
{
|
|
11919
|
-
label: "Relationship",
|
|
11920
|
-
options: RELATIONSHIP_OPTIONS,
|
|
11921
|
-
value: relType,
|
|
11922
|
-
onValueChange: (v) => setRelType(v)
|
|
11923
|
-
}
|
|
11924
|
-
),
|
|
11925
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11926
|
-
chunkUPWIJC6I_cjs.Select,
|
|
11927
|
-
{
|
|
11928
|
-
label: "Related problem",
|
|
11929
|
-
placeholder: "Select a problem\u2026",
|
|
11930
|
-
options: relatableConcerns.filter((c) => c.concernId !== concern?.concernId).map((c) => ({
|
|
11931
|
-
value: c.concernId,
|
|
11932
|
-
label: currentAssertion(c)?.text ?? c.concernId
|
|
11933
|
-
})),
|
|
11934
|
-
value: relTarget,
|
|
11935
|
-
onValueChange: setRelTarget
|
|
11936
|
-
}
|
|
11937
|
-
)
|
|
11938
|
-
] }) : mode === "observe" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11939
|
-
/* @__PURE__ */ jsxRuntime.jsx(ObservationHistory, { concern }),
|
|
11940
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11941
|
-
chunkAQUHEKXL_cjs.Textarea,
|
|
11942
|
-
{
|
|
11943
|
-
label: "New observation",
|
|
11944
|
-
value: observation,
|
|
11945
|
-
onChange: (e) => setObservation(e.target.value),
|
|
11946
|
-
placeholder: "e.g. BP improving on current regimen; patient reports better sleep",
|
|
11947
|
-
rows: 3,
|
|
11948
|
-
autoFocus: true
|
|
11949
|
-
}
|
|
11950
|
-
)
|
|
11951
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11952
|
-
(mode === "refine" || mode === "revise") && /* @__PURE__ */ jsxRuntime.jsx(ObservationHistory, { concern }),
|
|
11953
|
-
mode === "add" && effectiveRenderCodeSearch && !text.trim() ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
11954
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-foreground block text-sm font-medium", children: [
|
|
11955
|
-
"Problem name",
|
|
11956
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive ms-1", "aria-hidden": "true", children: "*" })
|
|
11957
|
-
] }),
|
|
11958
|
-
effectiveRenderCodeSearch({
|
|
11959
|
-
placeholder: "Search conditions \u2014 or type a name and press Enter\u2026",
|
|
11960
|
-
onPick: handleCodePick,
|
|
11961
|
-
onFreeText: (t) => setText(t.trim())
|
|
11962
|
-
}),
|
|
11963
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-xs", children: "Picking a code fills the name and coding together; free text is fine \u2014 codes can be added any time." })
|
|
11964
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
11965
|
-
chunkZ5S5JEJD_cjs.Input,
|
|
11966
|
-
{
|
|
11967
|
-
label: "Problem name",
|
|
11968
|
-
required: true,
|
|
11969
|
-
value: text,
|
|
11970
|
-
onChange: (e) => setText(e.target.value),
|
|
11971
|
-
placeholder: "e.g. Type 1 diabetes mellitus with neuropathy"
|
|
11972
|
-
}
|
|
11973
|
-
),
|
|
11974
|
-
mode === "refine" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11975
|
-
chunk7AECNMYV_cjs.Checkbox,
|
|
11976
|
-
{
|
|
11977
|
-
size: "sm",
|
|
11978
|
-
checked: progression,
|
|
11979
|
-
onChange: (e) => setProgression(e.target.checked),
|
|
11980
|
-
label: "Disease progressed (e.g. new complication) rather than a more specific diagnosis"
|
|
11981
|
-
}
|
|
11982
|
-
),
|
|
11983
|
-
/* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "space-y-3", children: [
|
|
11984
|
-
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "sr-only", children: "Coding" }),
|
|
11985
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
11986
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-wrap items-center gap-2 text-sm font-medium", children: [
|
|
11987
|
-
"Coding",
|
|
11988
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11989
|
-
FieldFlag,
|
|
11990
|
-
{
|
|
11991
|
-
label: "Coding",
|
|
11992
|
-
value: fields.coding,
|
|
11993
|
-
onChange: setField("coding"),
|
|
11994
|
-
hasValue: coding.length > 0
|
|
11995
|
-
}
|
|
11996
|
-
)
|
|
11997
|
-
] }),
|
|
11998
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11999
|
-
chunkANMX7YDL_cjs.Button,
|
|
12000
|
-
{
|
|
12001
|
-
variant: "ghost",
|
|
12002
|
-
size: "sm",
|
|
12003
|
-
disabled: codingUnknown,
|
|
12004
|
-
onClick: () => setCoding((prev) => [
|
|
12005
|
-
...prev,
|
|
12006
|
-
{
|
|
12007
|
-
system: "SNOMED",
|
|
12008
|
-
code: "",
|
|
12009
|
-
primary: prev.length === 0
|
|
12010
|
-
}
|
|
12011
|
-
]),
|
|
12012
|
-
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.Plus, { size: 12 }),
|
|
12013
|
-
className: "h-8 shrink-0 text-xs",
|
|
12014
|
-
children: "Add code"
|
|
12015
|
-
}
|
|
12016
|
-
)
|
|
12017
|
-
] }),
|
|
12018
|
-
effectiveRenderCodeSearch && !(mode === "add" && !text.trim()) && /* @__PURE__ */ jsxRuntime.jsx("div", { children: effectiveRenderCodeSearch({
|
|
12019
|
-
placeholder: "Search codes \u2014 ICD-10-CM / SNOMED\u2026",
|
|
12020
|
-
onPick: handleCodePick,
|
|
12021
|
-
onFreeText: (t) => setText((prev) => prev || t)
|
|
12022
|
-
}) }),
|
|
12023
|
-
coding.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-xs", children: "Optional \u2014 a name-only problem is valid. Codes can be added any time." }),
|
|
12024
|
-
coding.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12025
|
-
"div",
|
|
12026
|
-
{
|
|
12027
|
-
"aria-hidden": "true",
|
|
12028
|
-
"data-slot": "condition-coding-header",
|
|
12029
|
-
className: "text-muted-foreground hidden grid-cols-[minmax(8rem,1.1fr)_minmax(7rem,0.9fr)_minmax(10rem,1.5fr)_5.5rem_2.5rem] items-center gap-2 px-1 text-xs font-medium sm:!grid",
|
|
12030
|
-
children: [
|
|
12031
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "System" }),
|
|
12032
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Code" }),
|
|
12033
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Display" }),
|
|
12034
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-center", children: "Primary code" }),
|
|
12035
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Actions" })
|
|
12036
|
-
]
|
|
12037
|
-
}
|
|
12038
|
-
),
|
|
12039
|
-
coding.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12040
|
-
chunkG7EQ3JPX_cjs.RadioGroup,
|
|
12041
|
-
{
|
|
12042
|
-
name: "primary-coding",
|
|
12043
|
-
label: "Primary display code",
|
|
12044
|
-
value: String(
|
|
12045
|
-
Math.max(
|
|
12046
|
-
0,
|
|
12047
|
-
coding.findIndex((entry) => entry.primary)
|
|
12048
|
-
)
|
|
12049
|
-
),
|
|
12050
|
-
onValueChange: (value) => {
|
|
12051
|
-
const selectedIndex = Number(value);
|
|
12052
|
-
setCoding(
|
|
12053
|
-
(prev) => prev.map((entry, index) => ({
|
|
12054
|
-
...entry,
|
|
12055
|
-
primary: index === selectedIndex
|
|
12056
|
-
}))
|
|
12057
|
-
);
|
|
12058
|
-
},
|
|
12059
|
-
size: "sm",
|
|
12060
|
-
className: "gap-2 [&_[data-slot=radio-group-items]]:gap-2 sm:[&_[data-slot=radio-group-legend]]:sr-only",
|
|
12061
|
-
children: coding.map((c, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12062
|
-
"div",
|
|
12063
|
-
{
|
|
12064
|
-
"data-slot": "condition-coding-row",
|
|
12065
|
-
className: "border-border/70 grid grid-cols-1 gap-2 rounded-md border p-2 sm:grid-cols-[minmax(8rem,1.1fr)_minmax(7rem,0.9fr)_minmax(10rem,1.5fr)_5.5rem_2.5rem] sm:items-center sm:border-0 sm:p-0",
|
|
12066
|
-
children: [
|
|
12067
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
12068
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-xs sm:hidden", children: "System" }),
|
|
12069
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12070
|
-
chunkUPWIJC6I_cjs.Select,
|
|
12071
|
-
{
|
|
12072
|
-
"aria-label": `Coding system ${i + 1}`,
|
|
12073
|
-
options: CODING_SYSTEMS.map((s) => ({
|
|
12074
|
-
value: s,
|
|
12075
|
-
label: s
|
|
12076
|
-
})),
|
|
12077
|
-
value: c.system,
|
|
12078
|
-
onValueChange: (v) => updateCoding(i, { system: v }),
|
|
12079
|
-
disabled: codingUnknown
|
|
12080
|
-
}
|
|
12081
|
-
)
|
|
12082
|
-
] }),
|
|
12083
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
12084
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-xs sm:hidden", children: "Code" }),
|
|
12085
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12086
|
-
chunkZ5S5JEJD_cjs.Input,
|
|
12087
|
-
{
|
|
12088
|
-
"aria-label": `Code ${i + 1}`,
|
|
12089
|
-
value: c.code,
|
|
12090
|
-
onChange: (e) => updateCoding(i, { code: e.target.value }),
|
|
12091
|
-
placeholder: "Code",
|
|
12092
|
-
disabled: codingUnknown,
|
|
12093
|
-
className: "font-mono"
|
|
12094
|
-
}
|
|
12095
|
-
)
|
|
12096
|
-
] }),
|
|
12097
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
12098
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-xs sm:hidden", children: "Display" }),
|
|
12099
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12100
|
-
chunkZ5S5JEJD_cjs.Input,
|
|
12101
|
-
{
|
|
12102
|
-
"aria-label": `Display ${i + 1}`,
|
|
12103
|
-
value: c.display ?? "",
|
|
12104
|
-
onChange: (e) => updateCoding(i, { display: e.target.value }),
|
|
12105
|
-
placeholder: "Display",
|
|
12106
|
-
disabled: codingUnknown
|
|
12107
|
-
}
|
|
12108
|
-
)
|
|
12109
|
-
] }),
|
|
12110
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-10 items-center gap-1.5 text-xs sm:justify-center", children: [
|
|
12111
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12112
|
-
chunkG7EQ3JPX_cjs.Radio,
|
|
12113
|
-
{
|
|
12114
|
-
value: String(i),
|
|
12115
|
-
"aria-label": `Primary code: ${c.system} ${c.code || `row ${i + 1}`}`,
|
|
12116
|
-
disabled: codingUnknown
|
|
12117
|
-
}
|
|
12118
|
-
),
|
|
12119
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sm:sr-only", children: "Primary code" })
|
|
12120
|
-
] }),
|
|
12121
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12122
|
-
chunkANMX7YDL_cjs.Button,
|
|
12123
|
-
{
|
|
12124
|
-
variant: "ghost",
|
|
12125
|
-
size: "icon",
|
|
12126
|
-
"aria-label": `Remove code ${i + 1}`,
|
|
12127
|
-
disabled: codingUnknown,
|
|
12128
|
-
onClick: () => setCoding(
|
|
12129
|
-
(prev) => withSinglePrimary(
|
|
12130
|
-
prev.filter((_, index) => index !== i)
|
|
12131
|
-
)
|
|
12132
|
-
),
|
|
12133
|
-
className: "h-10 w-10 justify-self-start sm:justify-self-center",
|
|
12134
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.Trash2, { size: 14 })
|
|
12135
|
-
}
|
|
12136
|
-
)
|
|
12137
|
-
]
|
|
12138
|
-
},
|
|
12139
|
-
i
|
|
12140
|
-
))
|
|
12141
|
-
}
|
|
12142
|
-
)
|
|
12143
|
-
] }),
|
|
12144
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12145
|
-
chunkUPWIJC6I_cjs.Select,
|
|
12146
|
-
{
|
|
12147
|
-
label: "Verification status",
|
|
12148
|
-
options: VERIFICATION_OPTIONS,
|
|
12149
|
-
value: verification,
|
|
12150
|
-
onValueChange: (v) => setVerification(v)
|
|
12151
|
-
}
|
|
12152
|
-
),
|
|
12153
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-end gap-x-4 gap-y-2", children: [
|
|
12154
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
12155
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-sm font-medium", children: "Severity" }),
|
|
12156
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12157
|
-
"div",
|
|
12158
|
-
{
|
|
12159
|
-
role: "group",
|
|
12160
|
-
"aria-label": "Severity",
|
|
12161
|
-
className: "border-border inline-flex items-center overflow-hidden rounded-md border",
|
|
12162
|
-
children: SEVERITIES.map((s) => {
|
|
12163
|
-
const active = severity === s;
|
|
12164
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12165
|
-
"button",
|
|
12166
|
-
{
|
|
12167
|
-
type: "button",
|
|
12168
|
-
"aria-pressed": active,
|
|
12169
|
-
disabled: fields.severity?.known === false,
|
|
12170
|
-
onClick: () => setSeverity(active ? void 0 : s),
|
|
12171
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
12172
|
-
"border-border border-s px-2.5 py-1 text-xs font-medium capitalize transition-colors first:border-s-0",
|
|
12173
|
-
"disabled:opacity-40",
|
|
12174
|
-
active ? "bg-primary-600 text-white" : "bg-background text-muted-foreground hover:text-foreground"
|
|
12175
|
-
),
|
|
12176
|
-
children: s
|
|
12177
|
-
},
|
|
12178
|
-
s
|
|
12179
|
-
);
|
|
12180
|
-
})
|
|
12181
|
-
}
|
|
12182
|
-
)
|
|
12183
|
-
] }),
|
|
12184
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
12185
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-sm font-medium", children: "Certainty" }),
|
|
12186
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12187
|
-
FieldFlag,
|
|
12188
|
-
{
|
|
12189
|
-
label: "Severity",
|
|
12190
|
-
value: fields.severity,
|
|
12191
|
-
onChange: setField("severity"),
|
|
12192
|
-
hasValue: Boolean(severity)
|
|
12193
|
-
}
|
|
12194
|
-
)
|
|
12195
|
-
] })
|
|
12196
|
-
] }),
|
|
12197
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
12198
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
12199
|
-
"Onset",
|
|
12200
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12201
|
-
FieldFlag,
|
|
12202
|
-
{
|
|
12203
|
-
label: "Onset",
|
|
12204
|
-
value: fields.onset,
|
|
12205
|
-
onChange: setField("onset"),
|
|
12206
|
-
hasValue: Boolean(onsetDate || onsetFuzzy)
|
|
12207
|
-
}
|
|
12208
|
-
)
|
|
12209
|
-
] }),
|
|
12210
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 items-end gap-2 sm:grid-cols-[minmax(10rem,0.8fr)_auto_minmax(14rem,1.2fr)]", children: [
|
|
12211
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12212
|
-
chunkPHUTJKHL_cjs.DateInput,
|
|
12213
|
-
{
|
|
12214
|
-
"aria-label": "Onset date (exact)",
|
|
12215
|
-
value: onsetDate,
|
|
12216
|
-
onChange: (value) => {
|
|
12217
|
-
setOnsetDate(value);
|
|
12218
|
-
if (value) setOnsetFuzzy("");
|
|
12219
|
-
},
|
|
12220
|
-
disabled: fields.onset?.known === false,
|
|
12221
|
-
validateOnBlur: true,
|
|
12222
|
-
width: "full"
|
|
12223
|
-
}
|
|
12224
|
-
),
|
|
12225
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground pb-3 text-center text-xs", children: "or" }),
|
|
12226
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12227
|
-
chunkZ5S5JEJD_cjs.Input,
|
|
12228
|
-
{
|
|
12229
|
-
"aria-label": "Onset (fuzzy)",
|
|
12230
|
-
value: onsetFuzzy,
|
|
12231
|
-
onChange: (e) => {
|
|
12232
|
-
setOnsetFuzzy(e.target.value);
|
|
12233
|
-
if (e.target.value) setOnsetDate("");
|
|
12234
|
-
},
|
|
12235
|
-
disabled: fields.onset?.known === false,
|
|
12236
|
-
placeholder: 'Fuzzy \u2014 "since her twenties", "~3 months ago"'
|
|
12237
|
-
}
|
|
12238
|
-
)
|
|
12239
|
-
] })
|
|
12240
|
-
] }),
|
|
12241
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12242
|
-
chunkAQUHEKXL_cjs.Textarea,
|
|
12243
|
-
{
|
|
12244
|
-
label: "Note",
|
|
12245
|
-
value: note,
|
|
12246
|
-
onChange: (e) => setNote(e.target.value),
|
|
12247
|
-
placeholder: "e.g. patient thinks it started after the fall, not sure",
|
|
12248
|
-
rows: 2
|
|
12249
|
-
}
|
|
12250
|
-
),
|
|
12251
|
-
Object.keys(fields).length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground flex items-center gap-1.5 text-xs", children: [
|
|
12252
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkL7L5S2HO_cjs.HelpCircle, { size: 12 }),
|
|
12253
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
12254
|
-
"Uncertainty recorded:",
|
|
12255
|
-
" ",
|
|
12256
|
-
Object.entries(fields).map(
|
|
12257
|
-
([k, f]) => f?.known === false ? `${k} unknown` : `${f?.confidence ?? "unspecified"} confidence in ${k}`
|
|
12258
|
-
).join(", ")
|
|
12259
|
-
] })
|
|
12260
|
-
] })
|
|
12261
|
-
] })
|
|
12262
|
-
] }) }),
|
|
12263
|
-
/* @__PURE__ */ jsxRuntime.jsxs(chunkLC3JL2HB_cjs.ModalFooter, { children: [
|
|
12264
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkANMX7YDL_cjs.Button, { variant: "secondary", onClick: () => onOpenChange(false), children: "Cancel" }),
|
|
12265
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkANMX7YDL_cjs.Button, { onClick: handleSave, disabled: saveDisabled, children: mode === "relate" ? "Relate" : mode === "observe" ? "Add observation" : "Save" }),
|
|
12266
|
-
mode !== "relate" && mode !== "observe" && !text.trim() && /* @__PURE__ */ jsxRuntime.jsx(chunk7E46YDOT_cjs.Badge, { variant: "outline", size: "sm", className: "text-muted-foreground", children: "name required" })
|
|
12267
|
-
] })
|
|
12268
|
-
]
|
|
12269
|
-
}
|
|
12270
|
-
);
|
|
12271
|
-
}
|
|
12272
|
-
ConditionEditor.displayName = "ConditionEditor";
|
|
12273
10128
|
function CheckrIntegration({
|
|
12274
10129
|
connected = false,
|
|
12275
10130
|
account,
|
|
@@ -15895,793 +13750,6 @@ var DashboardWidgetDataCards = React13__namespace.forwardRef(({ className, items
|
|
|
15895
13750
|
);
|
|
15896
13751
|
});
|
|
15897
13752
|
DashboardWidgetDataCards.displayName = "DashboardWidgetDataCards";
|
|
15898
|
-
function getDefaultPresets(labels = {}) {
|
|
15899
|
-
const {
|
|
15900
|
-
today = "Today",
|
|
15901
|
-
thisWeek = "This Week",
|
|
15902
|
-
thisMonth = "This Month",
|
|
15903
|
-
lastMonth = "Last Month",
|
|
15904
|
-
last24Hours = "Last 24 Hours",
|
|
15905
|
-
last7Days = "Last 7 Days",
|
|
15906
|
-
last30Days = "Last 30 Days"
|
|
15907
|
-
} = labels;
|
|
15908
|
-
return [
|
|
15909
|
-
{ key: "today", label: today },
|
|
15910
|
-
{ key: "this-week", label: thisWeek },
|
|
15911
|
-
{ key: "this-month", label: thisMonth },
|
|
15912
|
-
{ key: "last-month", label: lastMonth },
|
|
15913
|
-
{ key: "last-24-hours", label: last24Hours },
|
|
15914
|
-
{ key: "last-7-days", label: last7Days },
|
|
15915
|
-
{ key: "last-30-days", label: last30Days }
|
|
15916
|
-
];
|
|
15917
|
-
}
|
|
15918
|
-
function getExtendedPresets(labels = {}) {
|
|
15919
|
-
const {
|
|
15920
|
-
today = "Today",
|
|
15921
|
-
yesterday = "Yesterday",
|
|
15922
|
-
thisWeek = "This Week",
|
|
15923
|
-
lastWeek = "Last Week",
|
|
15924
|
-
thisMonth = "This Month",
|
|
15925
|
-
lastMonth = "Last Month",
|
|
15926
|
-
thisQuarter = "This Quarter",
|
|
15927
|
-
lastQuarter = "Last Quarter",
|
|
15928
|
-
thisYear = "This Year",
|
|
15929
|
-
lastYear = "Last Year",
|
|
15930
|
-
last24Hours = "Last 24 Hours",
|
|
15931
|
-
last7Days = "Last 7 Days",
|
|
15932
|
-
last30Days = "Last 30 Days",
|
|
15933
|
-
last90Days = "Last 90 Days",
|
|
15934
|
-
last365Days = "Last 365 Days"
|
|
15935
|
-
} = labels;
|
|
15936
|
-
return [
|
|
15937
|
-
{ key: "today", label: today },
|
|
15938
|
-
{ key: "yesterday", label: yesterday },
|
|
15939
|
-
{ key: "last-24-hours", label: last24Hours },
|
|
15940
|
-
{ key: "this-week", label: thisWeek },
|
|
15941
|
-
{ key: "last-week", label: lastWeek },
|
|
15942
|
-
{ key: "last-7-days", label: last7Days },
|
|
15943
|
-
{ key: "this-month", label: thisMonth },
|
|
15944
|
-
{ key: "last-month", label: lastMonth },
|
|
15945
|
-
{ key: "last-30-days", label: last30Days },
|
|
15946
|
-
{ key: "this-quarter", label: thisQuarter },
|
|
15947
|
-
{ key: "last-quarter", label: lastQuarter },
|
|
15948
|
-
{ key: "last-90-days", label: last90Days },
|
|
15949
|
-
{ key: "this-year", label: thisYear },
|
|
15950
|
-
{ key: "last-year", label: lastYear },
|
|
15951
|
-
{ key: "last-365-days", label: last365Days }
|
|
15952
|
-
];
|
|
15953
|
-
}
|
|
15954
|
-
function endOfDay(d) {
|
|
15955
|
-
return new Date(d.getFullYear(), d.getMonth(), d.getDate(), 23, 59, 59, 999);
|
|
15956
|
-
}
|
|
15957
|
-
function calculateDateRange(presetKey) {
|
|
15958
|
-
const now = /* @__PURE__ */ new Date();
|
|
15959
|
-
const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
|
15960
|
-
switch (presetKey) {
|
|
15961
|
-
case "today":
|
|
15962
|
-
return { start: today, end: endOfDay(today) };
|
|
15963
|
-
case "yesterday": {
|
|
15964
|
-
const yesterday = new Date(today);
|
|
15965
|
-
yesterday.setDate(today.getDate() - 1);
|
|
15966
|
-
return { start: yesterday, end: endOfDay(yesterday) };
|
|
15967
|
-
}
|
|
15968
|
-
case "this-week": {
|
|
15969
|
-
const dayOfWeek = today.getDay();
|
|
15970
|
-
const sunday = new Date(today);
|
|
15971
|
-
sunday.setDate(today.getDate() - dayOfWeek);
|
|
15972
|
-
const saturday = new Date(sunday);
|
|
15973
|
-
saturday.setDate(sunday.getDate() + 6);
|
|
15974
|
-
return { start: sunday, end: endOfDay(saturday) };
|
|
15975
|
-
}
|
|
15976
|
-
case "last-week": {
|
|
15977
|
-
const dayOfWeek = today.getDay();
|
|
15978
|
-
const lastSunday = new Date(today);
|
|
15979
|
-
lastSunday.setDate(today.getDate() - dayOfWeek - 7);
|
|
15980
|
-
const lastSaturday = new Date(lastSunday);
|
|
15981
|
-
lastSaturday.setDate(lastSunday.getDate() + 6);
|
|
15982
|
-
return { start: lastSunday, end: endOfDay(lastSaturday) };
|
|
15983
|
-
}
|
|
15984
|
-
case "this-month": {
|
|
15985
|
-
const firstDay = new Date(now.getFullYear(), now.getMonth(), 1);
|
|
15986
|
-
const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0);
|
|
15987
|
-
return { start: firstDay, end: endOfDay(lastDay) };
|
|
15988
|
-
}
|
|
15989
|
-
case "last-month": {
|
|
15990
|
-
const firstDay = new Date(now.getFullYear(), now.getMonth() - 1, 1);
|
|
15991
|
-
const lastDay = new Date(now.getFullYear(), now.getMonth(), 0);
|
|
15992
|
-
return { start: firstDay, end: endOfDay(lastDay) };
|
|
15993
|
-
}
|
|
15994
|
-
case "this-quarter": {
|
|
15995
|
-
const quarter = Math.floor(now.getMonth() / 3);
|
|
15996
|
-
const firstDay = new Date(now.getFullYear(), quarter * 3, 1);
|
|
15997
|
-
const lastDay = new Date(now.getFullYear(), quarter * 3 + 3, 0);
|
|
15998
|
-
return { start: firstDay, end: endOfDay(lastDay) };
|
|
15999
|
-
}
|
|
16000
|
-
case "last-quarter": {
|
|
16001
|
-
const quarter = Math.floor(now.getMonth() / 3);
|
|
16002
|
-
const firstDay = new Date(now.getFullYear(), (quarter - 1) * 3, 1);
|
|
16003
|
-
const lastDay = new Date(now.getFullYear(), quarter * 3, 0);
|
|
16004
|
-
return { start: firstDay, end: endOfDay(lastDay) };
|
|
16005
|
-
}
|
|
16006
|
-
case "this-year": {
|
|
16007
|
-
const firstDay = new Date(now.getFullYear(), 0, 1);
|
|
16008
|
-
const lastDay = new Date(now.getFullYear(), 11, 31);
|
|
16009
|
-
return { start: firstDay, end: endOfDay(lastDay) };
|
|
16010
|
-
}
|
|
16011
|
-
case "last-year": {
|
|
16012
|
-
const firstDay = new Date(now.getFullYear() - 1, 0, 1);
|
|
16013
|
-
const lastDay = new Date(now.getFullYear() - 1, 11, 31);
|
|
16014
|
-
return { start: firstDay, end: endOfDay(lastDay) };
|
|
16015
|
-
}
|
|
16016
|
-
case "last-24-hours":
|
|
16017
|
-
return {
|
|
16018
|
-
start: new Date(now.getTime() - 24 * 60 * 60 * 1e3),
|
|
16019
|
-
end: now
|
|
16020
|
-
};
|
|
16021
|
-
case "last-7-days":
|
|
16022
|
-
return {
|
|
16023
|
-
start: new Date(now.getTime() - 7 * 24 * 60 * 60 * 1e3),
|
|
16024
|
-
end: now
|
|
16025
|
-
};
|
|
16026
|
-
case "last-30-days":
|
|
16027
|
-
return {
|
|
16028
|
-
start: new Date(now.getTime() - 30 * 24 * 60 * 60 * 1e3),
|
|
16029
|
-
end: now
|
|
16030
|
-
};
|
|
16031
|
-
case "last-90-days":
|
|
16032
|
-
return {
|
|
16033
|
-
start: new Date(now.getTime() - 90 * 24 * 60 * 60 * 1e3),
|
|
16034
|
-
end: now
|
|
16035
|
-
};
|
|
16036
|
-
case "last-365-days":
|
|
16037
|
-
return {
|
|
16038
|
-
start: new Date(now.getTime() - 365 * 24 * 60 * 60 * 1e3),
|
|
16039
|
-
end: now
|
|
16040
|
-
};
|
|
16041
|
-
default:
|
|
16042
|
-
return { start: null, end: null };
|
|
16043
|
-
}
|
|
16044
|
-
}
|
|
16045
|
-
function formatDateRange(range) {
|
|
16046
|
-
if (!range.start && !range.end) return "";
|
|
16047
|
-
const formatDate4 = (d) => {
|
|
16048
|
-
if (!d) return "";
|
|
16049
|
-
return d.toLocaleDateString("en-US", {
|
|
16050
|
-
month: "short",
|
|
16051
|
-
day: "numeric",
|
|
16052
|
-
year: "numeric"
|
|
16053
|
-
});
|
|
16054
|
-
};
|
|
16055
|
-
if (range.start && range.end) {
|
|
16056
|
-
return `${formatDate4(range.start)} - ${formatDate4(range.end)}`;
|
|
16057
|
-
}
|
|
16058
|
-
return formatDate4(range.start || range.end);
|
|
16059
|
-
}
|
|
16060
|
-
function DateRangePicker({
|
|
16061
|
-
value,
|
|
16062
|
-
onChange,
|
|
16063
|
-
presets,
|
|
16064
|
-
activePreset,
|
|
16065
|
-
placeholder = "Pick a date range",
|
|
16066
|
-
className,
|
|
16067
|
-
align = "auto",
|
|
16068
|
-
showPresets = true,
|
|
16069
|
-
variant = "desktop",
|
|
16070
|
-
labels = {}
|
|
16071
|
-
}) {
|
|
16072
|
-
const finalPresets = presets || getDefaultPresets(labels);
|
|
16073
|
-
const [isCalendarOpen, setIsCalendarOpen] = React13__namespace.useState(false);
|
|
16074
|
-
const [leftMonth, setLeftMonth] = React13__namespace.useState(
|
|
16075
|
-
() => value?.start?.getMonth() ?? (/* @__PURE__ */ new Date()).getMonth()
|
|
16076
|
-
);
|
|
16077
|
-
const [leftYear, setLeftYear] = React13__namespace.useState(
|
|
16078
|
-
() => value?.start?.getFullYear() ?? (/* @__PURE__ */ new Date()).getFullYear()
|
|
16079
|
-
);
|
|
16080
|
-
const [rangeStart, setRangeStart] = React13__namespace.useState(
|
|
16081
|
-
value?.start ?? null
|
|
16082
|
-
);
|
|
16083
|
-
const [rangeEnd, setRangeEnd] = React13__namespace.useState(
|
|
16084
|
-
value?.end ?? null
|
|
16085
|
-
);
|
|
16086
|
-
const [selectingEnd, setSelectingEnd] = React13__namespace.useState(false);
|
|
16087
|
-
const [hoverDate, setHoverDate] = React13__namespace.useState(null);
|
|
16088
|
-
const calendarRef = React13__namespace.useRef(null);
|
|
16089
|
-
const triggerRef = React13__namespace.useRef(null);
|
|
16090
|
-
const [resolvedAlign, setResolvedAlign] = React13__namespace.useState(
|
|
16091
|
-
align === "end" ? "end" : "start"
|
|
16092
|
-
);
|
|
16093
|
-
const isMobileVariant = variant === "mobile";
|
|
16094
|
-
const isResponsive = variant === "responsive";
|
|
16095
|
-
const focusTrapRef = chunkNNEFAUHV_cjs.useFocusTrap(
|
|
16096
|
-
isMobileVariant && isCalendarOpen
|
|
16097
|
-
);
|
|
16098
|
-
const rightMonth = leftMonth === 11 ? 0 : leftMonth + 1;
|
|
16099
|
-
const rightYear = leftMonth === 11 ? leftYear + 1 : leftYear;
|
|
16100
|
-
React13__namespace.useEffect(() => {
|
|
16101
|
-
if (!value) {
|
|
16102
|
-
setRangeStart(null);
|
|
16103
|
-
setRangeEnd(null);
|
|
16104
|
-
return;
|
|
16105
|
-
}
|
|
16106
|
-
setRangeStart(value.start ?? null);
|
|
16107
|
-
setRangeEnd(value.end ?? null);
|
|
16108
|
-
}, [value]);
|
|
16109
|
-
const wrapperRef = React13__namespace.useRef(null);
|
|
16110
|
-
const outsideRefs = React13__namespace.useMemo(
|
|
16111
|
-
() => [wrapperRef, calendarRef],
|
|
16112
|
-
[calendarRef]
|
|
16113
|
-
);
|
|
16114
|
-
chunkFSGEDDF2_cjs.useClickOutside(
|
|
16115
|
-
outsideRefs,
|
|
16116
|
-
() => {
|
|
16117
|
-
setIsCalendarOpen(false);
|
|
16118
|
-
setSelectingEnd(false);
|
|
16119
|
-
},
|
|
16120
|
-
isCalendarOpen
|
|
16121
|
-
);
|
|
16122
|
-
const { anchorRef, floatingRef, style } = chunkAOHJILLU_cjs.useAnchoredPosition({
|
|
16123
|
-
open: !isMobileVariant && isCalendarOpen,
|
|
16124
|
-
placement: resolvedAlign === "end" ? "bottom-end" : "bottom-start"
|
|
16125
|
-
});
|
|
16126
|
-
chunkFHY3K6PL_cjs.useEscapeKey(() => {
|
|
16127
|
-
setIsCalendarOpen(false);
|
|
16128
|
-
setSelectingEnd(false);
|
|
16129
|
-
triggerRef.current?.focus();
|
|
16130
|
-
}, isCalendarOpen);
|
|
16131
|
-
React13__namespace.useEffect(() => {
|
|
16132
|
-
if (chunkSCV7C55E_cjs.isStorybookDocsMode()) return;
|
|
16133
|
-
if (isMobileVariant && isCalendarOpen) {
|
|
16134
|
-
const prev = document.body.style.overflow;
|
|
16135
|
-
document.body.style.overflow = "hidden";
|
|
16136
|
-
return () => {
|
|
16137
|
-
document.body.style.overflow = prev;
|
|
16138
|
-
};
|
|
16139
|
-
}
|
|
16140
|
-
}, [isMobileVariant, isCalendarOpen]);
|
|
16141
|
-
React13__namespace.useLayoutEffect(() => {
|
|
16142
|
-
if (isMobileVariant || !isCalendarOpen) return;
|
|
16143
|
-
if (align === "start" || align === "end") {
|
|
16144
|
-
setResolvedAlign(align);
|
|
16145
|
-
return;
|
|
16146
|
-
}
|
|
16147
|
-
if (typeof window === "undefined") return;
|
|
16148
|
-
const trigger = triggerRef.current;
|
|
16149
|
-
if (!trigger) return;
|
|
16150
|
-
const rect = trigger.getBoundingClientRect();
|
|
16151
|
-
const estimatedPopupWidth = showPresets ? 840 : 640;
|
|
16152
|
-
const margin = 8;
|
|
16153
|
-
const overflowsRight = rect.left + estimatedPopupWidth > window.innerWidth - margin;
|
|
16154
|
-
const fitsLeftAligned = rect.right - estimatedPopupWidth >= margin;
|
|
16155
|
-
setResolvedAlign(overflowsRight && fitsLeftAligned ? "end" : "start");
|
|
16156
|
-
}, [align, isCalendarOpen, isMobileVariant, showPresets]);
|
|
16157
|
-
const handlePresetSelect = (presetKey) => {
|
|
16158
|
-
const range = calculateDateRange(presetKey);
|
|
16159
|
-
setRangeStart(range.start);
|
|
16160
|
-
setRangeEnd(range.end);
|
|
16161
|
-
setSelectingEnd(false);
|
|
16162
|
-
setIsCalendarOpen(false);
|
|
16163
|
-
if (range.start) {
|
|
16164
|
-
setLeftMonth(range.start.getMonth());
|
|
16165
|
-
setLeftYear(range.start.getFullYear());
|
|
16166
|
-
}
|
|
16167
|
-
onChange(range, presetKey);
|
|
16168
|
-
};
|
|
16169
|
-
const handleDayClick = (day, month, year) => {
|
|
16170
|
-
const clicked = new Date(year, month, day);
|
|
16171
|
-
if (!selectingEnd) {
|
|
16172
|
-
setRangeStart(clicked);
|
|
16173
|
-
setRangeEnd(null);
|
|
16174
|
-
setSelectingEnd(true);
|
|
16175
|
-
} else {
|
|
16176
|
-
let start = rangeStart;
|
|
16177
|
-
let end = clicked;
|
|
16178
|
-
if (end < start) {
|
|
16179
|
-
[start, end] = [end, start];
|
|
16180
|
-
}
|
|
16181
|
-
setRangeStart(start);
|
|
16182
|
-
setRangeEnd(end);
|
|
16183
|
-
setSelectingEnd(false);
|
|
16184
|
-
if (variant !== "mobile") {
|
|
16185
|
-
setIsCalendarOpen(false);
|
|
16186
|
-
}
|
|
16187
|
-
onChange({ start, end });
|
|
16188
|
-
}
|
|
16189
|
-
};
|
|
16190
|
-
const toggleCalendar = () => {
|
|
16191
|
-
if (!isCalendarOpen) {
|
|
16192
|
-
if (value?.start) {
|
|
16193
|
-
setRangeStart(value.start);
|
|
16194
|
-
setRangeEnd(value.end ?? null);
|
|
16195
|
-
setLeftMonth(value.start.getMonth());
|
|
16196
|
-
setLeftYear(value.start.getFullYear());
|
|
16197
|
-
} else {
|
|
16198
|
-
const now = /* @__PURE__ */ new Date();
|
|
16199
|
-
setLeftMonth(now.getMonth());
|
|
16200
|
-
setLeftYear(now.getFullYear());
|
|
16201
|
-
}
|
|
16202
|
-
setSelectingEnd(false);
|
|
16203
|
-
}
|
|
16204
|
-
setIsCalendarOpen(!isCalendarOpen);
|
|
16205
|
-
};
|
|
16206
|
-
const goToPrevMonth = () => {
|
|
16207
|
-
if (leftMonth === 0) {
|
|
16208
|
-
setLeftMonth(11);
|
|
16209
|
-
setLeftYear(leftYear - 1);
|
|
16210
|
-
} else {
|
|
16211
|
-
setLeftMonth(leftMonth - 1);
|
|
16212
|
-
}
|
|
16213
|
-
};
|
|
16214
|
-
const goToNextMonth = () => {
|
|
16215
|
-
if (leftMonth === 11) {
|
|
16216
|
-
setLeftMonth(0);
|
|
16217
|
-
setLeftYear(leftYear + 1);
|
|
16218
|
-
} else {
|
|
16219
|
-
setLeftMonth(leftMonth + 1);
|
|
16220
|
-
}
|
|
16221
|
-
};
|
|
16222
|
-
const getDaysInMonth = (month, year) => new Date(year, month + 1, 0).getDate();
|
|
16223
|
-
const getFirstDayOfMonth = (month, year) => new Date(year, month, 1).getDay();
|
|
16224
|
-
const isSameDay = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
16225
|
-
const isInRange = (date) => {
|
|
16226
|
-
const start = rangeStart;
|
|
16227
|
-
const end = selectingEnd ? hoverDate : rangeEnd;
|
|
16228
|
-
if (!start || !end) return false;
|
|
16229
|
-
const [lo, hi] = start <= end ? [start, end] : [end, start];
|
|
16230
|
-
return date > lo && date < hi;
|
|
16231
|
-
};
|
|
16232
|
-
const isStart = (date) => {
|
|
16233
|
-
if (!rangeStart) return false;
|
|
16234
|
-
return isSameDay(date, rangeStart);
|
|
16235
|
-
};
|
|
16236
|
-
const isEnd = (date) => {
|
|
16237
|
-
const end = selectingEnd ? hoverDate : rangeEnd;
|
|
16238
|
-
if (!end) return false;
|
|
16239
|
-
return isSameDay(date, end);
|
|
16240
|
-
};
|
|
16241
|
-
const isToday = (date) => {
|
|
16242
|
-
const today = /* @__PURE__ */ new Date();
|
|
16243
|
-
return isSameDay(date, today);
|
|
16244
|
-
};
|
|
16245
|
-
const displayValue = value ? formatDateRange(value) : "";
|
|
16246
|
-
const monthNames = React13__namespace.useMemo(
|
|
16247
|
-
() => Array.from(
|
|
16248
|
-
{ length: 12 },
|
|
16249
|
-
(_, i) => new Intl.DateTimeFormat(void 0, { month: "long" }).format(
|
|
16250
|
-
new Date(2e3, i, 1)
|
|
16251
|
-
)
|
|
16252
|
-
),
|
|
16253
|
-
[]
|
|
16254
|
-
);
|
|
16255
|
-
const weekdayNames = React13__namespace.useMemo(
|
|
16256
|
-
() => Array.from(
|
|
16257
|
-
{ length: 7 },
|
|
16258
|
-
(_, i) => new Intl.DateTimeFormat(void 0, { weekday: "short" }).format(
|
|
16259
|
-
new Date(1970, 0, 4 + i)
|
|
16260
|
-
)
|
|
16261
|
-
),
|
|
16262
|
-
[]
|
|
16263
|
-
);
|
|
16264
|
-
const renderMonthGrid = (month, year) => {
|
|
16265
|
-
const daysInMonth = getDaysInMonth(month, year);
|
|
16266
|
-
const firstDay = getFirstDayOfMonth(month, year);
|
|
16267
|
-
const prevMonth = month === 0 ? 11 : month - 1;
|
|
16268
|
-
const prevYear = month === 0 ? year - 1 : year;
|
|
16269
|
-
const daysInPrevMonth = getDaysInMonth(prevMonth, prevYear);
|
|
16270
|
-
const cells = [];
|
|
16271
|
-
for (let i = firstDay - 1; i >= 0; i--) {
|
|
16272
|
-
cells.push({
|
|
16273
|
-
day: daysInPrevMonth - i,
|
|
16274
|
-
month: prevMonth,
|
|
16275
|
-
year: prevYear,
|
|
16276
|
-
isCurrentMonth: false
|
|
16277
|
-
});
|
|
16278
|
-
}
|
|
16279
|
-
for (let i = 1; i <= daysInMonth; i++) {
|
|
16280
|
-
cells.push({ day: i, month, year, isCurrentMonth: true });
|
|
16281
|
-
}
|
|
16282
|
-
const nextMonth = month === 11 ? 0 : month + 1;
|
|
16283
|
-
const nextYear = month === 11 ? year + 1 : year;
|
|
16284
|
-
const remaining = 42 - cells.length;
|
|
16285
|
-
for (let i = 1; i <= remaining; i++) {
|
|
16286
|
-
cells.push({
|
|
16287
|
-
day: i,
|
|
16288
|
-
month: nextMonth,
|
|
16289
|
-
year: nextYear,
|
|
16290
|
-
isCurrentMonth: false
|
|
16291
|
-
});
|
|
16292
|
-
}
|
|
16293
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-[280px]", "data-slot": "date-range-grid", children: [
|
|
16294
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1 grid grid-cols-7", "data-slot": "date-range-weekdays", children: weekdayNames.map((dayName) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16295
|
-
"div",
|
|
16296
|
-
{
|
|
16297
|
-
className: "text-muted-foreground py-1 text-center text-xs font-medium",
|
|
16298
|
-
"data-slot": "date-range-weekday",
|
|
16299
|
-
children: dayName
|
|
16300
|
-
},
|
|
16301
|
-
dayName
|
|
16302
|
-
)) }),
|
|
16303
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-7", "data-slot": "date-range-day-grid", children: cells.map((cell, index) => {
|
|
16304
|
-
const date = new Date(cell.year, cell.month, cell.day);
|
|
16305
|
-
const inRange = isInRange(date);
|
|
16306
|
-
const start = isStart(date);
|
|
16307
|
-
const end = isEnd(date);
|
|
16308
|
-
const today = isToday(date);
|
|
16309
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16310
|
-
"button",
|
|
16311
|
-
{
|
|
16312
|
-
type: "button",
|
|
16313
|
-
"data-slot": "date-range-day",
|
|
16314
|
-
onClick: () => handleDayClick(cell.day, cell.month, cell.year),
|
|
16315
|
-
onMouseEnter: () => {
|
|
16316
|
-
if (selectingEnd) {
|
|
16317
|
-
setHoverDate(date);
|
|
16318
|
-
}
|
|
16319
|
-
},
|
|
16320
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
16321
|
-
"relative h-9 w-10 text-center text-sm",
|
|
16322
|
-
"focus:ring-ring focus:z-10 focus:ring-2 focus:outline-none",
|
|
16323
|
-
"transition-colors",
|
|
16324
|
-
// Not current month — dimmed
|
|
16325
|
-
!cell.isCurrentMonth && "text-muted-foreground/50",
|
|
16326
|
-
// Current month — normal
|
|
16327
|
-
cell.isCurrentMonth && "text-foreground",
|
|
16328
|
-
// Hover
|
|
16329
|
-
"hover:bg-muted",
|
|
16330
|
-
// In range background
|
|
16331
|
-
inRange && "bg-muted",
|
|
16332
|
-
// Start date
|
|
16333
|
-
start && "bg-foreground text-background hover:bg-foreground rounded-s-md font-semibold",
|
|
16334
|
-
// End date
|
|
16335
|
-
end && !start && "border-foreground text-foreground rounded-e-md border font-semibold",
|
|
16336
|
-
// Today indicator (only if not start/end)
|
|
16337
|
-
today && !start && !end && "font-semibold"
|
|
16338
|
-
),
|
|
16339
|
-
children: cell.day
|
|
16340
|
-
},
|
|
16341
|
-
index
|
|
16342
|
-
);
|
|
16343
|
-
}) })
|
|
16344
|
-
] });
|
|
16345
|
-
};
|
|
16346
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16347
|
-
"div",
|
|
16348
|
-
{
|
|
16349
|
-
ref: (node) => {
|
|
16350
|
-
wrapperRef.current = node;
|
|
16351
|
-
anchorRef.current = node;
|
|
16352
|
-
},
|
|
16353
|
-
className: chunkS5RVSXDV_cjs.cn("relative inline-block", className),
|
|
16354
|
-
"data-slot": "date-range-picker",
|
|
16355
|
-
children: [
|
|
16356
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16357
|
-
"button",
|
|
16358
|
-
{
|
|
16359
|
-
ref: triggerRef,
|
|
16360
|
-
type: "button",
|
|
16361
|
-
onClick: toggleCalendar,
|
|
16362
|
-
"aria-expanded": isCalendarOpen,
|
|
16363
|
-
"aria-haspopup": "dialog",
|
|
16364
|
-
"data-slot": "date-range-trigger",
|
|
16365
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
16366
|
-
"border-input bg-background hover:bg-muted",
|
|
16367
|
-
"inline-flex w-[300px] items-center gap-2 rounded-md border px-4 py-2 text-start text-sm font-normal",
|
|
16368
|
-
"focus:ring-ring focus:ring-2 focus:outline-none",
|
|
16369
|
-
"transition-colors",
|
|
16370
|
-
!displayValue && "text-muted-foreground"
|
|
16371
|
-
),
|
|
16372
|
-
children: [
|
|
16373
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "h-4 w-4", "data-slot": "date-range-trigger-icon" }),
|
|
16374
|
-
displayValue || placeholder
|
|
16375
|
-
]
|
|
16376
|
-
}
|
|
16377
|
-
),
|
|
16378
|
-
isMobileVariant && isCalendarOpen && // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
16379
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16380
|
-
"div",
|
|
16381
|
-
{
|
|
16382
|
-
"data-slot": "date-range-mobile-overlay",
|
|
16383
|
-
className: "fixed inset-0 z-50 flex items-end justify-center bg-black/40",
|
|
16384
|
-
onClick: (event) => {
|
|
16385
|
-
if (event.target !== event.currentTarget) return;
|
|
16386
|
-
setIsCalendarOpen(false);
|
|
16387
|
-
setSelectingEnd(false);
|
|
16388
|
-
setHoverDate(null);
|
|
16389
|
-
if (triggerRef.current instanceof HTMLElement) {
|
|
16390
|
-
triggerRef.current.focus();
|
|
16391
|
-
}
|
|
16392
|
-
},
|
|
16393
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16394
|
-
"div",
|
|
16395
|
-
{
|
|
16396
|
-
ref: (node) => {
|
|
16397
|
-
calendarRef.current = node;
|
|
16398
|
-
focusTrapRef.current = node;
|
|
16399
|
-
},
|
|
16400
|
-
className: "bg-background animate-in slide-in-from-bottom max-h-[90vh] w-full max-w-md overflow-y-auto rounded-t-2xl px-6 pt-4 pb-6 shadow-xl",
|
|
16401
|
-
role: "dialog",
|
|
16402
|
-
"aria-modal": "true",
|
|
16403
|
-
"aria-labelledby": "mobile-date-range-title",
|
|
16404
|
-
"data-slot": "date-range-mobile-sheet",
|
|
16405
|
-
children: [
|
|
16406
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16407
|
-
"div",
|
|
16408
|
-
{
|
|
16409
|
-
className: "bg-muted mx-auto mb-4 h-1 w-10 rounded-full",
|
|
16410
|
-
"data-slot": "date-range-mobile-handle"
|
|
16411
|
-
}
|
|
16412
|
-
),
|
|
16413
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16414
|
-
"h3",
|
|
16415
|
-
{
|
|
16416
|
-
id: "mobile-date-range-title",
|
|
16417
|
-
className: "mb-4 text-lg font-semibold",
|
|
16418
|
-
"data-slot": "date-range-mobile-title",
|
|
16419
|
-
children: placeholder
|
|
16420
|
-
}
|
|
16421
|
-
),
|
|
16422
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16423
|
-
"div",
|
|
16424
|
-
{
|
|
16425
|
-
className: "mb-3 flex items-center justify-center gap-4",
|
|
16426
|
-
"data-slot": "date-range-month-header",
|
|
16427
|
-
children: [
|
|
16428
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16429
|
-
"button",
|
|
16430
|
-
{
|
|
16431
|
-
type: "button",
|
|
16432
|
-
onClick: goToPrevMonth,
|
|
16433
|
-
className: "hover:bg-muted rounded-md p-1 transition-colors",
|
|
16434
|
-
"aria-label": "Previous month",
|
|
16435
|
-
"data-slot": "date-range-nav",
|
|
16436
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-4 w-4 rtl:-scale-x-100" })
|
|
16437
|
-
}
|
|
16438
|
-
),
|
|
16439
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16440
|
-
"div",
|
|
16441
|
-
{
|
|
16442
|
-
className: "text-sm font-medium",
|
|
16443
|
-
"data-slot": "date-range-month-label",
|
|
16444
|
-
children: [
|
|
16445
|
-
monthNames[leftMonth],
|
|
16446
|
-
" ",
|
|
16447
|
-
leftYear
|
|
16448
|
-
]
|
|
16449
|
-
}
|
|
16450
|
-
),
|
|
16451
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16452
|
-
"button",
|
|
16453
|
-
{
|
|
16454
|
-
type: "button",
|
|
16455
|
-
onClick: goToNextMonth,
|
|
16456
|
-
className: "hover:bg-muted rounded-md p-1 transition-colors",
|
|
16457
|
-
"aria-label": "Next month",
|
|
16458
|
-
"data-slot": "date-range-nav",
|
|
16459
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4 rtl:-scale-x-100" })
|
|
16460
|
-
}
|
|
16461
|
-
)
|
|
16462
|
-
]
|
|
16463
|
-
}
|
|
16464
|
-
),
|
|
16465
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16466
|
-
"div",
|
|
16467
|
-
{
|
|
16468
|
-
className: "flex justify-center",
|
|
16469
|
-
onMouseLeave: () => setHoverDate(null),
|
|
16470
|
-
children: renderMonthGrid(leftMonth, leftYear)
|
|
16471
|
-
}
|
|
16472
|
-
),
|
|
16473
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16474
|
-
"button",
|
|
16475
|
-
{
|
|
16476
|
-
type: "button",
|
|
16477
|
-
"data-slot": "date-range-mobile-done",
|
|
16478
|
-
onClick: () => {
|
|
16479
|
-
setIsCalendarOpen(false);
|
|
16480
|
-
setSelectingEnd(false);
|
|
16481
|
-
if (triggerRef.current instanceof HTMLElement) {
|
|
16482
|
-
triggerRef.current.focus();
|
|
16483
|
-
}
|
|
16484
|
-
},
|
|
16485
|
-
className: "border-input hover:bg-muted mt-6 w-full rounded-lg border py-3 text-sm font-medium transition-colors",
|
|
16486
|
-
children: labels?.done ?? "Done"
|
|
16487
|
-
}
|
|
16488
|
-
)
|
|
16489
|
-
]
|
|
16490
|
-
}
|
|
16491
|
-
)
|
|
16492
|
-
}
|
|
16493
|
-
),
|
|
16494
|
-
!isMobileVariant && isCalendarOpen && ReactDOM.createPortal(
|
|
16495
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16496
|
-
"div",
|
|
16497
|
-
{
|
|
16498
|
-
ref: (node) => {
|
|
16499
|
-
calendarRef.current = node;
|
|
16500
|
-
floatingRef.current = node;
|
|
16501
|
-
},
|
|
16502
|
-
style,
|
|
16503
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
16504
|
-
"overflow-auto",
|
|
16505
|
-
"bg-background border-border rounded-lg border shadow-lg"
|
|
16506
|
-
),
|
|
16507
|
-
role: "dialog",
|
|
16508
|
-
"aria-label": "Choose date range",
|
|
16509
|
-
"data-slot": "date-range-popup",
|
|
16510
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex", children: [
|
|
16511
|
-
showPresets && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16512
|
-
"div",
|
|
16513
|
-
{
|
|
16514
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
16515
|
-
"border-border flex w-[200px] shrink-0 flex-col gap-0.5 border-e p-3",
|
|
16516
|
-
isResponsive && "hidden md:flex"
|
|
16517
|
-
),
|
|
16518
|
-
"data-slot": "date-range-presets",
|
|
16519
|
-
children: finalPresets.map((preset) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16520
|
-
"button",
|
|
16521
|
-
{
|
|
16522
|
-
type: "button",
|
|
16523
|
-
onClick: () => handlePresetSelect(preset.key),
|
|
16524
|
-
"data-slot": "date-range-preset",
|
|
16525
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
16526
|
-
"rounded-md px-3 py-1.5 text-start text-sm transition-colors",
|
|
16527
|
-
"hover:bg-muted",
|
|
16528
|
-
activePreset === preset.key && "bg-primary-800 text-white"
|
|
16529
|
-
),
|
|
16530
|
-
children: preset.label
|
|
16531
|
-
},
|
|
16532
|
-
preset.key
|
|
16533
|
-
))
|
|
16534
|
-
}
|
|
16535
|
-
),
|
|
16536
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", "data-slot": "date-range-calendar", children: [
|
|
16537
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16538
|
-
"p",
|
|
16539
|
-
{
|
|
16540
|
-
className: "text-muted-foreground mb-4 text-sm",
|
|
16541
|
-
"data-slot": "date-range-subtitle",
|
|
16542
|
-
children: "Select a start and end date from the calendar."
|
|
16543
|
-
}
|
|
16544
|
-
),
|
|
16545
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16546
|
-
"div",
|
|
16547
|
-
{
|
|
16548
|
-
className: "flex gap-8",
|
|
16549
|
-
onMouseLeave: () => setHoverDate(null),
|
|
16550
|
-
"data-slot": "date-range-calendars",
|
|
16551
|
-
children: [
|
|
16552
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
16553
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16554
|
-
"div",
|
|
16555
|
-
{
|
|
16556
|
-
className: "mb-3 flex items-center",
|
|
16557
|
-
"data-slot": "date-range-month-header",
|
|
16558
|
-
children: [
|
|
16559
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16560
|
-
"button",
|
|
16561
|
-
{
|
|
16562
|
-
type: "button",
|
|
16563
|
-
onClick: goToPrevMonth,
|
|
16564
|
-
className: "hover:bg-muted rounded-md p-1 transition-colors",
|
|
16565
|
-
"aria-label": "Previous month",
|
|
16566
|
-
"data-slot": "date-range-nav",
|
|
16567
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-4 w-4 rtl:-scale-x-100" })
|
|
16568
|
-
}
|
|
16569
|
-
),
|
|
16570
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16571
|
-
"div",
|
|
16572
|
-
{
|
|
16573
|
-
className: "flex-1 text-center text-sm font-medium",
|
|
16574
|
-
"data-slot": "date-range-month-label",
|
|
16575
|
-
children: [
|
|
16576
|
-
monthNames[leftMonth],
|
|
16577
|
-
" ",
|
|
16578
|
-
leftYear
|
|
16579
|
-
]
|
|
16580
|
-
}
|
|
16581
|
-
),
|
|
16582
|
-
isResponsive && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16583
|
-
"button",
|
|
16584
|
-
{
|
|
16585
|
-
type: "button",
|
|
16586
|
-
onClick: goToNextMonth,
|
|
16587
|
-
className: "hover:bg-muted rounded-md p-1 transition-colors md:hidden",
|
|
16588
|
-
"aria-label": "Next month",
|
|
16589
|
-
"data-slot": "date-range-nav",
|
|
16590
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4 rtl:-scale-x-100" })
|
|
16591
|
-
}
|
|
16592
|
-
)
|
|
16593
|
-
]
|
|
16594
|
-
}
|
|
16595
|
-
),
|
|
16596
|
-
renderMonthGrid(leftMonth, leftYear)
|
|
16597
|
-
] }),
|
|
16598
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkS5RVSXDV_cjs.cn(isResponsive && "hidden md:block"), children: [
|
|
16599
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16600
|
-
"div",
|
|
16601
|
-
{
|
|
16602
|
-
className: "mb-3 flex items-center",
|
|
16603
|
-
"data-slot": "date-range-month-header",
|
|
16604
|
-
children: [
|
|
16605
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16606
|
-
"div",
|
|
16607
|
-
{
|
|
16608
|
-
className: "flex-1 text-center text-sm font-medium",
|
|
16609
|
-
"data-slot": "date-range-month-label",
|
|
16610
|
-
children: [
|
|
16611
|
-
monthNames[rightMonth],
|
|
16612
|
-
" ",
|
|
16613
|
-
rightYear
|
|
16614
|
-
]
|
|
16615
|
-
}
|
|
16616
|
-
),
|
|
16617
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16618
|
-
"button",
|
|
16619
|
-
{
|
|
16620
|
-
type: "button",
|
|
16621
|
-
onClick: goToNextMonth,
|
|
16622
|
-
className: "hover:bg-muted rounded-md p-1 transition-colors",
|
|
16623
|
-
"aria-label": "Next month",
|
|
16624
|
-
"data-slot": "date-range-nav",
|
|
16625
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4 rtl:-scale-x-100" })
|
|
16626
|
-
}
|
|
16627
|
-
)
|
|
16628
|
-
]
|
|
16629
|
-
}
|
|
16630
|
-
),
|
|
16631
|
-
renderMonthGrid(rightMonth, rightYear)
|
|
16632
|
-
] })
|
|
16633
|
-
]
|
|
16634
|
-
}
|
|
16635
|
-
)
|
|
16636
|
-
] })
|
|
16637
|
-
] })
|
|
16638
|
-
}
|
|
16639
|
-
),
|
|
16640
|
-
document.body
|
|
16641
|
-
)
|
|
16642
|
-
]
|
|
16643
|
-
}
|
|
16644
|
-
);
|
|
16645
|
-
}
|
|
16646
|
-
function DateRangeFilter({
|
|
16647
|
-
value: _value,
|
|
16648
|
-
onChange,
|
|
16649
|
-
presets,
|
|
16650
|
-
activePreset,
|
|
16651
|
-
variant = "outline",
|
|
16652
|
-
className,
|
|
16653
|
-
labels = {}
|
|
16654
|
-
}) {
|
|
16655
|
-
const finalPresets = presets || getDefaultPresets(labels);
|
|
16656
|
-
const activeLabel = finalPresets.find((p) => p.key === activePreset)?.label;
|
|
16657
|
-
const handlePresetSelect = (presetKey) => {
|
|
16658
|
-
const range = calculateDateRange(presetKey);
|
|
16659
|
-
onChange(range, presetKey);
|
|
16660
|
-
};
|
|
16661
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16662
|
-
chunkPINIBEIU_cjs.Dropdown,
|
|
16663
|
-
{
|
|
16664
|
-
trigger: /* @__PURE__ */ jsxRuntime.jsxs(chunkANMX7YDL_cjs.Button, { variant, size: "md", className, children: [
|
|
16665
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "me-2 h-4 w-4" }),
|
|
16666
|
-
activeLabel || labels.filter || "Filter by Date",
|
|
16667
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "ms-2 h-3 w-3" })
|
|
16668
|
-
] }),
|
|
16669
|
-
className: "w-56",
|
|
16670
|
-
"data-slot": "date-range-filter",
|
|
16671
|
-
children: finalPresets.map((preset) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16672
|
-
chunkPINIBEIU_cjs.DropdownItem,
|
|
16673
|
-
{
|
|
16674
|
-
onClick: () => handlePresetSelect(preset.key),
|
|
16675
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
16676
|
-
activePreset === preset.key && "bg-primary/10 text-primary"
|
|
16677
|
-
),
|
|
16678
|
-
children: preset.label
|
|
16679
|
-
},
|
|
16680
|
-
preset.key
|
|
16681
|
-
))
|
|
16682
|
-
}
|
|
16683
|
-
);
|
|
16684
|
-
}
|
|
16685
13753
|
function DropZone({
|
|
16686
13754
|
onFilesSelected,
|
|
16687
13755
|
acceptedFileTypes,
|
|
@@ -19333,7 +16401,7 @@ function CreateInvoiceModal({
|
|
|
19333
16401
|
}
|
|
19334
16402
|
),
|
|
19335
16403
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19336
|
-
|
|
16404
|
+
chunkXQHDQ64G_cjs.Textarea,
|
|
19337
16405
|
{
|
|
19338
16406
|
label: "Notes (Optional)",
|
|
19339
16407
|
rows: 3,
|
|
@@ -19649,7 +16717,7 @@ function CreateReferralModal({
|
|
|
19649
16717
|
)) })
|
|
19650
16718
|
] }),
|
|
19651
16719
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
19652
|
-
|
|
16720
|
+
chunkXQHDQ64G_cjs.Textarea,
|
|
19653
16721
|
{
|
|
19654
16722
|
label: "Notes (Optional)",
|
|
19655
16723
|
rows: 2,
|
|
@@ -20241,7 +17309,7 @@ function EmployeeForm({
|
|
|
20241
17309
|
)
|
|
20242
17310
|
] }),
|
|
20243
17311
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20244
|
-
|
|
17312
|
+
chunkXQHDQ64G_cjs.Textarea,
|
|
20245
17313
|
{
|
|
20246
17314
|
label: additionalInformation,
|
|
20247
17315
|
value: additionalInfo,
|
|
@@ -23260,7 +20328,7 @@ function HelpSupportPanel({
|
|
|
23260
20328
|
}
|
|
23261
20329
|
),
|
|
23262
20330
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23263
|
-
|
|
20331
|
+
chunkXQHDQ64G_cjs.Textarea,
|
|
23264
20332
|
{
|
|
23265
20333
|
id: "support-message",
|
|
23266
20334
|
required: true,
|
|
@@ -23994,7 +21062,7 @@ function InventoryManager({
|
|
|
23994
21062
|
}
|
|
23995
21063
|
),
|
|
23996
21064
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23997
|
-
|
|
21065
|
+
chunkXQHDQ64G_cjs.Textarea,
|
|
23998
21066
|
{
|
|
23999
21067
|
label: "Memo",
|
|
24000
21068
|
value: updateMemo,
|
|
@@ -27654,7 +24722,7 @@ var defaultOrderTabs = [
|
|
|
27654
24722
|
{ id: "rejected", label: "Rejected", statuses: ["rejected", "cancelled"] }
|
|
27655
24723
|
];
|
|
27656
24724
|
function orderToMedication(order) {
|
|
27657
|
-
const sig = order.detail ?
|
|
24725
|
+
const sig = order.detail ? chunkZ2OOJGHL_cjs.parseSig(order.detail) : void 0;
|
|
27658
24726
|
return {
|
|
27659
24727
|
id: order.orderId,
|
|
27660
24728
|
name: order.display,
|
|
@@ -27662,7 +24730,7 @@ function orderToMedication(order) {
|
|
|
27662
24730
|
status: "unreconciled",
|
|
27663
24731
|
indication: order.indication,
|
|
27664
24732
|
pharmacyNotes: order.notes,
|
|
27665
|
-
...
|
|
24733
|
+
...chunkZ2OOJGHL_cjs.labelToMedicationFields(order.display),
|
|
27666
24734
|
...sig && {
|
|
27667
24735
|
route: sig.route,
|
|
27668
24736
|
frequency: sig.frequency,
|
|
@@ -27733,7 +24801,7 @@ function BaseOrderEditor({
|
|
|
27733
24801
|
onSave
|
|
27734
24802
|
}) {
|
|
27735
24803
|
const config = TYPE_CONFIG[type];
|
|
27736
|
-
const ambientCodeLookup =
|
|
24804
|
+
const ambientCodeLookup = chunkZ2OOJGHL_cjs.useCodeLookupConfig();
|
|
27737
24805
|
const effectiveCodeLookup = codeLookup === false ? void 0 : codeLookup ?? ambientCodeLookup ?? void 0;
|
|
27738
24806
|
const [draft, setDraft] = React13__namespace.useState(
|
|
27739
24807
|
() => order ?? {
|
|
@@ -27854,7 +24922,7 @@ function BaseOrderEditor({
|
|
|
27854
24922
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
27855
24923
|
/* @__PURE__ */ jsxRuntime.jsx(chunkAIJAFPGJ_cjs.Label, { htmlFor: "ord-detail", children: "Instructions" }),
|
|
27856
24924
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27857
|
-
|
|
24925
|
+
chunkXQHDQ64G_cjs.Textarea,
|
|
27858
24926
|
{
|
|
27859
24927
|
id: "ord-detail",
|
|
27860
24928
|
value: draft.detail ?? "",
|
|
@@ -27877,7 +24945,7 @@ function BaseOrderEditor({
|
|
|
27877
24945
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
27878
24946
|
/* @__PURE__ */ jsxRuntime.jsx(chunkAIJAFPGJ_cjs.Label, { htmlFor: "ord-notes", children: type === "referral" ? "Notes to consultant" : "Notes to performer" }),
|
|
27879
24947
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
27880
|
-
|
|
24948
|
+
chunkXQHDQ64G_cjs.Textarea,
|
|
27881
24949
|
{
|
|
27882
24950
|
id: "ord-notes",
|
|
27883
24951
|
value: draft.notes ?? "",
|
|
@@ -27932,7 +25000,7 @@ function OrderEditor({
|
|
|
27932
25000
|
display: ""
|
|
27933
25001
|
};
|
|
27934
25002
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
27935
|
-
|
|
25003
|
+
chunkZ2OOJGHL_cjs.MedicationEditor,
|
|
27936
25004
|
{
|
|
27937
25005
|
open,
|
|
27938
25006
|
medication: order ? orderToMedication(order) : void 0,
|
|
@@ -30588,7 +27656,7 @@ function RelevanceControl({
|
|
|
30588
27656
|
{
|
|
30589
27657
|
role: "toolbar",
|
|
30590
27658
|
"aria-label": `Relevance for ${labelPrefix}`,
|
|
30591
|
-
onKeyDown:
|
|
27659
|
+
onKeyDown: chunk4NB4WOGU_cjs.toolbarKeyNav,
|
|
30592
27660
|
className: "border-border flex shrink-0 items-center overflow-hidden rounded-md border",
|
|
30593
27661
|
children: RELEVANCE_ORDER.map((relevance) => {
|
|
30594
27662
|
const active = value === relevance;
|
|
@@ -30658,14 +27726,14 @@ var PresentingProblems = React13__namespace.forwardRef(
|
|
|
30658
27726
|
const to = from + dir;
|
|
30659
27727
|
if (to < 0 || to >= ids.length) return;
|
|
30660
27728
|
[ids[from], ids[to]] = [ids[to], ids[from]];
|
|
30661
|
-
const current = currentAssertion(concern);
|
|
27729
|
+
const current = chunk4NB4WOGU_cjs.currentAssertion(concern);
|
|
30662
27730
|
setAnnouncement(
|
|
30663
27731
|
`${current?.text ?? concern.concernId} moved ${dir === -1 ? "up" : "down"}`
|
|
30664
27732
|
);
|
|
30665
27733
|
onReorder(ids);
|
|
30666
27734
|
};
|
|
30667
27735
|
const renderRow = (concern, inUnselectedPool) => {
|
|
30668
|
-
const current = currentAssertion(concern);
|
|
27736
|
+
const current = chunk4NB4WOGU_cjs.currentAssertion(concern);
|
|
30669
27737
|
if (!current) return null;
|
|
30670
27738
|
const relevance = relevanceOf(concern.concernId);
|
|
30671
27739
|
const entry = presenting.find((p) => p.concernId === concern.concernId);
|
|
@@ -30717,7 +27785,7 @@ var PresentingProblems = React13__namespace.forwardRef(
|
|
|
30717
27785
|
}
|
|
30718
27786
|
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/60 select-none", children: "\u2022" }),
|
|
30719
27787
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground font-medium", children: current.text }),
|
|
30720
|
-
/* @__PURE__ */ jsxRuntime.jsx(CodingChips, { coding: current.coding }),
|
|
27788
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk4NB4WOGU_cjs.CodingChips, { coding: current.coding }),
|
|
30721
27789
|
entry?.comments && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-xs", children: entry.comments }),
|
|
30722
27790
|
outOfScope && /* @__PURE__ */ jsxRuntime.jsx(
|
|
30723
27791
|
chunk7E46YDOT_cjs.Badge,
|
|
@@ -34418,7 +31486,7 @@ function ProviderSettings({
|
|
|
34418
31486
|
}
|
|
34419
31487
|
),
|
|
34420
31488
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
34421
|
-
|
|
31489
|
+
chunkXQHDQ64G_cjs.Textarea,
|
|
34422
31490
|
{
|
|
34423
31491
|
id: "provider-description",
|
|
34424
31492
|
value: settings.general.description || "",
|
|
@@ -36416,7 +33484,7 @@ var ResultsEntryForm = React13__namespace.forwardRef(function ResultsEntryForm2(
|
|
|
36416
33484
|
}
|
|
36417
33485
|
) }),
|
|
36418
33486
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36419
|
-
|
|
33487
|
+
chunkXQHDQ64G_cjs.Textarea,
|
|
36420
33488
|
{
|
|
36421
33489
|
label: providerRecommendations,
|
|
36422
33490
|
value: recommendations,
|
|
@@ -44519,11 +41587,11 @@ Object.defineProperty(exports, "resolveCurrent", {
|
|
|
44519
41587
|
});
|
|
44520
41588
|
Object.defineProperty(exports, "ActionPlan", {
|
|
44521
41589
|
enumerable: true,
|
|
44522
|
-
get: function () { return
|
|
41590
|
+
get: function () { return chunkMA3Y6AYA_cjs.ActionPlan; }
|
|
44523
41591
|
});
|
|
44524
41592
|
Object.defineProperty(exports, "defaultActionPlanLabels", {
|
|
44525
41593
|
enumerable: true,
|
|
44526
|
-
get: function () { return
|
|
41594
|
+
get: function () { return chunkMA3Y6AYA_cjs.defaultActionPlanLabels; }
|
|
44527
41595
|
});
|
|
44528
41596
|
Object.defineProperty(exports, "ActivityFeed", {
|
|
44529
41597
|
enumerable: true,
|
|
@@ -44655,71 +41723,67 @@ Object.defineProperty(exports, "Sparkline", {
|
|
|
44655
41723
|
});
|
|
44656
41724
|
Object.defineProperty(exports, "AILogoIcon", {
|
|
44657
41725
|
enumerable: true,
|
|
44658
|
-
get: function () { return
|
|
41726
|
+
get: function () { return chunkZK2R6UGF_cjs.AILogoIcon; }
|
|
44659
41727
|
});
|
|
44660
41728
|
Object.defineProperty(exports, "AIMessageDisplay", {
|
|
44661
41729
|
enumerable: true,
|
|
44662
|
-
get: function () { return
|
|
41730
|
+
get: function () { return chunkZK2R6UGF_cjs.AIMessageDisplay; }
|
|
44663
41731
|
});
|
|
44664
41732
|
Object.defineProperty(exports, "AITypingIndicator", {
|
|
44665
41733
|
enumerable: true,
|
|
44666
|
-
get: function () { return
|
|
44667
|
-
});
|
|
44668
|
-
Object.defineProperty(exports, "ButtonGroup", {
|
|
44669
|
-
enumerable: true,
|
|
44670
|
-
get: function () { return chunkQKW2QCGI_cjs.ButtonGroup; }
|
|
41734
|
+
get: function () { return chunkZK2R6UGF_cjs.AITypingIndicator; }
|
|
44671
41735
|
});
|
|
44672
41736
|
Object.defineProperty(exports, "ChatBubble", {
|
|
44673
41737
|
enumerable: true,
|
|
44674
|
-
get: function () { return
|
|
41738
|
+
get: function () { return chunkZK2R6UGF_cjs.ChatBubble; }
|
|
44675
41739
|
});
|
|
44676
41740
|
Object.defineProperty(exports, "ChevronIcon", {
|
|
44677
41741
|
enumerable: true,
|
|
44678
|
-
get: function () { return
|
|
41742
|
+
get: function () { return chunkZK2R6UGF_cjs.ChevronIcon; }
|
|
44679
41743
|
});
|
|
44680
41744
|
Object.defineProperty(exports, "CloseIcon", {
|
|
44681
41745
|
enumerable: true,
|
|
44682
|
-
get: function () { return
|
|
41746
|
+
get: function () { return chunkZK2R6UGF_cjs.CloseIcon; }
|
|
44683
41747
|
});
|
|
44684
41748
|
Object.defineProperty(exports, "CollapsiblePill", {
|
|
44685
41749
|
enumerable: true,
|
|
44686
|
-
get: function () { return
|
|
41750
|
+
get: function () { return chunkZK2R6UGF_cjs.CollapsiblePill; }
|
|
44687
41751
|
});
|
|
44688
41752
|
Object.defineProperty(exports, "MCPToolCallDisplay", {
|
|
44689
41753
|
enumerable: true,
|
|
44690
|
-
get: function () { return
|
|
41754
|
+
get: function () { return chunkZK2R6UGF_cjs.MCPToolCallDisplay; }
|
|
44691
41755
|
});
|
|
44692
41756
|
Object.defineProperty(exports, "MessageAvatar", {
|
|
44693
41757
|
enumerable: true,
|
|
44694
|
-
get: function () { return
|
|
41758
|
+
get: function () { return chunkZK2R6UGF_cjs.MessageAvatar; }
|
|
44695
41759
|
});
|
|
44696
41760
|
Object.defineProperty(exports, "RefreshIcon", {
|
|
44697
41761
|
enumerable: true,
|
|
44698
|
-
get: function () { return
|
|
41762
|
+
get: function () { return chunkZK2R6UGF_cjs.RefreshIcon; }
|
|
44699
41763
|
});
|
|
44700
41764
|
Object.defineProperty(exports, "ResourceLink", {
|
|
44701
41765
|
enumerable: true,
|
|
44702
|
-
get: function () { return
|
|
41766
|
+
get: function () { return chunkZK2R6UGF_cjs.ResourceLink; }
|
|
44703
41767
|
});
|
|
44704
41768
|
Object.defineProperty(exports, "SendIcon", {
|
|
44705
41769
|
enumerable: true,
|
|
44706
|
-
get: function () { return
|
|
41770
|
+
get: function () { return chunkZK2R6UGF_cjs.SendIcon; }
|
|
44707
41771
|
});
|
|
44708
41772
|
Object.defineProperty(exports, "SparklesIcon", {
|
|
44709
41773
|
enumerable: true,
|
|
44710
|
-
get: function () { return
|
|
41774
|
+
get: function () { return chunkZK2R6UGF_cjs.SparklesIcon; }
|
|
44711
41775
|
});
|
|
44712
41776
|
Object.defineProperty(exports, "SpinnerIcon", {
|
|
44713
41777
|
enumerable: true,
|
|
44714
|
-
get: function () { return
|
|
41778
|
+
get: function () { return chunkZK2R6UGF_cjs.SpinnerIcon; }
|
|
44715
41779
|
});
|
|
44716
41780
|
Object.defineProperty(exports, "ToolStatusIcon", {
|
|
44717
41781
|
enumerable: true,
|
|
44718
|
-
get: function () { return
|
|
41782
|
+
get: function () { return chunkZK2R6UGF_cjs.ToolStatusIcon; }
|
|
44719
41783
|
});
|
|
44720
41784
|
Object.defineProperty(exports, "getToolIcon", {
|
|
44721
41785
|
enumerable: true,
|
|
44722
|
-
get: function () { return
|
|
41786
|
+
get: function () { return chunkZK2R6UGF_cjs.getToolIcon; }
|
|
44723
41787
|
});
|
|
44724
41788
|
Object.defineProperty(exports, "AttachmentPreview", {
|
|
44725
41789
|
enumerable: true,
|
|
@@ -45011,23 +42075,23 @@ Object.defineProperty(exports, "recordButtonVariants", {
|
|
|
45011
42075
|
});
|
|
45012
42076
|
Object.defineProperty(exports, "FillerWordsModal", {
|
|
45013
42077
|
enumerable: true,
|
|
45014
|
-
get: function () { return
|
|
42078
|
+
get: function () { return chunk7XC6E4BT_cjs.FillerWordsModal; }
|
|
45015
42079
|
});
|
|
45016
42080
|
Object.defineProperty(exports, "MediaEditor", {
|
|
45017
42081
|
enumerable: true,
|
|
45018
|
-
get: function () { return
|
|
42082
|
+
get: function () { return chunk7XC6E4BT_cjs.MediaEditor; }
|
|
45019
42083
|
});
|
|
45020
42084
|
Object.defineProperty(exports, "SilenceSettingsModal", {
|
|
45021
42085
|
enumerable: true,
|
|
45022
|
-
get: function () { return
|
|
42086
|
+
get: function () { return chunk7XC6E4BT_cjs.SilenceSettingsModal; }
|
|
45023
42087
|
});
|
|
45024
42088
|
Object.defineProperty(exports, "SpeedMarkerMenu", {
|
|
45025
42089
|
enumerable: true,
|
|
45026
|
-
get: function () { return
|
|
42090
|
+
get: function () { return chunk7XC6E4BT_cjs.SpeedMarkerMenu; }
|
|
45027
42091
|
});
|
|
45028
42092
|
Object.defineProperty(exports, "WordEditorModal", {
|
|
45029
42093
|
enumerable: true,
|
|
45030
|
-
get: function () { return
|
|
42094
|
+
get: function () { return chunk7XC6E4BT_cjs.WordEditorModal; }
|
|
45031
42095
|
});
|
|
45032
42096
|
Object.defineProperty(exports, "Slider", {
|
|
45033
42097
|
enumerable: true,
|
|
@@ -45255,39 +42319,39 @@ Object.defineProperty(exports, "sheetOverlayVariants", {
|
|
|
45255
42319
|
});
|
|
45256
42320
|
Object.defineProperty(exports, "EMAIL_BLOCK_TYPES", {
|
|
45257
42321
|
enumerable: true,
|
|
45258
|
-
get: function () { return
|
|
42322
|
+
get: function () { return chunk5KGYTNOA_cjs.EMAIL_BLOCK_TYPES; }
|
|
45259
42323
|
});
|
|
45260
42324
|
Object.defineProperty(exports, "EmailEditor", {
|
|
45261
42325
|
enumerable: true,
|
|
45262
|
-
get: function () { return
|
|
42326
|
+
get: function () { return chunk5KGYTNOA_cjs.EmailEditor; }
|
|
45263
42327
|
});
|
|
45264
42328
|
Object.defineProperty(exports, "createDefaultDesignSettings", {
|
|
45265
42329
|
enumerable: true,
|
|
45266
|
-
get: function () { return
|
|
42330
|
+
get: function () { return chunk5KGYTNOA_cjs.createDefaultDesignSettings; }
|
|
45267
42331
|
});
|
|
45268
42332
|
Object.defineProperty(exports, "createEmailBlock", {
|
|
45269
42333
|
enumerable: true,
|
|
45270
|
-
get: function () { return
|
|
42334
|
+
get: function () { return chunk5KGYTNOA_cjs.createEmailBlock; }
|
|
45271
42335
|
});
|
|
45272
42336
|
Object.defineProperty(exports, "createEmailHtmlSanitizer", {
|
|
45273
42337
|
enumerable: true,
|
|
45274
|
-
get: function () { return
|
|
42338
|
+
get: function () { return chunk5KGYTNOA_cjs.createEmailHtmlSanitizer; }
|
|
45275
42339
|
});
|
|
45276
42340
|
Object.defineProperty(exports, "createEmptyEmailContentTree", {
|
|
45277
42341
|
enumerable: true,
|
|
45278
|
-
get: function () { return
|
|
42342
|
+
get: function () { return chunk5KGYTNOA_cjs.createEmptyEmailContentTree; }
|
|
45279
42343
|
});
|
|
45280
42344
|
Object.defineProperty(exports, "defaultEmailEditorLabels", {
|
|
45281
42345
|
enumerable: true,
|
|
45282
|
-
get: function () { return
|
|
42346
|
+
get: function () { return chunk5KGYTNOA_cjs.defaultEmailEditorLabels; }
|
|
45283
42347
|
});
|
|
45284
42348
|
Object.defineProperty(exports, "generateEmailBlockId", {
|
|
45285
42349
|
enumerable: true,
|
|
45286
|
-
get: function () { return
|
|
42350
|
+
get: function () { return chunk5KGYTNOA_cjs.generateEmailBlockId; }
|
|
45287
42351
|
});
|
|
45288
42352
|
Object.defineProperty(exports, "renderEmailMjml", {
|
|
45289
42353
|
enumerable: true,
|
|
45290
|
-
get: function () { return
|
|
42354
|
+
get: function () { return chunk5KGYTNOA_cjs.renderEmailMjml; }
|
|
45291
42355
|
});
|
|
45292
42356
|
Object.defineProperty(exports, "Tabs", {
|
|
45293
42357
|
enumerable: true,
|
|
@@ -45353,18 +42417,6 @@ Object.defineProperty(exports, "defaultCalendarLabels", {
|
|
|
45353
42417
|
enumerable: true,
|
|
45354
42418
|
get: function () { return chunkGM32IDVL_cjs.defaultCalendarLabels; }
|
|
45355
42419
|
});
|
|
45356
|
-
Object.defineProperty(exports, "Checkbox", {
|
|
45357
|
-
enumerable: true,
|
|
45358
|
-
get: function () { return chunk7AECNMYV_cjs.Checkbox; }
|
|
45359
|
-
});
|
|
45360
|
-
Object.defineProperty(exports, "CheckboxGroup", {
|
|
45361
|
-
enumerable: true,
|
|
45362
|
-
get: function () { return chunk7AECNMYV_cjs.CheckboxGroup; }
|
|
45363
|
-
});
|
|
45364
|
-
Object.defineProperty(exports, "checkboxVariants", {
|
|
45365
|
-
enumerable: true,
|
|
45366
|
-
get: function () { return chunk7AECNMYV_cjs.checkboxVariants; }
|
|
45367
|
-
});
|
|
45368
42420
|
Object.defineProperty(exports, "ClampedText", {
|
|
45369
42421
|
enumerable: true,
|
|
45370
42422
|
get: function () { return chunkIVGI353O_cjs.ClampedText; }
|
|
@@ -45775,11 +42827,11 @@ Object.defineProperty(exports, "unformatPhoneNumber", {
|
|
|
45775
42827
|
});
|
|
45776
42828
|
Object.defineProperty(exports, "miewebUIPreset", {
|
|
45777
42829
|
enumerable: true,
|
|
45778
|
-
get: function () { return
|
|
42830
|
+
get: function () { return chunkXPVQI3MM_cjs.miewebUIPreset; }
|
|
45779
42831
|
});
|
|
45780
42832
|
Object.defineProperty(exports, "miewebUISafelist", {
|
|
45781
42833
|
enumerable: true,
|
|
45782
|
-
get: function () { return
|
|
42834
|
+
get: function () { return chunkXPVQI3MM_cjs.miewebUISafelist; }
|
|
45783
42835
|
});
|
|
45784
42836
|
Object.defineProperty(exports, "Accordion", {
|
|
45785
42837
|
enumerable: true,
|
|
@@ -45859,72 +42911,160 @@ Object.defineProperty(exports, "isApplicable", {
|
|
|
45859
42911
|
});
|
|
45860
42912
|
Object.defineProperty(exports, "ALLERGY_TYPE_LABELS", {
|
|
45861
42913
|
enumerable: true,
|
|
45862
|
-
get: function () { return
|
|
42914
|
+
get: function () { return chunkZ2OOJGHL_cjs.ALLERGY_TYPE_LABELS; }
|
|
45863
42915
|
});
|
|
45864
42916
|
Object.defineProperty(exports, "AllergyList", {
|
|
45865
42917
|
enumerable: true,
|
|
45866
|
-
get: function () { return
|
|
42918
|
+
get: function () { return chunkZ2OOJGHL_cjs.AllergyList; }
|
|
45867
42919
|
});
|
|
45868
42920
|
Object.defineProperty(exports, "AllergyManager", {
|
|
45869
42921
|
enumerable: true,
|
|
45870
|
-
get: function () { return
|
|
42922
|
+
get: function () { return chunkZ2OOJGHL_cjs.AllergyManager; }
|
|
42923
|
+
});
|
|
42924
|
+
Object.defineProperty(exports, "Assessment", {
|
|
42925
|
+
enumerable: true,
|
|
42926
|
+
get: function () { return chunkZ2OOJGHL_cjs.Assessment; }
|
|
45871
42927
|
});
|
|
45872
42928
|
Object.defineProperty(exports, "CodeLookupProvider", {
|
|
45873
42929
|
enumerable: true,
|
|
45874
|
-
get: function () { return
|
|
42930
|
+
get: function () { return chunkZ2OOJGHL_cjs.CodeLookupProvider; }
|
|
42931
|
+
});
|
|
42932
|
+
Object.defineProperty(exports, "ConditionEditor", {
|
|
42933
|
+
enumerable: true,
|
|
42934
|
+
get: function () { return chunkZ2OOJGHL_cjs.ConditionEditor; }
|
|
42935
|
+
});
|
|
42936
|
+
Object.defineProperty(exports, "DateRangeFilter", {
|
|
42937
|
+
enumerable: true,
|
|
42938
|
+
get: function () { return chunkZ2OOJGHL_cjs.DateRangeFilter; }
|
|
42939
|
+
});
|
|
42940
|
+
Object.defineProperty(exports, "DateRangePicker", {
|
|
42941
|
+
enumerable: true,
|
|
42942
|
+
get: function () { return chunkZ2OOJGHL_cjs.DateRangePicker; }
|
|
45875
42943
|
});
|
|
45876
42944
|
Object.defineProperty(exports, "MEDICATION_STATUS_LABELS", {
|
|
45877
42945
|
enumerable: true,
|
|
45878
|
-
get: function () { return
|
|
42946
|
+
get: function () { return chunkZ2OOJGHL_cjs.MEDICATION_STATUS_LABELS; }
|
|
45879
42947
|
});
|
|
45880
42948
|
Object.defineProperty(exports, "MedicationEditor", {
|
|
45881
42949
|
enumerable: true,
|
|
45882
|
-
get: function () { return
|
|
42950
|
+
get: function () { return chunkZ2OOJGHL_cjs.MedicationEditor; }
|
|
45883
42951
|
});
|
|
45884
42952
|
Object.defineProperty(exports, "MedicationList", {
|
|
45885
42953
|
enumerable: true,
|
|
45886
|
-
get: function () { return
|
|
42954
|
+
get: function () { return chunkZ2OOJGHL_cjs.MedicationList; }
|
|
45887
42955
|
});
|
|
45888
42956
|
Object.defineProperty(exports, "MedicationReconciliation", {
|
|
45889
42957
|
enumerable: true,
|
|
45890
|
-
get: function () { return
|
|
42958
|
+
get: function () { return chunkZ2OOJGHL_cjs.MedicationReconciliation; }
|
|
45891
42959
|
});
|
|
45892
|
-
Object.defineProperty(exports, "
|
|
42960
|
+
Object.defineProperty(exports, "ORDER_TYPE_META", {
|
|
45893
42961
|
enumerable: true,
|
|
45894
|
-
get: function () { return
|
|
42962
|
+
get: function () { return chunkZ2OOJGHL_cjs.ORDER_TYPE_META; }
|
|
45895
42963
|
});
|
|
45896
|
-
Object.defineProperty(exports, "
|
|
42964
|
+
Object.defineProperty(exports, "ORDER_TYPE_SEARCH_DOMAINS", {
|
|
45897
42965
|
enumerable: true,
|
|
45898
|
-
get: function () { return
|
|
42966
|
+
get: function () { return chunkZ2OOJGHL_cjs.ORDER_TYPE_SEARCH_DOMAINS; }
|
|
42967
|
+
});
|
|
42968
|
+
Object.defineProperty(exports, "calculateDateRange", {
|
|
42969
|
+
enumerable: true,
|
|
42970
|
+
get: function () { return chunkZ2OOJGHL_cjs.calculateDateRange; }
|
|
42971
|
+
});
|
|
42972
|
+
Object.defineProperty(exports, "doseFormToQuantityUnit", {
|
|
42973
|
+
enumerable: true,
|
|
42974
|
+
get: function () { return chunkZ2OOJGHL_cjs.doseFormToQuantityUnit; }
|
|
42975
|
+
});
|
|
42976
|
+
Object.defineProperty(exports, "getDefaultPresets", {
|
|
42977
|
+
enumerable: true,
|
|
42978
|
+
get: function () { return chunkZ2OOJGHL_cjs.getDefaultPresets; }
|
|
42979
|
+
});
|
|
42980
|
+
Object.defineProperty(exports, "getExtendedPresets", {
|
|
42981
|
+
enumerable: true,
|
|
42982
|
+
get: function () { return chunkZ2OOJGHL_cjs.getExtendedPresets; }
|
|
42983
|
+
});
|
|
42984
|
+
Object.defineProperty(exports, "isConditionCodetype", {
|
|
42985
|
+
enumerable: true,
|
|
42986
|
+
get: function () { return chunkZ2OOJGHL_cjs.isConditionCodetype; }
|
|
45899
42987
|
});
|
|
45900
42988
|
Object.defineProperty(exports, "labelToMedicationFields", {
|
|
45901
42989
|
enumerable: true,
|
|
45902
|
-
get: function () { return
|
|
42990
|
+
get: function () { return chunkZ2OOJGHL_cjs.labelToMedicationFields; }
|
|
45903
42991
|
});
|
|
45904
42992
|
Object.defineProperty(exports, "lookupToMedicationFields", {
|
|
45905
42993
|
enumerable: true,
|
|
45906
|
-
get: function () { return
|
|
42994
|
+
get: function () { return chunkZ2OOJGHL_cjs.lookupToMedicationFields; }
|
|
42995
|
+
});
|
|
42996
|
+
Object.defineProperty(exports, "normalizeConditionCodingSystem", {
|
|
42997
|
+
enumerable: true,
|
|
42998
|
+
get: function () { return chunkZ2OOJGHL_cjs.normalizeConditionCodingSystem; }
|
|
42999
|
+
});
|
|
43000
|
+
Object.defineProperty(exports, "orderTypeForCodetype", {
|
|
43001
|
+
enumerable: true,
|
|
43002
|
+
get: function () { return chunkZ2OOJGHL_cjs.orderTypeForCodetype; }
|
|
45907
43003
|
});
|
|
45908
43004
|
Object.defineProperty(exports, "parseMedicationLabel", {
|
|
45909
43005
|
enumerable: true,
|
|
45910
|
-
get: function () { return
|
|
43006
|
+
get: function () { return chunkZ2OOJGHL_cjs.parseMedicationLabel; }
|
|
45911
43007
|
});
|
|
45912
43008
|
Object.defineProperty(exports, "parseSig", {
|
|
45913
43009
|
enumerable: true,
|
|
45914
|
-
get: function () { return
|
|
43010
|
+
get: function () { return chunkZ2OOJGHL_cjs.parseSig; }
|
|
45915
43011
|
});
|
|
45916
|
-
Object.defineProperty(exports, "
|
|
43012
|
+
Object.defineProperty(exports, "useCodeLookupConfig", {
|
|
45917
43013
|
enumerable: true,
|
|
45918
|
-
get: function () { return
|
|
43014
|
+
get: function () { return chunkZ2OOJGHL_cjs.useCodeLookupConfig; }
|
|
45919
43015
|
});
|
|
45920
|
-
Object.defineProperty(exports, "
|
|
43016
|
+
Object.defineProperty(exports, "CHANGE_TYPE_LABELS", {
|
|
43017
|
+
enumerable: true,
|
|
43018
|
+
get: function () { return chunk4NB4WOGU_cjs.CHANGE_TYPE_LABELS; }
|
|
43019
|
+
});
|
|
43020
|
+
Object.defineProperty(exports, "CONCERN_STATUS_LABELS", {
|
|
43021
|
+
enumerable: true,
|
|
43022
|
+
get: function () { return chunk4NB4WOGU_cjs.CONCERN_STATUS_LABELS; }
|
|
43023
|
+
});
|
|
43024
|
+
Object.defineProperty(exports, "CodingChips", {
|
|
43025
|
+
enumerable: true,
|
|
43026
|
+
get: function () { return chunk4NB4WOGU_cjs.CodingChips; }
|
|
43027
|
+
});
|
|
43028
|
+
Object.defineProperty(exports, "ProblemList", {
|
|
43029
|
+
enumerable: true,
|
|
43030
|
+
get: function () { return chunk4NB4WOGU_cjs.ProblemList; }
|
|
43031
|
+
});
|
|
43032
|
+
Object.defineProperty(exports, "RowActionToolbar", {
|
|
43033
|
+
enumerable: true,
|
|
43034
|
+
get: function () { return chunk4NB4WOGU_cjs.RowActionToolbar; }
|
|
43035
|
+
});
|
|
43036
|
+
Object.defineProperty(exports, "RowIconButton", {
|
|
43037
|
+
enumerable: true,
|
|
43038
|
+
get: function () { return chunk4NB4WOGU_cjs.RowIconButton; }
|
|
43039
|
+
});
|
|
43040
|
+
Object.defineProperty(exports, "UncertaintyBadge", {
|
|
43041
|
+
enumerable: true,
|
|
43042
|
+
get: function () { return chunk4NB4WOGU_cjs.UncertaintyBadge; }
|
|
43043
|
+
});
|
|
43044
|
+
Object.defineProperty(exports, "concernGroupKey", {
|
|
45921
43045
|
enumerable: true,
|
|
45922
|
-
get: function () { return
|
|
43046
|
+
get: function () { return chunk4NB4WOGU_cjs.concernGroupKey; }
|
|
43047
|
+
});
|
|
43048
|
+
Object.defineProperty(exports, "concernHistoryContent", {
|
|
43049
|
+
enumerable: true,
|
|
43050
|
+
get: function () { return chunk4NB4WOGU_cjs.concernHistoryContent; }
|
|
43051
|
+
});
|
|
43052
|
+
Object.defineProperty(exports, "currentAssertion", {
|
|
43053
|
+
enumerable: true,
|
|
43054
|
+
get: function () { return chunk4NB4WOGU_cjs.currentAssertion; }
|
|
43055
|
+
});
|
|
43056
|
+
Object.defineProperty(exports, "toolbarKeyNav", {
|
|
43057
|
+
enumerable: true,
|
|
43058
|
+
get: function () { return chunk4NB4WOGU_cjs.toolbarKeyNav; }
|
|
45923
43059
|
});
|
|
45924
43060
|
Object.defineProperty(exports, "Tooltip", {
|
|
45925
43061
|
enumerable: true,
|
|
45926
43062
|
get: function () { return chunkGLG6UE2H_cjs.Tooltip; }
|
|
45927
43063
|
});
|
|
43064
|
+
Object.defineProperty(exports, "ButtonGroup", {
|
|
43065
|
+
enumerable: true,
|
|
43066
|
+
get: function () { return chunkSV6YGK4U_cjs.ButtonGroup; }
|
|
43067
|
+
});
|
|
45928
43068
|
Object.defineProperty(exports, "Radio", {
|
|
45929
43069
|
enumerable: true,
|
|
45930
43070
|
get: function () { return chunkG7EQ3JPX_cjs.Radio; }
|
|
@@ -45951,47 +43091,47 @@ Object.defineProperty(exports, "DateInput", {
|
|
|
45951
43091
|
});
|
|
45952
43092
|
Object.defineProperty(exports, "RichTextArea", {
|
|
45953
43093
|
enumerable: true,
|
|
45954
|
-
get: function () { return
|
|
43094
|
+
get: function () { return chunkXQHDQ64G_cjs.TextAreaRich; }
|
|
45955
43095
|
});
|
|
45956
43096
|
Object.defineProperty(exports, "TextAreaPlain", {
|
|
45957
43097
|
enumerable: true,
|
|
45958
|
-
get: function () { return
|
|
43098
|
+
get: function () { return chunkXQHDQ64G_cjs.TextAreaPlain; }
|
|
45959
43099
|
});
|
|
45960
43100
|
Object.defineProperty(exports, "TextAreaRich", {
|
|
45961
43101
|
enumerable: true,
|
|
45962
|
-
get: function () { return
|
|
43102
|
+
get: function () { return chunkXQHDQ64G_cjs.TextAreaRich; }
|
|
45963
43103
|
});
|
|
45964
43104
|
Object.defineProperty(exports, "Textarea", {
|
|
45965
43105
|
enumerable: true,
|
|
45966
|
-
get: function () { return
|
|
43106
|
+
get: function () { return chunkXQHDQ64G_cjs.Textarea; }
|
|
45967
43107
|
});
|
|
45968
43108
|
Object.defineProperty(exports, "htmlToPlain", {
|
|
45969
43109
|
enumerable: true,
|
|
45970
|
-
get: function () { return
|
|
43110
|
+
get: function () { return chunkXQHDQ64G_cjs.htmlToPlain; }
|
|
45971
43111
|
});
|
|
45972
43112
|
Object.defineProperty(exports, "plainToHtml", {
|
|
45973
43113
|
enumerable: true,
|
|
45974
|
-
get: function () { return
|
|
43114
|
+
get: function () { return chunkXQHDQ64G_cjs.plainToHtml; }
|
|
45975
43115
|
});
|
|
45976
43116
|
Object.defineProperty(exports, "textareaVariants", {
|
|
45977
43117
|
enumerable: true,
|
|
45978
|
-
get: function () { return
|
|
43118
|
+
get: function () { return chunkXQHDQ64G_cjs.textareaVariants; }
|
|
45979
43119
|
});
|
|
45980
43120
|
Object.defineProperty(exports, "MacroLibrary", {
|
|
45981
43121
|
enumerable: true,
|
|
45982
|
-
get: function () { return
|
|
43122
|
+
get: function () { return chunk3Y3ZCDNF_cjs.MacroLibrary; }
|
|
45983
43123
|
});
|
|
45984
43124
|
Object.defineProperty(exports, "RichTextEditor", {
|
|
45985
43125
|
enumerable: true,
|
|
45986
|
-
get: function () { return
|
|
43126
|
+
get: function () { return chunk3Y3ZCDNF_cjs.RichTextEditor; }
|
|
45987
43127
|
});
|
|
45988
43128
|
Object.defineProperty(exports, "convertAngleBracketsToMustache", {
|
|
45989
43129
|
enumerable: true,
|
|
45990
|
-
get: function () { return
|
|
43130
|
+
get: function () { return chunk3Y3ZCDNF_cjs.convertAngleBracketsToMustache; }
|
|
45991
43131
|
});
|
|
45992
43132
|
Object.defineProperty(exports, "processDictation", {
|
|
45993
43133
|
enumerable: true,
|
|
45994
|
-
get: function () { return
|
|
43134
|
+
get: function () { return chunk3Y3ZCDNF_cjs.processDictation; }
|
|
45995
43135
|
});
|
|
45996
43136
|
Object.defineProperty(exports, "Separator", {
|
|
45997
43137
|
enumerable: true,
|
|
@@ -46093,6 +43233,18 @@ Object.defineProperty(exports, "cardVariants", {
|
|
|
46093
43233
|
enumerable: true,
|
|
46094
43234
|
get: function () { return chunkMJWFNV3L_cjs.cardVariants; }
|
|
46095
43235
|
});
|
|
43236
|
+
Object.defineProperty(exports, "Checkbox", {
|
|
43237
|
+
enumerable: true,
|
|
43238
|
+
get: function () { return chunk7AECNMYV_cjs.Checkbox; }
|
|
43239
|
+
});
|
|
43240
|
+
Object.defineProperty(exports, "CheckboxGroup", {
|
|
43241
|
+
enumerable: true,
|
|
43242
|
+
get: function () { return chunk7AECNMYV_cjs.CheckboxGroup; }
|
|
43243
|
+
});
|
|
43244
|
+
Object.defineProperty(exports, "checkboxVariants", {
|
|
43245
|
+
enumerable: true,
|
|
43246
|
+
get: function () { return chunk7AECNMYV_cjs.checkboxVariants; }
|
|
43247
|
+
});
|
|
46096
43248
|
Object.defineProperty(exports, "Modal", {
|
|
46097
43249
|
enumerable: true,
|
|
46098
43250
|
get: function () { return chunkLC3JL2HB_cjs.Modal; }
|
|
@@ -47071,7 +44223,6 @@ exports.AppHeaderSearch = AppHeaderSearch;
|
|
|
47071
44223
|
exports.AppHeaderSection = AppHeaderSection;
|
|
47072
44224
|
exports.AppHeaderTitle = AppHeaderTitle;
|
|
47073
44225
|
exports.AppHeaderUserMenu = AppHeaderUserMenu;
|
|
47074
|
-
exports.Assessment = Assessment;
|
|
47075
44226
|
exports.AuthButtons = AuthButtons;
|
|
47076
44227
|
exports.AuthDialog = AuthDialog;
|
|
47077
44228
|
exports.BUSINESS_HOURS_END_OF_DAY = BUSINESS_HOURS_END_OF_DAY;
|
|
@@ -47079,8 +44230,6 @@ exports.BookAppointmentButton = BookAppointmentButton;
|
|
|
47079
44230
|
exports.BookingDialog = BookingDialog;
|
|
47080
44231
|
exports.BusinessHours = BusinessHours;
|
|
47081
44232
|
exports.BusinessHoursEditor = BusinessHoursEditor;
|
|
47082
|
-
exports.CHANGE_TYPE_LABELS = CHANGE_TYPE_LABELS;
|
|
47083
|
-
exports.CONCERN_STATUS_LABELS = CONCERN_STATUS_LABELS;
|
|
47084
44233
|
exports.CSVColumnMapper = CSVColumnMapper;
|
|
47085
44234
|
exports.CSVFileUpload = CSVFileUpload;
|
|
47086
44235
|
exports.CardSkeleton = CardSkeleton;
|
|
@@ -47089,7 +44238,6 @@ exports.CaseManagementHeader = CaseManagementHeader;
|
|
|
47089
44238
|
exports.CheckrIntegration = CheckrIntegration;
|
|
47090
44239
|
exports.ClaimListingButton = ClaimListingButton;
|
|
47091
44240
|
exports.ClaimProviderForm = ClaimProviderForm;
|
|
47092
|
-
exports.CodingChips = CodingChips;
|
|
47093
44241
|
exports.CommandPalette = CommandPalette;
|
|
47094
44242
|
exports.CommandPaletteProvider = CommandPaletteProvider;
|
|
47095
44243
|
exports.CommandPaletteTrigger = CommandPaletteTrigger;
|
|
@@ -47098,7 +44246,6 @@ exports.CompactFilterBar = CompactFilterBar;
|
|
|
47098
44246
|
exports.CompactHeader = CompactHeader;
|
|
47099
44247
|
exports.CompactHours = CompactHours;
|
|
47100
44248
|
exports.CompactProviderHeader = CompactProviderHeader;
|
|
47101
|
-
exports.ConditionEditor = ConditionEditor;
|
|
47102
44249
|
exports.ConnectionStatusBadge = ConnectionStatusBadge;
|
|
47103
44250
|
exports.ConnectionStatusBar = ConnectionStatusBar;
|
|
47104
44251
|
exports.ConnectionStatusOverlay = ConnectionStatusOverlay;
|
|
@@ -47121,8 +44268,6 @@ exports.DashboardWidgetActions = DashboardWidgetActions;
|
|
|
47121
44268
|
exports.DashboardWidgetDataCards = DashboardWidgetDataCards;
|
|
47122
44269
|
exports.DashboardWidgetInfo = DashboardWidgetInfo;
|
|
47123
44270
|
exports.DashboardWidgetTable = DashboardWidgetTable;
|
|
47124
|
-
exports.DateRangeFilter = DateRangeFilter;
|
|
47125
|
-
exports.DateRangePicker = DateRangePicker;
|
|
47126
44271
|
exports.DialogOverlay = DialogOverlay;
|
|
47127
44272
|
exports.DisclaimerText = DisclaimerText;
|
|
47128
44273
|
exports.DockablePanel = DockablePanel;
|
|
@@ -47181,8 +44326,6 @@ exports.NavLinks = NavLinks;
|
|
|
47181
44326
|
exports.NewsletterForm = NewsletterForm;
|
|
47182
44327
|
exports.NotFoundPage = NotFoundPage;
|
|
47183
44328
|
exports.NotificationCenter = NotificationCenter;
|
|
47184
|
-
exports.ORDER_TYPE_META = ORDER_TYPE_META;
|
|
47185
|
-
exports.ORDER_TYPE_SEARCH_DOMAINS = ORDER_TYPE_SEARCH_DOMAINS;
|
|
47186
44329
|
exports.OfflinePage = OfflinePage;
|
|
47187
44330
|
exports.OnboardingCompletion = OnboardingCompletion;
|
|
47188
44331
|
exports.OnboardingStepQuestion = OnboardingStepQuestion;
|
|
@@ -47209,7 +44352,6 @@ exports.PendingClaimsTable = PendingClaimsTable;
|
|
|
47209
44352
|
exports.PermissionsEditor = PermissionsEditor;
|
|
47210
44353
|
exports.PillSelect = PillSelect;
|
|
47211
44354
|
exports.PresentingProblems = PresentingProblems;
|
|
47212
|
-
exports.ProblemList = ProblemList;
|
|
47213
44355
|
exports.ProcedureOrderEditor = ProcedureOrderEditor;
|
|
47214
44356
|
exports.ProductVersion = ProductVersion;
|
|
47215
44357
|
exports.ProductVersionBadge = ProductVersionBadge;
|
|
@@ -47290,7 +44432,6 @@ exports.TimelineProgress = TimelineProgress;
|
|
|
47290
44432
|
exports.Toast = Toast;
|
|
47291
44433
|
exports.ToastContainer = ToastContainer;
|
|
47292
44434
|
exports.ToastProvider = ToastProvider;
|
|
47293
|
-
exports.UncertaintyBadge = UncertaintyBadge;
|
|
47294
44435
|
exports.UpdateAvailableOverlay = UpdateAvailableOverlay;
|
|
47295
44436
|
exports.UserMenu = UserMenu;
|
|
47296
44437
|
exports.VerifiedBadge = VerifiedBadge2;
|
|
@@ -47303,19 +44444,15 @@ exports.WebcamModal = WebcamModal;
|
|
|
47303
44444
|
exports.WebsiteInput = WebsiteInput;
|
|
47304
44445
|
exports.WebsiteInputGroup = WebsiteInputGroup;
|
|
47305
44446
|
exports.attributeSegments = attributeSegments;
|
|
47306
|
-
exports.calculateDateRange = calculateDateRange;
|
|
47307
44447
|
exports.centroid = centroid;
|
|
47308
44448
|
exports.chime = chime;
|
|
47309
44449
|
exports.clusterEmbeddings = clusterEmbeddings;
|
|
47310
|
-
exports.concernGroupKey = concernGroupKey;
|
|
47311
|
-
exports.concernHistoryContent = concernHistoryContent;
|
|
47312
44450
|
exports.cosine = cosine;
|
|
47313
44451
|
exports.countBadgeVariants = countBadgeVariants;
|
|
47314
44452
|
exports.countChipVariants = countChipVariants;
|
|
47315
44453
|
exports.create24HourSchedule = create24HourSchedule;
|
|
47316
44454
|
exports.createDefaultSchedule = createDefaultSchedule;
|
|
47317
44455
|
exports.createWeekdaySchedule = createWeekdaySchedule;
|
|
47318
|
-
exports.currentAssertion = currentAssertion;
|
|
47319
44456
|
exports.defaultCaseManagementHeaderLabels = defaultCaseManagementHeaderLabels;
|
|
47320
44457
|
exports.defaultHeyOzwellSelectorLabels = defaultHeyOzwellSelectorLabels;
|
|
47321
44458
|
exports.defaultOrderTabs = defaultOrderTabs;
|
|
@@ -47325,22 +44462,17 @@ exports.formatAddressSingleLine = formatAddressSingleLine;
|
|
|
47325
44462
|
exports.formatCityState = formatCityState;
|
|
47326
44463
|
exports.formatCityStateZip = formatCityStateZip;
|
|
47327
44464
|
exports.generateId = generateId;
|
|
47328
|
-
exports.getDefaultPresets = getDefaultPresets;
|
|
47329
|
-
exports.getExtendedPresets = getExtendedPresets;
|
|
47330
44465
|
exports.getGoogleMapsSearchUrl = getGoogleMapsSearchUrl;
|
|
47331
44466
|
exports.getGoogleMapsUrl = getGoogleMapsUrl;
|
|
47332
44467
|
exports.getWakeWarm = getWakeWarm;
|
|
47333
44468
|
exports.inferSpeakerRoles = inferSpeakerRoles;
|
|
47334
|
-
exports.isConditionCodetype = isConditionCodetype;
|
|
47335
44469
|
exports.isValidUrl = isValidUrl;
|
|
47336
44470
|
exports.labelClusters = labelClusters;
|
|
47337
44471
|
exports.medicationToOrder = medicationToOrder;
|
|
47338
44472
|
exports.mergeTurns = mergeTurns;
|
|
47339
44473
|
exports.normalizeClosingTime = normalizeClosingTime;
|
|
47340
|
-
exports.normalizeConditionCodingSystem = normalizeConditionCodingSystem;
|
|
47341
44474
|
exports.openRollingRecorder = openRollingRecorder;
|
|
47342
44475
|
exports.orderToMedication = orderToMedication;
|
|
47343
|
-
exports.orderTypeForCodetype = orderTypeForCodetype;
|
|
47344
44476
|
exports.parseTimeInput = parseTimeInput;
|
|
47345
44477
|
exports.reconciliationPanelVariants = panelVariants;
|
|
47346
44478
|
exports.subscribeWakeWarm = subscribeWakeWarm;
|