@mieweb/ui 0.11.0-dev.32 → 0.11.0-dev.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/{chunk-PJN4HM2X.cjs → chunk-3O3Q3DX7.cjs} +21 -21
  2. package/dist/{chunk-PJN4HM2X.cjs.map → chunk-3O3Q3DX7.cjs.map} +1 -1
  3. package/dist/{chunk-M42FTWY2.cjs → chunk-46RYJYN2.cjs} +6 -6
  4. package/dist/{chunk-M42FTWY2.cjs.map → chunk-46RYJYN2.cjs.map} +1 -1
  5. package/dist/{chunk-JMAZ2GKT.js → chunk-4GSFVD5V.js} +3 -3
  6. package/dist/{chunk-JMAZ2GKT.js.map → chunk-4GSFVD5V.js.map} +1 -1
  7. package/dist/{chunk-2R3ILG4Y.cjs → chunk-4M2KE4O5.cjs} +7 -7
  8. package/dist/{chunk-2R3ILG4Y.cjs.map → chunk-4M2KE4O5.cjs.map} +1 -1
  9. package/dist/{chunk-L52HKEUD.js → chunk-4SUEBKTY.js} +3 -3
  10. package/dist/{chunk-L52HKEUD.js.map → chunk-4SUEBKTY.js.map} +1 -1
  11. package/dist/{chunk-SCYLVQWA.cjs → chunk-6O6EYKOG.cjs} +130 -874
  12. package/dist/chunk-6O6EYKOG.cjs.map +1 -0
  13. package/dist/{chunk-INMDLVUB.cjs → chunk-6UYMO3PF.cjs} +7 -2
  14. package/dist/chunk-6UYMO3PF.cjs.map +1 -0
  15. package/dist/{chunk-2Z2GFDRS.cjs → chunk-DXNVQQYN.cjs} +4 -4
  16. package/dist/{chunk-2Z2GFDRS.cjs.map → chunk-DXNVQQYN.cjs.map} +1 -1
  17. package/dist/{chunk-JN2CL7MK.js → chunk-EWPNM6OO.js} +25 -5
  18. package/dist/chunk-EWPNM6OO.js.map +1 -0
  19. package/dist/{chunk-JQAGNAY2.js → chunk-EX7Q5545.js} +4 -4
  20. package/dist/{chunk-JQAGNAY2.js.map → chunk-EX7Q5545.js.map} +1 -1
  21. package/dist/{chunk-YG7BR76Y.js → chunk-GMNF4E7B.js} +3 -42
  22. package/dist/chunk-GMNF4E7B.js.map +1 -0
  23. package/dist/chunk-HTZ27DGZ.js +46 -0
  24. package/dist/chunk-HTZ27DGZ.js.map +1 -0
  25. package/dist/{chunk-SNAMNKFH.js → chunk-JEXEFWEM.js} +7 -2
  26. package/dist/chunk-JEXEFWEM.js.map +1 -0
  27. package/dist/{chunk-KIVEYQGA.cjs → chunk-MSX2P5JE.cjs} +2 -48
  28. package/dist/chunk-MSX2P5JE.cjs.map +1 -0
  29. package/dist/{chunk-VV2U36T6.cjs → chunk-MZR634HI.cjs} +9 -9
  30. package/dist/{chunk-VV2U36T6.cjs.map → chunk-MZR634HI.cjs.map} +1 -1
  31. package/dist/{chunk-JCO62XMU.cjs → chunk-NCPDUJKJ.cjs} +43 -26
  32. package/dist/chunk-NCPDUJKJ.cjs.map +1 -0
  33. package/dist/{chunk-DG3CXR24.js → chunk-NW6D6AFL.js} +80 -819
  34. package/dist/chunk-NW6D6AFL.js.map +1 -0
  35. package/dist/{chunk-BP4LXRC6.cjs → chunk-PGJLW2NO.cjs} +7 -7
  36. package/dist/{chunk-BP4LXRC6.cjs.map → chunk-PGJLW2NO.cjs.map} +1 -1
  37. package/dist/chunk-PHYQSCP6.cjs +54 -0
  38. package/dist/chunk-PHYQSCP6.cjs.map +1 -0
  39. package/dist/{chunk-ZFJJMDV3.js → chunk-RTADGBBN.js} +3 -3
  40. package/dist/{chunk-ZFJJMDV3.js.map → chunk-RTADGBBN.js.map} +1 -1
  41. package/dist/{chunk-FQUSSPXX.cjs → chunk-S2CJ57BX.cjs} +25 -5
  42. package/dist/chunk-S2CJ57BX.cjs.map +1 -0
  43. package/dist/{chunk-KSQQBFDQ.js → chunk-SPGP252Q.js} +43 -26
  44. package/dist/chunk-SPGP252Q.js.map +1 -0
  45. package/dist/{chunk-67SD6VPF.cjs → chunk-SVC7NPQ6.cjs} +6 -6
  46. package/dist/{chunk-67SD6VPF.cjs.map → chunk-SVC7NPQ6.cjs.map} +1 -1
  47. package/dist/{chunk-TWQSMUE6.js → chunk-VMEVLBI3.js} +46 -38
  48. package/dist/chunk-VMEVLBI3.js.map +1 -0
  49. package/dist/{chunk-QNJEDBIN.js → chunk-X5HLVACK.js} +4 -4
  50. package/dist/{chunk-QNJEDBIN.js.map → chunk-X5HLVACK.js.map} +1 -1
  51. package/dist/{chunk-LC3JL2HB.cjs → chunk-XEHD2HA5.cjs} +46 -38
  52. package/dist/chunk-XEHD2HA5.cjs.map +1 -0
  53. package/dist/{chunk-R3MJKY63.js → chunk-YGSPIDE4.js} +3 -3
  54. package/dist/{chunk-R3MJKY63.js.map → chunk-YGSPIDE4.js.map} +1 -1
  55. package/dist/{chunk-7LKTIZLR.js → chunk-YR45POH2.js} +3 -3
  56. package/dist/{chunk-7LKTIZLR.js.map → chunk-YR45POH2.js.map} +1 -1
  57. package/dist/components/AlertDialog/index.cjs +6 -6
  58. package/dist/components/AlertDialog/index.js +2 -2
  59. package/dist/components/EmailEditor/index.cjs +14 -12
  60. package/dist/components/EmailEditor/index.js +5 -3
  61. package/dist/components/KeyboardShortcutsOverlay/index.cjs +4 -4
  62. package/dist/components/KeyboardShortcutsOverlay/index.js +2 -2
  63. package/dist/components/MediaEditor/index.cjs +7 -7
  64. package/dist/components/MediaEditor/index.js +2 -2
  65. package/dist/components/MediaFeed/index.cjs +3 -3
  66. package/dist/components/MediaFeed/index.js +2 -2
  67. package/dist/components/Modal/index.cjs +9 -9
  68. package/dist/components/Modal/index.js +1 -1
  69. package/dist/components/RichTextEditor/index.cjs +6 -4
  70. package/dist/components/RichTextEditor/index.js +3 -1
  71. package/dist/components/SuperChat/index.cjs +3 -3
  72. package/dist/components/SuperChat/index.js +2 -2
  73. package/dist/components/Textarea/index.cjs +7 -5
  74. package/dist/components/Textarea/index.js +4 -2
  75. package/dist/esheet.cjs +1119 -1393
  76. package/dist/esheet.cjs.map +1 -1
  77. package/dist/esheet.d.cts +211 -4
  78. package/dist/esheet.d.ts +211 -4
  79. package/dist/esheet.js +946 -1239
  80. package/dist/esheet.js.map +1 -1
  81. package/dist/hooks/index.cjs +41 -40
  82. package/dist/hooks/index.js +2 -1
  83. package/dist/index.cjs +1058 -285
  84. package/dist/index.cjs.map +1 -1
  85. package/dist/index.d.cts +6 -2
  86. package/dist/index.d.ts +6 -2
  87. package/dist/index.js +809 -20
  88. package/dist/index.js.map +1 -1
  89. package/dist/{model-NPW2JMHZ.cjs → model-EFXX5JZN.cjs} +18 -18
  90. package/dist/{model-NPW2JMHZ.cjs.map → model-EFXX5JZN.cjs.map} +1 -1
  91. package/dist/{model-SG5H3TCJ.js → model-TAARSYDY.js} +4 -4
  92. package/dist/{model-SG5H3TCJ.js.map → model-TAARSYDY.js.map} +1 -1
  93. package/dist/styles.css +1 -1
  94. package/dist/tailwind-preset.cjs +4 -4
  95. package/dist/tailwind-preset.js +1 -1
  96. package/package.json +1 -1
  97. package/dist/chunk-DG3CXR24.js.map +0 -1
  98. package/dist/chunk-FQUSSPXX.cjs.map +0 -1
  99. package/dist/chunk-INMDLVUB.cjs.map +0 -1
  100. package/dist/chunk-JCO62XMU.cjs.map +0 -1
  101. package/dist/chunk-JN2CL7MK.js.map +0 -1
  102. package/dist/chunk-KIVEYQGA.cjs.map +0 -1
  103. package/dist/chunk-KSQQBFDQ.js.map +0 -1
  104. package/dist/chunk-LC3JL2HB.cjs.map +0 -1
  105. package/dist/chunk-SCYLVQWA.cjs.map +0 -1
  106. package/dist/chunk-SNAMNKFH.js.map +0 -1
  107. package/dist/chunk-TWQSMUE6.js.map +0 -1
  108. package/dist/chunk-YG7BR76Y.js.map +0 -1
