@mieweb/ui 0.11.0-dev.35 → 0.11.0-dev.37
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 +45 -11
- package/agent/skills/mieweb-ui-catalog/SKILL.md +5 -3
- package/agent/skills/mieweb-ui-catalog/selection-guidance.md +6 -3
- package/dist/{EncounterMdyEditor-73PTTIRY.cjs → EncounterMdyEditor-46WMYRFI.cjs} +6 -6
- package/dist/{EncounterMdyEditor-73PTTIRY.cjs.map → EncounterMdyEditor-46WMYRFI.cjs.map} +1 -1
- package/dist/{EncounterMdyEditor-3SQY4MK2.js → EncounterMdyEditor-L7RBLE7B.js} +3 -3
- package/dist/{EncounterMdyEditor-3SQY4MK2.js.map → EncounterMdyEditor-L7RBLE7B.js.map} +1 -1
- package/dist/{chunk-4SUEBKTY.js → chunk-2OTPQPJS.js} +52 -44
- package/dist/chunk-2OTPQPJS.js.map +1 -0
- package/dist/{chunk-MZR634HI.cjs → chunk-3M2BBOXF.cjs} +9 -9
- package/dist/{chunk-MZR634HI.cjs.map → chunk-3M2BBOXF.cjs.map} +1 -1
- package/dist/{chunk-TUYWCUKH.js → chunk-4LKAZW2W.js} +7 -3
- package/dist/chunk-4LKAZW2W.js.map +1 -0
- package/dist/{chunk-JEXEFWEM.js → chunk-5WA6IYZD.js} +68 -2
- package/dist/chunk-5WA6IYZD.js.map +1 -0
- package/dist/{chunk-DXNVQQYN.cjs → chunk-6L7CTEX2.cjs} +51 -44
- package/dist/chunk-6L7CTEX2.cjs.map +1 -0
- package/dist/{chunk-DT3X3RBM.js → chunk-7U7SONM5.js} +3 -3
- package/dist/{chunk-DT3X3RBM.js.map → chunk-7U7SONM5.js.map} +1 -1
- package/dist/{chunk-4M2KE4O5.cjs → chunk-AHYDJN4H.cjs} +506 -125
- package/dist/chunk-AHYDJN4H.cjs.map +1 -0
- package/dist/{chunk-EX7Q5545.js → chunk-AKC677ZF.js} +5 -5
- package/dist/{chunk-EX7Q5545.js.map → chunk-AKC677ZF.js.map} +1 -1
- package/dist/{chunk-C4GEPUE7.js → chunk-CKECOCYJ.js} +2 -2
- package/dist/{chunk-C4GEPUE7.js.map → chunk-CKECOCYJ.js.map} +1 -1
- package/dist/{chunk-V5VPECJI.js → chunk-CRR7AE5D.js} +11 -7
- package/dist/chunk-CRR7AE5D.js.map +1 -0
- package/dist/chunk-D3FNZMOB.cjs +4 -0
- package/dist/{chunk-GLXTVCHN.cjs.map → chunk-D3FNZMOB.cjs.map} +1 -1
- package/dist/{chunk-ZK2R6UGF.cjs → chunk-DCV34MEF.cjs} +4 -4
- package/dist/{chunk-ZK2R6UGF.cjs.map → chunk-DCV34MEF.cjs.map} +1 -1
- package/dist/{chunk-XEHD2HA5.cjs → chunk-FRPELUI5.cjs} +3 -3
- package/dist/{chunk-XEHD2HA5.cjs.map → chunk-FRPELUI5.cjs.map} +1 -1
- package/dist/chunk-G4VQEQGW.js +3 -0
- package/dist/{chunk-RISZWWEQ.js.map → chunk-G4VQEQGW.js.map} +1 -1
- package/dist/{chunk-3O3Q3DX7.cjs → chunk-GG3IK5TL.cjs} +26 -26
- package/dist/{chunk-3O3Q3DX7.cjs.map → chunk-GG3IK5TL.cjs.map} +1 -1
- package/dist/{chunk-DGHS5IVD.js → chunk-GJSLKD4Q.js} +3 -3
- package/dist/{chunk-DGHS5IVD.js.map → chunk-GJSLKD4Q.js.map} +1 -1
- package/dist/{chunk-VMEVLBI3.js → chunk-GKMMDKYY.js} +3 -3
- package/dist/{chunk-VMEVLBI3.js.map → chunk-GKMMDKYY.js.map} +1 -1
- package/dist/{chunk-46RYJYN2.cjs → chunk-GU6TPVXF.cjs} +6 -6
- package/dist/{chunk-46RYJYN2.cjs.map → chunk-GU6TPVXF.cjs.map} +1 -1
- package/dist/{chunk-QHCAWDMG.cjs → chunk-HDZQLTBP.cjs} +7 -3
- package/dist/chunk-HDZQLTBP.cjs.map +1 -0
- package/dist/chunk-IALTKN3Y.js +1017 -0
- package/dist/chunk-IALTKN3Y.js.map +1 -0
- package/dist/{chunk-33Y3KQWL.js → chunk-IGRHPZOJ.js} +3 -3
- package/dist/{chunk-33Y3KQWL.js.map → chunk-IGRHPZOJ.js.map} +1 -1
- package/dist/chunk-JCIQIR5V.js +546 -0
- package/dist/chunk-JCIQIR5V.js.map +1 -0
- package/dist/{chunk-RTADGBBN.js → chunk-JUY2JLFL.js} +502 -121
- package/dist/chunk-JUY2JLFL.js.map +1 -0
- package/dist/{chunk-2S76TRBJ.cjs → chunk-JUYBJLPI.cjs} +4 -4
- package/dist/{chunk-2S76TRBJ.cjs.map → chunk-JUYBJLPI.cjs.map} +1 -1
- package/dist/{chunk-UDUYZDTA.js → chunk-JWMMWNTT.js} +3 -3
- package/dist/{chunk-UDUYZDTA.js.map → chunk-JWMMWNTT.js.map} +1 -1
- package/dist/{chunk-PLBWZW4F.js → chunk-KAQNYX7B.js} +3 -3
- package/dist/{chunk-PLBWZW4F.js.map → chunk-KAQNYX7B.js.map} +1 -1
- package/dist/{chunk-SPGP252Q.js → chunk-KB2PLV5Q.js} +4 -4
- package/dist/{chunk-SPGP252Q.js.map → chunk-KB2PLV5Q.js.map} +1 -1
- package/dist/{chunk-NCPDUJKJ.cjs → chunk-KQXD6BFO.cjs} +4 -4
- package/dist/{chunk-NCPDUJKJ.cjs.map → chunk-KQXD6BFO.cjs.map} +1 -1
- package/dist/{chunk-4VSK3EE5.cjs → chunk-L77XJPKC.cjs} +3 -3
- package/dist/{chunk-4VSK3EE5.cjs.map → chunk-L77XJPKC.cjs.map} +1 -1
- package/dist/{chunk-PGJLW2NO.cjs → chunk-LLIG4X6M.cjs} +7 -7
- package/dist/{chunk-PGJLW2NO.cjs.map → chunk-LLIG4X6M.cjs.map} +1 -1
- package/dist/{chunk-YGSPIDE4.js → chunk-LQ22CY7X.js} +5 -5
- package/dist/{chunk-YGSPIDE4.js.map → chunk-LQ22CY7X.js.map} +1 -1
- package/dist/{chunk-AKMTPCLC.cjs → chunk-LTCHD3K5.cjs} +2 -2
- package/dist/{chunk-AKMTPCLC.cjs.map → chunk-LTCHD3K5.cjs.map} +1 -1
- package/dist/{chunk-NW6D6AFL.js → chunk-LWLHCUDP.js} +10 -10
- package/dist/{chunk-NW6D6AFL.js.map → chunk-LWLHCUDP.js.map} +1 -1
- package/dist/{chunk-YR45POH2.js → chunk-MAEANAAJ.js} +3 -3
- package/dist/{chunk-YR45POH2.js.map → chunk-MAEANAAJ.js.map} +1 -1
- package/dist/{chunk-X5HLVACK.js → chunk-MLCIINXT.js} +4 -4
- package/dist/{chunk-X5HLVACK.js.map → chunk-MLCIINXT.js.map} +1 -1
- package/dist/{chunk-PHUTJKHL.cjs → chunk-MXIIPFTA.cjs} +3 -3
- package/dist/{chunk-PHUTJKHL.cjs.map → chunk-MXIIPFTA.cjs.map} +1 -1
- package/dist/{chunk-QO4A6U73.cjs → chunk-NCG7NJAW.cjs} +93 -30
- package/dist/chunk-NCG7NJAW.cjs.map +1 -0
- package/dist/{chunk-25MPUVTM.js → chunk-NIE3WBJH.js} +94 -31
- package/dist/chunk-NIE3WBJH.js.map +1 -0
- package/dist/{chunk-4GSFVD5V.js → chunk-NUHHWELE.js} +3 -3
- package/dist/{chunk-4GSFVD5V.js.map → chunk-NUHHWELE.js.map} +1 -1
- package/dist/{chunk-GDKOYVX3.cjs → chunk-NZUQL42A.cjs} +11 -7
- package/dist/chunk-NZUQL42A.cjs.map +1 -0
- package/dist/{chunk-YSIFPHLX.js → chunk-OJQMC426.js} +2 -2
- package/dist/{chunk-YSIFPHLX.js.map → chunk-OJQMC426.js.map} +1 -1
- package/dist/{chunk-SVC7NPQ6.cjs → chunk-PDLVSJMZ.cjs} +6 -6
- package/dist/{chunk-SVC7NPQ6.cjs.map → chunk-PDLVSJMZ.cjs.map} +1 -1
- package/dist/chunk-QAEAC7HO.cjs +4 -0
- package/dist/chunk-QAEAC7HO.cjs.map +1 -0
- package/dist/{chunk-KD7YD6US.cjs → chunk-QOQQVNP3.cjs} +2 -2
- package/dist/{chunk-KD7YD6US.cjs.map → chunk-QOQQVNP3.cjs.map} +1 -1
- package/dist/{chunk-6O6EYKOG.cjs → chunk-R4QWCP2T.cjs} +65 -65
- package/dist/{chunk-6O6EYKOG.cjs.map → chunk-R4QWCP2T.cjs.map} +1 -1
- package/dist/chunk-RCTIPBLU.cjs +1039 -0
- package/dist/chunk-RCTIPBLU.cjs.map +1 -0
- package/dist/{chunk-FSWHZY3T.cjs → chunk-RD2I67C4.cjs} +3 -3
- package/dist/{chunk-FSWHZY3T.cjs.map → chunk-RD2I67C4.cjs.map} +1 -1
- package/dist/chunk-SCGXD334.js +3 -0
- package/dist/chunk-SCGXD334.js.map +1 -0
- package/dist/{chunk-2OXNJJHJ.cjs → chunk-TERHGQ73.cjs} +3 -3
- package/dist/{chunk-2OXNJJHJ.cjs.map → chunk-TERHGQ73.cjs.map} +1 -1
- package/dist/chunk-TZKBW4GA.cjs +578 -0
- package/dist/chunk-TZKBW4GA.cjs.map +1 -0
- package/dist/{chunk-DO7EED3B.cjs → chunk-WZ7WTIVU.cjs} +3 -3
- package/dist/{chunk-DO7EED3B.cjs.map → chunk-WZ7WTIVU.cjs.map} +1 -1
- package/dist/{chunk-6UYMO3PF.cjs → chunk-XX6PNPF2.cjs} +68 -2
- package/dist/chunk-XX6PNPF2.cjs.map +1 -0
- package/dist/{chunk-566FIEPE.js → chunk-YFZNSP7F.js} +3 -3
- package/dist/{chunk-566FIEPE.js.map → chunk-YFZNSP7F.js.map} +1 -1
- package/dist/{chunk-I6Y2KLTZ.js → chunk-ZP4H5HA4.js} +3 -3
- package/dist/{chunk-I6Y2KLTZ.js.map → chunk-ZP4H5HA4.js.map} +1 -1
- package/dist/components/ActionPlan/index.cjs +1 -1
- package/dist/components/ActionPlan/index.js +1 -1
- package/dist/components/AlertDialog/index.cjs +7 -7
- package/dist/components/AlertDialog/index.js +3 -3
- package/dist/components/AudioPlayer/index.cjs +7 -6
- package/dist/components/AudioPlayer/index.js +2 -1
- package/dist/components/CustomizableDashboard/index.cjs +1 -1
- package/dist/components/CustomizableDashboard/index.js +1 -1
- package/dist/components/DateInput/index.cjs +3 -3
- package/dist/components/DateInput/index.js +2 -2
- package/dist/components/EmailEditor/index.cjs +16 -13
- package/dist/components/EmailEditor/index.js +7 -4
- package/dist/components/KeyboardShortcutsOverlay/index.cjs +5 -5
- package/dist/components/KeyboardShortcutsOverlay/index.js +3 -3
- package/dist/components/Markdown/index.cjs +10 -10
- package/dist/components/Markdown/index.js +2 -2
- package/dist/components/MediaEditor/index.cjs +13 -12
- package/dist/components/MediaEditor/index.js +8 -7
- package/dist/components/MediaFeed/index.cjs +10 -7
- package/dist/components/MediaFeed/index.d.cts +33 -0
- package/dist/components/MediaFeed/index.d.ts +33 -0
- package/dist/components/MediaFeed/index.js +9 -6
- package/dist/components/MediaPlayer/index.cjs +13 -6
- package/dist/components/MediaPlayer/index.d.cts +103 -5
- package/dist/components/MediaPlayer/index.d.ts +103 -5
- package/dist/components/MediaPlayer/index.js +6 -3
- package/dist/components/Modal/index.cjs +10 -10
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/RadialExplorer/index.cjs +3 -3
- package/dist/components/RadialExplorer/index.js +2 -2
- package/dist/components/RecordHeader/index.cjs +4 -4
- package/dist/components/RecordHeader/index.js +2 -2
- package/dist/components/RecordLayout/index.cjs +1 -1
- package/dist/components/RecordLayout/index.js +1 -1
- package/dist/components/Sheet/index.cjs +1 -1
- package/dist/components/Sheet/index.js +1 -1
- package/dist/components/Slider/index.cjs +5 -5
- package/dist/components/Slider/index.d.cts +6 -0
- package/dist/components/Slider/index.d.ts +6 -0
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/SliderCalculator/index.cjs +4 -4
- package/dist/components/SliderCalculator/index.js +2 -2
- package/dist/components/SuperChat/index.cjs +20 -18
- package/dist/components/SuperChat/index.cjs.map +1 -1
- package/dist/components/SuperChat/index.d.cts +2 -2
- package/dist/components/SuperChat/index.d.ts +2 -2
- package/dist/components/SuperChat/index.js +12 -10
- package/dist/components/SuperChat/index.js.map +1 -1
- package/dist/components/SuperChat/plugins/index.cjs +1 -1
- package/dist/components/SuperChat/plugins/index.d.cts +2 -2
- package/dist/components/SuperChat/plugins/index.d.ts +2 -2
- package/dist/components/SuperChat/plugins/index.js +1 -1
- package/dist/components/TagEditor/index.cjs +4 -4
- package/dist/components/TagEditor/index.js +2 -2
- package/dist/components/Textarea/index.cjs +7 -4
- package/dist/components/Textarea/index.js +4 -1
- package/dist/esheet.cjs +122 -123
- package/dist/esheet.cjs.map +1 -1
- package/dist/esheet.js +25 -26
- package/dist/esheet.js.map +1 -1
- package/dist/hooks/index.cjs +17 -17
- package/dist/hooks/index.js +4 -4
- package/dist/index.cjs +518 -482
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +204 -98
- package/dist/index.d.ts +204 -98
- package/dist/index.js +91 -52
- package/dist/index.js.map +1 -1
- package/dist/kerebron.cjs +32 -62
- package/dist/kerebron.cjs.map +1 -1
- package/dist/kerebron.css +145 -8
- package/dist/kerebron.d.cts +299 -1
- package/dist/kerebron.d.ts +299 -1
- package/dist/kerebron.js +22 -63
- package/dist/kerebron.js.map +1 -1
- package/dist/{model-EFXX5JZN.cjs → model-5PB6KNYH.cjs} +20 -20
- package/dist/{model-EFXX5JZN.cjs.map → model-5PB6KNYH.cjs.map} +1 -1
- package/dist/{model-TAARSYDY.js → model-OGWTZEXR.js} +6 -6
- package/dist/{model-TAARSYDY.js.map → model-OGWTZEXR.js.map} +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind-preset.cjs +4 -4
- package/dist/tailwind-preset.js +1 -1
- package/dist/templates.cjs +31 -31
- package/dist/templates.js +2 -2
- package/dist/{types-DSWbrVkM.d.ts → types-BfVolads.d.cts} +33 -0
- package/dist/{types-DSWbrVkM.d.cts → types-BfVolads.d.ts} +33 -0
- package/dist/utils/index.cjs +5 -5
- package/dist/utils/index.d.cts +12 -12
- package/dist/utils/index.d.ts +12 -12
- package/dist/utils/index.js +1 -1
- package/package.json +3 -13
- package/dist/chunk-25MPUVTM.js.map +0 -1
- package/dist/chunk-4M2KE4O5.cjs.map +0 -1
- package/dist/chunk-4SUEBKTY.js.map +0 -1
- package/dist/chunk-6UYMO3PF.cjs.map +0 -1
- package/dist/chunk-DXNVQQYN.cjs.map +0 -1
- package/dist/chunk-ECKIFQSD.cjs +0 -183
- package/dist/chunk-ECKIFQSD.cjs.map +0 -1
- package/dist/chunk-GDKOYVX3.cjs.map +0 -1
- package/dist/chunk-GLXTVCHN.cjs +0 -4
- package/dist/chunk-JEXEFWEM.js.map +0 -1
- package/dist/chunk-QHCAWDMG.cjs.map +0 -1
- package/dist/chunk-QO4A6U73.cjs.map +0 -1
- package/dist/chunk-R5P7NAJQ.js +0 -159
- package/dist/chunk-R5P7NAJQ.js.map +0 -1
- package/dist/chunk-RISZWWEQ.js +0 -3
- package/dist/chunk-RTADGBBN.js.map +0 -1
- package/dist/chunk-TUYWCUKH.js.map +0 -1
- package/dist/chunk-V5VPECJI.js.map +0 -1
package/dist/esheet.cjs
CHANGED
|
@@ -1,40 +1,43 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('./chunk-K2BY7YPJ.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
4
|
+
var chunkGU6TPVXF_cjs = require('./chunk-GU6TPVXF.cjs');
|
|
5
|
+
var chunkR4QWCP2T_cjs = require('./chunk-R4QWCP2T.cjs');
|
|
6
|
+
var chunkKQXD6BFO_cjs = require('./chunk-KQXD6BFO.cjs');
|
|
7
7
|
require('./chunk-GLG6UE2H.cjs');
|
|
8
8
|
var chunkSV6YGK4U_cjs = require('./chunk-SV6YGK4U.cjs');
|
|
9
9
|
require('./chunk-G7EQ3JPX.cjs');
|
|
10
10
|
require('./chunk-AIJAFPGJ.cjs');
|
|
11
|
-
var
|
|
12
|
-
|
|
11
|
+
var chunkMXIIPFTA_cjs = require('./chunk-MXIIPFTA.cjs');
|
|
12
|
+
require('./chunk-6L7CTEX2.cjs');
|
|
13
|
+
var chunkUPWIJC6I_cjs = require('./chunk-UPWIJC6I.cjs');
|
|
14
|
+
require('./chunk-MJWFNV3L.cjs');
|
|
15
|
+
require('./chunk-7AECNMYV.cjs');
|
|
16
|
+
require('./chunk-FRPELUI5.cjs');
|
|
17
|
+
require('./chunk-GF2BE4FB.cjs');
|
|
18
|
+
require('./chunk-CPDNX3LS.cjs');
|
|
19
|
+
require('./chunk-NNEFAUHV.cjs');
|
|
20
|
+
require('./chunk-CW75IKA6.cjs');
|
|
21
|
+
require('./chunk-SCV7C55E.cjs');
|
|
22
|
+
require('./chunk-7E46YDOT.cjs');
|
|
23
|
+
var chunkRCTIPBLU_cjs = require('./chunk-RCTIPBLU.cjs');
|
|
24
|
+
require('./chunk-NCG7NJAW.cjs');
|
|
13
25
|
require('./chunk-S2CJ57BX.cjs');
|
|
14
26
|
var chunkFSLI5IKP_cjs = require('./chunk-FSLI5IKP.cjs');
|
|
15
27
|
require('./chunk-YP5T6NZD.cjs');
|
|
16
|
-
var chunkUPWIJC6I_cjs = require('./chunk-UPWIJC6I.cjs');
|
|
17
28
|
require('./chunk-ZNUMOJOI.cjs');
|
|
18
29
|
require('./chunk-PINIBEIU.cjs');
|
|
19
|
-
require('./chunk-MJWFNV3L.cjs');
|
|
20
|
-
require('./chunk-7AECNMYV.cjs');
|
|
21
|
-
require('./chunk-XEHD2HA5.cjs');
|
|
22
30
|
require('./chunk-I44YNYI6.cjs');
|
|
23
31
|
var chunkZ5S5JEJD_cjs = require('./chunk-Z5S5JEJD.cjs');
|
|
24
|
-
require('./chunk-
|
|
25
|
-
require('./chunk-CPDNX3LS.cjs');
|
|
32
|
+
require('./chunk-NMBYU7D7.cjs');
|
|
26
33
|
require('./chunk-PHYQSCP6.cjs');
|
|
27
|
-
require('./chunk-NNEFAUHV.cjs');
|
|
28
34
|
var chunkFHY3K6PL_cjs = require('./chunk-FHY3K6PL.cjs');
|
|
29
35
|
require('./chunk-FSGEDDF2.cjs');
|
|
30
36
|
require('./chunk-AOHJILLU.cjs');
|
|
31
|
-
require('./chunk-CW75IKA6.cjs');
|
|
32
37
|
require('./chunk-C7RVKV25.cjs');
|
|
33
|
-
require('./chunk-SCV7C55E.cjs');
|
|
34
38
|
require('./chunk-L7L5S2HO.cjs');
|
|
35
39
|
require('./chunk-YW2AKBLS.cjs');
|
|
36
40
|
require('./chunk-Z3WMDVMR.cjs');
|
|
37
|
-
require('./chunk-7E46YDOT.cjs');
|
|
38
41
|
require('./chunk-EACNRR3C.cjs');
|
|
39
42
|
var chunkFSARTLUE_cjs = require('./chunk-FSARTLUE.cjs');
|
|
40
43
|
require('./chunk-HGJHWI7W.cjs');
|
|
@@ -238,7 +241,7 @@ function EncounterMdyView({ source }) {
|
|
|
238
241
|
const [failure2, setFailure] = React11__namespace.useState(null);
|
|
239
242
|
React11__namespace.useEffect(() => {
|
|
240
243
|
let cancelled = false;
|
|
241
|
-
void
|
|
244
|
+
void chunkGU6TPVXF_cjs.renderEncounterMdy(source).then((result) => {
|
|
242
245
|
if (cancelled) return;
|
|
243
246
|
const html = createEncounterReportHtml(
|
|
244
247
|
result.html ?? "",
|
|
@@ -389,7 +392,7 @@ function EncounterVitalsField({
|
|
|
389
392
|
const [drafts, setDrafts] = React11__namespace.useState({});
|
|
390
393
|
const readOnly = !(isPreview && isEnabled) || Boolean(isReadOnly) || Boolean(parsed.error);
|
|
391
394
|
const definition = field.definition;
|
|
392
|
-
const issues =
|
|
395
|
+
const issues = chunkGU6TPVXF_cjs.validateEncounterVitals(parsed.value, definition.id);
|
|
393
396
|
const commit = (value) => {
|
|
394
397
|
if (!readOnly) {
|
|
395
398
|
const next = { ...response, answer: JSON.stringify(value), _ai: false };
|
|
@@ -573,7 +576,7 @@ function EncounterVitalsField({
|
|
|
573
576
|
] }),
|
|
574
577
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-3 sm:grid-cols-3", children: [
|
|
575
578
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2 min-w-0 sm:col-span-1", children: !reading.recordedAt || /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/.test(reading.recordedAt) && !recordedAtIssue ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
576
|
-
|
|
579
|
+
chunkMXIIPFTA_cjs.DateInput,
|
|
577
580
|
{
|
|
578
581
|
label: m("Recorded at"),
|
|
579
582
|
inputType: "datetime-local",
|
|
@@ -731,7 +734,7 @@ function getExternalEncounterConditions(state) {
|
|
|
731
734
|
if (!answer) continue;
|
|
732
735
|
try {
|
|
733
736
|
const parsed = JSON.parse(answer);
|
|
734
|
-
if (
|
|
737
|
+
if (chunkGU6TPVXF_cjs.validateEncounterConditions(parsed).length > 0) continue;
|
|
735
738
|
for (const concern of parsed.concerns) {
|
|
736
739
|
if (!byId.has(concern.concernId)) byId.set(concern.concernId, concern);
|
|
737
740
|
}
|
|
@@ -825,11 +828,11 @@ function conditionSystemIdentity(system) {
|
|
|
825
828
|
const trimmed = system.trim();
|
|
826
829
|
if (trimmed === "http://hl7.org/fhir/sid/icd-10-cm") return "ICD-10-CM";
|
|
827
830
|
if (trimmed === "http://snomed.info/sct") return "SNOMED";
|
|
828
|
-
return
|
|
831
|
+
return chunkR4QWCP2T_cjs.normalizeConditionCodingSystem(trimmed);
|
|
829
832
|
}
|
|
830
833
|
function matchingConditionCode(concern, picked) {
|
|
831
834
|
return Boolean(
|
|
832
|
-
|
|
835
|
+
chunkKQXD6BFO_cjs.currentAssertion(concern)?.coding?.some(
|
|
833
836
|
(coding) => conditionSystemIdentity(coding.system) === conditionSystemIdentity(picked.codetype) && coding.code.trim().toUpperCase() === picked.fullcode.trim().toUpperCase()
|
|
834
837
|
)
|
|
835
838
|
);
|
|
@@ -845,7 +848,7 @@ function useEncounterAssertionDate(field) {
|
|
|
845
848
|
React11__namespace.useEffect(() => {
|
|
846
849
|
setDate(hostDate ?? "");
|
|
847
850
|
}, [hostDate]);
|
|
848
|
-
return { date, setDate, valid:
|
|
851
|
+
return { date, setDate, valid: chunkGU6TPVXF_cjs.isEncounterDate(date) };
|
|
849
852
|
}
|
|
850
853
|
function readAssessment(answer, externalConcerns) {
|
|
851
854
|
if (!answer) return { value: { concerns: [], items: [], orders: [] } };
|
|
@@ -853,7 +856,7 @@ function readAssessment(answer, externalConcerns) {
|
|
|
853
856
|
const parsed = JSON.parse(answer);
|
|
854
857
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
855
858
|
throw new Error();
|
|
856
|
-
if (
|
|
859
|
+
if (chunkGU6TPVXF_cjs.validateEncounterAssessment(parsed, "", "", externalConcerns).length > 0)
|
|
857
860
|
throw new Error();
|
|
858
861
|
return { value: parsed };
|
|
859
862
|
} catch {
|
|
@@ -925,7 +928,7 @@ function EncounterAssessmentField({
|
|
|
925
928
|
}
|
|
926
929
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "space-y-2", children: [
|
|
927
930
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
928
|
-
|
|
931
|
+
chunkR4QWCP2T_cjs.Assessment,
|
|
929
932
|
{
|
|
930
933
|
concerns,
|
|
931
934
|
items: value.items,
|
|
@@ -938,7 +941,7 @@ function EncounterAssessmentField({
|
|
|
938
941
|
const existingConcern = pick.code ? concerns.find(
|
|
939
942
|
(concern) => matchingConditionCode(concern, pick.code)
|
|
940
943
|
) : void 0;
|
|
941
|
-
const existingAssertion = existingConcern &&
|
|
944
|
+
const existingAssertion = existingConcern && chunkKQXD6BFO_cjs.currentAssertion(existingConcern);
|
|
942
945
|
if (existingConcern && existingAssertion) {
|
|
943
946
|
commit((next) => ({
|
|
944
947
|
...next,
|
|
@@ -1293,13 +1296,7 @@ function EsheetNarrativeField({
|
|
|
1293
1296
|
};
|
|
1294
1297
|
React11__namespace.useEffect(() => {
|
|
1295
1298
|
editorRef.current?.setAttribute("dir", "auto");
|
|
1296
|
-
|
|
1297
|
-
editorRef.current?.setAttribute("aria-labelledby", labelId);
|
|
1298
|
-
editorRef.current?.setAttribute(
|
|
1299
|
-
"aria-required",
|
|
1300
|
-
String(isRequired || isSoftRequired)
|
|
1301
|
-
);
|
|
1302
|
-
}, [isRequired, isSoftRequired, labelId, readOnly]);
|
|
1299
|
+
}, []);
|
|
1303
1300
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": slot, className: "min-w-0", children: [
|
|
1304
1301
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1305
1302
|
"div",
|
|
@@ -1314,7 +1311,7 @@ function EsheetNarrativeField({
|
|
|
1314
1311
|
}
|
|
1315
1312
|
),
|
|
1316
1313
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1317
|
-
|
|
1314
|
+
chunkRCTIPBLU_cjs.TextAreaRichKerebron,
|
|
1318
1315
|
{
|
|
1319
1316
|
ref: editorRef,
|
|
1320
1317
|
value: html,
|
|
@@ -1343,7 +1340,9 @@ function EsheetNarrativeField({
|
|
|
1343
1340
|
return true;
|
|
1344
1341
|
},
|
|
1345
1342
|
"aria-label": question,
|
|
1346
|
-
|
|
1343
|
+
"aria-labelledby": labelId,
|
|
1344
|
+
"aria-required": isRequired || isSoftRequired,
|
|
1345
|
+
readOnly,
|
|
1347
1346
|
enableDictation: false,
|
|
1348
1347
|
macros: readOnly ? void 0 : macros,
|
|
1349
1348
|
macrosOnFocus: true,
|
|
@@ -1428,7 +1427,7 @@ function readValue(answer) {
|
|
|
1428
1427
|
if (!answer) return { value: { medications: [] } };
|
|
1429
1428
|
try {
|
|
1430
1429
|
const value = JSON.parse(answer);
|
|
1431
|
-
if (
|
|
1430
|
+
if (chunkGU6TPVXF_cjs.validateEncounterMedicationValue(value).length) throw new Error();
|
|
1432
1431
|
return { value };
|
|
1433
1432
|
} catch {
|
|
1434
1433
|
return {
|
|
@@ -1471,7 +1470,7 @@ function EncounterMedicationField({
|
|
|
1471
1470
|
if (error)
|
|
1472
1471
|
return /* @__PURE__ */ jsxRuntime.jsx(InvalidClinicalAnswer, { label: "medication", answer: response?.answer });
|
|
1473
1472
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1474
|
-
|
|
1473
|
+
chunkR4QWCP2T_cjs.MedicationReconciliation,
|
|
1475
1474
|
{
|
|
1476
1475
|
medications: value.medications,
|
|
1477
1476
|
onChange: commit,
|
|
@@ -1484,7 +1483,7 @@ function readValue2(answer) {
|
|
|
1484
1483
|
if (!answer) return { value: { allergies: [] } };
|
|
1485
1484
|
try {
|
|
1486
1485
|
const value = JSON.parse(answer);
|
|
1487
|
-
if (
|
|
1486
|
+
if (chunkGU6TPVXF_cjs.validateEncounterAllergyValue(value).length) throw new Error();
|
|
1488
1487
|
return { value };
|
|
1489
1488
|
} catch {
|
|
1490
1489
|
return {
|
|
@@ -1527,7 +1526,7 @@ function EncounterAllergyField({
|
|
|
1527
1526
|
if (error)
|
|
1528
1527
|
return /* @__PURE__ */ jsxRuntime.jsx(InvalidClinicalAnswer, { label: "allergy", answer: response?.answer });
|
|
1529
1528
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1530
|
-
|
|
1529
|
+
chunkR4QWCP2T_cjs.AllergyManager,
|
|
1531
1530
|
{
|
|
1532
1531
|
allergies: value.allergies,
|
|
1533
1532
|
onChange: (allergies) => commitValue((current) => ({
|
|
@@ -1550,7 +1549,7 @@ function readConditions(answer) {
|
|
|
1550
1549
|
if (!answer) return { concerns: [] };
|
|
1551
1550
|
try {
|
|
1552
1551
|
const parsed = JSON.parse(answer);
|
|
1553
|
-
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed) || !("concerns" in parsed) ||
|
|
1552
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed) || !("concerns" in parsed) || chunkGU6TPVXF_cjs.validateEncounterConditions(parsed).length > 0)
|
|
1554
1553
|
return void 0;
|
|
1555
1554
|
return parsed;
|
|
1556
1555
|
} catch {
|
|
@@ -1571,7 +1570,7 @@ function EncounterConditionsField({
|
|
|
1571
1570
|
[response?.answer]
|
|
1572
1571
|
);
|
|
1573
1572
|
const m = chunkFSLI5IKP_cjs.useMessages();
|
|
1574
|
-
const codeLookup =
|
|
1573
|
+
const codeLookup = chunkR4QWCP2T_cjs.useCodeLookupConfig();
|
|
1575
1574
|
const assertionDate = useEncounterAssertionDate(field);
|
|
1576
1575
|
const currentDate = React11__namespace.useRef(assertionDate);
|
|
1577
1576
|
currentDate.current = assertionDate;
|
|
@@ -1621,7 +1620,7 @@ function EncounterConditionsField({
|
|
|
1621
1620
|
...next,
|
|
1622
1621
|
concerns: next.concerns.map((concern) => {
|
|
1623
1622
|
if (concern.concernId !== concernId) return concern;
|
|
1624
|
-
const prior =
|
|
1623
|
+
const prior = chunkKQXD6BFO_cjs.currentAssertion(concern);
|
|
1625
1624
|
const assertions = draft.changeType === "revision" && prior ? concern.assertions.map(
|
|
1626
1625
|
(candidate) => candidate.id === prior.id ? { ...candidate, verificationStatus: "refuted" } : candidate
|
|
1627
1626
|
) : concern.assertions;
|
|
@@ -1679,7 +1678,7 @@ function EncounterConditionsField({
|
|
|
1679
1678
|
) : void 0;
|
|
1680
1679
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1681
1680
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1682
|
-
|
|
1681
|
+
chunkKQXD6BFO_cjs.ProblemList,
|
|
1683
1682
|
{
|
|
1684
1683
|
concerns: value.concerns,
|
|
1685
1684
|
readOnly,
|
|
@@ -1726,7 +1725,7 @@ function EncounterConditionsField({
|
|
|
1726
1725
|
}
|
|
1727
1726
|
),
|
|
1728
1727
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1729
|
-
|
|
1728
|
+
chunkR4QWCP2T_cjs.ConditionEditor,
|
|
1730
1729
|
{
|
|
1731
1730
|
mode: editor?.mode ?? "add",
|
|
1732
1731
|
open: editor !== null,
|
|
@@ -1795,7 +1794,7 @@ function readPlan(answer) {
|
|
|
1795
1794
|
const parsed = JSON.parse(answer);
|
|
1796
1795
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed) || !("orders" in parsed) || !Array.isArray(parsed.orders))
|
|
1797
1796
|
return void 0;
|
|
1798
|
-
if (
|
|
1797
|
+
if (chunkGU6TPVXF_cjs.validateEncounterPlan(parsed).length > 0) return void 0;
|
|
1799
1798
|
return parsed;
|
|
1800
1799
|
} catch {
|
|
1801
1800
|
return void 0;
|
|
@@ -1818,11 +1817,11 @@ function getPlanConcerns(state) {
|
|
|
1818
1817
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
1819
1818
|
continue;
|
|
1820
1819
|
const assessment = parsed;
|
|
1821
|
-
if (
|
|
1820
|
+
if (chunkGU6TPVXF_cjs.validateEncounterConditions({ concerns: assessment.concerns }).length > 0)
|
|
1822
1821
|
continue;
|
|
1823
1822
|
for (const concern of assessment.concerns ?? []) {
|
|
1824
1823
|
if (concerns.has(concern.concernId)) continue;
|
|
1825
|
-
const assertion =
|
|
1824
|
+
const assertion = chunkKQXD6BFO_cjs.currentAssertion(concern);
|
|
1826
1825
|
concerns.set(concern.concernId, concern);
|
|
1827
1826
|
if (assertion) {
|
|
1828
1827
|
items.set(concern.concernId, {
|
|
@@ -1832,7 +1831,7 @@ function getPlanConcerns(state) {
|
|
|
1832
1831
|
}
|
|
1833
1832
|
}
|
|
1834
1833
|
for (const item of assessment.items ?? []) {
|
|
1835
|
-
if (!
|
|
1834
|
+
if (!chunkGU6TPVXF_cjs.validAssessmentItem(item)) continue;
|
|
1836
1835
|
if (concerns.get(item.concernId)?.assertions.some(({ id }) => id === item.assertionId))
|
|
1837
1836
|
items.set(item.concernId, item);
|
|
1838
1837
|
}
|
|
@@ -1884,7 +1883,7 @@ function EncounterPlanField({
|
|
|
1884
1883
|
if (!value)
|
|
1885
1884
|
return /* @__PURE__ */ jsxRuntime.jsx(InvalidClinicalAnswer, { label, answer: response?.answer });
|
|
1886
1885
|
return /* @__PURE__ */ jsxRuntime.jsx("section", { "aria-label": label, className: "min-w-0 space-y-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1887
|
-
|
|
1886
|
+
chunkR4QWCP2T_cjs.Assessment,
|
|
1888
1887
|
{
|
|
1889
1888
|
concerns,
|
|
1890
1889
|
items,
|
|
@@ -2079,7 +2078,7 @@ function createEncounterVisitTools(options) {
|
|
|
2079
2078
|
}
|
|
2080
2079
|
function definition() {
|
|
2081
2080
|
const current = options.getDefinition();
|
|
2082
|
-
|
|
2081
|
+
chunkGU6TPVXF_cjs.validateEncounterDefinition(current);
|
|
2083
2082
|
return current;
|
|
2084
2083
|
}
|
|
2085
2084
|
function section(sectionId) {
|
|
@@ -2099,7 +2098,7 @@ function createEncounterVisitTools(options) {
|
|
|
2099
2098
|
throw new ToolError("READ_ONLY", "This visit is read-only.");
|
|
2100
2099
|
}
|
|
2101
2100
|
function snapshot() {
|
|
2102
|
-
return
|
|
2101
|
+
return chunkGU6TPVXF_cjs.createEncounterSnapshot(definition(), options.getResponses());
|
|
2103
2102
|
}
|
|
2104
2103
|
function write(sectionId, fieldId, response, targetReadingId) {
|
|
2105
2104
|
const currentDefinition = definition();
|
|
@@ -2109,7 +2108,7 @@ function createEncounterVisitTools(options) {
|
|
|
2109
2108
|
({ id }) => id === sectionId
|
|
2110
2109
|
);
|
|
2111
2110
|
const isChoice = target?.observations?.some(
|
|
2112
|
-
(observation) =>
|
|
2111
|
+
(observation) => chunkGU6TPVXF_cjs.getEncounterFieldId(sectionId, observation.id) === fieldId && observation.type === "choice"
|
|
2113
2112
|
);
|
|
2114
2113
|
if (!isChoice) delete replacement.selected;
|
|
2115
2114
|
const next = { ...previous, [fieldId]: replacement };
|
|
@@ -2121,19 +2120,19 @@ function createEncounterVisitTools(options) {
|
|
|
2121
2120
|
issue.message
|
|
2122
2121
|
]);
|
|
2123
2122
|
const previousIssueKeys = new Set(
|
|
2124
|
-
|
|
2123
|
+
chunkGU6TPVXF_cjs.validateEncounterResponses(currentDefinition, previous).map(issueKey)
|
|
2125
2124
|
);
|
|
2126
|
-
const issues =
|
|
2125
|
+
const issues = chunkGU6TPVXF_cjs.validateEncounterResponses(currentDefinition, next).filter(
|
|
2127
2126
|
(issue) => issue.sectionId === sectionId && issue.fieldId === fieldId && issue.code !== "required" && (!targetReadingId || !issue.readingId || issue.readingId === targetReadingId) || issue.fieldId !== fieldId && issue.code !== "required" && !previousIssueKeys.has(issueKey(issue))
|
|
2128
2127
|
);
|
|
2129
2128
|
if (issues.length)
|
|
2130
2129
|
throw new ToolError("INVALID_RESPONSE", issues[0].message, issues);
|
|
2131
2130
|
options.setResponses(next);
|
|
2132
|
-
return
|
|
2131
|
+
return chunkGU6TPVXF_cjs.createEncounterSnapshot(currentDefinition, next);
|
|
2133
2132
|
}
|
|
2134
2133
|
function structured(sectionId, value, targetReadingId) {
|
|
2135
2134
|
assertJsonValue(value);
|
|
2136
|
-
const fieldId =
|
|
2135
|
+
const fieldId = chunkGU6TPVXF_cjs.getEncounterFieldId(sectionId, "value");
|
|
2137
2136
|
return write(
|
|
2138
2137
|
sectionId,
|
|
2139
2138
|
fieldId,
|
|
@@ -2145,7 +2144,7 @@ function createEncounterVisitTools(options) {
|
|
|
2145
2144
|
);
|
|
2146
2145
|
}
|
|
2147
2146
|
function vitalValue(sectionId) {
|
|
2148
|
-
const fieldId =
|
|
2147
|
+
const fieldId = chunkGU6TPVXF_cjs.getEncounterFieldId(sectionId, "value");
|
|
2149
2148
|
const answer = options.getResponses()[fieldId]?.answer;
|
|
2150
2149
|
if (!answer?.trim()) return { readings: [] };
|
|
2151
2150
|
let value;
|
|
@@ -2194,7 +2193,7 @@ function createEncounterVisitTools(options) {
|
|
|
2194
2193
|
}
|
|
2195
2194
|
if (typeof text !== "string")
|
|
2196
2195
|
throw new ToolError("INVALID_ARGUMENT", "text must be a string.");
|
|
2197
|
-
const fieldId =
|
|
2196
|
+
const fieldId = chunkGU6TPVXF_cjs.getEncounterFieldId(sectionId);
|
|
2198
2197
|
return write(sectionId, fieldId, {
|
|
2199
2198
|
...options.getResponses()[fieldId],
|
|
2200
2199
|
answer: text
|
|
@@ -2204,7 +2203,7 @@ function createEncounterVisitTools(options) {
|
|
|
2204
2203
|
writable();
|
|
2205
2204
|
const current = section(sectionId);
|
|
2206
2205
|
requireId(findingId, "findingId");
|
|
2207
|
-
let fieldId =
|
|
2206
|
+
let fieldId = chunkGU6TPVXF_cjs.getEncounterFieldId(sectionId);
|
|
2208
2207
|
let findings = current.findings;
|
|
2209
2208
|
if (observationId !== void 0) {
|
|
2210
2209
|
requireId(observationId, "observationId");
|
|
@@ -2216,7 +2215,7 @@ function createEncounterVisitTools(options) {
|
|
|
2216
2215
|
"UNKNOWN_OBSERVATION",
|
|
2217
2216
|
"Common findings require a configured text observation."
|
|
2218
2217
|
);
|
|
2219
|
-
fieldId =
|
|
2218
|
+
fieldId = chunkGU6TPVXF_cjs.getEncounterFieldId(sectionId, observationId);
|
|
2220
2219
|
findings = observation.findings;
|
|
2221
2220
|
} else if (current.kind !== "narrative" && !current.narrative) {
|
|
2222
2221
|
throw new ToolError(
|
|
@@ -2256,7 +2255,7 @@ function createEncounterVisitTools(options) {
|
|
|
2256
2255
|
"UNKNOWN_OBSERVATION",
|
|
2257
2256
|
`Unknown observation: ${observationId}.`
|
|
2258
2257
|
);
|
|
2259
|
-
const fieldId =
|
|
2258
|
+
const fieldId = chunkGU6TPVXF_cjs.getEncounterFieldId(sectionId, observationId);
|
|
2260
2259
|
const response = { ...options.getResponses()[fieldId] };
|
|
2261
2260
|
delete response.answer;
|
|
2262
2261
|
delete response.selected;
|
|
@@ -2298,9 +2297,9 @@ function createEncounterVisitTools(options) {
|
|
|
2298
2297
|
throw new ToolError("INVALID_ARGUMENT", "reading must be an object.");
|
|
2299
2298
|
requireId(reading.id, "reading.id");
|
|
2300
2299
|
assertJsonValue(reading);
|
|
2301
|
-
const issues =
|
|
2300
|
+
const issues = chunkGU6TPVXF_cjs.validateEncounterVitals(
|
|
2302
2301
|
{ readings: [reading] },
|
|
2303
|
-
|
|
2302
|
+
chunkGU6TPVXF_cjs.getEncounterFieldId(sectionId, "value"),
|
|
2304
2303
|
sectionId
|
|
2305
2304
|
);
|
|
2306
2305
|
if (issues.length)
|
|
@@ -2371,7 +2370,7 @@ function createEncounterVisitTools(options) {
|
|
|
2371
2370
|
return structured(sectionId, parsed);
|
|
2372
2371
|
}),
|
|
2373
2372
|
validateVisit: () => run(() => {
|
|
2374
|
-
const issues =
|
|
2373
|
+
const issues = chunkGU6TPVXF_cjs.validateEncounterResponses(
|
|
2375
2374
|
definition(),
|
|
2376
2375
|
options.getResponses()
|
|
2377
2376
|
);
|
|
@@ -2384,11 +2383,11 @@ function createEncounterVisitTools(options) {
|
|
|
2384
2383
|
if (typeof body !== "string")
|
|
2385
2384
|
throw new ToolError("INVALID_ARGUMENT", "body must be a string.");
|
|
2386
2385
|
const currentDefinition = definition();
|
|
2387
|
-
const next =
|
|
2386
|
+
const next = chunkGU6TPVXF_cjs.updateEncounterDocumentBody(options.getResponses(), body, {
|
|
2388
2387
|
_ai: true
|
|
2389
2388
|
});
|
|
2390
2389
|
options.setResponses(next);
|
|
2391
|
-
return
|
|
2390
|
+
return chunkGU6TPVXF_cjs.createEncounterSnapshot(currentDefinition, next);
|
|
2392
2391
|
}),
|
|
2393
2392
|
navigateToSection: (sectionId) => run(() => {
|
|
2394
2393
|
section(sectionId);
|
|
@@ -2691,7 +2690,7 @@ function executeEncounterVisitToolCall(name, args, tools) {
|
|
|
2691
2690
|
};
|
|
2692
2691
|
}
|
|
2693
2692
|
var EncounterMdyEditor = React11__namespace.lazy(
|
|
2694
|
-
() => import('./EncounterMdyEditor-
|
|
2693
|
+
() => import('./EncounterMdyEditor-46WMYRFI.cjs').then((module) => ({
|
|
2695
2694
|
default: module.EncounterMdyEditor
|
|
2696
2695
|
}))
|
|
2697
2696
|
);
|
|
@@ -2709,12 +2708,12 @@ function ensureFields() {
|
|
|
2709
2708
|
}
|
|
2710
2709
|
var esheetDefaultsSettled = false;
|
|
2711
2710
|
var EncounterVisit = React11__namespace.forwardRef(function EncounterVisit2({ definition, initialMdy, codeLookup, messages, ...props }, ref) {
|
|
2712
|
-
const inheritedCodeLookup =
|
|
2711
|
+
const inheritedCodeLookup = chunkR4QWCP2T_cjs.useCodeLookupConfig();
|
|
2713
2712
|
const parsed = React11__namespace.useMemo(
|
|
2714
|
-
() => initialMdy === void 0 ? null :
|
|
2713
|
+
() => initialMdy === void 0 ? null : chunkGU6TPVXF_cjs.parseEncounterMdy(initialMdy),
|
|
2715
2714
|
[initialMdy]
|
|
2716
2715
|
);
|
|
2717
|
-
const visitDefinition = definition ?? parsed?.definition ??
|
|
2716
|
+
const visitDefinition = definition ?? parsed?.definition ?? chunkGU6TPVXF_cjs.DEFAULT_ENCOUNTER_VISIT_DEFINITION;
|
|
2718
2717
|
const loadErrors = parsed?.diagnostics.filter(
|
|
2719
2718
|
(diagnostic) => diagnostic.severity === "error" && diagnostic.code !== "dangling-link"
|
|
2720
2719
|
) ?? [];
|
|
@@ -2760,7 +2759,7 @@ var EncounterVisit = React11__namespace.forwardRef(function EncounterVisit2({ de
|
|
|
2760
2759
|
form.pages.forEach((page) => visitFields(page.fields));
|
|
2761
2760
|
return JSON.stringify(shapes.sort((a, b) => a.id.localeCompare(b.id)));
|
|
2762
2761
|
};
|
|
2763
|
-
if (fieldShapes(parsed.form) !== fieldShapes(
|
|
2762
|
+
if (fieldShapes(parsed.form) !== fieldShapes(chunkGU6TPVXF_cjs.createEncounterFormDefinition(visitDefinition))) {
|
|
2764
2763
|
throw new Error(
|
|
2765
2764
|
"The MDY fields do not match the supplied encounter definition."
|
|
2766
2765
|
);
|
|
@@ -2776,7 +2775,7 @@ var EncounterVisit = React11__namespace.forwardRef(function EncounterVisit2({ de
|
|
|
2776
2775
|
},
|
|
2777
2776
|
visitDefinition.id
|
|
2778
2777
|
);
|
|
2779
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2778
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkR4QWCP2T_cjs.CodeLookupContext.Provider, { value: codeLookup ?? inheritedCodeLookup, children: /* @__PURE__ */ jsxRuntime.jsx(chunkFSLI5IKP_cjs.MessagesProvider, { messages, children: session }) });
|
|
2780
2779
|
});
|
|
2781
2780
|
var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisitSession2({
|
|
2782
2781
|
definition,
|
|
@@ -2809,22 +2808,22 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
2809
2808
|
[definitionJson]
|
|
2810
2809
|
);
|
|
2811
2810
|
const form = React11__namespace.useMemo(
|
|
2812
|
-
() =>
|
|
2811
|
+
() => chunkGU6TPVXF_cjs.createEncounterFormDefinition(stableDefinition),
|
|
2813
2812
|
[stableDefinition]
|
|
2814
2813
|
);
|
|
2815
2814
|
const [initialSeed] = React11__namespace.useState(() => {
|
|
2816
2815
|
if (initialMdy === void 0) return initialResponses ?? {};
|
|
2817
|
-
const document2 =
|
|
2816
|
+
const document2 = chunkGU6TPVXF_cjs.parseEncounterMdy(initialMdy);
|
|
2818
2817
|
return {
|
|
2819
2818
|
...document2.response ?? {},
|
|
2820
|
-
[
|
|
2819
|
+
[chunkGU6TPVXF_cjs.ENCOUNTER_DOCUMENT_FIELD_ID]: chunkGU6TPVXF_cjs.encounterDocumentResponse(initialMdy)
|
|
2821
2820
|
};
|
|
2822
2821
|
});
|
|
2823
2822
|
const [snapshot, setSnapshot] = React11__namespace.useState(
|
|
2824
|
-
() =>
|
|
2823
|
+
() => chunkGU6TPVXF_cjs.createEncounterSnapshot(stableDefinition, initialSeed)
|
|
2825
2824
|
);
|
|
2826
2825
|
const [richBodySeed] = React11__namespace.useState(
|
|
2827
|
-
() =>
|
|
2826
|
+
() => chunkGU6TPVXF_cjs.parseEncounterMdy(snapshot.mdy).body
|
|
2828
2827
|
);
|
|
2829
2828
|
const [activeSection, setActiveSection] = React11__namespace.useState(
|
|
2830
2829
|
stableDefinition.sections[0].id
|
|
@@ -2872,18 +2871,18 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
2872
2871
|
const store = renderer$1.current?.getFormStore();
|
|
2873
2872
|
if (!store) return;
|
|
2874
2873
|
const current = store.getState().responses;
|
|
2875
|
-
if (current[
|
|
2876
|
-
const next =
|
|
2874
|
+
if (current[chunkGU6TPVXF_cjs.ENCOUNTER_DOCUMENT_FIELD_ID]?.answer === body) return;
|
|
2875
|
+
const next = chunkGU6TPVXF_cjs.updateEncounterDocumentBody(current, body, { _ai: false });
|
|
2877
2876
|
store.getState().setResponse(
|
|
2878
|
-
|
|
2879
|
-
next[
|
|
2877
|
+
chunkGU6TPVXF_cjs.ENCOUNTER_DOCUMENT_FIELD_ID,
|
|
2878
|
+
next[chunkGU6TPVXF_cjs.ENCOUNTER_DOCUMENT_FIELD_ID]
|
|
2880
2879
|
);
|
|
2881
2880
|
}, []);
|
|
2882
2881
|
const flushEditor = React11__namespace.useCallback(async () => {
|
|
2883
2882
|
if (richEditor.current && latest.current.mode === "rich" && !latest.current.readOnly && !latest.current.saving) {
|
|
2884
|
-
const before = renderer$1.current?.getRawResponse()[
|
|
2883
|
+
const before = renderer$1.current?.getRawResponse()[chunkGU6TPVXF_cjs.ENCOUNTER_DOCUMENT_FIELD_ID];
|
|
2885
2884
|
const body = await richEditor.current.getContent();
|
|
2886
|
-
const after = renderer$1.current?.getRawResponse()[
|
|
2885
|
+
const after = renderer$1.current?.getRawResponse()[chunkGU6TPVXF_cjs.ENCOUNTER_DOCUMENT_FIELD_ID];
|
|
2887
2886
|
if (after !== before && after?.answer !== before?.answer) return;
|
|
2888
2887
|
writeBody(body);
|
|
2889
2888
|
}
|
|
@@ -2925,7 +2924,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
2925
2924
|
);
|
|
2926
2925
|
React11__namespace.useLayoutEffect(() => {
|
|
2927
2926
|
if (mode !== "esheet" || pendingSection === null) return;
|
|
2928
|
-
const fieldId =
|
|
2927
|
+
const fieldId = chunkGU6TPVXF_cjs.getEncounterSectionFieldId(pendingSection);
|
|
2929
2928
|
const section = Array.from(
|
|
2930
2929
|
root.current?.querySelectorAll("[data-field-id]") ?? []
|
|
2931
2930
|
).find((element) => element.dataset.fieldId === fieldId);
|
|
@@ -2967,7 +2966,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
2967
2966
|
React11__namespace.useImperativeHandle(
|
|
2968
2967
|
ref,
|
|
2969
2968
|
() => ({
|
|
2970
|
-
getSnapshot: () =>
|
|
2969
|
+
getSnapshot: () => chunkGU6TPVXF_cjs.createEncounterSnapshot(
|
|
2971
2970
|
latest.current.definition,
|
|
2972
2971
|
renderer$1.current?.getRawResponse() ?? responses.current
|
|
2973
2972
|
),
|
|
@@ -3060,7 +3059,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
3060
3059
|
previousFocus.focus();
|
|
3061
3060
|
};
|
|
3062
3061
|
}, [resolverField]);
|
|
3063
|
-
const mdyFields =
|
|
3062
|
+
const mdyFields = chunkGU6TPVXF_cjs.getEncounterMdyFields(snapshot);
|
|
3064
3063
|
const resolvedField = mdyFields.find((field) => field.id === resolverField);
|
|
3065
3064
|
const resolvedNativeFieldId = resolvedField?.fieldId;
|
|
3066
3065
|
const resolvedSectionId = resolvedField?.sectionId;
|
|
@@ -3070,7 +3069,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
3070
3069
|
);
|
|
3071
3070
|
sections?.forEach((element) => {
|
|
3072
3071
|
const wrapper2 = element.closest("[data-field-id]");
|
|
3073
|
-
const focused = resolvedSectionId && wrapper2?.dataset.fieldId ===
|
|
3072
|
+
const focused = resolvedSectionId && wrapper2?.dataset.fieldId === chunkGU6TPVXF_cjs.getEncounterSectionFieldId(resolvedSectionId);
|
|
3074
3073
|
element.toggleAttribute("data-encounter-focus", Boolean(focused));
|
|
3075
3074
|
wrapper2?.toggleAttribute("data-encounter-focus", Boolean(focused));
|
|
3076
3075
|
});
|
|
@@ -3086,7 +3085,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
3086
3085
|
unsubscribe.current?.();
|
|
3087
3086
|
const publish = () => {
|
|
3088
3087
|
responses.current = store.getState().responses;
|
|
3089
|
-
const next =
|
|
3088
|
+
const next = chunkGU6TPVXF_cjs.createEncounterSnapshot(
|
|
3090
3089
|
latest.current.definition,
|
|
3091
3090
|
responses.current
|
|
3092
3091
|
);
|
|
@@ -3130,7 +3129,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
3130
3129
|
}
|
|
3131
3130
|
if (!latest.current.onSubmit || latest.current.readOnly || latest.current.saving)
|
|
3132
3131
|
return;
|
|
3133
|
-
const next =
|
|
3132
|
+
const next = chunkGU6TPVXF_cjs.createEncounterSnapshot(
|
|
3134
3133
|
latest.current.definition,
|
|
3135
3134
|
renderer$1.current?.getRawResponse() ?? responses.current
|
|
3136
3135
|
);
|
|
@@ -3164,7 +3163,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
3164
3163
|
}
|
|
3165
3164
|
};
|
|
3166
3165
|
const documentedSections = snapshot.definition.sections.filter(
|
|
3167
|
-
(section) =>
|
|
3166
|
+
(section) => chunkGU6TPVXF_cjs.getEncounterSectionFieldIds(section).some(
|
|
3168
3167
|
(fieldId) => snapshot.observations.some(
|
|
3169
3168
|
(observation) => observation.fieldId === fieldId
|
|
3170
3169
|
)
|
|
@@ -3260,7 +3259,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
3260
3259
|
EncounterMdyEditor,
|
|
3261
3260
|
{
|
|
3262
3261
|
ref: richEditor,
|
|
3263
|
-
body:
|
|
3262
|
+
body: chunkGU6TPVXF_cjs.getEncounterDocumentBody(snapshot.responses) ?? richBodySeed,
|
|
3264
3263
|
fieldIds: mdyFields.map((field) => field.id),
|
|
3265
3264
|
fields: mdyFields.map((field) => ({
|
|
3266
3265
|
id: field.id,
|
|
@@ -3874,7 +3873,7 @@ function MedicationListField({
|
|
|
3874
3873
|
return definition.medications ?? [];
|
|
3875
3874
|
}, [response?.answer, definition.medications]);
|
|
3876
3875
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3877
|
-
|
|
3876
|
+
chunkR4QWCP2T_cjs.MedicationReconciliation,
|
|
3878
3877
|
{
|
|
3879
3878
|
medications,
|
|
3880
3879
|
onChange: (next) => onResponse({ answer: JSON.stringify({ medications: next }) }),
|
|
@@ -3932,7 +3931,7 @@ function AllergyListField({
|
|
|
3932
3931
|
codeLookup
|
|
3933
3932
|
}) {
|
|
3934
3933
|
const definition = field.definition;
|
|
3935
|
-
const ambientCodeLookup =
|
|
3934
|
+
const ambientCodeLookup = chunkR4QWCP2T_cjs.useCodeLookupConfig();
|
|
3936
3935
|
const effectiveCodeLookup = codeLookup === false ? void 0 : codeLookup ?? ambientCodeLookup ?? void 0;
|
|
3937
3936
|
const value = React11__namespace.useMemo(() => {
|
|
3938
3937
|
if (response?.answer) return parseValue2(response.answer);
|
|
@@ -3942,7 +3941,7 @@ function AllergyListField({
|
|
|
3942
3941
|
onResponse({ answer: JSON.stringify(next) });
|
|
3943
3942
|
};
|
|
3944
3943
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3945
|
-
|
|
3944
|
+
chunkR4QWCP2T_cjs.AllergyManager,
|
|
3946
3945
|
{
|
|
3947
3946
|
allergies: value.allergies,
|
|
3948
3947
|
onChange: (allergies) => commit({
|
|
@@ -3984,123 +3983,123 @@ function registerMieEsheetFields(options) {
|
|
|
3984
3983
|
|
|
3985
3984
|
Object.defineProperty(exports, "DEFAULT_ENCOUNTER_VISIT_DEFINITION", {
|
|
3986
3985
|
enumerable: true,
|
|
3987
|
-
get: function () { return
|
|
3986
|
+
get: function () { return chunkGU6TPVXF_cjs.DEFAULT_ENCOUNTER_VISIT_DEFINITION; }
|
|
3988
3987
|
});
|
|
3989
3988
|
Object.defineProperty(exports, "ENCOUNTER_DOCUMENT_FIELD_ID", {
|
|
3990
3989
|
enumerable: true,
|
|
3991
|
-
get: function () { return
|
|
3990
|
+
get: function () { return chunkGU6TPVXF_cjs.ENCOUNTER_DOCUMENT_FIELD_ID; }
|
|
3992
3991
|
});
|
|
3993
3992
|
Object.defineProperty(exports, "EXAMPLE_ENCOUNTER_VISIT_RESPONSES", {
|
|
3994
3993
|
enumerable: true,
|
|
3995
|
-
get: function () { return
|
|
3994
|
+
get: function () { return chunkGU6TPVXF_cjs.EXAMPLE_ENCOUNTER_VISIT_RESPONSES; }
|
|
3996
3995
|
});
|
|
3997
3996
|
Object.defineProperty(exports, "createEncounterFormDefinition", {
|
|
3998
3997
|
enumerable: true,
|
|
3999
|
-
get: function () { return
|
|
3998
|
+
get: function () { return chunkGU6TPVXF_cjs.createEncounterFormDefinition; }
|
|
4000
3999
|
});
|
|
4001
4000
|
Object.defineProperty(exports, "createEncounterMdy", {
|
|
4002
4001
|
enumerable: true,
|
|
4003
|
-
get: function () { return
|
|
4002
|
+
get: function () { return chunkGU6TPVXF_cjs.createEncounterMdy; }
|
|
4004
4003
|
});
|
|
4005
4004
|
Object.defineProperty(exports, "createEncounterSnapshot", {
|
|
4006
4005
|
enumerable: true,
|
|
4007
|
-
get: function () { return
|
|
4006
|
+
get: function () { return chunkGU6TPVXF_cjs.createEncounterSnapshot; }
|
|
4008
4007
|
});
|
|
4009
4008
|
Object.defineProperty(exports, "encounterDocumentResponse", {
|
|
4010
4009
|
enumerable: true,
|
|
4011
|
-
get: function () { return
|
|
4010
|
+
get: function () { return chunkGU6TPVXF_cjs.encounterDocumentResponse; }
|
|
4012
4011
|
});
|
|
4013
4012
|
Object.defineProperty(exports, "getEncounterConcerns", {
|
|
4014
4013
|
enumerable: true,
|
|
4015
|
-
get: function () { return
|
|
4014
|
+
get: function () { return chunkGU6TPVXF_cjs.getEncounterConcerns; }
|
|
4016
4015
|
});
|
|
4017
4016
|
Object.defineProperty(exports, "getEncounterDocumentBody", {
|
|
4018
4017
|
enumerable: true,
|
|
4019
|
-
get: function () { return
|
|
4018
|
+
get: function () { return chunkGU6TPVXF_cjs.getEncounterDocumentBody; }
|
|
4020
4019
|
});
|
|
4021
4020
|
Object.defineProperty(exports, "getEncounterFieldId", {
|
|
4022
4021
|
enumerable: true,
|
|
4023
|
-
get: function () { return
|
|
4022
|
+
get: function () { return chunkGU6TPVXF_cjs.getEncounterFieldId; }
|
|
4024
4023
|
});
|
|
4025
4024
|
Object.defineProperty(exports, "getEncounterMdyFields", {
|
|
4026
4025
|
enumerable: true,
|
|
4027
|
-
get: function () { return
|
|
4026
|
+
get: function () { return chunkGU6TPVXF_cjs.getEncounterMdyFields; }
|
|
4028
4027
|
});
|
|
4029
4028
|
Object.defineProperty(exports, "getEncounterSectionFieldId", {
|
|
4030
4029
|
enumerable: true,
|
|
4031
|
-
get: function () { return
|
|
4030
|
+
get: function () { return chunkGU6TPVXF_cjs.getEncounterSectionFieldId; }
|
|
4032
4031
|
});
|
|
4033
4032
|
Object.defineProperty(exports, "getEncounterSectionFieldIds", {
|
|
4034
4033
|
enumerable: true,
|
|
4035
|
-
get: function () { return
|
|
4034
|
+
get: function () { return chunkGU6TPVXF_cjs.getEncounterSectionFieldIds; }
|
|
4036
4035
|
});
|
|
4037
4036
|
Object.defineProperty(exports, "parseEncounterAssessment", {
|
|
4038
4037
|
enumerable: true,
|
|
4039
|
-
get: function () { return
|
|
4038
|
+
get: function () { return chunkGU6TPVXF_cjs.parseEncounterAssessment; }
|
|
4040
4039
|
});
|
|
4041
4040
|
Object.defineProperty(exports, "parseEncounterConditions", {
|
|
4042
4041
|
enumerable: true,
|
|
4043
|
-
get: function () { return
|
|
4042
|
+
get: function () { return chunkGU6TPVXF_cjs.parseEncounterConditions; }
|
|
4044
4043
|
});
|
|
4045
4044
|
Object.defineProperty(exports, "parseEncounterMdy", {
|
|
4046
4045
|
enumerable: true,
|
|
4047
|
-
get: function () { return
|
|
4046
|
+
get: function () { return chunkGU6TPVXF_cjs.parseEncounterMdy; }
|
|
4048
4047
|
});
|
|
4049
4048
|
Object.defineProperty(exports, "parseEncounterPlan", {
|
|
4050
4049
|
enumerable: true,
|
|
4051
|
-
get: function () { return
|
|
4050
|
+
get: function () { return chunkGU6TPVXF_cjs.parseEncounterPlan; }
|
|
4052
4051
|
});
|
|
4053
4052
|
Object.defineProperty(exports, "parseEncounterVitals", {
|
|
4054
4053
|
enumerable: true,
|
|
4055
|
-
get: function () { return
|
|
4054
|
+
get: function () { return chunkGU6TPVXF_cjs.parseEncounterVitals; }
|
|
4056
4055
|
});
|
|
4057
4056
|
Object.defineProperty(exports, "refreshEncounterMdyLinks", {
|
|
4058
4057
|
enumerable: true,
|
|
4059
|
-
get: function () { return
|
|
4058
|
+
get: function () { return chunkGU6TPVXF_cjs.refreshEncounterMdyLinks; }
|
|
4060
4059
|
});
|
|
4061
4060
|
Object.defineProperty(exports, "renderEncounterMdy", {
|
|
4062
4061
|
enumerable: true,
|
|
4063
|
-
get: function () { return
|
|
4062
|
+
get: function () { return chunkGU6TPVXF_cjs.renderEncounterMdy; }
|
|
4064
4063
|
});
|
|
4065
4064
|
Object.defineProperty(exports, "updateEncounterDocumentBody", {
|
|
4066
4065
|
enumerable: true,
|
|
4067
|
-
get: function () { return
|
|
4066
|
+
get: function () { return chunkGU6TPVXF_cjs.updateEncounterDocumentBody; }
|
|
4068
4067
|
});
|
|
4069
4068
|
Object.defineProperty(exports, "validAssessmentItem", {
|
|
4070
4069
|
enumerable: true,
|
|
4071
|
-
get: function () { return
|
|
4070
|
+
get: function () { return chunkGU6TPVXF_cjs.validAssessmentItem; }
|
|
4072
4071
|
});
|
|
4073
4072
|
Object.defineProperty(exports, "validateEncounterAllergyValue", {
|
|
4074
4073
|
enumerable: true,
|
|
4075
|
-
get: function () { return
|
|
4074
|
+
get: function () { return chunkGU6TPVXF_cjs.validateEncounterAllergyValue; }
|
|
4076
4075
|
});
|
|
4077
4076
|
Object.defineProperty(exports, "validateEncounterAssessment", {
|
|
4078
4077
|
enumerable: true,
|
|
4079
|
-
get: function () { return
|
|
4078
|
+
get: function () { return chunkGU6TPVXF_cjs.validateEncounterAssessment; }
|
|
4080
4079
|
});
|
|
4081
4080
|
Object.defineProperty(exports, "validateEncounterConditions", {
|
|
4082
4081
|
enumerable: true,
|
|
4083
|
-
get: function () { return
|
|
4082
|
+
get: function () { return chunkGU6TPVXF_cjs.validateEncounterConditions; }
|
|
4084
4083
|
});
|
|
4085
4084
|
Object.defineProperty(exports, "validateEncounterDefinition", {
|
|
4086
4085
|
enumerable: true,
|
|
4087
|
-
get: function () { return
|
|
4086
|
+
get: function () { return chunkGU6TPVXF_cjs.validateEncounterDefinition; }
|
|
4088
4087
|
});
|
|
4089
4088
|
Object.defineProperty(exports, "validateEncounterMedicationValue", {
|
|
4090
4089
|
enumerable: true,
|
|
4091
|
-
get: function () { return
|
|
4090
|
+
get: function () { return chunkGU6TPVXF_cjs.validateEncounterMedicationValue; }
|
|
4092
4091
|
});
|
|
4093
4092
|
Object.defineProperty(exports, "validateEncounterPlan", {
|
|
4094
4093
|
enumerable: true,
|
|
4095
|
-
get: function () { return
|
|
4094
|
+
get: function () { return chunkGU6TPVXF_cjs.validateEncounterPlan; }
|
|
4096
4095
|
});
|
|
4097
4096
|
Object.defineProperty(exports, "validateEncounterResponses", {
|
|
4098
4097
|
enumerable: true,
|
|
4099
|
-
get: function () { return
|
|
4098
|
+
get: function () { return chunkGU6TPVXF_cjs.validateEncounterResponses; }
|
|
4100
4099
|
});
|
|
4101
4100
|
Object.defineProperty(exports, "validateEncounterVitals", {
|
|
4102
4101
|
enumerable: true,
|
|
4103
|
-
get: function () { return
|
|
4102
|
+
get: function () { return chunkGU6TPVXF_cjs.validateEncounterVitals; }
|
|
4104
4103
|
});
|
|
4105
4104
|
Object.defineProperty(exports, "EsheetRenderer", {
|
|
4106
4105
|
enumerable: true,
|