@mieweb/ui 0.9.0-dev.1 → 0.9.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -80,7 +80,7 @@ export { CollabStatus, defaultCollabStatusLabels, useYjsCollabStatus } from './c
80
80
  import './chunk-7XUN3OQT.js';
81
81
  export { isHtmlEmpty, stripHtmlTags } from './chunk-ERLPVXOV.js';
82
82
  export { formatPhoneNumber, isPhoneNumberEmpty, isValidPhoneNumber, unformatPhoneNumber } from './chunk-ZVPJ2MH6.js';
83
- export { miewebUIPreset, miewebUISafelist } from './chunk-DGRXAIWK.js';
83
+ export { miewebUIPreset, miewebUISafelist } from './chunk-KI5ES4GR.js';
84
84
  export { Accordion } from './chunk-KRU6IGV7.js';
85
85
  import { Alert, AlertTitle, AlertDescription } from './chunk-3JWAABYI.js';
86
86
  export { Alert, AlertDescription, AlertTitle, alertVariants } from './chunk-3JWAABYI.js';
@@ -91,8 +91,8 @@ export { AudioRecorder, audioRecorderVariants, controlButtonVariants, formatTime
91
91
  export { Autocomplete } from './chunk-QAQOCS2J.js';
92
92
  import { evaluateDue, completedKeys, normalizeOrders } from './chunk-Y5KEFV5O.js';
93
93
  export { buildChartOrderRows, buildEncounterOrderRows, dueForOrder, evaluateDue, evaluateProgram, isApplicable } from './chunk-Y5KEFV5O.js';
94
- import { useCodeLookupConfig, RowActionToolbar, RowIconButton, toolbarKeyNav, parseSig, labelToMedicationFields, MedicationEditor } from './chunk-ODYQYLO2.js';
95
- export { ALLERGY_TYPE_LABELS, AllergyList, AllergyManager, CodeLookupProvider, MEDICATION_STATUS_LABELS, MedicationEditor, MedicationList, MedicationReconciliation, RowActionToolbar, RowIconButton, labelToMedicationFields, lookupToMedicationFields, parseMedicationLabel, parseSig, toolbarKeyNav, useCodeLookupConfig } from './chunk-ODYQYLO2.js';
94
+ import { useCodeLookupConfig, RowActionToolbar, RowIconButton, toolbarKeyNav, parseSig, labelToMedicationFields, MedicationEditor } from './chunk-2KQWEROH.js';
95
+ export { ALLERGY_TYPE_LABELS, AllergyList, AllergyManager, CodeLookupProvider, MEDICATION_STATUS_LABELS, MedicationEditor, MedicationList, MedicationReconciliation, RowActionToolbar, RowIconButton, labelToMedicationFields, lookupToMedicationFields, parseMedicationLabel, parseSig, toolbarKeyNav, useCodeLookupConfig } from './chunk-2KQWEROH.js';
96
96
  import { Textarea } from './chunk-H3YO5GBM.js';
97
97
  export { Textarea, textareaVariants } from './chunk-H3YO5GBM.js';
98
98
  import { Tooltip } from './chunk-MUIDWFYJ.js';
@@ -114,7 +114,7 @@ export { Modal, ModalBody, ModalClose, ModalFooter, ModalHeader, ModalTitle, mod
114
114
  import './chunk-6NZXWKUE.js';
115
115
  import { Input, inputVariants } from './chunk-3IMM2PM4.js';
116
116
  export { Input, RequiredMark, floatingGroupLabelVariants, floatingGroupVariants, floatingLabelVariants, inputVariants } from './chunk-3IMM2PM4.js';
117
- import { Plus, GripVertical, RefreshCw, Pencil, AlertCircle, ArrowLeft, Users, FilePlus, CheckCircle, ChevronDown, Clock, FileText, ClipboardList, Stethoscope, Mail, Phone, ClipboardCheck, Eye, Info, Link, ChevronUp, History, StickyNote, ExternalLink, MoreVertical, Trash2, Send, Scan, TestTube2, Pill, Share, User, Download, ChevronRight, Calendar, Printer, ClipboardPlus, FileCheck, Wheat, Bell, FileHeart, HeartPulse, Paperclip, HelpCircle, MoreHorizontal, AlertTriangle, Upload as Upload$1, Camera, Check as Check$1, X as X$1, ScanLine, Image } from './chunk-BKSPDTX4.js';
117
+ import { Plus, GripVertical, RefreshCw, Pencil, Trash2, AlertCircle, ArrowLeft, Users, FilePlus, CheckCircle, ChevronDown, Clock, FileText, ClipboardList, Stethoscope, Mail, Phone, ClipboardCheck, Eye, Info, Link, ChevronUp, History, StickyNote, ExternalLink, MoreVertical, Send, Scan, TestTube2, Pill, Share, User, Download, ChevronRight, Calendar, Printer, ClipboardPlus, FileCheck, Wheat, Bell, FileHeart, HeartPulse, Paperclip, HelpCircle, MoreHorizontal, AlertTriangle, Upload as Upload$1, Camera, Check as Check$1, X as X$1, ScanLine, Image } from './chunk-BKSPDTX4.js';
118
118
  export { Accessibility as AccessibilityIcon, Activity as ActivityIcon, AlertCircle as AlertCircleIcon, AlertTriangle as AlertTriangleIcon, Wheat as AllergyIcon, WheatOff as AllergyOffIcon, Ambulance as AmbulanceIcon, ArrowLeft as ArrowLeftIcon, ArrowRight as ArrowRightIcon, ArrowUpDown as ArrowUpDownIcon, ArrowUp as ArrowUpIcon, AtSign as AtSignIcon, Baby as BabyIcon, BadgeAlert as BadgeAlertIcon, BadgeCheck as BadgeCheckIcon, BadgeMinus as BadgeMinusIcon, BadgePlus as BadgePlusIcon, BadgeX as BadgeXIcon, Ban as BanIcon, Bandage as BandageIcon, BedDouble as BedDoubleIcon, Bed as BedIcon, BedSingle as BedSingleIcon, Bell as BellIcon, BellOff as BellOffIcon, Biohazard as BiohazardIcon, Bone as BoneIcon, BookOpenCheck as BookOpenCheckIcon, BookOpen as BookOpenIcon, Bookmark as BookmarkIcon, Bot as BotIcon, Brain as BrainIcon, Briefcase as BriefcaseIcon, BriefcaseMedical as BriefcaseMedicalIcon, Building as BuildingIcon, CalendarCheck as CalendarCheckIcon, Calendar as CalendarIcon, Camera as CameraIcon, Cannabis as CannabisIcon, BarChart3 as ChartIcon, CheckCircle as CheckCircleIcon, Check as CheckIcon, ChevronDown as ChevronDownIcon, ChevronLeft as ChevronLeftIcon, ChevronRight as ChevronRightIcon, ChevronUp as ChevronUpIcon, Cigarette as CigaretteIcon, CigaretteOff as CigaretteOffIcon, CircleDotDashed as CircleDotDashedIcon, CircleDot as CircleDotIcon, CircleUser as CircleUserIcon, ClipboardCheck as ClipboardCheckIcon, Clipboard as ClipboardIcon, ClipboardList as ClipboardListIcon, ClipboardPlus as ClipboardPlusIcon, Clock as ClockIcon, Cog as CogIcon, Columns as ColumnsIcon, Copy as CopyIcon, CreditCard as CreditCardIcon, Cross as CrossIcon, Dna as DnaIcon, DollarSign as DollarSignIcon, Download as DownloadIcon, Droplet as DropletIcon, Droplets as DropletsIcon, Ear as EarIcon, ExternalLink as ExternalLinkIcon, Eye as EyeIcon, EyeOff as EyeOffIcon, FileCheck2 as FileCheck2Icon, FileCheck as FileCheckIcon, FileHeart as FileHeartIcon, File as FileIcon, FilePlus2 as FilePlus2Icon, FilePlus as FilePlusIcon, FileText as FileTextIcon, Filter as FilterIcon, Fingerprint as FingerprintIcon, Flag as FlagIcon, FlaskConical as FlaskIcon, FlaskRound as FlaskRoundIcon, Folder as FolderIcon, FolderOpen as FolderOpenIcon, Footprints as FootprintsIcon, Glasses as GlassesIcon, Globe as GlobeIcon, LayoutGrid as GridIcon, GripVertical as GripVerticalIcon, Hand as HandIcon, HandMetal as HandMetalIcon, Hash as HashIcon, Heart as HeartIcon, HeartOff as HeartOffIcon, HeartPulse as HeartPulseIcon, HelpCircle as HelpCircleIcon, History as HistoryIcon, Home as HomeIcon, Hospital as HospitalIcon, Image as ImageIcon, Info as InfoIcon, Key as KeyIcon, Link as LinkIcon, List as ListIcon, Loader2 as LoaderIcon, Lock as LockIcon, LogIn as LogInIcon, LogOut as LogOutIcon, Mail as MailIcon, MapPin as MapPinIcon, Maximize as MaximizeIcon, Menu as MenuIcon, MessageSquare as MessageIcon, Mic as MicIcon, Microscope as MicroscopeIcon, Minimize as MinimizeIcon, Minus as MinusIcon, Monitor as MonitorIcon, Moon as MoonIcon, MoreHorizontal as MoreHorizontalIcon, MoreVertical as MoreVerticalIcon, NotebookPen as NotebookPenIcon, Palette as PaletteIcon, Paperclip as PaperclipIcon, CircleUserRound as PatientIcon, Pencil as PencilIcon, UserRound as PersonIcon, Phone as PhoneIcon, PieChart as PieChartIcon, Pill as PillIcon, Plus as PlusIcon, Printer as PrinterIcon, Radiation as RadiationIcon, Ruler as RulerIcon, Save as SaveIcon, Scale as ScaleIcon, Scaling as ScalingIcon, ScanEye as ScanEyeIcon, Scan as ScanIcon, ScanLine as ScanLineIcon, Search as SearchIcon, Settings as SettingsIcon, Share as ShareIcon, ShieldCheck as ShieldCheckIcon, Shield as ShieldIcon, ShieldPlus as ShieldPlusIcon, Sliders as SlidersIcon, Sparkle as SparkleIcon, Star as StarIcon, Stethoscope as StethoscopeIcon, StickyNote as StickyNoteIcon, Square as StopIcon, Sun as SunIcon, Syringe as SyringeIcon, Table as TableIcon, Tablets as TabletsIcon, Tag as TagIcon, TestTube2 as TestTubeIcon, TestTubes as TestTubesIcon, Thermometer as ThermometerIcon, ThermometerSun as ThermometerSunIcon, ThumbsDown as ThumbsDownIcon, ThumbsUp as ThumbsUpIcon, Timer as TimerIcon, Trash2 as TrashIcon, TrendingDown as TrendingDownIcon, TrendingUp as TrendingUpIcon, Truck as TruckIcon, Unlock as UnlockIcon, Upload as UploadIcon, UserCheck as UserCheckIcon, User as UserIcon, UserMinus as UserMinusIcon, UserPlus as UserPlusIcon, UserRoundCheck as UserRoundCheckIcon, UserRoundMinus as UserRoundMinusIcon, UserRoundPlus as UserRoundPlusIcon, UserRoundX as UserRoundXIcon, Users as UsersIcon, Weight as WeightIcon, Wrench as WrenchIcon, XCircle as XCircleIcon, X2 as XIcon, Zap as ZapIcon } from './chunk-BKSPDTX4.js';
119
119
  import { Badge } from './chunk-BMSG4NBH.js';
120
120
  export { Badge, badgeVariants } from './chunk-BMSG4NBH.js';
@@ -7875,11 +7875,11 @@ function OrderRow({
7875
7875
  "aria-label": `Edit order ${order.display}`,
7876
7876
  className: "flex flex-1 flex-wrap items-center gap-1.5",
7877
7877
  children: [
7878
- /* @__PURE__ */ jsx(
7879
- "input",
7878
+ /* @__PURE__ */ jsx("div", { className: "min-w-40 flex-1", children: /* @__PURE__ */ jsx(
7879
+ Input,
7880
7880
  {
7881
- type: "text",
7882
7881
  autoFocus: true,
7882
+ size: "sm",
7883
7883
  value: editing.display,
7884
7884
  onChange: (e) => setEditing(
7885
7885
  (prev) => prev ? { ...prev, display: e.target.value } : prev
@@ -7889,17 +7889,13 @@ function OrderRow({
7889
7889
  else if (e.key === "Escape") setEditing(null);
7890
7890
  },
7891
7891
  "aria-label": "Order description",
7892
- className: cn(
7893
- "border-border bg-background text-foreground",
7894
- "h-7 min-w-40 flex-1 rounded-md border px-2 text-sm",
7895
- "focus:ring-ring focus:ring-2 focus:outline-none"
7896
- )
7892
+ className: "h-7"
7897
7893
  }
7898
- ),
7899
- /* @__PURE__ */ jsx(
7900
- "input",
7894
+ ) }),
7895
+ /* @__PURE__ */ jsx("div", { className: "w-40", children: /* @__PURE__ */ jsx(
7896
+ Input,
7901
7897
  {
7902
- type: "text",
7898
+ size: "sm",
7903
7899
  value: editing.detail,
7904
7900
  onChange: (e) => setEditing(
7905
7901
  (prev) => prev ? { ...prev, detail: e.target.value } : prev
@@ -7910,13 +7906,9 @@ function OrderRow({
7910
7906
  },
7911
7907
  placeholder: "detail (sig, timing\u2026)",
7912
7908
  "aria-label": "Order detail",
7913
- className: cn(
7914
- "border-border bg-background text-foreground placeholder:text-muted-foreground",
7915
- "h-7 w-40 rounded-md border px-2 text-xs",
7916
- "focus:ring-ring focus:ring-2 focus:outline-none"
7917
- )
7909
+ className: "h-7 text-xs"
7918
7910
  }
7919
- ),
7911
+ ) }),
7920
7912
  /* @__PURE__ */ jsx(
7921
7913
  Button,
7922
7914
  {
@@ -8035,6 +8027,7 @@ function OrderRow({
8035
8027
  );
8036
8028
  }
8037
8029
  function AddOrderForm({
8030
+ id,
8038
8031
  problemText,
8039
8032
  onSubmit,
8040
8033
  onCancel,
@@ -8069,6 +8062,7 @@ function AddOrderForm({
8069
8062
  return /* @__PURE__ */ jsxs(
8070
8063
  "div",
8071
8064
  {
8065
+ id,
8072
8066
  role: "form",
8073
8067
  "aria-label": `Add order for ${problemText}`,
8074
8068
  className: "border-border bg-muted/40 ms-2.5 mt-1.5 flex flex-wrap items-center gap-1.5 rounded-md border border-dashed p-2",
@@ -8107,12 +8101,11 @@ function AddOrderForm({
8107
8101
  });
8108
8102
  }
8109
8103
  }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
8110
- /* @__PURE__ */ jsx(
8111
- "input",
8104
+ /* @__PURE__ */ jsx("div", { className: "min-w-48 flex-1", children: /* @__PURE__ */ jsx(
8105
+ Input,
8112
8106
  {
8113
8107
  ref: inputRef,
8114
- type: "text",
8115
- "data-slot": "input",
8108
+ size: "sm",
8116
8109
  value: display,
8117
8110
  onChange: (e) => setDisplay(e.target.value),
8118
8111
  onKeyDown: (e) => {
@@ -8120,14 +8113,9 @@ function AddOrderForm({
8120
8113
  else if (e.key === "Escape") onCancel();
8121
8114
  },
8122
8115
  placeholder: "e.g. lisinopril 10 mg tablet \u2014 1 po daily",
8123
- "aria-label": "Order description",
8124
- className: cn(
8125
- "border-border bg-background text-foreground placeholder:text-muted-foreground",
8126
- "h-8 min-w-48 flex-1 rounded-md border px-2.5 text-sm",
8127
- "focus:ring-ring focus:ring-2 focus:outline-none"
8128
- )
8116
+ "aria-label": "Order description"
8129
8117
  }
8130
- ),
8118
+ ) }),
8131
8119
  /* @__PURE__ */ jsx(
8132
8120
  Button,
8133
8121
  {
@@ -8164,6 +8152,7 @@ var Assessment = React12.forwardRef(
8164
8152
  showPlan = true,
8165
8153
  onShowPlanChange,
8166
8154
  onAction,
8155
+ onRemoveAssessment,
8167
8156
  onAddOrder,
8168
8157
  onAddAssessment,
8169
8158
  onLinkOrder,
@@ -8180,6 +8169,7 @@ var Assessment = React12.forwardRef(
8180
8169
  "data-testid": dataTestId,
8181
8170
  ...props
8182
8171
  }, ref) => {
8172
+ const instanceId = React12.useId();
8183
8173
  const [addingFor, setAddingFor] = React12.useState(null);
8184
8174
  const [addMode, setAddMode] = React12.useState(
8185
8175
  defaultAddMode
@@ -8380,18 +8370,15 @@ var Assessment = React12.forwardRef(
8380
8370
  children: [
8381
8371
  title !== null && /* @__PURE__ */ jsxs(CardHeader, { className: "border-border bg-muted/50 flex flex-row items-center justify-between border-b px-4 py-3", children: [
8382
8372
  /* @__PURE__ */ jsx("h3", { className: "text-foreground text-sm font-semibold tracking-wide uppercase", children: title }),
8383
- onShowPlanChange && /* @__PURE__ */ jsxs("label", { className: "text-muted-foreground flex items-center gap-1.5 text-xs font-medium", children: [
8384
- /* @__PURE__ */ jsx(
8385
- "input",
8386
- {
8387
- type: "checkbox",
8388
- checked: showPlan,
8389
- onChange: (e) => onShowPlanChange(e.target.checked),
8390
- className: "accent-primary-600 h-3.5 w-3.5"
8391
- }
8392
- ),
8393
- "Show plan"
8394
- ] })
8373
+ onShowPlanChange && /* @__PURE__ */ jsx(
8374
+ Checkbox,
8375
+ {
8376
+ size: "sm",
8377
+ checked: showPlan,
8378
+ onChange: (e) => onShowPlanChange(e.target.checked),
8379
+ label: "Show plan"
8380
+ }
8381
+ )
8395
8382
  ] }),
8396
8383
  /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4 px-4 py-4", children: [
8397
8384
  items.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: "No problems assessed this visit." }),
@@ -8403,6 +8390,7 @@ var Assessment = React12.forwardRef(
8403
8390
  );
8404
8391
  const bp = blockProps(item.concernId);
8405
8392
  const formOpen = addingFor === item.concernId;
8393
+ const addOrderFormId = `${instanceId}-add-order-${item.concernId}`;
8406
8394
  return /* @__PURE__ */ jsxs(
8407
8395
  "li",
8408
8396
  {
@@ -8443,36 +8431,62 @@ var Assessment = React12.forwardRef(
8443
8431
  /* @__PURE__ */ jsx("span", { className: "text-foreground font-medium", children: assertion.text }),
8444
8432
  assertion.verificationStatus !== "confirmed" && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: assertion.verificationStatus }),
8445
8433
  /* @__PURE__ */ jsx(CodingChips, { coding: assertion.coding }),
8446
- !readOnly && /* @__PURE__ */ jsx(
8434
+ !readOnly && (onAction || onAddOrder || onRemoveAssessment) && /* @__PURE__ */ jsxs(
8447
8435
  RowActionToolbar,
8448
8436
  {
8449
8437
  label: `Actions for ${assertion.text}`,
8450
8438
  align: "top",
8451
- children: Object.keys(ACTION_META2).map(
8452
- (action) => {
8453
- const meta = ACTION_META2[action];
8454
- if (action === "add-order" && !onAddOrder && !onAction)
8455
- return null;
8456
- return /* @__PURE__ */ jsx(
8457
- RowIconButton,
8458
- {
8459
- label: meta.label,
8460
- icon: meta.icon,
8461
- size: "sm",
8462
- onClick: () => {
8463
- if (action === "add-order" && onAddOrder) {
8464
- setAddingFor(
8465
- (prev) => prev === item.concernId ? null : item.concernId
8466
- );
8467
- } else {
8468
- onAction?.(item, action);
8439
+ className: cn(
8440
+ "pointer-fine:group-has-[[data-order-id]:hover]:pointer-events-none",
8441
+ "pointer-fine:group-has-[[data-order-id]:hover]:opacity-0",
8442
+ "pointer-fine:group-has-[[data-order-id]:focus-within]:pointer-events-none",
8443
+ "pointer-fine:group-has-[[data-order-id]:focus-within]:opacity-0"
8444
+ ),
8445
+ children: [
8446
+ Object.keys(ACTION_META2).map(
8447
+ (action) => {
8448
+ const meta = ACTION_META2[action];
8449
+ if (action !== "add-order" && !onAction)
8450
+ return null;
8451
+ if (action === "add-order" && !onAddOrder && !onAction)
8452
+ return null;
8453
+ return /* @__PURE__ */ jsx(
8454
+ RowIconButton,
8455
+ {
8456
+ label: meta.label,
8457
+ icon: meta.icon,
8458
+ size: "sm",
8459
+ expanded: action === "add-order" && onAddOrder ? addingFor === item.concernId : void 0,
8460
+ controls: action === "add-order" && onAddOrder ? addOrderFormId : void 0,
8461
+ onClick: () => {
8462
+ if (action === "add-order" && onAddOrder) {
8463
+ setAddingFor(
8464
+ (prev) => prev === item.concernId ? null : item.concernId
8465
+ );
8466
+ } else {
8467
+ onAction?.(item, action);
8468
+ }
8469
8469
  }
8470
- }
8471
- },
8472
- action
8473
- );
8474
- }
8475
- )
8470
+ },
8471
+ action
8472
+ );
8473
+ }
8474
+ ),
8475
+ onRemoveAssessment && /* @__PURE__ */ jsx(
8476
+ RowIconButton,
8477
+ {
8478
+ label: `Remove ${assertion.text} from assessment`,
8479
+ icon: Trash2,
8480
+ size: "sm",
8481
+ onClick: () => {
8482
+ onRemoveAssessment(item);
8483
+ setAnnouncement(
8484
+ `${assertion.text} removed from assessment`
8485
+ );
8486
+ }
8487
+ }
8488
+ )
8489
+ ]
8476
8490
  }
8477
8491
  )
8478
8492
  ]
@@ -8498,8 +8512,15 @@ var Assessment = React12.forwardRef(
8498
8512
  !readOnly && onAddOrder && addingFor === item.concernId && /* @__PURE__ */ jsx(
8499
8513
  AddOrderForm,
8500
8514
  {
8515
+ id: addOrderFormId,
8501
8516
  problemText: assertion.text,
8502
- onSubmit: (order) => onAddOrder(item, order),
8517
+ onSubmit: (order) => {
8518
+ onAddOrder(item, order);
8519
+ setAnnouncement(
8520
+ `${order.display} added to ${assertion.text}`
8521
+ );
8522
+ setAddingFor(null);
8523
+ },
8503
8524
  onCancel: () => setAddingFor(null),
8504
8525
  renderSearch: effectiveRenderOrderSearch
8505
8526
  }
@@ -11997,13 +12018,24 @@ var RELATIONSHIP_OPTIONS = [
11997
12018
  ];
11998
12019
  var SEVERITIES = ["mild", "moderate", "severe"];
11999
12020
  var CONFIDENCES = ["low", "medium", "high"];
12000
- function systemForCodetype(codetype) {
12021
+ function normalizeConditionCodingSystem(codetype) {
12001
12022
  const ct = codetype.toUpperCase().replace(/[^A-Z0-9]/g, "");
12002
12023
  if (ct === "ICD10" || ct === "ICD10CM") return "ICD-10-CM";
12003
12024
  if (ct === "ICD11") return "ICD-11";
12004
- if (ct === "SNOMED" || ct === "SNOMEDCT") return "SNOMED";
12025
+ if (ct === "SNOMED" || ct === "SNOMEDCT" || ct === "SNOMEDUS") {
12026
+ return "SNOMED";
12027
+ }
12005
12028
  return codetype;
12006
12029
  }
12030
+ function withSinglePrimary(coding) {
12031
+ if (coding.length === 0) return coding;
12032
+ const primaryIndex = coding.findIndex((entry) => entry.primary);
12033
+ const selectedIndex = primaryIndex >= 0 ? primaryIndex : 0;
12034
+ return coding.map((entry, index) => ({
12035
+ ...entry,
12036
+ primary: index === selectedIndex
12037
+ }));
12038
+ }
12007
12039
  function contextConditionCodeSearch(ctx) {
12008
12040
  const ContextConditionCodeSearch = ({
12009
12041
  placeholder,
@@ -12057,7 +12089,7 @@ function FieldFlag({
12057
12089
  ),
12058
12090
  className: cn(
12059
12091
  "rounded-full border px-2 py-0.5 text-[11px] font-medium transition-colors",
12060
- unknown ? "border-amber-400 bg-amber-100 text-amber-900 dark:border-amber-600 dark:bg-amber-950 dark:text-amber-200" : "border-border text-muted-foreground hover:text-foreground"
12092
+ unknown ? "border-warning/50 bg-warning/10 text-warning-800 dark:text-warning-200" : "border-border text-muted-foreground hover:text-foreground"
12061
12093
  ),
12062
12094
  children: "Unknown"
12063
12095
  }
@@ -12130,13 +12162,14 @@ function ConditionEditor({
12130
12162
  React12.useEffect(() => {
12131
12163
  if (!open) return;
12132
12164
  setText(prior?.text ?? "");
12133
- setCoding(prior?.coding ?? []);
12165
+ setCoding(withSinglePrimary(prior?.coding ?? []));
12134
12166
  setVerification(
12135
12167
  mode === "add" ? "unconfirmed" : prior?.verificationStatus ?? "confirmed"
12136
12168
  );
12137
12169
  setSeverity(prior?.severity);
12138
- setOnsetDate(prior?.onset?.date ?? "");
12139
- setOnsetFuzzy(prior?.onset?.fuzzy ?? "");
12170
+ const priorOnsetDate = prior?.onset?.date;
12171
+ setOnsetDate(priorOnsetDate ? dateToDisplayFormat(priorOnsetDate) : "");
12172
+ setOnsetFuzzy(priorOnsetDate ? "" : prior?.onset?.fuzzy ?? "");
12140
12173
  setNote("");
12141
12174
  setProgression(false);
12142
12175
  setFields(prior?.uncertainty?.fields ?? {});
@@ -12152,18 +12185,14 @@ function ConditionEditor({
12152
12185
  });
12153
12186
  const updateCoding = (i, patch) => setCoding((prev) => prev.map((c, j) => j === i ? { ...c, ...patch } : c));
12154
12187
  const codingUnknown = fields.coding?.known === false;
12188
+ const hasInvalidOnsetDate = fields.onset?.known !== false && Boolean(onsetDate) && !isValidDate(onsetDate);
12155
12189
  const handleCodePick = (pick) => {
12156
- const system = systemForCodetype(pick.codetype);
12190
+ const system = normalizeConditionCodingSystem(pick.codetype);
12157
12191
  setCoding(
12158
- (prev) => prev.some((c) => c.system === system && c.code === pick.fullcode) ? prev : [
12192
+ (prev) => prev.some((c) => c.system === system && c.code === pick.fullcode) ? prev : withSinglePrimary([
12159
12193
  ...prev,
12160
- {
12161
- system,
12162
- code: pick.fullcode,
12163
- display: pick.label,
12164
- primary: prev.length === 0
12165
- }
12166
- ]
12194
+ { system, code: pick.fullcode, display: pick.label }
12195
+ ])
12167
12196
  );
12168
12197
  setText((prev) => prev || pick.label);
12169
12198
  setFields((prev) => {
@@ -12186,7 +12215,7 @@ function ConditionEditor({
12186
12215
  onOpenChange(false);
12187
12216
  return;
12188
12217
  }
12189
- if (!text.trim()) return;
12218
+ if (!text.trim() || hasInvalidOnsetDate) return;
12190
12219
  if (observation.trim()) onAddObservation?.(observation.trim());
12191
12220
  const uncertainty = Object.keys(fields).length > 0 ? { fields } : void 0;
12192
12221
  onSave?.({
@@ -12195,41 +12224,46 @@ function ConditionEditor({
12195
12224
  // checks downstream. A field marked explicitly unknown must not carry a
12196
12225
  // value (e.g. one seeded from the prior assertion): value + "unknown"
12197
12226
  // would be contradictory, so unknown wins and the value is dropped.
12198
- coding: fields.coding?.known === false ? [] : coding.filter((c) => c.code.trim()).map((c) => ({
12199
- ...c,
12200
- code: c.code.trim(),
12201
- display: c.display?.trim() || void 0,
12202
- mappedFrom: c.mappedFrom?.trim() || void 0
12203
- })),
12227
+ coding: fields.coding?.known === false ? [] : withSinglePrimary(
12228
+ coding.filter((c) => c.code.trim()).map((c) => ({
12229
+ ...c,
12230
+ code: c.code.trim(),
12231
+ display: c.display?.trim() || void 0,
12232
+ mappedFrom: c.mappedFrom?.trim() || void 0
12233
+ }))
12234
+ ),
12204
12235
  verificationStatus: verification,
12205
12236
  changeType: mode === "refine" ? progression ? "progression" : "refinement" : MODE_META[mode].changeType,
12206
12237
  supersedes: prior?.id,
12207
12238
  severity: fields.severity?.known === false ? void 0 : severity,
12208
- onset: fields.onset?.known === false ? void 0 : onsetDate || onsetFuzzy ? { date: onsetDate || void 0, fuzzy: onsetFuzzy || void 0 } : void 0,
12239
+ onset: fields.onset?.known === false ? void 0 : onsetDate || onsetFuzzy ? {
12240
+ date: onsetDate ? displayFormatToDateString(onsetDate) : void 0,
12241
+ fuzzy: onsetFuzzy || void 0
12242
+ } : void 0,
12209
12243
  uncertainty,
12210
12244
  note: note.trim() || void 0
12211
12245
  });
12212
12246
  onOpenChange(false);
12213
12247
  };
12214
- const saveDisabled = mode === "relate" ? !relTarget : mode === "observe" ? !observation.trim() : !text.trim();
12248
+ const saveDisabled = mode === "relate" ? !relTarget : mode === "observe" ? !observation.trim() : !text.trim() || hasInvalidOnsetDate;
12215
12249
  return /* @__PURE__ */ jsxs(
12216
12250
  Modal,
12217
12251
  {
12218
12252
  open,
12219
12253
  onOpenChange,
12220
- size: "lg",
12254
+ size: "2xl",
12221
12255
  className,
12222
12256
  children: [
12223
12257
  /* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsxs(ModalTitle, { children: [
12224
12258
  MODE_META[mode].title,
12225
12259
  prior ? ` \u2014 ${prior.text}` : ""
12226
12260
  ] }) }),
12227
- /* @__PURE__ */ jsx(ModalBody, { "data-testid": dataTestId, children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
12261
+ /* @__PURE__ */ jsx(ModalBody, { "data-testid": dataTestId, className: "space-y-5", children: /* @__PURE__ */ jsxs("div", { className: "space-y-5", children: [
12228
12262
  mode === "revise" && /* @__PURE__ */ jsxs(
12229
12263
  "div",
12230
12264
  {
12231
12265
  role: "alert",
12232
- className: "flex items-start gap-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200",
12266
+ className: "border-warning/30 bg-warning/10 text-warning-800 dark:text-warning-200 flex items-start gap-2 rounded-md border px-3 py-2 text-sm",
12233
12267
  children: [
12234
12268
  /* @__PURE__ */ jsx(AlertTriangle, { size: 16 }),
12235
12269
  /* @__PURE__ */ jsxs("span", { children: [
@@ -12302,21 +12336,19 @@ function ConditionEditor({
12302
12336
  placeholder: "e.g. Type 1 diabetes mellitus with neuropathy"
12303
12337
  }
12304
12338
  ),
12305
- mode === "refine" && /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-sm", children: [
12306
- /* @__PURE__ */ jsx(
12307
- "input",
12308
- {
12309
- type: "checkbox",
12310
- checked: progression,
12311
- onChange: (e) => setProgression(e.target.checked),
12312
- className: "accent-primary-600 h-4 w-4"
12313
- }
12314
- ),
12315
- "Disease progressed (e.g. new complication) rather than a more specific diagnosis"
12316
- ] }),
12317
- /* @__PURE__ */ jsxs("fieldset", { className: "space-y-2", children: [
12318
- /* @__PURE__ */ jsxs("legend", { className: "flex w-full items-center justify-between text-sm font-medium", children: [
12319
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
12339
+ mode === "refine" && /* @__PURE__ */ jsx(
12340
+ Checkbox,
12341
+ {
12342
+ size: "sm",
12343
+ checked: progression,
12344
+ onChange: (e) => setProgression(e.target.checked),
12345
+ label: "Disease progressed (e.g. new complication) rather than a more specific diagnosis"
12346
+ }
12347
+ ),
12348
+ /* @__PURE__ */ jsxs("fieldset", { className: "space-y-3", children: [
12349
+ /* @__PURE__ */ jsx("legend", { className: "sr-only", children: "Coding" }),
12350
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
12351
+ /* @__PURE__ */ jsxs("span", { className: "flex flex-wrap items-center gap-2 text-sm font-medium", children: [
12320
12352
  "Coding",
12321
12353
  /* @__PURE__ */ jsx(
12322
12354
  FieldFlag,
@@ -12343,82 +12375,136 @@ function ConditionEditor({
12343
12375
  }
12344
12376
  ]),
12345
12377
  leftIcon: /* @__PURE__ */ jsx(Plus, { size: 12 }),
12346
- className: "h-7 text-xs",
12378
+ className: "h-8 shrink-0 text-xs",
12347
12379
  children: "Add code"
12348
12380
  }
12349
12381
  )
12350
12382
  ] }),
12351
- effectiveRenderCodeSearch && !(mode === "add" && !text.trim()) && /* @__PURE__ */ jsx("div", { className: "max-w-md", children: effectiveRenderCodeSearch({
12383
+ effectiveRenderCodeSearch && !(mode === "add" && !text.trim()) && /* @__PURE__ */ jsx("div", { children: effectiveRenderCodeSearch({
12352
12384
  placeholder: "Search codes \u2014 ICD-10-CM / SNOMED\u2026",
12353
12385
  onPick: handleCodePick,
12354
12386
  onFreeText: (t) => setText((prev) => prev || t)
12355
12387
  }) }),
12356
12388
  coding.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "Optional \u2014 a name-only problem is valid. Codes can be added any time." }),
12357
- coding.map((c, i) => /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
12358
- /* @__PURE__ */ jsx(
12359
- Select,
12360
- {
12361
- "aria-label": `Coding system ${i + 1}`,
12362
- options: CODING_SYSTEMS.map((s) => ({
12363
- value: s,
12364
- label: s
12365
- })),
12366
- value: c.system,
12367
- onValueChange: (v) => updateCoding(i, { system: v }),
12368
- disabled: codingUnknown,
12369
- className: "w-32"
12370
- }
12371
- ),
12372
- /* @__PURE__ */ jsx(
12373
- Input,
12374
- {
12375
- "aria-label": `Code ${i + 1}`,
12376
- value: c.code,
12377
- onChange: (e) => updateCoding(i, { code: e.target.value }),
12378
- placeholder: "Code",
12379
- disabled: codingUnknown,
12380
- className: "w-28 font-mono"
12381
- }
12382
- ),
12383
- /* @__PURE__ */ jsx(
12384
- Input,
12385
- {
12386
- "aria-label": `Display ${i + 1}`,
12387
- value: c.display ?? "",
12388
- onChange: (e) => updateCoding(i, { display: e.target.value }),
12389
- placeholder: "Display",
12390
- disabled: codingUnknown,
12391
- className: "min-w-32 flex-1"
12392
- }
12393
- ),
12394
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs", children: [
12395
- /* @__PURE__ */ jsx(
12396
- "input",
12397
- {
12398
- type: "radio",
12399
- name: "primary-coding",
12400
- checked: Boolean(c.primary),
12401
- disabled: codingUnknown,
12402
- onChange: () => setCoding(
12403
- (prev) => prev.map((cc, j) => ({ ...cc, primary: j === i }))
12404
- ),
12405
- className: "accent-primary-600"
12406
- }
12389
+ coding.length > 0 && /* @__PURE__ */ jsxs(
12390
+ "div",
12391
+ {
12392
+ "aria-hidden": "true",
12393
+ "data-slot": "condition-coding-header",
12394
+ className: "text-muted-foreground hidden grid-cols-[minmax(8rem,1.1fr)_minmax(7rem,0.9fr)_minmax(10rem,1.5fr)_5.5rem_2.5rem] items-center gap-2 px-1 text-xs font-medium sm:!grid",
12395
+ children: [
12396
+ /* @__PURE__ */ jsx("span", { children: "System" }),
12397
+ /* @__PURE__ */ jsx("span", { children: "Code" }),
12398
+ /* @__PURE__ */ jsx("span", { children: "Display" }),
12399
+ /* @__PURE__ */ jsx("span", { className: "text-center", children: "Primary code" }),
12400
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Actions" })
12401
+ ]
12402
+ }
12403
+ ),
12404
+ coding.length > 0 && /* @__PURE__ */ jsx(
12405
+ RadioGroup,
12406
+ {
12407
+ name: "primary-coding",
12408
+ label: "Primary display code",
12409
+ value: String(
12410
+ Math.max(
12411
+ 0,
12412
+ coding.findIndex((entry) => entry.primary)
12413
+ )
12407
12414
  ),
12408
- "primary"
12409
- ] }),
12410
- /* @__PURE__ */ jsx(
12411
- Button,
12412
- {
12413
- variant: "ghost",
12414
- size: "icon",
12415
- "aria-label": `Remove code ${i + 1}`,
12416
- onClick: () => setCoding((prev) => prev.filter((_, j) => j !== i)),
12417
- className: "h-7 w-7",
12418
- children: /* @__PURE__ */ jsx(Trash2, { size: 14 })
12419
- }
12420
- )
12421
- ] }, i))
12415
+ onValueChange: (value) => {
12416
+ const selectedIndex = Number(value);
12417
+ setCoding(
12418
+ (prev) => prev.map((entry, index) => ({
12419
+ ...entry,
12420
+ primary: index === selectedIndex
12421
+ }))
12422
+ );
12423
+ },
12424
+ size: "sm",
12425
+ className: "gap-2 [&_[data-slot=radio-group-items]]:gap-2 sm:[&_[data-slot=radio-group-legend]]:sr-only",
12426
+ children: coding.map((c, i) => /* @__PURE__ */ jsxs(
12427
+ "div",
12428
+ {
12429
+ "data-slot": "condition-coding-row",
12430
+ className: "border-border/70 grid grid-cols-1 gap-2 rounded-md border p-2 sm:grid-cols-[minmax(8rem,1.1fr)_minmax(7rem,0.9fr)_minmax(10rem,1.5fr)_5.5rem_2.5rem] sm:items-center sm:border-0 sm:p-0",
12431
+ children: [
12432
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12433
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs sm:hidden", children: "System" }),
12434
+ /* @__PURE__ */ jsx(
12435
+ Select,
12436
+ {
12437
+ "aria-label": `Coding system ${i + 1}`,
12438
+ options: CODING_SYSTEMS.map((s) => ({
12439
+ value: s,
12440
+ label: s
12441
+ })),
12442
+ value: c.system,
12443
+ onValueChange: (v) => updateCoding(i, { system: v }),
12444
+ disabled: codingUnknown
12445
+ }
12446
+ )
12447
+ ] }),
12448
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12449
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs sm:hidden", children: "Code" }),
12450
+ /* @__PURE__ */ jsx(
12451
+ Input,
12452
+ {
12453
+ "aria-label": `Code ${i + 1}`,
12454
+ value: c.code,
12455
+ onChange: (e) => updateCoding(i, { code: e.target.value }),
12456
+ placeholder: "Code",
12457
+ disabled: codingUnknown,
12458
+ className: "font-mono"
12459
+ }
12460
+ )
12461
+ ] }),
12462
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12463
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs sm:hidden", children: "Display" }),
12464
+ /* @__PURE__ */ jsx(
12465
+ Input,
12466
+ {
12467
+ "aria-label": `Display ${i + 1}`,
12468
+ value: c.display ?? "",
12469
+ onChange: (e) => updateCoding(i, { display: e.target.value }),
12470
+ placeholder: "Display",
12471
+ disabled: codingUnknown
12472
+ }
12473
+ )
12474
+ ] }),
12475
+ /* @__PURE__ */ jsxs("div", { className: "flex min-h-10 items-center gap-1.5 text-xs sm:justify-center", children: [
12476
+ /* @__PURE__ */ jsx(
12477
+ Radio,
12478
+ {
12479
+ value: String(i),
12480
+ "aria-label": `Primary code: ${c.system} ${c.code || `row ${i + 1}`}`,
12481
+ disabled: codingUnknown
12482
+ }
12483
+ ),
12484
+ /* @__PURE__ */ jsx("span", { className: "sm:sr-only", children: "Primary code" })
12485
+ ] }),
12486
+ /* @__PURE__ */ jsx(
12487
+ Button,
12488
+ {
12489
+ variant: "ghost",
12490
+ size: "icon",
12491
+ "aria-label": `Remove code ${i + 1}`,
12492
+ disabled: codingUnknown,
12493
+ onClick: () => setCoding(
12494
+ (prev) => withSinglePrimary(
12495
+ prev.filter((_, index) => index !== i)
12496
+ )
12497
+ ),
12498
+ className: "h-10 w-10 justify-self-start sm:justify-self-center",
12499
+ children: /* @__PURE__ */ jsx(Trash2, { size: 14 })
12500
+ }
12501
+ )
12502
+ ]
12503
+ },
12504
+ i
12505
+ ))
12506
+ }
12507
+ )
12422
12508
  ] }),
12423
12509
  /* @__PURE__ */ jsx(
12424
12510
  Select,
@@ -12429,9 +12515,39 @@ function ConditionEditor({
12429
12515
  onValueChange: (v) => setVerification(v)
12430
12516
  }
12431
12517
  ),
12432
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12433
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-sm font-medium", children: [
12434
- "Severity",
12518
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-end gap-x-4 gap-y-2", children: [
12519
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12520
+ /* @__PURE__ */ jsx("span", { className: "block text-sm font-medium", children: "Severity" }),
12521
+ /* @__PURE__ */ jsx(
12522
+ "div",
12523
+ {
12524
+ role: "group",
12525
+ "aria-label": "Severity",
12526
+ className: "border-border inline-flex items-center overflow-hidden rounded-md border",
12527
+ children: SEVERITIES.map((s) => {
12528
+ const active = severity === s;
12529
+ return /* @__PURE__ */ jsx(
12530
+ "button",
12531
+ {
12532
+ type: "button",
12533
+ "aria-pressed": active,
12534
+ disabled: fields.severity?.known === false,
12535
+ onClick: () => setSeverity(active ? void 0 : s),
12536
+ className: cn(
12537
+ "border-border border-s px-2.5 py-1 text-xs font-medium capitalize transition-colors first:border-s-0",
12538
+ "disabled:opacity-40",
12539
+ active ? "bg-primary-600 text-white" : "bg-background text-muted-foreground hover:text-foreground"
12540
+ ),
12541
+ children: s
12542
+ },
12543
+ s
12544
+ );
12545
+ })
12546
+ }
12547
+ )
12548
+ ] }),
12549
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12550
+ /* @__PURE__ */ jsx("span", { className: "block text-sm font-medium", children: "Certainty" }),
12435
12551
  /* @__PURE__ */ jsx(
12436
12552
  FieldFlag,
12437
12553
  {
@@ -12441,34 +12557,7 @@ function ConditionEditor({
12441
12557
  hasValue: Boolean(severity)
12442
12558
  }
12443
12559
  )
12444
- ] }),
12445
- /* @__PURE__ */ jsx(
12446
- "div",
12447
- {
12448
- role: "group",
12449
- "aria-label": "Severity",
12450
- className: "border-border inline-flex items-center overflow-hidden rounded-md border",
12451
- children: SEVERITIES.map((s) => {
12452
- const active = severity === s;
12453
- return /* @__PURE__ */ jsx(
12454
- "button",
12455
- {
12456
- type: "button",
12457
- "aria-pressed": active,
12458
- disabled: fields.severity?.known === false,
12459
- onClick: () => setSeverity(active ? void 0 : s),
12460
- className: cn(
12461
- "border-border border-s px-2.5 py-1 text-xs font-medium capitalize transition-colors first:border-s-0",
12462
- "disabled:opacity-40",
12463
- active ? "bg-primary-600 text-white" : "bg-background text-muted-foreground hover:text-foreground"
12464
- ),
12465
- children: s
12466
- },
12467
- s
12468
- );
12469
- })
12470
- }
12471
- )
12560
+ ] })
12472
12561
  ] }),
12473
12562
  /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12474
12563
  /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-sm font-medium", children: [
@@ -12483,28 +12572,33 @@ function ConditionEditor({
12483
12572
  }
12484
12573
  )
12485
12574
  ] }),
12486
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
12575
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-end gap-2 sm:grid-cols-[minmax(10rem,0.8fr)_auto_minmax(14rem,1.2fr)]", children: [
12487
12576
  /* @__PURE__ */ jsx(
12488
- Input,
12577
+ DateInput,
12489
12578
  {
12490
- type: "date",
12491
12579
  "aria-label": "Onset date (exact)",
12492
12580
  value: onsetDate,
12493
- onChange: (e) => setOnsetDate(e.target.value),
12581
+ onChange: (value) => {
12582
+ setOnsetDate(value);
12583
+ if (value) setOnsetFuzzy("");
12584
+ },
12494
12585
  disabled: fields.onset?.known === false,
12495
- className: "w-40"
12586
+ validateOnBlur: true,
12587
+ width: "full"
12496
12588
  }
12497
12589
  ),
12498
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs", children: "or" }),
12590
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground pb-3 text-center text-xs", children: "or" }),
12499
12591
  /* @__PURE__ */ jsx(
12500
12592
  Input,
12501
12593
  {
12502
12594
  "aria-label": "Onset (fuzzy)",
12503
12595
  value: onsetFuzzy,
12504
- onChange: (e) => setOnsetFuzzy(e.target.value),
12596
+ onChange: (e) => {
12597
+ setOnsetFuzzy(e.target.value);
12598
+ if (e.target.value) setOnsetDate("");
12599
+ },
12505
12600
  disabled: fields.onset?.known === false,
12506
- placeholder: 'Fuzzy \u2014 "since her twenties", "~3 months ago"',
12507
- className: "min-w-48 flex-1"
12601
+ placeholder: 'Fuzzy \u2014 "since her twenties", "~3 months ago"'
12508
12602
  }
12509
12603
  )
12510
12604
  ] })
@@ -12525,7 +12619,7 @@ function ConditionEditor({
12525
12619
  "Uncertainty recorded:",
12526
12620
  " ",
12527
12621
  Object.entries(fields).map(
12528
- ([k, f]) => f?.known === false ? `${k} unknown` : `${k} ${f?.confidence ?? "soft"}`
12622
+ ([k, f]) => f?.known === false ? `${k} unknown` : `${f?.confidence ?? "unspecified"} confidence in ${k}`
12529
12623
  ).join(", ")
12530
12624
  ] })
12531
12625
  ] })
@@ -44193,6 +44287,6 @@ function WebsiteInputGroup({
44193
44287
  }
44194
44288
  WebsiteInputGroup.displayName = "WebsiteInputGroup";
44195
44289
 
44196
- export { AIChat, AIChatModal, AIChatTrigger, AIReconciliationPanel, AccessDeniedPage, ActionButton2 as ActionButton, ActionButtonsBar, ActiveFilters, AddContactModal, AddServiceCard, AdditionalFields, Address, AddressCard, AddressCompact, AddressDisplay, AddressForm, AddressInline, AppHeader, AppHeaderActions, AppHeaderBrand, AppHeaderDivider, AppHeaderIconButton, AppHeaderSearch, AppHeaderSection, AppHeaderTitle, AppHeaderUserMenu, Assessment, AuthButtons, AuthDialog, BookAppointmentButton, BookingDialog, BusinessHours, BusinessHoursEditor, ButtonGroup, CHANGE_TYPE_LABELS, CONCERN_STATUS_LABELS, CSVColumnMapper, CSVFileUpload, CardSkeleton, CaseContextBar, CaseManagementHeader, CheckrIntegration, ClaimListingButton, ClaimProviderForm, CodingChips, CommandPalette, CommandPaletteProvider, CommandPaletteTrigger, CompactCookieBanner, CompactFilterBar, CompactHeader, CompactHours, CompactProviderHeader, ConditionEditor, ConnectionStatusBadge, ConnectionStatusBar, ConnectionStatusOverlay, ConsentSwitch, CookieConsentBanner, CopyrightText, CountBadge, CountryDropdown, CreateInvoiceModal, CreateReferralModal, DEFAULT_ERROR_CONFIGS, DEFAULT_LANGUAGES, DEFAULT_RADIUS_OPTIONS, DEFAULT_SOCIAL_PROVIDERS, DOTBadge, DashboardWidget, DashboardWidgetActions, DashboardWidgetDataCards, DashboardWidgetInfo, DashboardWidgetTable, DateRangeFilter, DateRangePicker, DialogOverlay, DisclaimerText, DockablePanel, DocumentDetectionOverlay, DocumentScanner, DropZone, DropzoneOverlay, EditUserRoleModal, EmployeeForm, EmployeeProfileCard, EmployerContactCard, EmployerList, EmployerPricingCard, EmployerServiceModal, EmployerView, ErrorPage, FileManager, FilePreview, FloatingAIChat, FloatingInput, FooterLinkSection, SocialMediaLinks2 as FooterSocialLinks, HRISProviderSelector, HandsFreeChat, HealthSurveillance, HelpSupportPanel, HeroSearchBar, HeyOzwell, HeyOzwellToggle, HoursSummary, ImagingOrderEditor, InlineBookingForm, InventoryManager, InviteUserModal, InvoiceList, InvoicePaymentPage, InvoiceView, LabOrderEditor, LanguageSelector, LanguageSelectorInline, LanguageSelectorNative, LegalLinks, LoadingBar, LoadingDots, LoadingOverlay, LoadingPage, LoadingSkeleton, MODEL_MANIFEST, MaintenancePage, MobileBackButton, MobileMenuButton, MobileMenuPanel, ModelInfoList, NavLinks, NewsletterForm, NotFoundPage, NotificationCenter, ORDER_TYPE_META, ORDER_TYPE_SEARCH_DOMAINS, OfflinePage, OnboardingCompletion, OnboardingStepQuestion, OnboardingWizard, OpenStatusBadge, OrderCard, OrderConfirmation, OrderConfirmationWizard, OrderDetailSidebar, OrderEditor, OrderList, OrderLookupForm, OrderSidebar, OrderSidebarTabs, OzwellChat, OzwellSettingsMenu, PageHeader, PatientHeader, PaymentHistoryTable, PaymentMethodBank, PaymentMethodCard, PaymentMethodList, PendingClaimsTable, PermissionsEditor, PillSelect, PresentingProblems, ProblemList, ProcedureOrderEditor, ProductVersion, ProductVersionBadge, Breadcrumb2 as ProviderBreadcrumb, ProviderCard, ProviderCardGrid, ProviderCardSkeleton, ProviderDetailHeader, ProviderDetailHeaderSkeleton, ProviderLogo2 as ProviderLogo, ProviderOverview, ProviderSearchBar, ProviderSearchFilters, ProviderSelector, ProviderSettings, SocialMediaLinks as ProviderSocialLinks, ProviderUsersTable, QuickBookCard, QuickLinksCard, RELEVANCE_LABELS, RecurringServiceAddCard, RecurringServiceCard, RecurringServiceGrid, RecurringServiceSetupModal, ReferralEditor, RejectionModal, ReportDashboard, ReportDatePicker, ReportLink, ReportTimeRange, ResultsEntryCard, ResultsEntryForm, ResultsEntryModal, SSOConfigForm, ScheduleCalendar, SearchResultsMessage, SelectedServicesBadges, ServerErrorPage, ServiceAccordion, ServiceBadge, ServiceBadgeGroup, ServiceCard, ServiceCategoryBadge, ServiceGeneralSettings, ServiceGrid, ServiceLink, ServiceList, ServiceMultiSelect, ServicePicker, ServicePricingManager, ServiceSelect, ServiceShippingSettings, ServiceTagCloud, ServiceTagCloudBadges, SetupServiceModal, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMobileToggle, SidebarNav, SidebarNavGroup, SidebarNavItem, SidebarProvider, SidebarSearch, SidebarToggle, SimpleFooter, SiteFooter, SiteHeader, SiteLogo, StepIndicator, StripeBadge, StripeSecureBadge, SuggestedActions, TableOfContents, TimelineEventList, TimelineProgress, Toast, ToastContainer, ToastProvider, UncertaintyBadge, UpdateAvailableOverlay, UserMenu, VerifiedBadge2 as VerifiedBadge, VisitScribe, VoiceManager, VoiceSetup, WEBSITE_TYPES, WebChartReportViewer, WebcamModal, WebsiteInput, WebsiteInputGroup, askOzwell, askOzwellStream, attributeSegments, calculateDateRange, centroid, chime, clearVoiceprints, clearWhatPrints, clusterEmbeddings, concernGroupKey, concernHistoryContent, cosine, countBadgeVariants, countChipVariants, create24HourSchedule, createDefaultSchedule, createWeekdaySchedule, currentAssertion, decodeTo16kMono, defaultCaseManagementHeaderLabels, defaultOrderTabs, defaultReconciliationIsEqual, endsWithDone, formatAddressLines, formatAddressSingleLine, formatCityState, formatCityStateZip, generateId, getDefaultPresets, getDictationLoad, getExtendedPresets, getGoogleMapsSearchUrl, getGoogleMapsUrl, getOzwellConfig, getVoiceprints, getWakeWarm, inferSpeakerRoles, isConditionCodetype, isOzwellConfigured, isValidUrl, isWhisperLoaded, labelClusters, loadWhatPrints, medicationToOrder, mergeTurns, openRollingRecorder, orderToMedication, orderTypeForCodetype, panelVariants as reconciliationPanelVariants, saveWhatPrints, setVoiceprints, stripStopPhrase, subscribeDictationLoad, subscribeWakeWarm, toOzwellMessages, transcribeBlob, transcribeGate, transcribeSamples, transcribeSegments, transcribeServer, trimTrailingStopPhrase, useCamera, useCommandPalette, useConnectionStatus, useCookieConsent, useDiarization, useDocumentDetection, useDropzone, useFileUpload, useHeyOzwell, useOptionalToast, useSidebar, useSpeakerVerify, useToast, useVisitScribe, useVoiceSetup, useWakeWord, warmStopGate, warmWakeModels, warmWhisper, widgetVariants };
44290
+ export { AIChat, AIChatModal, AIChatTrigger, AIReconciliationPanel, AccessDeniedPage, ActionButton2 as ActionButton, ActionButtonsBar, ActiveFilters, AddContactModal, AddServiceCard, AdditionalFields, Address, AddressCard, AddressCompact, AddressDisplay, AddressForm, AddressInline, AppHeader, AppHeaderActions, AppHeaderBrand, AppHeaderDivider, AppHeaderIconButton, AppHeaderSearch, AppHeaderSection, AppHeaderTitle, AppHeaderUserMenu, Assessment, AuthButtons, AuthDialog, BookAppointmentButton, BookingDialog, BusinessHours, BusinessHoursEditor, ButtonGroup, CHANGE_TYPE_LABELS, CONCERN_STATUS_LABELS, CSVColumnMapper, CSVFileUpload, CardSkeleton, CaseContextBar, CaseManagementHeader, CheckrIntegration, ClaimListingButton, ClaimProviderForm, CodingChips, CommandPalette, CommandPaletteProvider, CommandPaletteTrigger, CompactCookieBanner, CompactFilterBar, CompactHeader, CompactHours, CompactProviderHeader, ConditionEditor, ConnectionStatusBadge, ConnectionStatusBar, ConnectionStatusOverlay, ConsentSwitch, CookieConsentBanner, CopyrightText, CountBadge, CountryDropdown, CreateInvoiceModal, CreateReferralModal, DEFAULT_ERROR_CONFIGS, DEFAULT_LANGUAGES, DEFAULT_RADIUS_OPTIONS, DEFAULT_SOCIAL_PROVIDERS, DOTBadge, DashboardWidget, DashboardWidgetActions, DashboardWidgetDataCards, DashboardWidgetInfo, DashboardWidgetTable, DateRangeFilter, DateRangePicker, DialogOverlay, DisclaimerText, DockablePanel, DocumentDetectionOverlay, DocumentScanner, DropZone, DropzoneOverlay, EditUserRoleModal, EmployeeForm, EmployeeProfileCard, EmployerContactCard, EmployerList, EmployerPricingCard, EmployerServiceModal, EmployerView, ErrorPage, FileManager, FilePreview, FloatingAIChat, FloatingInput, FooterLinkSection, SocialMediaLinks2 as FooterSocialLinks, HRISProviderSelector, HandsFreeChat, HealthSurveillance, HelpSupportPanel, HeroSearchBar, HeyOzwell, HeyOzwellToggle, HoursSummary, ImagingOrderEditor, InlineBookingForm, InventoryManager, InviteUserModal, InvoiceList, InvoicePaymentPage, InvoiceView, LabOrderEditor, LanguageSelector, LanguageSelectorInline, LanguageSelectorNative, LegalLinks, LoadingBar, LoadingDots, LoadingOverlay, LoadingPage, LoadingSkeleton, MODEL_MANIFEST, MaintenancePage, MobileBackButton, MobileMenuButton, MobileMenuPanel, ModelInfoList, NavLinks, NewsletterForm, NotFoundPage, NotificationCenter, ORDER_TYPE_META, ORDER_TYPE_SEARCH_DOMAINS, OfflinePage, OnboardingCompletion, OnboardingStepQuestion, OnboardingWizard, OpenStatusBadge, OrderCard, OrderConfirmation, OrderConfirmationWizard, OrderDetailSidebar, OrderEditor, OrderList, OrderLookupForm, OrderSidebar, OrderSidebarTabs, OzwellChat, OzwellSettingsMenu, PageHeader, PatientHeader, PaymentHistoryTable, PaymentMethodBank, PaymentMethodCard, PaymentMethodList, PendingClaimsTable, PermissionsEditor, PillSelect, PresentingProblems, ProblemList, ProcedureOrderEditor, ProductVersion, ProductVersionBadge, Breadcrumb2 as ProviderBreadcrumb, ProviderCard, ProviderCardGrid, ProviderCardSkeleton, ProviderDetailHeader, ProviderDetailHeaderSkeleton, ProviderLogo2 as ProviderLogo, ProviderOverview, ProviderSearchBar, ProviderSearchFilters, ProviderSelector, ProviderSettings, SocialMediaLinks as ProviderSocialLinks, ProviderUsersTable, QuickBookCard, QuickLinksCard, RELEVANCE_LABELS, RecurringServiceAddCard, RecurringServiceCard, RecurringServiceGrid, RecurringServiceSetupModal, ReferralEditor, RejectionModal, ReportDashboard, ReportDatePicker, ReportLink, ReportTimeRange, ResultsEntryCard, ResultsEntryForm, ResultsEntryModal, SSOConfigForm, ScheduleCalendar, SearchResultsMessage, SelectedServicesBadges, ServerErrorPage, ServiceAccordion, ServiceBadge, ServiceBadgeGroup, ServiceCard, ServiceCategoryBadge, ServiceGeneralSettings, ServiceGrid, ServiceLink, ServiceList, ServiceMultiSelect, ServicePicker, ServicePricingManager, ServiceSelect, ServiceShippingSettings, ServiceTagCloud, ServiceTagCloudBadges, SetupServiceModal, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMobileToggle, SidebarNav, SidebarNavGroup, SidebarNavItem, SidebarProvider, SidebarSearch, SidebarToggle, SimpleFooter, SiteFooter, SiteHeader, SiteLogo, StepIndicator, StripeBadge, StripeSecureBadge, SuggestedActions, TableOfContents, TimelineEventList, TimelineProgress, Toast, ToastContainer, ToastProvider, UncertaintyBadge, UpdateAvailableOverlay, UserMenu, VerifiedBadge2 as VerifiedBadge, VisitScribe, VoiceManager, VoiceSetup, WEBSITE_TYPES, WebChartReportViewer, WebcamModal, WebsiteInput, WebsiteInputGroup, askOzwell, askOzwellStream, attributeSegments, calculateDateRange, centroid, chime, clearVoiceprints, clearWhatPrints, clusterEmbeddings, concernGroupKey, concernHistoryContent, cosine, countBadgeVariants, countChipVariants, create24HourSchedule, createDefaultSchedule, createWeekdaySchedule, currentAssertion, decodeTo16kMono, defaultCaseManagementHeaderLabels, defaultOrderTabs, defaultReconciliationIsEqual, endsWithDone, formatAddressLines, formatAddressSingleLine, formatCityState, formatCityStateZip, generateId, getDefaultPresets, getDictationLoad, getExtendedPresets, getGoogleMapsSearchUrl, getGoogleMapsUrl, getOzwellConfig, getVoiceprints, getWakeWarm, inferSpeakerRoles, isConditionCodetype, isOzwellConfigured, isValidUrl, isWhisperLoaded, labelClusters, loadWhatPrints, medicationToOrder, mergeTurns, normalizeConditionCodingSystem, openRollingRecorder, orderToMedication, orderTypeForCodetype, panelVariants as reconciliationPanelVariants, saveWhatPrints, setVoiceprints, stripStopPhrase, subscribeDictationLoad, subscribeWakeWarm, toOzwellMessages, transcribeBlob, transcribeGate, transcribeSamples, transcribeSegments, transcribeServer, trimTrailingStopPhrase, useCamera, useCommandPalette, useConnectionStatus, useCookieConsent, useDiarization, useDocumentDetection, useDropzone, useFileUpload, useHeyOzwell, useOptionalToast, useSidebar, useSpeakerVerify, useToast, useVisitScribe, useVoiceSetup, useWakeWord, warmStopGate, warmWakeModels, warmWhisper, widgetVariants };
44197
44291
  //# sourceMappingURL=index.js.map
44198
44292
  //# sourceMappingURL=index.js.map