package/dist/esheet.d.cts CHANGED
@@ -3,6 +3,7 @@ export { FormDefinition } from '@esheet/core';
3
3
  import * as React from 'react';
4
4
  export { EsheetBuilder, EsheetBuilderProps } from '@esheet/builder';
5
5
  export { EsheetRenderer, EsheetRendererHandle, EsheetRendererProps } from '@esheet/renderer';
6
+ import * as react_jsx_runtime from 'react/jsx-runtime';
6
7
 
7
8
  interface CodifyResult {
8
9
  fullid: string;
@@ -732,16 +733,106 @@ declare function EncounterVitalsField({ field, response, isPreview, isEnabled, i
732
733
  /** Native eSheet adapter for the shared Assessment and plan editor. */
733
734
  declare function EncounterAssessmentField({ field, form, response, isPreview, isEnabled, isReadOnly, onResponse, }: FieldComponentProps): React.JSX.Element;
734
735
 
736
+ /** Standard coding reference attached to a finding (SNOMED, ICD, …). */
737
+ interface NarrativeCode {
738
+ system: string;
739
+ code: string;
740
+ display?: string;
741
+ }
742
+ /** Explicit quick selections; free prose never becomes a coded finding automatically. */
743
+ interface NarrativeFinding {
744
+ id: string;
745
+ label: string;
746
+ text: string;
747
+ code?: NarrativeCode;
748
+ }
749
+ /**
750
+ * Response attribute names a narrative field publishes under. Hosts with a
751
+ * published attribute contract (e.g. EncounterVisit's `encounterNarrative*`)
752
+ * supply their own namespace; everyone else uses {@link NARRATIVE_ATTRIBUTES}.
753
+ */
754
+ interface NarrativeAttributeNames {
755
+ /** Sanitized rich HTML mirroring the plain answer. */
756
+ html: string;
757
+ /** Plain text derived from the HTML; must equal the answer to be trusted. */
758
+ text: string;
759
+ /** JSON provenance of explicitly picked findings. */
760
+ findings: string;
761
+ /** Answer snapshot the findings provenance was recorded against. */
762
+ findingsText: string;
763
+ }
764
+ /** Default attribute namespace for the generic narrative field. */
765
+ declare const NARRATIVE_ATTRIBUTES: NarrativeAttributeNames;
766
+ /** Whitelist configured or persisted selection provenance, never arbitrary attributes. */
767
+ declare function validNarrativeFindings(value: unknown): NarrativeFinding[];
768
+ /** Match complete inserted lines, never a phrase inside unrelated free prose. */
769
+ declare function hasNarrativeFindingText(answer: string, text: string): boolean;
770
+ /** Codes represent explicit picks and are invalidated by external plain-answer edits. */
771
+ declare function getNarrativeFindings(response?: FieldResponse, attributes?: NarrativeAttributeNames): NarrativeFinding[];
772
+ /**
773
+ * The plain-response equivalent of an explicit quick-pick action, also used by
774
+ * MCP. Valid existing rich formatting is retained without needing a DOM.
775
+ */
776
+ declare function applyNarrativeFinding(response: FieldResponse | undefined, finding: NarrativeFinding, attributes?: NarrativeAttributeNames): FieldResponse;
777
+
778
+ /**
779
+ * EsheetNarrativeField — generic esheet-guided narrative field.
780
+ *
781
+ * A report-like rich text surface backed by eSheet text: the field rests as a
782
+ * plain one-line input, expands while the author writes, docks the section's
783
+ * common findings as a macro group (each with a derived dot-phrase), and
784
+ * records explicit finding picks as provenance on the response.
785
+ *
786
+ * The response attribute namespace, findings source, and styling slot are
787
+ * parameterized so hosts with a published contract (EncounterNarrativeField's
788
+ * `encounterNarrative*`) configure it without forking the behavior.
789
+ *
790
+ * Exposed via the `@mieweb/ui/esheet` entry point (NOT the main bundle) so
791
+ * that @esheet/* stays an optional dependency.
792
+ */
793
+
794
+ /**
795
+ * Keep document formatting small: no links, media, styles, or imported
796
+ * document chrome. Every block format the editor's block menu and markdown
797
+ * shortcuts offer (headings 1–3, quote, lists) is allowed, so published
798
+ * formatting survives reopening the field.
799
+ */
800
+ declare function sanitizeNarrativeHtml(html: string): string;
801
+ /** Extract readable narrative text without flattening paragraphs or list items together. */
802
+ declare function narrativeText(html: string): string;
803
+ interface EsheetNarrativeFieldProps extends FieldComponentProps {
804
+ /** Response attribute namespace; defaults to {@link NARRATIVE_ATTRIBUTES}. */
805
+ attributes?: NarrativeAttributeNames;
806
+ /** `definition._sourceData` key holding the section's common findings. */
807
+ findingsKey?: string;
808
+ /** `definition._sourceData` key that hides the visible field label. */
809
+ hideLabelKey?: string;
810
+ /** `data-slot` value for host CSS hooks. */
811
+ slot?: string;
812
+ }
735
813
  /** A report-like narrative surface that grows with its content, backed by eSheet text. */
736
- declare function EncounterNarrativeField({ field, response, isPreview, isEnabled, isReadOnly, isRequired, isSoftRequired, onResponse, }: FieldComponentProps): React.JSX.Element;
814
+ declare function EsheetNarrativeField({ field, response, isPreview, isEnabled, isReadOnly, isRequired, isSoftRequired, onResponse, attributes, findingsKey, hideLabelKey, slot, }: EsheetNarrativeFieldProps): React.JSX.Element;
815
+ /**
816
+ * Register the `esheetNarrative` field type with eSheet.
817
+ * Call once before rendering EsheetBuilder or EsheetRenderer. Hosts that
818
+ * already registered their own `esheetNarrative` component keep it.
819
+ */
820
+ declare function registerEsheetNarrativeFieldType(): void;
821
+
822
+ /**
823
+ * The generic EsheetNarrativeField configured for encounter visits: the
824
+ * published `encounterNarrative*` response attributes, findings sourced from
825
+ * the section definition's `encounterFindings`, and the encounter CSS slot.
826
+ */
827
+ declare function EncounterNarrativeField(props: FieldComponentProps): React.JSX.Element;
737
828
 
738
829
  /** Register encounter fields when missing, retaining any host-supplied editors. */
739
830
  declare function registerEncounterFieldTypes(): void;
740
831
 
741
- /** Native eSheet answer captured through inline prescription cards. */
832
+ /** Native eSheet answer captured through the shared medication list. */
742
833
  declare function EncounterMedicationField({ field, form, response, isPreview, isEnabled, isReadOnly, onResponse, }: FieldComponentProps): React.JSX.Element;
743
834
 
744
- /** Native eSheet answer captured through inline allergy cards with NKA. */
835
+ /** Native eSheet answer captured through the shared allergy list with NKA. */
745
836
  declare function EncounterAllergyField({ field, form, response, isPreview, isEnabled, isReadOnly, onResponse, }: FieldComponentProps): React.JSX.Element;
746
837
 
747
838
  /** Native eSheet adapter for the shared coded longitudinal ProblemList. */
@@ -750,6 +841,99 @@ declare function EncounterConditionsField({ field, form, response, isPreview, is
750
841
  /** Native eSheet coded care orders, using the shared Assessment plan editor. */
751
842
  declare function EncounterPlanField({ field, form, response, isPreview, isEnabled, isReadOnly, onResponse, }: FieldComponentProps): React.JSX.Element;
752
843
 
844
+ /** A person or system the document references, e.g. a patient and a provider. */
845
+ interface RichTextEsheetParty {
846
+ /** Displayed role, e.g. "Patient", "Provider", "Reporter". */
847
+ role: string;
848
+ name: string;
849
+ /** Identifying line shown beside the name, e.g. a DOB, NPI or email. */
850
+ detail?: string;
851
+ }
852
+ interface RichTextEsheetSection {
853
+ id: string;
854
+ title: string;
855
+ /** Guidance shown above the section's field. */
856
+ description?: string;
857
+ /** Memory-aid phrases docked as macros, each with a derived dot-phrase. */
858
+ findings?: NarrativeFinding[];
859
+ /** Require content in this section before submitting. */
860
+ required?: boolean;
861
+ /**
862
+ * Registered custom eSheet field type for non-narrative sections. Defaults
863
+ * to the built-in guided narrative; any other value must be registered with
864
+ * `registerCustomFieldTypes` before the component mounts.
865
+ */
866
+ fieldType?: string;
867
+ }
868
+ /** Document sections and their memory aids; contains no identity data. */
869
+ interface RichTextEsheetDefinition {
870
+ id: string;
871
+ title: string;
872
+ sections: RichTextEsheetSection[];
873
+ }
874
+ /** Native eSheet answers, keyed by generated field id. */
875
+ type RichTextEsheetResponses = Record<string, FieldResponse>;
876
+ interface RichTextEsheetIssue {
877
+ sectionId: string;
878
+ message: string;
879
+ }
880
+ interface RichTextEsheetSnapshot {
881
+ definition: RichTextEsheetDefinition;
882
+ /** Native eSheet responses — the canonical draft state. */
883
+ responses: RichTextEsheetResponses;
884
+ /** Ids of sections with recorded content. */
885
+ documentedSections: string[];
886
+ /** Required sections still missing content. */
887
+ errors: RichTextEsheetIssue[];
888
+ /** Portable document: YAML front matter + Markdown body. */
889
+ mdy: string;
890
+ }
891
+ /** Encode the identifier separately so punctuation cannot collide with delimiters. */
892
+ declare function getRichTextEsheetFieldId(sectionId: string): string;
893
+ declare function getRichTextEsheetSectionFieldId(sectionId: string): string;
894
+ /** Reject ambiguous identifiers and invalid configuration before constructing an eSheet. */
895
+ declare function validateRichTextEsheetDefinition(definition: RichTextEsheetDefinition): void;
896
+ /** Each party becomes an insertable macro so authors can drop names into the text. */
897
+ declare function partyFindings(parties: RichTextEsheetParty[] | undefined): NarrativeFinding[];
898
+ /** All sections remain native eSheet sections with native FieldResponse values. */
899
+ declare function createRichTextEsheetFormDefinition(definition: RichTextEsheetDefinition, parties?: RichTextEsheetParty[]): FormDefinition;
900
+ /** Derive the full document state — progress, validation and portable MDY — from native responses. */
901
+ declare function createRichTextEsheetSnapshot(definition: RichTextEsheetDefinition, responses: RichTextEsheetResponses, parties?: RichTextEsheetParty[]): RichTextEsheetSnapshot;
902
+
903
+ interface RichTextEsheetProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onSubmit' | 'title'> {
904
+ /** Document sections and their memory aids. */
905
+ definition: RichTextEsheetDefinition;
906
+ /**
907
+ * People or systems the document references — for example a patient and a
908
+ * provider on a letter, or a reporter and a system on a support ticket.
909
+ * Shown in the header, docked as insertable macros beside every narrative
910
+ * section, and retained in the exported document's front matter.
911
+ */
912
+ parties?: RichTextEsheetParty[];
913
+ /** Translate built-in labels and messages. */
914
+ messages?: ComponentMessages;
915
+ /** Loaded once per definition.id. Change the id to open another document. */
916
+ initialResponses?: RichTextEsheetResponses;
917
+ /** Every edit returns the same native eSheet responses. */
918
+ onChange?: (document: RichTextEsheetSnapshot) => void;
919
+ /** Host-owned persistence. Reject to keep the draft and show the failure. */
920
+ onSubmit?: (document: RichTextEsheetSnapshot) => void | Promise<void>;
921
+ readOnly?: boolean;
922
+ }
923
+ interface RichTextEsheetHandle {
924
+ getSnapshot: () => RichTextEsheetSnapshot;
925
+ focusSection: (sectionId: string) => void;
926
+ }
927
+ /**
928
+ * A guided rich text document backed by a native eSheet: letters, support
929
+ * tickets, any templated prose where an eSheet acts as the memory aid. Each
930
+ * section is a narrative field with docked finding macros; parties (patient,
931
+ * provider, reporter…) become insertable macros. For clinical visit
932
+ * documentation use EncounterVisit, which layers coded clinical sections on
933
+ * the same foundations.
934
+ */
935
+ declare const RichTextEsheet: React.ForwardRefExoticComponent<RichTextEsheetProps & React.RefAttributes<RichTextEsheetHandle>>;
936
+
753
937
  /** Reconciliation status of a medication. */
754
938
  type MedicationStatus = 'unreconciled' | 'taking' | 'taking-noncompliant' | 'not-taking' | 'unknown';
755
939
  /** Coding-system reference for a medication (RxNorm / FDB / NDC …). */
@@ -1010,6 +1194,29 @@ declare function registerAllergyListFieldType(options?: {
1010
1194
  codeLookup?: CodeLookupConfig | false;
1011
1195
  }): void;
1012
1196
 
1197
+ type EsheetSectionFieldProps = FieldComponentProps & {
1198
+ nestedChildren?: React.ReactNode;
1199
+ };
1200
+ /**
1201
+ * Guided documents (RichTextEsheet, EncounterVisit) opt into the lightweight
1202
+ * section chrome by providing `true`; everywhere else the stock eSheet
1203
+ * SectionField renders unchanged.
1204
+ */
1205
+ declare const EsheetSectionContext: React.Context<boolean>;
1206
+ /**
1207
+ * Section renderer registered for guided documents: inside the document
1208
+ * composition, preview-mode sections render as a plain labelled group
1209
+ * (heading + always-visible children); builder mode and other hosts
1210
+ * delegate to the stock SectionField.
1211
+ */
1212
+ declare function EsheetSectionField(props: EsheetSectionFieldProps): react_jsx_runtime.JSX.Element;
1213
+ /**
1214
+ * Take over the built-in section renderer (the component itself delegates to
1215
+ * the stock SectionField outside EsheetSectionContext). Hosts that registered
1216
+ * their own section component keep it.
1217
+ */
1218
+ declare function registerEsheetSectionFieldType(): void;
1219
+
1013
1220
  /**
1014
1221
  * registerMieEsheetFields — one-call registration for every @mieweb/ui custom
1015
1222
  * eSheet field type (medication reconciliation + allergy list).
@@ -1046,4 +1253,4 @@ interface RegisterMieEsheetFieldsOptions {
1046
1253
  */
1047
1254
  declare function registerMieEsheetFields(options?: RegisterMieEsheetFieldsOptions): void;
1048
1255
 
1049
- export { AllergyListField, type AllergyListFieldValue, DEFAULT_ENCOUNTER_VISIT_DEFINITION, ENCOUNTER_DOCUMENT_FIELD_ID, ENCOUNTER_VISIT_SYSTEM_PROMPT, ENCOUNTER_VISIT_TOOL_DEFINITIONS, EXAMPLE_ENCOUNTER_VISIT_RESPONSES, EncounterAllergyField, EncounterAssessmentField, type EncounterAssessmentValue, type EncounterCode, EncounterConditionsField, type EncounterConditionsValue, type EncounterMdyDiagnostic, type EncounterMdyField, EncounterMedicationField, type MessageTranslator as EncounterMessageTranslator, type MessageValues as EncounterMessageValues, EncounterNarrativeField, type EncounterNarrativeFinding, type EncounterObservation, type EncounterObservationComponent, type EncounterObservationDefinition, EncounterPlanField, type EncounterPlanValue, type EncounterResponses, type EncounterSectionDefinition, type EncounterSectionKind, type EncounterValidationIssue, EncounterVisit, type EncounterVisitDefinition, type EncounterVisitHandle, type EncounterVisitMcpResult, type EncounterVisitMcpToolDefinition, type ComponentMessages as EncounterVisitMessages, type EncounterVisitMode, type EncounterVisitProps, type EncounterVisitSnapshot, type EncounterVisitToolErrorCode, type EncounterVisitToolOptions, type EncounterVisitToolResult, type EncounterVisitTools, type EncounterVitalInputDraft, type EncounterVitalNumericKey, type EncounterVitalReading, EncounterVitalsField, type EncounterVitalsValue, MedicationListField, type MedicationListFieldValue, type ParsedEncounterMdy, type RegisterMieEsheetFieldsOptions, createEncounterFormDefinition, createEncounterMdy, createEncounterSnapshot, createEncounterVisitTools, encounterDocumentResponse, executeEncounterVisitToolCall, getEncounterConcerns, getEncounterDocumentBody, getEncounterFieldId, getEncounterMdyFields, getEncounterSectionFieldId, getEncounterSectionFieldIds, parseEncounterAssessment, parseEncounterConditions, parseEncounterMdy, parseEncounterPlan, parseEncounterVitals, refreshEncounterMdyLinks, registerAllergyListFieldType, registerEncounterFieldTypes, registerMedicationListFieldType, registerMieEsheetFields, renderEncounterMdy, updateEncounterDocumentBody, validAssessmentItem, validateEncounterAllergyValue, validateEncounterAssessment, validateEncounterConditions, validateEncounterDefinition, validateEncounterMedicationValue, validateEncounterPlan, validateEncounterResponses, validateEncounterVitals };
1256
+ export { AllergyListField, type AllergyListFieldValue, DEFAULT_ENCOUNTER_VISIT_DEFINITION, ENCOUNTER_DOCUMENT_FIELD_ID, ENCOUNTER_VISIT_SYSTEM_PROMPT, ENCOUNTER_VISIT_TOOL_DEFINITIONS, EXAMPLE_ENCOUNTER_VISIT_RESPONSES, EncounterAllergyField, EncounterAssessmentField, type EncounterAssessmentValue, type EncounterCode, EncounterConditionsField, type EncounterConditionsValue, type EncounterMdyDiagnostic, type EncounterMdyField, EncounterMedicationField, type MessageTranslator as EncounterMessageTranslator, type MessageValues as EncounterMessageValues, EncounterNarrativeField, type EncounterNarrativeFinding, type EncounterObservation, type EncounterObservationComponent, type EncounterObservationDefinition, EncounterPlanField, type EncounterPlanValue, type EncounterResponses, type EncounterSectionDefinition, type EncounterSectionKind, type EncounterValidationIssue, EncounterVisit, type EncounterVisitDefinition, type EncounterVisitHandle, type EncounterVisitMcpResult, type EncounterVisitMcpToolDefinition, type ComponentMessages as EncounterVisitMessages, type EncounterVisitMode, type EncounterVisitProps, type EncounterVisitSnapshot, type EncounterVisitToolErrorCode, type EncounterVisitToolOptions, type EncounterVisitToolResult, type EncounterVisitTools, type EncounterVitalInputDraft, type EncounterVitalNumericKey, type EncounterVitalReading, EncounterVitalsField, type EncounterVitalsValue, EsheetNarrativeField, type EsheetNarrativeFieldProps, EsheetSectionContext, EsheetSectionField, MedicationListField, type MedicationListFieldValue, NARRATIVE_ATTRIBUTES, type NarrativeAttributeNames, type NarrativeCode, type NarrativeFinding, type ParsedEncounterMdy, type RegisterMieEsheetFieldsOptions, RichTextEsheet, type RichTextEsheetDefinition, type RichTextEsheetHandle, type RichTextEsheetIssue, type RichTextEsheetParty, type RichTextEsheetProps, type RichTextEsheetResponses, type RichTextEsheetSection, type RichTextEsheetSnapshot, applyNarrativeFinding, createEncounterFormDefinition, createEncounterMdy, createEncounterSnapshot, createEncounterVisitTools, createRichTextEsheetFormDefinition, createRichTextEsheetSnapshot, encounterDocumentResponse, executeEncounterVisitToolCall, getEncounterConcerns, getEncounterDocumentBody, getEncounterFieldId, getEncounterMdyFields, getEncounterSectionFieldId, getEncounterSectionFieldIds, getNarrativeFindings, getRichTextEsheetFieldId, getRichTextEsheetSectionFieldId, hasNarrativeFindingText, narrativeText, parseEncounterAssessment, parseEncounterConditions, parseEncounterMdy, parseEncounterPlan, parseEncounterVitals, partyFindings, refreshEncounterMdyLinks, registerAllergyListFieldType, registerEncounterFieldTypes, registerEsheetNarrativeFieldType, registerEsheetSectionFieldType, registerMedicationListFieldType, registerMieEsheetFields, renderEncounterMdy, sanitizeNarrativeHtml, updateEncounterDocumentBody, validAssessmentItem, validNarrativeFindings, validateEncounterAllergyValue, validateEncounterAssessment, validateEncounterConditions, validateEncounterDefinition, validateEncounterMedicationValue, validateEncounterPlan, validateEncounterResponses, validateEncounterVitals, validateRichTextEsheetDefinition };
package/dist/esheet.d.ts CHANGED
@@ -3,6 +3,7 @@ export { FormDefinition } from '@esheet/core';
3
3
  import * as React from 'react';
4
4
  export { EsheetBuilder, EsheetBuilderProps } from '@esheet/builder';
5
5
  export { EsheetRenderer, EsheetRendererHandle, EsheetRendererProps } from '@esheet/renderer';
6
+ import * as react_jsx_runtime from 'react/jsx-runtime';
6
7
 
7
8
  interface CodifyResult {
8
9
  fullid: string;
@@ -732,16 +733,106 @@ declare function EncounterVitalsField({ field, response, isPreview, isEnabled, i
732
733
  /** Native eSheet adapter for the shared Assessment and plan editor. */
733
734
  declare function EncounterAssessmentField({ field, form, response, isPreview, isEnabled, isReadOnly, onResponse, }: FieldComponentProps): React.JSX.Element;
734
735
 
736
+ /** Standard coding reference attached to a finding (SNOMED, ICD, …). */
737
+ interface NarrativeCode {
738
+ system: string;
739
+ code: string;
740
+ display?: string;
741
+ }
742
+ /** Explicit quick selections; free prose never becomes a coded finding automatically. */
743
+ interface NarrativeFinding {
744
+ id: string;
745
+ label: string;
746
+ text: string;
747
+ code?: NarrativeCode;
748
+ }
749
+ /**
750
+ * Response attribute names a narrative field publishes under. Hosts with a
751
+ * published attribute contract (e.g. EncounterVisit's `encounterNarrative*`)
752
+ * supply their own namespace; everyone else uses {@link NARRATIVE_ATTRIBUTES}.
753
+ */
754
+ interface NarrativeAttributeNames {
755
+ /** Sanitized rich HTML mirroring the plain answer. */
756
+ html: string;
757
+ /** Plain text derived from the HTML; must equal the answer to be trusted. */
758
+ text: string;
759
+ /** JSON provenance of explicitly picked findings. */
760
+ findings: string;
761
+ /** Answer snapshot the findings provenance was recorded against. */
762
+ findingsText: string;
763
+ }
764
+ /** Default attribute namespace for the generic narrative field. */
765
+ declare const NARRATIVE_ATTRIBUTES: NarrativeAttributeNames;
766
+ /** Whitelist configured or persisted selection provenance, never arbitrary attributes. */
767
+ declare function validNarrativeFindings(value: unknown): NarrativeFinding[];
768
+ /** Match complete inserted lines, never a phrase inside unrelated free prose. */
769
+ declare function hasNarrativeFindingText(answer: string, text: string): boolean;
770
+ /** Codes represent explicit picks and are invalidated by external plain-answer edits. */
771
+ declare function getNarrativeFindings(response?: FieldResponse, attributes?: NarrativeAttributeNames): NarrativeFinding[];
772
+ /**
773
+ * The plain-response equivalent of an explicit quick-pick action, also used by
774
+ * MCP. Valid existing rich formatting is retained without needing a DOM.
775
+ */
776
+ declare function applyNarrativeFinding(response: FieldResponse | undefined, finding: NarrativeFinding, attributes?: NarrativeAttributeNames): FieldResponse;
777
+
778
+ /**
779
+ * EsheetNarrativeField — generic esheet-guided narrative field.
780
+ *
781
+ * A report-like rich text surface backed by eSheet text: the field rests as a
782
+ * plain one-line input, expands while the author writes, docks the section's
783
+ * common findings as a macro group (each with a derived dot-phrase), and
784
+ * records explicit finding picks as provenance on the response.
785
+ *
786
+ * The response attribute namespace, findings source, and styling slot are
787
+ * parameterized so hosts with a published contract (EncounterNarrativeField's
788
+ * `encounterNarrative*`) configure it without forking the behavior.
789
+ *
790
+ * Exposed via the `@mieweb/ui/esheet` entry point (NOT the main bundle) so
791
+ * that @esheet/* stays an optional dependency.
792
+ */
793
+
794
+ /**
795
+ * Keep document formatting small: no links, media, styles, or imported
796
+ * document chrome. Every block format the editor's block menu and markdown
797
+ * shortcuts offer (headings 1–3, quote, lists) is allowed, so published
798
+ * formatting survives reopening the field.
799
+ */
800
+ declare function sanitizeNarrativeHtml(html: string): string;
801
+ /** Extract readable narrative text without flattening paragraphs or list items together. */
802
+ declare function narrativeText(html: string): string;
803
+ interface EsheetNarrativeFieldProps extends FieldComponentProps {
804
+ /** Response attribute namespace; defaults to {@link NARRATIVE_ATTRIBUTES}. */
805
+ attributes?: NarrativeAttributeNames;
806
+ /** `definition._sourceData` key holding the section's common findings. */
807
+ findingsKey?: string;
808
+ /** `definition._sourceData` key that hides the visible field label. */
809
+ hideLabelKey?: string;
810
+ /** `data-slot` value for host CSS hooks. */
811
+ slot?: string;
812
+ }
735
813
  /** A report-like narrative surface that grows with its content, backed by eSheet text. */
736
- declare function EncounterNarrativeField({ field, response, isPreview, isEnabled, isReadOnly, isRequired, isSoftRequired, onResponse, }: FieldComponentProps): React.JSX.Element;
814
+ declare function EsheetNarrativeField({ field, response, isPreview, isEnabled, isReadOnly, isRequired, isSoftRequired, onResponse, attributes, findingsKey, hideLabelKey, slot, }: EsheetNarrativeFieldProps): React.JSX.Element;
815
+ /**
816
+ * Register the `esheetNarrative` field type with eSheet.
817
+ * Call once before rendering EsheetBuilder or EsheetRenderer. Hosts that
818
+ * already registered their own `esheetNarrative` component keep it.
819
+ */
820
+ declare function registerEsheetNarrativeFieldType(): void;
821
+
822
+ /**
823
+ * The generic EsheetNarrativeField configured for encounter visits: the
824
+ * published `encounterNarrative*` response attributes, findings sourced from
825
+ * the section definition's `encounterFindings`, and the encounter CSS slot.
826
+ */
827
+ declare function EncounterNarrativeField(props: FieldComponentProps): React.JSX.Element;
737
828
 
738
829
  /** Register encounter fields when missing, retaining any host-supplied editors. */
739
830
  declare function registerEncounterFieldTypes(): void;
740
831
 
741
- /** Native eSheet answer captured through inline prescription cards. */
832
+ /** Native eSheet answer captured through the shared medication list. */
742
833
  declare function EncounterMedicationField({ field, form, response, isPreview, isEnabled, isReadOnly, onResponse, }: FieldComponentProps): React.JSX.Element;
743
834
 
744
- /** Native eSheet answer captured through inline allergy cards with NKA. */
835
+ /** Native eSheet answer captured through the shared allergy list with NKA. */
745
836
  declare function EncounterAllergyField({ field, form, response, isPreview, isEnabled, isReadOnly, onResponse, }: FieldComponentProps): React.JSX.Element;
746
837
 
747
838
  /** Native eSheet adapter for the shared coded longitudinal ProblemList. */
@@ -750,6 +841,99 @@ declare function EncounterConditionsField({ field, form, response, isPreview, is
750
841
  /** Native eSheet coded care orders, using the shared Assessment plan editor. */
751
842
  declare function EncounterPlanField({ field, form, response, isPreview, isEnabled, isReadOnly, onResponse, }: FieldComponentProps): React.JSX.Element;
752
843
 
844
+ /** A person or system the document references, e.g. a patient and a provider. */
845
+ interface RichTextEsheetParty {
846
+ /** Displayed role, e.g. "Patient", "Provider", "Reporter". */
847
+ role: string;
848
+ name: string;
849
+ /** Identifying line shown beside the name, e.g. a DOB, NPI or email. */
850
+ detail?: string;
851
+ }
852
+ interface RichTextEsheetSection {
853
+ id: string;
854
+ title: string;
855
+ /** Guidance shown above the section's field. */
856
+ description?: string;
857
+ /** Memory-aid phrases docked as macros, each with a derived dot-phrase. */
858
+ findings?: NarrativeFinding[];
859
+ /** Require content in this section before submitting. */
860
+ required?: boolean;
861
+ /**
862
+ * Registered custom eSheet field type for non-narrative sections. Defaults
863
+ * to the built-in guided narrative; any other value must be registered with
864
+ * `registerCustomFieldTypes` before the component mounts.
865
+ */
866
+ fieldType?: string;
867
+ }
868
+ /** Document sections and their memory aids; contains no identity data. */
869
+ interface RichTextEsheetDefinition {
870
+ id: string;
871
+ title: string;
872
+ sections: RichTextEsheetSection[];
873
+ }
874
+ /** Native eSheet answers, keyed by generated field id. */
875
+ type RichTextEsheetResponses = Record<string, FieldResponse>;
876
+ interface RichTextEsheetIssue {
877
+ sectionId: string;
878
+ message: string;
879
+ }
880
+ interface RichTextEsheetSnapshot {
881
+ definition: RichTextEsheetDefinition;
882
+ /** Native eSheet responses — the canonical draft state. */
883
+ responses: RichTextEsheetResponses;
884
+ /** Ids of sections with recorded content. */
885
+ documentedSections: string[];
886
+ /** Required sections still missing content. */
887
+ errors: RichTextEsheetIssue[];
888
+ /** Portable document: YAML front matter + Markdown body. */
889
+ mdy: string;
890
+ }
891
+ /** Encode the identifier separately so punctuation cannot collide with delimiters. */
892
+ declare function getRichTextEsheetFieldId(sectionId: string): string;
893
+ declare function getRichTextEsheetSectionFieldId(sectionId: string): string;
894
+ /** Reject ambiguous identifiers and invalid configuration before constructing an eSheet. */
895
+ declare function validateRichTextEsheetDefinition(definition: RichTextEsheetDefinition): void;
896
+ /** Each party becomes an insertable macro so authors can drop names into the text. */
897
+ declare function partyFindings(parties: RichTextEsheetParty[] | undefined): NarrativeFinding[];
898
+ /** All sections remain native eSheet sections with native FieldResponse values. */
899
+ declare function createRichTextEsheetFormDefinition(definition: RichTextEsheetDefinition, parties?: RichTextEsheetParty[]): FormDefinition;
900
+ /** Derive the full document state — progress, validation and portable MDY — from native responses. */
901
+ declare function createRichTextEsheetSnapshot(definition: RichTextEsheetDefinition, responses: RichTextEsheetResponses, parties?: RichTextEsheetParty[]): RichTextEsheetSnapshot;
902
+
903
+ interface RichTextEsheetProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onSubmit' | 'title'> {
904
+ /** Document sections and their memory aids. */
905
+ definition: RichTextEsheetDefinition;
906
+ /**
907
+ * People or systems the document references — for example a patient and a
908
+ * provider on a letter, or a reporter and a system on a support ticket.
909
+ * Shown in the header, docked as insertable macros beside every narrative
910
+ * section, and retained in the exported document's front matter.
911
+ */
912
+ parties?: RichTextEsheetParty[];
913
+ /** Translate built-in labels and messages. */
914
+ messages?: ComponentMessages;
915
+ /** Loaded once per definition.id. Change the id to open another document. */
916
+ initialResponses?: RichTextEsheetResponses;
917
+ /** Every edit returns the same native eSheet responses. */
918
+ onChange?: (document: RichTextEsheetSnapshot) => void;
919
+ /** Host-owned persistence. Reject to keep the draft and show the failure. */
920
+ onSubmit?: (document: RichTextEsheetSnapshot) => void | Promise<void>;
921
+ readOnly?: boolean;
922
+ }
923
+ interface RichTextEsheetHandle {
924
+ getSnapshot: () => RichTextEsheetSnapshot;
925
+ focusSection: (sectionId: string) => void;
926
+ }
927
+ /**
928
+ * A guided rich text document backed by a native eSheet: letters, support
929
+ * tickets, any templated prose where an eSheet acts as the memory aid. Each
930
+ * section is a narrative field with docked finding macros; parties (patient,
931
+ * provider, reporter…) become insertable macros. For clinical visit
932
+ * documentation use EncounterVisit, which layers coded clinical sections on
933
+ * the same foundations.
934
+ */
935
+ declare const RichTextEsheet: React.ForwardRefExoticComponent<RichTextEsheetProps & React.RefAttributes<RichTextEsheetHandle>>;
936
+
753
937
  /** Reconciliation status of a medication. */
754
938
  type MedicationStatus = 'unreconciled' | 'taking' | 'taking-noncompliant' | 'not-taking' | 'unknown';
755
939
  /** Coding-system reference for a medication (RxNorm / FDB / NDC …). */
@@ -1010,6 +1194,29 @@ declare function registerAllergyListFieldType(options?: {
1010
1194
  codeLookup?: CodeLookupConfig | false;
1011
1195
  }): void;
1012
1196
 
1197
+ type EsheetSectionFieldProps = FieldComponentProps & {
1198
+ nestedChildren?: React.ReactNode;
1199
+ };
1200
+ /**
1201
+ * Guided documents (RichTextEsheet, EncounterVisit) opt into the lightweight
1202
+ * section chrome by providing `true`; everywhere else the stock eSheet
1203
+ * SectionField renders unchanged.
1204
+ */
1205
+ declare const EsheetSectionContext: React.Context<boolean>;
1206
+ /**
1207
+ * Section renderer registered for guided documents: inside the document
1208
+ * composition, preview-mode sections render as a plain labelled group
1209
+ * (heading + always-visible children); builder mode and other hosts
1210
+ * delegate to the stock SectionField.
1211
+ */
1212
+ declare function EsheetSectionField(props: EsheetSectionFieldProps): react_jsx_runtime.JSX.Element;
1213
+ /**
1214
+ * Take over the built-in section renderer (the component itself delegates to
1215
+ * the stock SectionField outside EsheetSectionContext). Hosts that registered
1216
+ * their own section component keep it.
1217
+ */
1218
+ declare function registerEsheetSectionFieldType(): void;
1219
+
1013
1220
  /**
1014
1221
  * registerMieEsheetFields — one-call registration for every @mieweb/ui custom
1015
1222
  * eSheet field type (medication reconciliation + allergy list).
@@ -1046,4 +1253,4 @@ interface RegisterMieEsheetFieldsOptions {
1046
1253
  */
1047
1254
  declare function registerMieEsheetFields(options?: RegisterMieEsheetFieldsOptions): void;
1048
1255
 
1049
- export { AllergyListField, type AllergyListFieldValue, DEFAULT_ENCOUNTER_VISIT_DEFINITION, ENCOUNTER_DOCUMENT_FIELD_ID, ENCOUNTER_VISIT_SYSTEM_PROMPT, ENCOUNTER_VISIT_TOOL_DEFINITIONS, EXAMPLE_ENCOUNTER_VISIT_RESPONSES, EncounterAllergyField, EncounterAssessmentField, type EncounterAssessmentValue, type EncounterCode, EncounterConditionsField, type EncounterConditionsValue, type EncounterMdyDiagnostic, type EncounterMdyField, EncounterMedicationField, type MessageTranslator as EncounterMessageTranslator, type MessageValues as EncounterMessageValues, EncounterNarrativeField, type EncounterNarrativeFinding, type EncounterObservation, type EncounterObservationComponent, type EncounterObservationDefinition, EncounterPlanField, type EncounterPlanValue, type EncounterResponses, type EncounterSectionDefinition, type EncounterSectionKind, type EncounterValidationIssue, EncounterVisit, type EncounterVisitDefinition, type EncounterVisitHandle, type EncounterVisitMcpResult, type EncounterVisitMcpToolDefinition, type ComponentMessages as EncounterVisitMessages, type EncounterVisitMode, type EncounterVisitProps, type EncounterVisitSnapshot, type EncounterVisitToolErrorCode, type EncounterVisitToolOptions, type EncounterVisitToolResult, type EncounterVisitTools, type EncounterVitalInputDraft, type EncounterVitalNumericKey, type EncounterVitalReading, EncounterVitalsField, type EncounterVitalsValue, MedicationListField, type MedicationListFieldValue, type ParsedEncounterMdy, type RegisterMieEsheetFieldsOptions, createEncounterFormDefinition, createEncounterMdy, createEncounterSnapshot, createEncounterVisitTools, encounterDocumentResponse, executeEncounterVisitToolCall, getEncounterConcerns, getEncounterDocumentBody, getEncounterFieldId, getEncounterMdyFields, getEncounterSectionFieldId, getEncounterSectionFieldIds, parseEncounterAssessment, parseEncounterConditions, parseEncounterMdy, parseEncounterPlan, parseEncounterVitals, refreshEncounterMdyLinks, registerAllergyListFieldType, registerEncounterFieldTypes, registerMedicationListFieldType, registerMieEsheetFields, renderEncounterMdy, updateEncounterDocumentBody, validAssessmentItem, validateEncounterAllergyValue, validateEncounterAssessment, validateEncounterConditions, validateEncounterDefinition, validateEncounterMedicationValue, validateEncounterPlan, validateEncounterResponses, validateEncounterVitals };
1256
+ export { AllergyListField, type AllergyListFieldValue, DEFAULT_ENCOUNTER_VISIT_DEFINITION, ENCOUNTER_DOCUMENT_FIELD_ID, ENCOUNTER_VISIT_SYSTEM_PROMPT, ENCOUNTER_VISIT_TOOL_DEFINITIONS, EXAMPLE_ENCOUNTER_VISIT_RESPONSES, EncounterAllergyField, EncounterAssessmentField, type EncounterAssessmentValue, type EncounterCode, EncounterConditionsField, type EncounterConditionsValue, type EncounterMdyDiagnostic, type EncounterMdyField, EncounterMedicationField, type MessageTranslator as EncounterMessageTranslator, type MessageValues as EncounterMessageValues, EncounterNarrativeField, type EncounterNarrativeFinding, type EncounterObservation, type EncounterObservationComponent, type EncounterObservationDefinition, EncounterPlanField, type EncounterPlanValue, type EncounterResponses, type EncounterSectionDefinition, type EncounterSectionKind, type EncounterValidationIssue, EncounterVisit, type EncounterVisitDefinition, type EncounterVisitHandle, type EncounterVisitMcpResult, type EncounterVisitMcpToolDefinition, type ComponentMessages as EncounterVisitMessages, type EncounterVisitMode, type EncounterVisitProps, type EncounterVisitSnapshot, type EncounterVisitToolErrorCode, type EncounterVisitToolOptions, type EncounterVisitToolResult, type EncounterVisitTools, type EncounterVitalInputDraft, type EncounterVitalNumericKey, type EncounterVitalReading, EncounterVitalsField, type EncounterVitalsValue, EsheetNarrativeField, type EsheetNarrativeFieldProps, EsheetSectionContext, EsheetSectionField, MedicationListField, type MedicationListFieldValue, NARRATIVE_ATTRIBUTES, type NarrativeAttributeNames, type NarrativeCode, type NarrativeFinding, type ParsedEncounterMdy, type RegisterMieEsheetFieldsOptions, RichTextEsheet, type RichTextEsheetDefinition, type RichTextEsheetHandle, type RichTextEsheetIssue, type RichTextEsheetParty, type RichTextEsheetProps, type RichTextEsheetResponses, type RichTextEsheetSection, type RichTextEsheetSnapshot, applyNarrativeFinding, createEncounterFormDefinition, createEncounterMdy, createEncounterSnapshot, createEncounterVisitTools, createRichTextEsheetFormDefinition, createRichTextEsheetSnapshot, encounterDocumentResponse, executeEncounterVisitToolCall, getEncounterConcerns, getEncounterDocumentBody, getEncounterFieldId, getEncounterMdyFields, getEncounterSectionFieldId, getEncounterSectionFieldIds, getNarrativeFindings, getRichTextEsheetFieldId, getRichTextEsheetSectionFieldId, hasNarrativeFindingText, narrativeText, parseEncounterAssessment, parseEncounterConditions, parseEncounterMdy, parseEncounterPlan, parseEncounterVitals, partyFindings, refreshEncounterMdyLinks, registerAllergyListFieldType, registerEncounterFieldTypes, registerEsheetNarrativeFieldType, registerEsheetSectionFieldType, registerMedicationListFieldType, registerMieEsheetFields, renderEncounterMdy, sanitizeNarrativeHtml, updateEncounterDocumentBody, validAssessmentItem, validNarrativeFindings, validateEncounterAllergyValue, validateEncounterAssessment, validateEncounterConditions, validateEncounterDefinition, validateEncounterMedicationValue, validateEncounterPlan, validateEncounterResponses, validateEncounterVitals, validateRichTextEsheetDefinition };