@mieweb/ui 0.11.0-dev.43 → 0.11.0-dev.45
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/agent/skills/mieweb-ui-catalog/selection-guidance.md +1 -1
- package/dist/ag-grid.cjs +2 -2
- package/dist/ag-grid.js +1 -1
- package/dist/{chunk-AHYDJN4H.cjs → chunk-2XHPPOXY.cjs} +32 -32
- package/dist/{chunk-AHYDJN4H.cjs.map → chunk-2XHPPOXY.cjs.map} +1 -1
- package/dist/{chunk-3IKIRGHI.cjs → chunk-3H6BQV2D.cjs} +6 -6
- package/dist/{chunk-3IKIRGHI.cjs.map → chunk-3H6BQV2D.cjs.map} +1 -1
- package/dist/{chunk-IIV5GNSK.cjs → chunk-3PT4B4JT.cjs} +4 -4
- package/dist/{chunk-IIV5GNSK.cjs.map → chunk-3PT4B4JT.cjs.map} +1 -1
- package/dist/{chunk-GLG6UE2H.cjs → chunk-3SEQVGLH.cjs} +4 -4
- package/dist/{chunk-GLG6UE2H.cjs.map → chunk-3SEQVGLH.cjs.map} +1 -1
- package/dist/{chunk-JUY2JLFL.js → chunk-3XDU7XIC.js} +3 -3
- package/dist/{chunk-JUY2JLFL.js.map → chunk-3XDU7XIC.js.map} +1 -1
- package/dist/{chunk-LQ22CY7X.js → chunk-46ZUORUE.js} +5 -5
- package/dist/{chunk-LQ22CY7X.js.map → chunk-46ZUORUE.js.map} +1 -1
- package/dist/{chunk-CKECOCYJ.js → chunk-4IOIDS2Z.js} +3 -3
- package/dist/{chunk-CKECOCYJ.js.map → chunk-4IOIDS2Z.js.map} +1 -1
- package/dist/{chunk-F7SZSOB3.js → chunk-6PCA5H47.js} +3 -3
- package/dist/{chunk-F7SZSOB3.js.map → chunk-6PCA5H47.js.map} +1 -1
- package/dist/{chunk-ULEX7OOJ.js → chunk-6Y6W5DUY.js} +4 -4
- package/dist/{chunk-ULEX7OOJ.js.map → chunk-6Y6W5DUY.js.map} +1 -1
- package/dist/{chunk-S7AMZ4RD.cjs → chunk-7K6SW4VB.cjs} +4 -4
- package/dist/{chunk-S7AMZ4RD.cjs.map → chunk-7K6SW4VB.cjs.map} +1 -1
- package/dist/{chunk-KY67AMQ5.cjs → chunk-7MF3O3BU.cjs} +4 -4
- package/dist/{chunk-KY67AMQ5.cjs.map → chunk-7MF3O3BU.cjs.map} +1 -1
- package/dist/{chunk-Z3WMDVMR.cjs → chunk-7QNBPB7F.cjs} +9 -5
- package/dist/chunk-7QNBPB7F.cjs.map +1 -0
- package/dist/{chunk-YFWDS6MX.js → chunk-AB24H2RM.js} +3 -3
- package/dist/{chunk-YFWDS6MX.js.map → chunk-AB24H2RM.js.map} +1 -1
- package/dist/{chunk-DSGFWT4D.js → chunk-AQBZEN43.js} +5 -5
- package/dist/{chunk-DSGFWT4D.js.map → chunk-AQBZEN43.js.map} +1 -1
- package/dist/{chunk-2W73UQ3T.js → chunk-BPYI7BDC.js} +3 -3
- package/dist/{chunk-2W73UQ3T.js.map → chunk-BPYI7BDC.js.map} +1 -1
- package/dist/{chunk-7U7SONM5.js → chunk-CVCUQ2MZ.js} +3 -3
- package/dist/{chunk-7U7SONM5.js.map → chunk-CVCUQ2MZ.js.map} +1 -1
- package/dist/{chunk-PWXDRFJL.cjs → chunk-DHEOWRIE.cjs} +6 -6
- package/dist/{chunk-PWXDRFJL.cjs.map → chunk-DHEOWRIE.cjs.map} +1 -1
- package/dist/{chunk-OYUIEJPN.js → chunk-GTRYDFMT.js} +38 -10
- package/dist/chunk-GTRYDFMT.js.map +1 -0
- package/dist/{chunk-2FZYZ4HT.cjs → chunk-HDSYYQYM.cjs} +4 -4
- package/dist/{chunk-2FZYZ4HT.cjs.map → chunk-HDSYYQYM.cjs.map} +1 -1
- package/dist/{chunk-MM32RSX4.cjs → chunk-HOE2U27V.cjs} +185 -18
- package/dist/chunk-HOE2U27V.cjs.map +1 -0
- package/dist/{chunk-JCIQIR5V.js → chunk-IGUDEWIW.js} +4 -4
- package/dist/{chunk-JCIQIR5V.js.map → chunk-IGUDEWIW.js.map} +1 -1
- package/dist/{chunk-GGLISETW.cjs → chunk-IKHK4GTF.cjs} +4 -4
- package/dist/{chunk-GGLISETW.cjs.map → chunk-IKHK4GTF.cjs.map} +1 -1
- package/dist/{chunk-YVKBXNPK.js → chunk-JBNQ2L3K.js} +10 -6
- package/dist/chunk-JBNQ2L3K.js.map +1 -0
- package/dist/{chunk-GU6TPVXF.cjs → chunk-JK2IWOI7.cjs} +6 -6
- package/dist/{chunk-GU6TPVXF.cjs.map → chunk-JK2IWOI7.cjs.map} +1 -1
- package/dist/{chunk-TZKBW4GA.cjs → chunk-K76UNS22.cjs} +6 -6
- package/dist/{chunk-TZKBW4GA.cjs.map → chunk-K76UNS22.cjs.map} +1 -1
- package/dist/{chunk-DAAJ3B2T.js → chunk-KP72MDFB.js} +4 -4
- package/dist/{chunk-DAAJ3B2T.js.map → chunk-KP72MDFB.js.map} +1 -1
- package/dist/{chunk-MLCIINXT.js → chunk-LBUXS6FJ.js} +4 -4
- package/dist/{chunk-MLCIINXT.js.map → chunk-LBUXS6FJ.js.map} +1 -1
- package/dist/{chunk-GG3IK5TL.cjs → chunk-MQK2D6I6.cjs} +9 -9
- package/dist/{chunk-GG3IK5TL.cjs.map → chunk-MQK2D6I6.cjs.map} +1 -1
- package/dist/{chunk-67X7L7JX.js → chunk-MQSGJB2B.js} +173 -6
- package/dist/chunk-MQSGJB2B.js.map +1 -0
- package/dist/{chunk-2GBVJHWN.cjs → chunk-NH5JOZLG.cjs} +13 -13
- package/dist/{chunk-2GBVJHWN.cjs.map → chunk-NH5JOZLG.cjs.map} +1 -1
- package/dist/{chunk-NWU634SO.cjs → chunk-O2EAHOXM.cjs} +4 -4
- package/dist/{chunk-NWU634SO.cjs.map → chunk-O2EAHOXM.cjs.map} +1 -1
- package/dist/{chunk-JUYBJLPI.cjs → chunk-O7Y56J4R.cjs} +4 -4
- package/dist/{chunk-JUYBJLPI.cjs.map → chunk-O7Y56J4R.cjs.map} +1 -1
- package/dist/{chunk-BQSREBF2.cjs → chunk-OJ2NCQ2R.cjs} +14 -14
- package/dist/{chunk-BQSREBF2.cjs.map → chunk-OJ2NCQ2R.cjs.map} +1 -1
- package/dist/{chunk-GLRKXJCR.js → chunk-OX32ITWC.js} +3 -3
- package/dist/{chunk-GLRKXJCR.js.map → chunk-OX32ITWC.js.map} +1 -1
- package/dist/{chunk-L4APW65W.cjs → chunk-PJ4XEBMU.cjs} +4 -4
- package/dist/{chunk-L4APW65W.cjs.map → chunk-PJ4XEBMU.cjs.map} +1 -1
- package/dist/{chunk-OZKJYLN6.js → chunk-PSCSU63K.js} +3 -3
- package/dist/{chunk-OZKJYLN6.js.map → chunk-PSCSU63K.js.map} +1 -1
- package/dist/{chunk-EI4JU5JF.js → chunk-RKM4VGAN.js} +3 -3
- package/dist/{chunk-EI4JU5JF.js.map → chunk-RKM4VGAN.js.map} +1 -1
- package/dist/{chunk-ME7EVT6F.js → chunk-RYGVILUR.js} +3 -3
- package/dist/{chunk-ME7EVT6F.js.map → chunk-RYGVILUR.js.map} +1 -1
- package/dist/{chunk-EGPDT7SM.js → chunk-S7NJV335.js} +3 -3
- package/dist/{chunk-EGPDT7SM.js.map → chunk-S7NJV335.js.map} +1 -1
- package/dist/{chunk-AHT2HRHC.cjs → chunk-TNRANQVI.cjs} +16 -16
- package/dist/{chunk-AHT2HRHC.cjs.map → chunk-TNRANQVI.cjs.map} +1 -1
- package/dist/{chunk-TERHGQ73.cjs → chunk-U7XWWU5H.cjs} +5 -5
- package/dist/{chunk-TERHGQ73.cjs.map → chunk-U7XWWU5H.cjs.map} +1 -1
- package/dist/{chunk-G35LXI2A.js → chunk-UIFN2LYT.js} +3 -3
- package/dist/{chunk-G35LXI2A.js.map → chunk-UIFN2LYT.js.map} +1 -1
- package/dist/{chunk-IYDPGQJA.js → chunk-UQAWXY6R.js} +3 -3
- package/dist/{chunk-IYDPGQJA.js.map → chunk-UQAWXY6R.js.map} +1 -1
- package/dist/{chunk-YWCHUUY3.js → chunk-VOPRL4RF.js} +7 -7
- package/dist/{chunk-YWCHUUY3.js.map → chunk-VOPRL4RF.js.map} +1 -1
- package/dist/{chunk-KB2PLV5Q.js → chunk-VQGRMCVT.js} +4 -4
- package/dist/{chunk-KB2PLV5Q.js.map → chunk-VQGRMCVT.js.map} +1 -1
- package/dist/{chunk-AWJBJYLZ.cjs → chunk-X6THHGTZ.cjs} +37 -37
- package/dist/{chunk-AWJBJYLZ.cjs.map → chunk-X6THHGTZ.cjs.map} +1 -1
- package/dist/{chunk-Q6QLGCL7.cjs → chunk-XCCH5KHW.cjs} +9 -9
- package/dist/{chunk-Q6QLGCL7.cjs.map → chunk-XCCH5KHW.cjs.map} +1 -1
- package/dist/{chunk-KQXD6BFO.cjs → chunk-XM3D4KAF.cjs} +9 -9
- package/dist/{chunk-KQXD6BFO.cjs.map → chunk-XM3D4KAF.cjs.map} +1 -1
- package/dist/{chunk-PINIBEIU.cjs → chunk-XRXOGMMG.cjs} +39 -11
- package/dist/chunk-XRXOGMMG.cjs.map +1 -0
- package/dist/{chunk-XPWFIDZM.cjs → chunk-XU3X2AUL.cjs} +4 -4
- package/dist/{chunk-XPWFIDZM.cjs.map → chunk-XU3X2AUL.cjs.map} +1 -1
- package/dist/{chunk-3A4N5E6P.js → chunk-XZ65FX6T.js} +3 -3
- package/dist/{chunk-3A4N5E6P.js.map → chunk-XZ65FX6T.js.map} +1 -1
- package/dist/{chunk-CRR7AE5D.js → chunk-Z6I4XFPC.js} +3 -3
- package/dist/{chunk-CRR7AE5D.js.map → chunk-Z6I4XFPC.js.map} +1 -1
- package/dist/{chunk-LTCHD3K5.cjs → chunk-Z7ZOSENN.cjs} +5 -5
- package/dist/{chunk-LTCHD3K5.cjs.map → chunk-Z7ZOSENN.cjs.map} +1 -1
- package/dist/{chunk-NZUQL42A.cjs → chunk-ZDA6FEKA.cjs} +5 -5
- package/dist/{chunk-NZUQL42A.cjs.map → chunk-ZDA6FEKA.cjs.map} +1 -1
- package/dist/{chunk-UY2EZYIC.js → chunk-ZSBG6C3P.js} +3 -3
- package/dist/{chunk-UY2EZYIC.js.map → chunk-ZSBG6C3P.js.map} +1 -1
- package/dist/{chunk-KAQNYX7B.js → chunk-ZVRJVUFX.js} +3 -3
- package/dist/{chunk-KAQNYX7B.js.map → chunk-ZVRJVUFX.js.map} +1 -1
- package/dist/components/AudioPlayer/index.cjs +7 -7
- package/dist/components/AudioPlayer/index.js +2 -2
- package/dist/components/BoardView/index.cjs +5 -5
- package/dist/components/BoardView/index.js +2 -2
- package/dist/components/CollabStatus/index.cjs +5 -5
- package/dist/components/CollabStatus/index.js +2 -2
- package/dist/components/Dropdown/index.cjs +9 -9
- package/dist/components/Dropdown/index.d.cts +6 -1
- package/dist/components/Dropdown/index.d.ts +6 -1
- package/dist/components/Dropdown/index.js +2 -2
- package/dist/components/EmailEditor/index.cjs +16 -16
- package/dist/components/EmailEditor/index.js +7 -7
- package/dist/components/MediaEditor/index.cjs +10 -10
- package/dist/components/MediaEditor/index.js +5 -5
- package/dist/components/MediaFeed/index.cjs +6 -6
- package/dist/components/MediaFeed/index.js +5 -5
- package/dist/components/MediaPlayer/index.cjs +8 -8
- package/dist/components/MediaPlayer/index.js +4 -4
- package/dist/components/MegaMenu/index.cjs +5 -5
- package/dist/components/MegaMenu/index.js +2 -2
- package/dist/components/RecordHeader/index.cjs +5 -5
- package/dist/components/RecordHeader/index.js +3 -3
- package/dist/components/RecordLayout/index.cjs +5 -5
- package/dist/components/RecordLayout/index.js +3 -3
- package/dist/components/RichTextEditor/index.cjs +6 -6
- package/dist/components/RichTextEditor/index.js +3 -3
- package/dist/components/Slider/index.cjs +6 -6
- package/dist/components/Slider/index.js +2 -2
- package/dist/components/SliderCalculator/index.cjs +5 -5
- package/dist/components/SliderCalculator/index.js +3 -3
- package/dist/components/SuperChat/index.cjs +23 -23
- package/dist/components/SuperChat/index.js +8 -8
- package/dist/components/SuperChat/plugins/index.cjs +5 -5
- package/dist/components/SuperChat/plugins/index.js +4 -4
- package/dist/components/Tabs/index.cjs +8 -8
- package/dist/components/Tabs/index.js +2 -2
- package/dist/components/Textarea/index.cjs +8 -8
- package/dist/components/Textarea/index.js +5 -5
- package/dist/components/ThemeProvider/index.cjs +9 -9
- package/dist/components/ThemeProvider/index.js +3 -3
- package/dist/components/Tooltip/index.cjs +3 -3
- package/dist/components/Tooltip/index.js +2 -2
- package/dist/components/ViewSet/index.cjs +5 -5
- package/dist/components/ViewSet/index.js +4 -4
- package/dist/components/ViewSwitcher/index.cjs +4 -4
- package/dist/components/ViewSwitcher/index.js +2 -2
- package/dist/deck.cjs +3 -3
- package/dist/deck.js +1 -1
- package/dist/esheet.cjs +107 -107
- package/dist/esheet.js +10 -10
- package/dist/hooks/index.cjs +5 -5
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +284 -284
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +40 -40
- package/dist/kerebron.cjs +6 -6
- package/dist/kerebron.js +4 -4
- package/dist/{model-5PB6KNYH.cjs → model-2TISYEYF.cjs} +20 -20
- package/dist/{model-5PB6KNYH.cjs.map → model-2TISYEYF.cjs.map} +1 -1
- package/dist/{model-OGWTZEXR.js → model-BCS5BUK3.js} +6 -6
- package/dist/{model-OGWTZEXR.js.map → model-BCS5BUK3.js.map} +1 -1
- package/dist/org-chart.cjs +2 -2
- package/dist/org-chart.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-67X7L7JX.js.map +0 -1
- package/dist/chunk-MM32RSX4.cjs.map +0 -1
- package/dist/chunk-OYUIEJPN.js.map +0 -1
- package/dist/chunk-PINIBEIU.cjs.map +0 -1
- package/dist/chunk-YVKBXNPK.js.map +0 -1
- package/dist/chunk-Z3WMDVMR.cjs.map +0 -1
package/dist/esheet.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('./chunk-K2BY7YPJ.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
require('./chunk-
|
|
4
|
+
var chunkJK2IWOI7_cjs = require('./chunk-JK2IWOI7.cjs');
|
|
5
|
+
var chunkX6THHGTZ_cjs = require('./chunk-X6THHGTZ.cjs');
|
|
6
|
+
var chunkXM3D4KAF_cjs = require('./chunk-XM3D4KAF.cjs');
|
|
7
|
+
require('./chunk-3SEQVGLH.cjs');
|
|
8
8
|
var chunkSV6YGK4U_cjs = require('./chunk-SV6YGK4U.cjs');
|
|
9
9
|
require('./chunk-G7EQ3JPX.cjs');
|
|
10
10
|
require('./chunk-AIJAFPGJ.cjs');
|
|
11
11
|
var chunkMXIIPFTA_cjs = require('./chunk-MXIIPFTA.cjs');
|
|
12
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-IKHK4GTF.cjs');
|
|
13
13
|
var chunkUPWIJC6I_cjs = require('./chunk-UPWIJC6I.cjs');
|
|
14
14
|
require('./chunk-MJWFNV3L.cjs');
|
|
15
15
|
require('./chunk-7AECNMYV.cjs');
|
|
@@ -20,13 +20,13 @@ require('./chunk-NNEFAUHV.cjs');
|
|
|
20
20
|
require('./chunk-CW75IKA6.cjs');
|
|
21
21
|
require('./chunk-SCV7C55E.cjs');
|
|
22
22
|
require('./chunk-7E46YDOT.cjs');
|
|
23
|
-
var
|
|
23
|
+
var chunkHOE2U27V_cjs = require('./chunk-HOE2U27V.cjs');
|
|
24
24
|
require('./chunk-NCG7NJAW.cjs');
|
|
25
|
-
require('./chunk-
|
|
25
|
+
require('./chunk-TNRANQVI.cjs');
|
|
26
26
|
var chunkFSLI5IKP_cjs = require('./chunk-FSLI5IKP.cjs');
|
|
27
27
|
require('./chunk-YP5T6NZD.cjs');
|
|
28
28
|
require('./chunk-ZNUMOJOI.cjs');
|
|
29
|
-
require('./chunk-
|
|
29
|
+
require('./chunk-XRXOGMMG.cjs');
|
|
30
30
|
require('./chunk-I44YNYI6.cjs');
|
|
31
31
|
var chunkZ5S5JEJD_cjs = require('./chunk-Z5S5JEJD.cjs');
|
|
32
32
|
require('./chunk-NMBYU7D7.cjs');
|
|
@@ -37,7 +37,7 @@ require('./chunk-AOHJILLU.cjs');
|
|
|
37
37
|
require('./chunk-C7RVKV25.cjs');
|
|
38
38
|
require('./chunk-L7L5S2HO.cjs');
|
|
39
39
|
require('./chunk-YW2AKBLS.cjs');
|
|
40
|
-
require('./chunk-
|
|
40
|
+
require('./chunk-7QNBPB7F.cjs');
|
|
41
41
|
require('./chunk-EACNRR3C.cjs');
|
|
42
42
|
var chunkFSARTLUE_cjs = require('./chunk-FSARTLUE.cjs');
|
|
43
43
|
require('./chunk-HGJHWI7W.cjs');
|
|
@@ -241,7 +241,7 @@ function EncounterMdyView({ source }) {
|
|
|
241
241
|
const [failure2, setFailure] = React11__namespace.useState(null);
|
|
242
242
|
React11__namespace.useEffect(() => {
|
|
243
243
|
let cancelled = false;
|
|
244
|
-
void
|
|
244
|
+
void chunkJK2IWOI7_cjs.renderEncounterMdy(source).then((result) => {
|
|
245
245
|
if (cancelled) return;
|
|
246
246
|
const html = createEncounterReportHtml(
|
|
247
247
|
result.html ?? "",
|
|
@@ -392,7 +392,7 @@ function EncounterVitalsField({
|
|
|
392
392
|
const [drafts, setDrafts] = React11__namespace.useState({});
|
|
393
393
|
const readOnly = !(isPreview && isEnabled) || Boolean(isReadOnly) || Boolean(parsed.error);
|
|
394
394
|
const definition = field.definition;
|
|
395
|
-
const issues =
|
|
395
|
+
const issues = chunkJK2IWOI7_cjs.validateEncounterVitals(parsed.value, definition.id);
|
|
396
396
|
const commit = (value) => {
|
|
397
397
|
if (!readOnly) {
|
|
398
398
|
const next = { ...response, answer: JSON.stringify(value), _ai: false };
|
|
@@ -734,7 +734,7 @@ function getExternalEncounterConditions(state) {
|
|
|
734
734
|
if (!answer) continue;
|
|
735
735
|
try {
|
|
736
736
|
const parsed = JSON.parse(answer);
|
|
737
|
-
if (
|
|
737
|
+
if (chunkJK2IWOI7_cjs.validateEncounterConditions(parsed).length > 0) continue;
|
|
738
738
|
for (const concern of parsed.concerns) {
|
|
739
739
|
if (!byId.has(concern.concernId)) byId.set(concern.concernId, concern);
|
|
740
740
|
}
|
|
@@ -828,11 +828,11 @@ function conditionSystemIdentity(system) {
|
|
|
828
828
|
const trimmed = system.trim();
|
|
829
829
|
if (trimmed === "http://hl7.org/fhir/sid/icd-10-cm") return "ICD-10-CM";
|
|
830
830
|
if (trimmed === "http://snomed.info/sct") return "SNOMED";
|
|
831
|
-
return
|
|
831
|
+
return chunkX6THHGTZ_cjs.normalizeConditionCodingSystem(trimmed);
|
|
832
832
|
}
|
|
833
833
|
function matchingConditionCode(concern, picked) {
|
|
834
834
|
return Boolean(
|
|
835
|
-
|
|
835
|
+
chunkXM3D4KAF_cjs.currentAssertion(concern)?.coding?.some(
|
|
836
836
|
(coding) => conditionSystemIdentity(coding.system) === conditionSystemIdentity(picked.codetype) && coding.code.trim().toUpperCase() === picked.fullcode.trim().toUpperCase()
|
|
837
837
|
)
|
|
838
838
|
);
|
|
@@ -848,7 +848,7 @@ function useEncounterAssertionDate(field) {
|
|
|
848
848
|
React11__namespace.useEffect(() => {
|
|
849
849
|
setDate(hostDate ?? "");
|
|
850
850
|
}, [hostDate]);
|
|
851
|
-
return { date, setDate, valid:
|
|
851
|
+
return { date, setDate, valid: chunkJK2IWOI7_cjs.isEncounterDate(date) };
|
|
852
852
|
}
|
|
853
853
|
function readAssessment(answer, externalConcerns) {
|
|
854
854
|
if (!answer) return { value: { concerns: [], items: [], orders: [] } };
|
|
@@ -856,7 +856,7 @@ function readAssessment(answer, externalConcerns) {
|
|
|
856
856
|
const parsed = JSON.parse(answer);
|
|
857
857
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
858
858
|
throw new Error();
|
|
859
|
-
if (
|
|
859
|
+
if (chunkJK2IWOI7_cjs.validateEncounterAssessment(parsed, "", "", externalConcerns).length > 0)
|
|
860
860
|
throw new Error();
|
|
861
861
|
return { value: parsed };
|
|
862
862
|
} catch {
|
|
@@ -928,7 +928,7 @@ function EncounterAssessmentField({
|
|
|
928
928
|
}
|
|
929
929
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "space-y-2", children: [
|
|
930
930
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
931
|
-
|
|
931
|
+
chunkX6THHGTZ_cjs.Assessment,
|
|
932
932
|
{
|
|
933
933
|
concerns,
|
|
934
934
|
items: value.items,
|
|
@@ -941,7 +941,7 @@ function EncounterAssessmentField({
|
|
|
941
941
|
const existingConcern = pick.code ? concerns.find(
|
|
942
942
|
(concern) => matchingConditionCode(concern, pick.code)
|
|
943
943
|
) : void 0;
|
|
944
|
-
const existingAssertion = existingConcern &&
|
|
944
|
+
const existingAssertion = existingConcern && chunkXM3D4KAF_cjs.currentAssertion(existingConcern);
|
|
945
945
|
if (existingConcern && existingAssertion) {
|
|
946
946
|
commit((next) => ({
|
|
947
947
|
...next,
|
|
@@ -1311,7 +1311,7 @@ function EsheetNarrativeField({
|
|
|
1311
1311
|
}
|
|
1312
1312
|
),
|
|
1313
1313
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1314
|
-
|
|
1314
|
+
chunkHOE2U27V_cjs.TextAreaRichKerebron,
|
|
1315
1315
|
{
|
|
1316
1316
|
ref: editorRef,
|
|
1317
1317
|
value: html,
|
|
@@ -1427,7 +1427,7 @@ function readValue(answer) {
|
|
|
1427
1427
|
if (!answer) return { value: { medications: [] } };
|
|
1428
1428
|
try {
|
|
1429
1429
|
const value = JSON.parse(answer);
|
|
1430
|
-
if (
|
|
1430
|
+
if (chunkJK2IWOI7_cjs.validateEncounterMedicationValue(value).length) throw new Error();
|
|
1431
1431
|
return { value };
|
|
1432
1432
|
} catch {
|
|
1433
1433
|
return {
|
|
@@ -1470,7 +1470,7 @@ function EncounterMedicationField({
|
|
|
1470
1470
|
if (error)
|
|
1471
1471
|
return /* @__PURE__ */ jsxRuntime.jsx(InvalidClinicalAnswer, { label: "medication", answer: response?.answer });
|
|
1472
1472
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1473
|
-
|
|
1473
|
+
chunkX6THHGTZ_cjs.MedicationReconciliation,
|
|
1474
1474
|
{
|
|
1475
1475
|
medications: value.medications,
|
|
1476
1476
|
onChange: commit,
|
|
@@ -1483,7 +1483,7 @@ function readValue2(answer) {
|
|
|
1483
1483
|
if (!answer) return { value: { allergies: [] } };
|
|
1484
1484
|
try {
|
|
1485
1485
|
const value = JSON.parse(answer);
|
|
1486
|
-
if (
|
|
1486
|
+
if (chunkJK2IWOI7_cjs.validateEncounterAllergyValue(value).length) throw new Error();
|
|
1487
1487
|
return { value };
|
|
1488
1488
|
} catch {
|
|
1489
1489
|
return {
|
|
@@ -1526,7 +1526,7 @@ function EncounterAllergyField({
|
|
|
1526
1526
|
if (error)
|
|
1527
1527
|
return /* @__PURE__ */ jsxRuntime.jsx(InvalidClinicalAnswer, { label: "allergy", answer: response?.answer });
|
|
1528
1528
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1529
|
-
|
|
1529
|
+
chunkX6THHGTZ_cjs.AllergyManager,
|
|
1530
1530
|
{
|
|
1531
1531
|
allergies: value.allergies,
|
|
1532
1532
|
onChange: (allergies) => commitValue((current) => ({
|
|
@@ -1549,7 +1549,7 @@ function readConditions(answer) {
|
|
|
1549
1549
|
if (!answer) return { concerns: [] };
|
|
1550
1550
|
try {
|
|
1551
1551
|
const parsed = JSON.parse(answer);
|
|
1552
|
-
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed) || !("concerns" in parsed) ||
|
|
1552
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed) || !("concerns" in parsed) || chunkJK2IWOI7_cjs.validateEncounterConditions(parsed).length > 0)
|
|
1553
1553
|
return void 0;
|
|
1554
1554
|
return parsed;
|
|
1555
1555
|
} catch {
|
|
@@ -1570,7 +1570,7 @@ function EncounterConditionsField({
|
|
|
1570
1570
|
[response?.answer]
|
|
1571
1571
|
);
|
|
1572
1572
|
const m = chunkFSLI5IKP_cjs.useMessages();
|
|
1573
|
-
const codeLookup =
|
|
1573
|
+
const codeLookup = chunkX6THHGTZ_cjs.useCodeLookupConfig();
|
|
1574
1574
|
const assertionDate = useEncounterAssertionDate(field);
|
|
1575
1575
|
const currentDate = React11__namespace.useRef(assertionDate);
|
|
1576
1576
|
currentDate.current = assertionDate;
|
|
@@ -1620,7 +1620,7 @@ function EncounterConditionsField({
|
|
|
1620
1620
|
...next,
|
|
1621
1621
|
concerns: next.concerns.map((concern) => {
|
|
1622
1622
|
if (concern.concernId !== concernId) return concern;
|
|
1623
|
-
const prior =
|
|
1623
|
+
const prior = chunkXM3D4KAF_cjs.currentAssertion(concern);
|
|
1624
1624
|
const assertions = draft.changeType === "revision" && prior ? concern.assertions.map(
|
|
1625
1625
|
(candidate) => candidate.id === prior.id ? { ...candidate, verificationStatus: "refuted" } : candidate
|
|
1626
1626
|
) : concern.assertions;
|
|
@@ -1678,7 +1678,7 @@ function EncounterConditionsField({
|
|
|
1678
1678
|
) : void 0;
|
|
1679
1679
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1680
1680
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1681
|
-
|
|
1681
|
+
chunkXM3D4KAF_cjs.ProblemList,
|
|
1682
1682
|
{
|
|
1683
1683
|
concerns: value.concerns,
|
|
1684
1684
|
readOnly,
|
|
@@ -1725,7 +1725,7 @@ function EncounterConditionsField({
|
|
|
1725
1725
|
}
|
|
1726
1726
|
),
|
|
1727
1727
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1728
|
-
|
|
1728
|
+
chunkX6THHGTZ_cjs.ConditionEditor,
|
|
1729
1729
|
{
|
|
1730
1730
|
mode: editor?.mode ?? "add",
|
|
1731
1731
|
open: editor !== null,
|
|
@@ -1794,7 +1794,7 @@ function readPlan(answer) {
|
|
|
1794
1794
|
const parsed = JSON.parse(answer);
|
|
1795
1795
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed) || !("orders" in parsed) || !Array.isArray(parsed.orders))
|
|
1796
1796
|
return void 0;
|
|
1797
|
-
if (
|
|
1797
|
+
if (chunkJK2IWOI7_cjs.validateEncounterPlan(parsed).length > 0) return void 0;
|
|
1798
1798
|
return parsed;
|
|
1799
1799
|
} catch {
|
|
1800
1800
|
return void 0;
|
|
@@ -1817,11 +1817,11 @@ function getPlanConcerns(state) {
|
|
|
1817
1817
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
1818
1818
|
continue;
|
|
1819
1819
|
const assessment = parsed;
|
|
1820
|
-
if (
|
|
1820
|
+
if (chunkJK2IWOI7_cjs.validateEncounterConditions({ concerns: assessment.concerns }).length > 0)
|
|
1821
1821
|
continue;
|
|
1822
1822
|
for (const concern of assessment.concerns ?? []) {
|
|
1823
1823
|
if (concerns.has(concern.concernId)) continue;
|
|
1824
|
-
const assertion =
|
|
1824
|
+
const assertion = chunkXM3D4KAF_cjs.currentAssertion(concern);
|
|
1825
1825
|
concerns.set(concern.concernId, concern);
|
|
1826
1826
|
if (assertion) {
|
|
1827
1827
|
items.set(concern.concernId, {
|
|
@@ -1831,7 +1831,7 @@ function getPlanConcerns(state) {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
}
|
|
1833
1833
|
for (const item of assessment.items ?? []) {
|
|
1834
|
-
if (!
|
|
1834
|
+
if (!chunkJK2IWOI7_cjs.validAssessmentItem(item)) continue;
|
|
1835
1835
|
if (concerns.get(item.concernId)?.assertions.some(({ id }) => id === item.assertionId))
|
|
1836
1836
|
items.set(item.concernId, item);
|
|
1837
1837
|
}
|
|
@@ -1883,7 +1883,7 @@ function EncounterPlanField({
|
|
|
1883
1883
|
if (!value)
|
|
1884
1884
|
return /* @__PURE__ */ jsxRuntime.jsx(InvalidClinicalAnswer, { label, answer: response?.answer });
|
|
1885
1885
|
return /* @__PURE__ */ jsxRuntime.jsx("section", { "aria-label": label, className: "min-w-0 space-y-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1886
|
-
|
|
1886
|
+
chunkX6THHGTZ_cjs.Assessment,
|
|
1887
1887
|
{
|
|
1888
1888
|
concerns,
|
|
1889
1889
|
items,
|
|
@@ -2078,7 +2078,7 @@ function createEncounterVisitTools(options) {
|
|
|
2078
2078
|
}
|
|
2079
2079
|
function definition() {
|
|
2080
2080
|
const current = options.getDefinition();
|
|
2081
|
-
|
|
2081
|
+
chunkJK2IWOI7_cjs.validateEncounterDefinition(current);
|
|
2082
2082
|
return current;
|
|
2083
2083
|
}
|
|
2084
2084
|
function section(sectionId) {
|
|
@@ -2098,7 +2098,7 @@ function createEncounterVisitTools(options) {
|
|
|
2098
2098
|
throw new ToolError("READ_ONLY", "This visit is read-only.");
|
|
2099
2099
|
}
|
|
2100
2100
|
function snapshot() {
|
|
2101
|
-
return
|
|
2101
|
+
return chunkJK2IWOI7_cjs.createEncounterSnapshot(definition(), options.getResponses());
|
|
2102
2102
|
}
|
|
2103
2103
|
function write(sectionId, fieldId, response, targetReadingId) {
|
|
2104
2104
|
const currentDefinition = definition();
|
|
@@ -2108,7 +2108,7 @@ function createEncounterVisitTools(options) {
|
|
|
2108
2108
|
({ id }) => id === sectionId
|
|
2109
2109
|
);
|
|
2110
2110
|
const isChoice = target?.observations?.some(
|
|
2111
|
-
(observation) =>
|
|
2111
|
+
(observation) => chunkJK2IWOI7_cjs.getEncounterFieldId(sectionId, observation.id) === fieldId && observation.type === "choice"
|
|
2112
2112
|
);
|
|
2113
2113
|
if (!isChoice) delete replacement.selected;
|
|
2114
2114
|
const next = { ...previous, [fieldId]: replacement };
|
|
@@ -2120,19 +2120,19 @@ function createEncounterVisitTools(options) {
|
|
|
2120
2120
|
issue.message
|
|
2121
2121
|
]);
|
|
2122
2122
|
const previousIssueKeys = new Set(
|
|
2123
|
-
|
|
2123
|
+
chunkJK2IWOI7_cjs.validateEncounterResponses(currentDefinition, previous).map(issueKey)
|
|
2124
2124
|
);
|
|
2125
|
-
const issues =
|
|
2125
|
+
const issues = chunkJK2IWOI7_cjs.validateEncounterResponses(currentDefinition, next).filter(
|
|
2126
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))
|
|
2127
2127
|
);
|
|
2128
2128
|
if (issues.length)
|
|
2129
2129
|
throw new ToolError("INVALID_RESPONSE", issues[0].message, issues);
|
|
2130
2130
|
options.setResponses(next);
|
|
2131
|
-
return
|
|
2131
|
+
return chunkJK2IWOI7_cjs.createEncounterSnapshot(currentDefinition, next);
|
|
2132
2132
|
}
|
|
2133
2133
|
function structured(sectionId, value, targetReadingId) {
|
|
2134
2134
|
assertJsonValue(value);
|
|
2135
|
-
const fieldId =
|
|
2135
|
+
const fieldId = chunkJK2IWOI7_cjs.getEncounterFieldId(sectionId, "value");
|
|
2136
2136
|
return write(
|
|
2137
2137
|
sectionId,
|
|
2138
2138
|
fieldId,
|
|
@@ -2144,7 +2144,7 @@ function createEncounterVisitTools(options) {
|
|
|
2144
2144
|
);
|
|
2145
2145
|
}
|
|
2146
2146
|
function vitalValue(sectionId) {
|
|
2147
|
-
const fieldId =
|
|
2147
|
+
const fieldId = chunkJK2IWOI7_cjs.getEncounterFieldId(sectionId, "value");
|
|
2148
2148
|
const answer = options.getResponses()[fieldId]?.answer;
|
|
2149
2149
|
if (!answer?.trim()) return { readings: [] };
|
|
2150
2150
|
let value;
|
|
@@ -2193,7 +2193,7 @@ function createEncounterVisitTools(options) {
|
|
|
2193
2193
|
}
|
|
2194
2194
|
if (typeof text !== "string")
|
|
2195
2195
|
throw new ToolError("INVALID_ARGUMENT", "text must be a string.");
|
|
2196
|
-
const fieldId =
|
|
2196
|
+
const fieldId = chunkJK2IWOI7_cjs.getEncounterFieldId(sectionId);
|
|
2197
2197
|
return write(sectionId, fieldId, {
|
|
2198
2198
|
...options.getResponses()[fieldId],
|
|
2199
2199
|
answer: text
|
|
@@ -2203,7 +2203,7 @@ function createEncounterVisitTools(options) {
|
|
|
2203
2203
|
writable();
|
|
2204
2204
|
const current = section(sectionId);
|
|
2205
2205
|
requireId(findingId, "findingId");
|
|
2206
|
-
let fieldId =
|
|
2206
|
+
let fieldId = chunkJK2IWOI7_cjs.getEncounterFieldId(sectionId);
|
|
2207
2207
|
let findings = current.findings;
|
|
2208
2208
|
if (observationId !== void 0) {
|
|
2209
2209
|
requireId(observationId, "observationId");
|
|
@@ -2215,7 +2215,7 @@ function createEncounterVisitTools(options) {
|
|
|
2215
2215
|
"UNKNOWN_OBSERVATION",
|
|
2216
2216
|
"Common findings require a configured text observation."
|
|
2217
2217
|
);
|
|
2218
|
-
fieldId =
|
|
2218
|
+
fieldId = chunkJK2IWOI7_cjs.getEncounterFieldId(sectionId, observationId);
|
|
2219
2219
|
findings = observation.findings;
|
|
2220
2220
|
} else if (current.kind !== "narrative" && !current.narrative) {
|
|
2221
2221
|
throw new ToolError(
|
|
@@ -2255,7 +2255,7 @@ function createEncounterVisitTools(options) {
|
|
|
2255
2255
|
"UNKNOWN_OBSERVATION",
|
|
2256
2256
|
`Unknown observation: ${observationId}.`
|
|
2257
2257
|
);
|
|
2258
|
-
const fieldId =
|
|
2258
|
+
const fieldId = chunkJK2IWOI7_cjs.getEncounterFieldId(sectionId, observationId);
|
|
2259
2259
|
const response = { ...options.getResponses()[fieldId] };
|
|
2260
2260
|
delete response.answer;
|
|
2261
2261
|
delete response.selected;
|
|
@@ -2297,9 +2297,9 @@ function createEncounterVisitTools(options) {
|
|
|
2297
2297
|
throw new ToolError("INVALID_ARGUMENT", "reading must be an object.");
|
|
2298
2298
|
requireId(reading.id, "reading.id");
|
|
2299
2299
|
assertJsonValue(reading);
|
|
2300
|
-
const issues =
|
|
2300
|
+
const issues = chunkJK2IWOI7_cjs.validateEncounterVitals(
|
|
2301
2301
|
{ readings: [reading] },
|
|
2302
|
-
|
|
2302
|
+
chunkJK2IWOI7_cjs.getEncounterFieldId(sectionId, "value"),
|
|
2303
2303
|
sectionId
|
|
2304
2304
|
);
|
|
2305
2305
|
if (issues.length)
|
|
@@ -2370,7 +2370,7 @@ function createEncounterVisitTools(options) {
|
|
|
2370
2370
|
return structured(sectionId, parsed);
|
|
2371
2371
|
}),
|
|
2372
2372
|
validateVisit: () => run(() => {
|
|
2373
|
-
const issues =
|
|
2373
|
+
const issues = chunkJK2IWOI7_cjs.validateEncounterResponses(
|
|
2374
2374
|
definition(),
|
|
2375
2375
|
options.getResponses()
|
|
2376
2376
|
);
|
|
@@ -2383,11 +2383,11 @@ function createEncounterVisitTools(options) {
|
|
|
2383
2383
|
if (typeof body !== "string")
|
|
2384
2384
|
throw new ToolError("INVALID_ARGUMENT", "body must be a string.");
|
|
2385
2385
|
const currentDefinition = definition();
|
|
2386
|
-
const next =
|
|
2386
|
+
const next = chunkJK2IWOI7_cjs.updateEncounterDocumentBody(options.getResponses(), body, {
|
|
2387
2387
|
_ai: true
|
|
2388
2388
|
});
|
|
2389
2389
|
options.setResponses(next);
|
|
2390
|
-
return
|
|
2390
|
+
return chunkJK2IWOI7_cjs.createEncounterSnapshot(currentDefinition, next);
|
|
2391
2391
|
}),
|
|
2392
2392
|
navigateToSection: (sectionId) => run(() => {
|
|
2393
2393
|
section(sectionId);
|
|
@@ -2708,12 +2708,12 @@ function ensureFields() {
|
|
|
2708
2708
|
}
|
|
2709
2709
|
var esheetDefaultsSettled = false;
|
|
2710
2710
|
var EncounterVisit = React11__namespace.forwardRef(function EncounterVisit2({ definition, initialMdy, codeLookup, messages, ...props }, ref) {
|
|
2711
|
-
const inheritedCodeLookup =
|
|
2711
|
+
const inheritedCodeLookup = chunkX6THHGTZ_cjs.useCodeLookupConfig();
|
|
2712
2712
|
const parsed = React11__namespace.useMemo(
|
|
2713
|
-
() => initialMdy === void 0 ? null :
|
|
2713
|
+
() => initialMdy === void 0 ? null : chunkJK2IWOI7_cjs.parseEncounterMdy(initialMdy),
|
|
2714
2714
|
[initialMdy]
|
|
2715
2715
|
);
|
|
2716
|
-
const visitDefinition = definition ?? parsed?.definition ??
|
|
2716
|
+
const visitDefinition = definition ?? parsed?.definition ?? chunkJK2IWOI7_cjs.DEFAULT_ENCOUNTER_VISIT_DEFINITION;
|
|
2717
2717
|
const loadErrors = parsed?.diagnostics.filter(
|
|
2718
2718
|
(diagnostic) => diagnostic.severity === "error" && diagnostic.code !== "dangling-link"
|
|
2719
2719
|
) ?? [];
|
|
@@ -2759,7 +2759,7 @@ var EncounterVisit = React11__namespace.forwardRef(function EncounterVisit2({ de
|
|
|
2759
2759
|
form.pages.forEach((page) => visitFields(page.fields));
|
|
2760
2760
|
return JSON.stringify(shapes.sort((a, b) => a.id.localeCompare(b.id)));
|
|
2761
2761
|
};
|
|
2762
|
-
if (fieldShapes(parsed.form) !== fieldShapes(
|
|
2762
|
+
if (fieldShapes(parsed.form) !== fieldShapes(chunkJK2IWOI7_cjs.createEncounterFormDefinition(visitDefinition))) {
|
|
2763
2763
|
throw new Error(
|
|
2764
2764
|
"The MDY fields do not match the supplied encounter definition."
|
|
2765
2765
|
);
|
|
@@ -2775,7 +2775,7 @@ var EncounterVisit = React11__namespace.forwardRef(function EncounterVisit2({ de
|
|
|
2775
2775
|
},
|
|
2776
2776
|
visitDefinition.id
|
|
2777
2777
|
);
|
|
2778
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2778
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkX6THHGTZ_cjs.CodeLookupContext.Provider, { value: codeLookup ?? inheritedCodeLookup, children: /* @__PURE__ */ jsxRuntime.jsx(chunkFSLI5IKP_cjs.MessagesProvider, { messages, children: session }) });
|
|
2779
2779
|
});
|
|
2780
2780
|
var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisitSession2({
|
|
2781
2781
|
definition,
|
|
@@ -2808,22 +2808,22 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
2808
2808
|
[definitionJson]
|
|
2809
2809
|
);
|
|
2810
2810
|
const form = React11__namespace.useMemo(
|
|
2811
|
-
() =>
|
|
2811
|
+
() => chunkJK2IWOI7_cjs.createEncounterFormDefinition(stableDefinition),
|
|
2812
2812
|
[stableDefinition]
|
|
2813
2813
|
);
|
|
2814
2814
|
const [initialSeed] = React11__namespace.useState(() => {
|
|
2815
2815
|
if (initialMdy === void 0) return initialResponses ?? {};
|
|
2816
|
-
const document2 =
|
|
2816
|
+
const document2 = chunkJK2IWOI7_cjs.parseEncounterMdy(initialMdy);
|
|
2817
2817
|
return {
|
|
2818
2818
|
...document2.response ?? {},
|
|
2819
|
-
[
|
|
2819
|
+
[chunkJK2IWOI7_cjs.ENCOUNTER_DOCUMENT_FIELD_ID]: chunkJK2IWOI7_cjs.encounterDocumentResponse(initialMdy)
|
|
2820
2820
|
};
|
|
2821
2821
|
});
|
|
2822
2822
|
const [snapshot, setSnapshot] = React11__namespace.useState(
|
|
2823
|
-
() =>
|
|
2823
|
+
() => chunkJK2IWOI7_cjs.createEncounterSnapshot(stableDefinition, initialSeed)
|
|
2824
2824
|
);
|
|
2825
2825
|
const [richBodySeed] = React11__namespace.useState(
|
|
2826
|
-
() =>
|
|
2826
|
+
() => chunkJK2IWOI7_cjs.parseEncounterMdy(snapshot.mdy).body
|
|
2827
2827
|
);
|
|
2828
2828
|
const [activeSection, setActiveSection] = React11__namespace.useState(
|
|
2829
2829
|
stableDefinition.sections[0].id
|
|
@@ -2871,18 +2871,18 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
2871
2871
|
const store = renderer$1.current?.getFormStore();
|
|
2872
2872
|
if (!store) return;
|
|
2873
2873
|
const current = store.getState().responses;
|
|
2874
|
-
if (current[
|
|
2875
|
-
const next =
|
|
2874
|
+
if (current[chunkJK2IWOI7_cjs.ENCOUNTER_DOCUMENT_FIELD_ID]?.answer === body) return;
|
|
2875
|
+
const next = chunkJK2IWOI7_cjs.updateEncounterDocumentBody(current, body, { _ai: false });
|
|
2876
2876
|
store.getState().setResponse(
|
|
2877
|
-
|
|
2878
|
-
next[
|
|
2877
|
+
chunkJK2IWOI7_cjs.ENCOUNTER_DOCUMENT_FIELD_ID,
|
|
2878
|
+
next[chunkJK2IWOI7_cjs.ENCOUNTER_DOCUMENT_FIELD_ID]
|
|
2879
2879
|
);
|
|
2880
2880
|
}, []);
|
|
2881
2881
|
const flushEditor = React11__namespace.useCallback(async () => {
|
|
2882
2882
|
if (richEditor.current && latest.current.mode === "rich" && !latest.current.readOnly && !latest.current.saving) {
|
|
2883
|
-
const before = renderer$1.current?.getRawResponse()[
|
|
2883
|
+
const before = renderer$1.current?.getRawResponse()[chunkJK2IWOI7_cjs.ENCOUNTER_DOCUMENT_FIELD_ID];
|
|
2884
2884
|
const body = await richEditor.current.getContent();
|
|
2885
|
-
const after = renderer$1.current?.getRawResponse()[
|
|
2885
|
+
const after = renderer$1.current?.getRawResponse()[chunkJK2IWOI7_cjs.ENCOUNTER_DOCUMENT_FIELD_ID];
|
|
2886
2886
|
if (after !== before && after?.answer !== before?.answer) return;
|
|
2887
2887
|
writeBody(body);
|
|
2888
2888
|
}
|
|
@@ -2924,7 +2924,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
2924
2924
|
);
|
|
2925
2925
|
React11__namespace.useLayoutEffect(() => {
|
|
2926
2926
|
if (mode !== "esheet" || pendingSection === null) return;
|
|
2927
|
-
const fieldId =
|
|
2927
|
+
const fieldId = chunkJK2IWOI7_cjs.getEncounterSectionFieldId(pendingSection);
|
|
2928
2928
|
const section = Array.from(
|
|
2929
2929
|
root.current?.querySelectorAll("[data-field-id]") ?? []
|
|
2930
2930
|
).find((element) => element.dataset.fieldId === fieldId);
|
|
@@ -2966,7 +2966,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
2966
2966
|
React11__namespace.useImperativeHandle(
|
|
2967
2967
|
ref,
|
|
2968
2968
|
() => ({
|
|
2969
|
-
getSnapshot: () =>
|
|
2969
|
+
getSnapshot: () => chunkJK2IWOI7_cjs.createEncounterSnapshot(
|
|
2970
2970
|
latest.current.definition,
|
|
2971
2971
|
renderer$1.current?.getRawResponse() ?? responses.current
|
|
2972
2972
|
),
|
|
@@ -3059,7 +3059,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
3059
3059
|
previousFocus.focus();
|
|
3060
3060
|
};
|
|
3061
3061
|
}, [resolverField]);
|
|
3062
|
-
const mdyFields =
|
|
3062
|
+
const mdyFields = chunkJK2IWOI7_cjs.getEncounterMdyFields(snapshot);
|
|
3063
3063
|
const resolvedField = mdyFields.find((field) => field.id === resolverField);
|
|
3064
3064
|
const resolvedNativeFieldId = resolvedField?.fieldId;
|
|
3065
3065
|
const resolvedSectionId = resolvedField?.sectionId;
|
|
@@ -3069,7 +3069,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
3069
3069
|
);
|
|
3070
3070
|
sections?.forEach((element) => {
|
|
3071
3071
|
const wrapper2 = element.closest("[data-field-id]");
|
|
3072
|
-
const focused = resolvedSectionId && wrapper2?.dataset.fieldId ===
|
|
3072
|
+
const focused = resolvedSectionId && wrapper2?.dataset.fieldId === chunkJK2IWOI7_cjs.getEncounterSectionFieldId(resolvedSectionId);
|
|
3073
3073
|
element.toggleAttribute("data-encounter-focus", Boolean(focused));
|
|
3074
3074
|
wrapper2?.toggleAttribute("data-encounter-focus", Boolean(focused));
|
|
3075
3075
|
});
|
|
@@ -3085,7 +3085,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
3085
3085
|
unsubscribe.current?.();
|
|
3086
3086
|
const publish = () => {
|
|
3087
3087
|
responses.current = store.getState().responses;
|
|
3088
|
-
const next =
|
|
3088
|
+
const next = chunkJK2IWOI7_cjs.createEncounterSnapshot(
|
|
3089
3089
|
latest.current.definition,
|
|
3090
3090
|
responses.current
|
|
3091
3091
|
);
|
|
@@ -3129,7 +3129,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
3129
3129
|
}
|
|
3130
3130
|
if (!latest.current.onSubmit || latest.current.readOnly || latest.current.saving)
|
|
3131
3131
|
return;
|
|
3132
|
-
const next =
|
|
3132
|
+
const next = chunkJK2IWOI7_cjs.createEncounterSnapshot(
|
|
3133
3133
|
latest.current.definition,
|
|
3134
3134
|
renderer$1.current?.getRawResponse() ?? responses.current
|
|
3135
3135
|
);
|
|
@@ -3163,7 +3163,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
3163
3163
|
}
|
|
3164
3164
|
};
|
|
3165
3165
|
const documentedSections = snapshot.definition.sections.filter(
|
|
3166
|
-
(section) =>
|
|
3166
|
+
(section) => chunkJK2IWOI7_cjs.getEncounterSectionFieldIds(section).some(
|
|
3167
3167
|
(fieldId) => snapshot.observations.some(
|
|
3168
3168
|
(observation) => observation.fieldId === fieldId
|
|
3169
3169
|
)
|
|
@@ -3259,7 +3259,7 @@ var EncounterVisitSession = React11__namespace.forwardRef(function EncounterVisi
|
|
|
3259
3259
|
EncounterMdyEditor,
|
|
3260
3260
|
{
|
|
3261
3261
|
ref: richEditor,
|
|
3262
|
-
body:
|
|
3262
|
+
body: chunkJK2IWOI7_cjs.getEncounterDocumentBody(snapshot.responses) ?? richBodySeed,
|
|
3263
3263
|
fieldIds: mdyFields.map((field) => field.id),
|
|
3264
3264
|
fields: mdyFields.map((field) => ({
|
|
3265
3265
|
id: field.id,
|
|
@@ -3873,7 +3873,7 @@ function MedicationListField({
|
|
|
3873
3873
|
return definition.medications ?? [];
|
|
3874
3874
|
}, [response?.answer, definition.medications]);
|
|
3875
3875
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3876
|
-
|
|
3876
|
+
chunkX6THHGTZ_cjs.MedicationReconciliation,
|
|
3877
3877
|
{
|
|
3878
3878
|
medications,
|
|
3879
3879
|
onChange: (next) => onResponse({ answer: JSON.stringify({ medications: next }) }),
|
|
@@ -3931,7 +3931,7 @@ function AllergyListField({
|
|
|
3931
3931
|
codeLookup
|
|
3932
3932
|
}) {
|
|
3933
3933
|
const definition = field.definition;
|
|
3934
|
-
const ambientCodeLookup =
|
|
3934
|
+
const ambientCodeLookup = chunkX6THHGTZ_cjs.useCodeLookupConfig();
|
|
3935
3935
|
const effectiveCodeLookup = codeLookup === false ? void 0 : codeLookup ?? ambientCodeLookup ?? void 0;
|
|
3936
3936
|
const value = React11__namespace.useMemo(() => {
|
|
3937
3937
|
if (response?.answer) return parseValue2(response.answer);
|
|
@@ -3941,7 +3941,7 @@ function AllergyListField({
|
|
|
3941
3941
|
onResponse({ answer: JSON.stringify(next) });
|
|
3942
3942
|
};
|
|
3943
3943
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3944
|
-
|
|
3944
|
+
chunkX6THHGTZ_cjs.AllergyManager,
|
|
3945
3945
|
{
|
|
3946
3946
|
allergies: value.allergies,
|
|
3947
3947
|
onChange: (allergies) => commit({
|
|
@@ -3983,123 +3983,123 @@ function registerMieEsheetFields(options) {
|
|
|
3983
3983
|
|
|
3984
3984
|
Object.defineProperty(exports, "DEFAULT_ENCOUNTER_VISIT_DEFINITION", {
|
|
3985
3985
|
enumerable: true,
|
|
3986
|
-
get: function () { return
|
|
3986
|
+
get: function () { return chunkJK2IWOI7_cjs.DEFAULT_ENCOUNTER_VISIT_DEFINITION; }
|
|
3987
3987
|
});
|
|
3988
3988
|
Object.defineProperty(exports, "ENCOUNTER_DOCUMENT_FIELD_ID", {
|
|
3989
3989
|
enumerable: true,
|
|
3990
|
-
get: function () { return
|
|
3990
|
+
get: function () { return chunkJK2IWOI7_cjs.ENCOUNTER_DOCUMENT_FIELD_ID; }
|
|
3991
3991
|
});
|
|
3992
3992
|
Object.defineProperty(exports, "EXAMPLE_ENCOUNTER_VISIT_RESPONSES", {
|
|
3993
3993
|
enumerable: true,
|
|
3994
|
-
get: function () { return
|
|
3994
|
+
get: function () { return chunkJK2IWOI7_cjs.EXAMPLE_ENCOUNTER_VISIT_RESPONSES; }
|
|
3995
3995
|
});
|
|
3996
3996
|
Object.defineProperty(exports, "createEncounterFormDefinition", {
|
|
3997
3997
|
enumerable: true,
|
|
3998
|
-
get: function () { return
|
|
3998
|
+
get: function () { return chunkJK2IWOI7_cjs.createEncounterFormDefinition; }
|
|
3999
3999
|
});
|
|
4000
4000
|
Object.defineProperty(exports, "createEncounterMdy", {
|
|
4001
4001
|
enumerable: true,
|
|
4002
|
-
get: function () { return
|
|
4002
|
+
get: function () { return chunkJK2IWOI7_cjs.createEncounterMdy; }
|
|
4003
4003
|
});
|
|
4004
4004
|
Object.defineProperty(exports, "createEncounterSnapshot", {
|
|
4005
4005
|
enumerable: true,
|
|
4006
|
-
get: function () { return
|
|
4006
|
+
get: function () { return chunkJK2IWOI7_cjs.createEncounterSnapshot; }
|
|
4007
4007
|
});
|
|
4008
4008
|
Object.defineProperty(exports, "encounterDocumentResponse", {
|
|
4009
4009
|
enumerable: true,
|
|
4010
|
-
get: function () { return
|
|
4010
|
+
get: function () { return chunkJK2IWOI7_cjs.encounterDocumentResponse; }
|
|
4011
4011
|
});
|
|
4012
4012
|
Object.defineProperty(exports, "getEncounterConcerns", {
|
|
4013
4013
|
enumerable: true,
|
|
4014
|
-
get: function () { return
|
|
4014
|
+
get: function () { return chunkJK2IWOI7_cjs.getEncounterConcerns; }
|
|
4015
4015
|
});
|
|
4016
4016
|
Object.defineProperty(exports, "getEncounterDocumentBody", {
|
|
4017
4017
|
enumerable: true,
|
|
4018
|
-
get: function () { return
|
|
4018
|
+
get: function () { return chunkJK2IWOI7_cjs.getEncounterDocumentBody; }
|
|
4019
4019
|
});
|
|
4020
4020
|
Object.defineProperty(exports, "getEncounterFieldId", {
|
|
4021
4021
|
enumerable: true,
|
|
4022
|
-
get: function () { return
|
|
4022
|
+
get: function () { return chunkJK2IWOI7_cjs.getEncounterFieldId; }
|
|
4023
4023
|
});
|
|
4024
4024
|
Object.defineProperty(exports, "getEncounterMdyFields", {
|
|
4025
4025
|
enumerable: true,
|
|
4026
|
-
get: function () { return
|
|
4026
|
+
get: function () { return chunkJK2IWOI7_cjs.getEncounterMdyFields; }
|
|
4027
4027
|
});
|
|
4028
4028
|
Object.defineProperty(exports, "getEncounterSectionFieldId", {
|
|
4029
4029
|
enumerable: true,
|
|
4030
|
-
get: function () { return
|
|
4030
|
+
get: function () { return chunkJK2IWOI7_cjs.getEncounterSectionFieldId; }
|
|
4031
4031
|
});
|
|
4032
4032
|
Object.defineProperty(exports, "getEncounterSectionFieldIds", {
|
|
4033
4033
|
enumerable: true,
|
|
4034
|
-
get: function () { return
|
|
4034
|
+
get: function () { return chunkJK2IWOI7_cjs.getEncounterSectionFieldIds; }
|
|
4035
4035
|
});
|
|
4036
4036
|
Object.defineProperty(exports, "parseEncounterAssessment", {
|
|
4037
4037
|
enumerable: true,
|
|
4038
|
-
get: function () { return
|
|
4038
|
+
get: function () { return chunkJK2IWOI7_cjs.parseEncounterAssessment; }
|
|
4039
4039
|
});
|
|
4040
4040
|
Object.defineProperty(exports, "parseEncounterConditions", {
|
|
4041
4041
|
enumerable: true,
|
|
4042
|
-
get: function () { return
|
|
4042
|
+
get: function () { return chunkJK2IWOI7_cjs.parseEncounterConditions; }
|
|
4043
4043
|
});
|
|
4044
4044
|
Object.defineProperty(exports, "parseEncounterMdy", {
|
|
4045
4045
|
enumerable: true,
|
|
4046
|
-
get: function () { return
|
|
4046
|
+
get: function () { return chunkJK2IWOI7_cjs.parseEncounterMdy; }
|
|
4047
4047
|
});
|
|
4048
4048
|
Object.defineProperty(exports, "parseEncounterPlan", {
|
|
4049
4049
|
enumerable: true,
|
|
4050
|
-
get: function () { return
|
|
4050
|
+
get: function () { return chunkJK2IWOI7_cjs.parseEncounterPlan; }
|
|
4051
4051
|
});
|
|
4052
4052
|
Object.defineProperty(exports, "parseEncounterVitals", {
|
|
4053
4053
|
enumerable: true,
|
|
4054
|
-
get: function () { return
|
|
4054
|
+
get: function () { return chunkJK2IWOI7_cjs.parseEncounterVitals; }
|
|
4055
4055
|
});
|
|
4056
4056
|
Object.defineProperty(exports, "refreshEncounterMdyLinks", {
|
|
4057
4057
|
enumerable: true,
|
|
4058
|
-
get: function () { return
|
|
4058
|
+
get: function () { return chunkJK2IWOI7_cjs.refreshEncounterMdyLinks; }
|
|
4059
4059
|
});
|
|
4060
4060
|
Object.defineProperty(exports, "renderEncounterMdy", {
|
|
4061
4061
|
enumerable: true,
|
|
4062
|
-
get: function () { return
|
|
4062
|
+
get: function () { return chunkJK2IWOI7_cjs.renderEncounterMdy; }
|
|
4063
4063
|
});
|
|
4064
4064
|
Object.defineProperty(exports, "updateEncounterDocumentBody", {
|
|
4065
4065
|
enumerable: true,
|
|
4066
|
-
get: function () { return
|
|
4066
|
+
get: function () { return chunkJK2IWOI7_cjs.updateEncounterDocumentBody; }
|
|
4067
4067
|
});
|
|
4068
4068
|
Object.defineProperty(exports, "validAssessmentItem", {
|
|
4069
4069
|
enumerable: true,
|
|
4070
|
-
get: function () { return
|
|
4070
|
+
get: function () { return chunkJK2IWOI7_cjs.validAssessmentItem; }
|
|
4071
4071
|
});
|
|
4072
4072
|
Object.defineProperty(exports, "validateEncounterAllergyValue", {
|
|
4073
4073
|
enumerable: true,
|
|
4074
|
-
get: function () { return
|
|
4074
|
+
get: function () { return chunkJK2IWOI7_cjs.validateEncounterAllergyValue; }
|
|
4075
4075
|
});
|
|
4076
4076
|
Object.defineProperty(exports, "validateEncounterAssessment", {
|
|
4077
4077
|
enumerable: true,
|
|
4078
|
-
get: function () { return
|
|
4078
|
+
get: function () { return chunkJK2IWOI7_cjs.validateEncounterAssessment; }
|
|
4079
4079
|
});
|
|
4080
4080
|
Object.defineProperty(exports, "validateEncounterConditions", {
|
|
4081
4081
|
enumerable: true,
|
|
4082
|
-
get: function () { return
|
|
4082
|
+
get: function () { return chunkJK2IWOI7_cjs.validateEncounterConditions; }
|
|
4083
4083
|
});
|
|
4084
4084
|
Object.defineProperty(exports, "validateEncounterDefinition", {
|
|
4085
4085
|
enumerable: true,
|
|
4086
|
-
get: function () { return
|
|
4086
|
+
get: function () { return chunkJK2IWOI7_cjs.validateEncounterDefinition; }
|
|
4087
4087
|
});
|
|
4088
4088
|
Object.defineProperty(exports, "validateEncounterMedicationValue", {
|
|
4089
4089
|
enumerable: true,
|
|
4090
|
-
get: function () { return
|
|
4090
|
+
get: function () { return chunkJK2IWOI7_cjs.validateEncounterMedicationValue; }
|
|
4091
4091
|
});
|
|
4092
4092
|
Object.defineProperty(exports, "validateEncounterPlan", {
|
|
4093
4093
|
enumerable: true,
|
|
4094
|
-
get: function () { return
|
|
4094
|
+
get: function () { return chunkJK2IWOI7_cjs.validateEncounterPlan; }
|
|
4095
4095
|
});
|
|
4096
4096
|
Object.defineProperty(exports, "validateEncounterResponses", {
|
|
4097
4097
|
enumerable: true,
|
|
4098
|
-
get: function () { return
|
|
4098
|
+
get: function () { return chunkJK2IWOI7_cjs.validateEncounterResponses; }
|
|
4099
4099
|
});
|
|
4100
4100
|
Object.defineProperty(exports, "validateEncounterVitals", {
|
|
4101
4101
|
enumerable: true,
|
|
4102
|
-
get: function () { return
|
|
4102
|
+
get: function () { return chunkJK2IWOI7_cjs.validateEncounterVitals; }
|
|
4103
4103
|
});
|
|
4104
4104
|
Object.defineProperty(exports, "EsheetRenderer", {
|
|
4105
4105
|
enumerable: true,
|