formanitor 0.0.38 → 0.0.40

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.d.cts CHANGED
@@ -84,6 +84,16 @@ interface RichTextFieldDef extends BaseFieldDef {
84
84
  interface NumberFieldDef extends BaseFieldDef {
85
85
  type: 'number';
86
86
  }
87
+ /** Single-thumb numeric slider (e.g. VAS 0–10). Value is a number. */
88
+ interface SliderFieldDef extends BaseFieldDef {
89
+ type: 'slider';
90
+ /** Inclusive minimum. Default 0. */
91
+ min?: number;
92
+ /** Inclusive maximum. Default 10. */
93
+ max?: number;
94
+ /** Default 1. */
95
+ step?: number;
96
+ }
87
97
  /** Option for select/radio/checkbox. When score is set, sum computation uses it for aggregation. */
88
98
  interface SelectOption {
89
99
  label: string;
@@ -288,6 +298,12 @@ interface SuggestionTextareaFieldDef extends BaseFieldDef {
288
298
  * as an array of selected chip values derived from the comma-separated textarea string.
289
299
  */
290
300
  parallelChipFieldId?: string;
301
+ /**
302
+ * Optional sibling field ids rendered **inside** the suggestion shell (between chips and the
303
+ * free-text area). Typically `text` / `select` fields (e.g. duration, onset). Those fields
304
+ * should use **`hidden: true`** and be **omitted from `layout`** so they are not shown twice.
305
+ */
306
+ embeddedFieldIds?: string[];
291
307
  } & Record<string, unknown>;
292
308
  }
293
309
  /** LOCS III component grades for one eye (integer scales per LOCS III). */
@@ -379,6 +395,26 @@ interface SurgicalRiskFlagsFieldDef extends BaseFieldDef {
379
395
  cardTitle?: string;
380
396
  } & Record<string, unknown>;
381
397
  }
398
+ /** General surgery OPD: structured smart history (SOCRATES, swelling, GI, breast, anorectal, thyroid + systemic). */
399
+ interface GeneralSurgerySmartHistoryFieldDef extends BaseFieldDef {
400
+ type: 'general_surgery_smart_history';
401
+ }
402
+ /** General surgery OPD: general signs, regional selection, structured abdomen + regional exam cards + notes. */
403
+ interface GeneralSurgeryExaminationFieldDef extends BaseFieldDef {
404
+ type: 'general_surgery_examination';
405
+ }
406
+ /** General surgery OPD: condition-wise grading (Clearsight triggers; no surgery column). */
407
+ interface GeneralSurgeryGradingFieldDef extends BaseFieldDef {
408
+ type: 'general_surgery_grading';
409
+ }
410
+ /** Pain scale (slider) + checkbox flags in one highlight-label shell; reusable across specialties. */
411
+ interface PainScaleFlagsFieldDef extends BaseFieldDef {
412
+ type: 'pain_scale_flags';
413
+ min?: number;
414
+ max?: number;
415
+ step?: number;
416
+ options?: SelectOption[];
417
+ }
382
418
  interface MedicationFrequentItem {
383
419
  id: string;
384
420
  name: string;
@@ -437,7 +473,7 @@ interface DiagnosticPackage {
437
473
  department?: string;
438
474
  tests: DiagnosticPackageTest[];
439
475
  }
440
- type FieldDef = TextFieldDef | RichTextFieldDef | NumberFieldDef | SelectFieldDef | RadioFieldDef | CheckboxFieldDef | RepeatableFieldDef | ImageUploadFieldDef | MediaUploadFieldDef | SignatureFieldDef | EditableTableFieldDef | StaticTextFieldDef | MedicationsFieldDef | InvestigationsFieldDef | ProceduresFieldDef | DifferentialDiagnosisFieldDef | VitalsFieldDef | ReferralFieldDef | FollowupFieldDef | SmartTextareaFieldDef | DiagnosisTextareaFieldDef | SuggestionTextareaFieldDef | LensAssessmentFieldDef | FunctionalImpairmentScoreFieldDef | ToggleFieldDef | BiometryIolWorkupFieldDef | SurgicalRiskFlagsFieldDef | BaseFieldDef;
476
+ type FieldDef = TextFieldDef | RichTextFieldDef | NumberFieldDef | SliderFieldDef | SelectFieldDef | RadioFieldDef | CheckboxFieldDef | RepeatableFieldDef | ImageUploadFieldDef | MediaUploadFieldDef | SignatureFieldDef | EditableTableFieldDef | StaticTextFieldDef | MedicationsFieldDef | InvestigationsFieldDef | ProceduresFieldDef | DifferentialDiagnosisFieldDef | VitalsFieldDef | ReferralFieldDef | FollowupFieldDef | SmartTextareaFieldDef | DiagnosisTextareaFieldDef | SuggestionTextareaFieldDef | LensAssessmentFieldDef | FunctionalImpairmentScoreFieldDef | ToggleFieldDef | BiometryIolWorkupFieldDef | SurgicalRiskFlagsFieldDef | GeneralSurgerySmartHistoryFieldDef | GeneralSurgeryExaminationFieldDef | GeneralSurgeryGradingFieldDef | PainScaleFlagsFieldDef | BaseFieldDef;
441
477
  /** Boolean switch; value is `true` | `false`. */
442
478
  interface ToggleFieldDef extends BaseFieldDef {
443
479
  type: 'toggle';
@@ -1085,4 +1121,4 @@ declare const SmartTextareaWidget: React.FC<{
1085
1121
  fieldId: string;
1086
1122
  }>;
1087
1123
 
1088
- export { type AIDifferentialDiagnosisItem, AddInvestigationField, type AddInvestigationFieldProps, AddMedicationField, type AddMedicationFieldProps, type BaseFieldDef, type BiometryIolWorkupFieldDef, type BiometryIolWorkupValue, type BiometryMethod, type CheckboxFieldDef, type ColumnLayout, type Computation, type Condition, type CreateUploadHandlerOptions, type DataSource, type DiagnosisGradeSelection, type DiagnosisTextareaFieldDef, type DiagnosisTextareaValue, type DiagnosticPackage, type DiagnosticPackageTest, DifferentialDiagnosis, type DifferentialDiagnosisFieldDef, type DifferentialDiagnosisItem, type DifferentialDiagnosisProps, type DoctorFrequentItems, DynamicForm, EMAIL_REGEX, type EditableTableColumnDef, type EditableTableFieldDef, type EventDefinition, type ExtractedKeywordMatch, type FieldDef, type FieldHandler, type FieldHandlersMap, type FieldPrefill, FieldRenderer, type FieldState, type FieldType, type FollowupFieldDef, type FollowupValue, FormControls, type FormControlsProps, type FormDef, type FormErrors, FormProvider, type FormState, FormStore, type FormValues, type FormulaComputation, type FormulaExpr, type FunctionalImpairmentDimension, type FunctionalImpairmentScoreFieldDef, type FunctionalImpairmentScoreValue, type ImageUploadFieldDef, ImageUploadWidget, type Investigation, type InvestigationFrequentItem, type InvestigationSearchResult, type InvestigationsFieldDef, type LayoutNode, type LensAssessmentFieldDef, type LensAssessmentValue, type LocsGrades, MAR_MEDICATION_ORDERS_META_KEY, type MatchedCondition, type MediaUploadFieldDef, MediaUploadWidget, type Medication, type MedicationFrequentItem, type MedicationSearchResult, type MedicationsFieldDef, type NumberFieldDef, type Permission, type PresignedUploadResponse, type ProcedureFrequentItem, type ProceduresFieldDef, type RadioFieldDef, ReadOnlyForm, ReadOnlyImageUpload, ReadOnlyMediaUpload, ReadOnlySignature, ReadOnlyTable, type ReferralFieldDef, type ReferralItem, type RepeatableFieldDef, type RichTextFieldDef, RichTextWidget, type Rule, type RuleAction, type RuleResult, type ScoreComputation, type ScoreRange, type Section, type SectionChild, type SelectFieldDef, type SelectOption, type SignatureFieldDef, SignatureUploadWidget, SmartForm, type SmartFormProps, type SmartKeywordsResult, type SmartTextareaFieldDef, type SmartTextareaValue, SmartTextareaWidget, type StaticTextFieldDef, type StoreConfig, type SubmissionData, type SuggestionTextareaFieldDef, type SumComputation, type SurgicalRiskFlagsFieldDef, type SurgicalRiskFlagsValue, type TextFieldDef, type ToggleFieldDef, type ValidationRule, type VitalsFieldDef, type WebhookDef, type Workflow, type WorkflowTransition, createUploadHandler, evaluateRules, fieldMetaRequestsMarMedicationOrdersButton, useField, useFieldHandlers, useForm, useFormStore, useFrequentItems, usePackages, useSmartKeywords, validateField, validateForm };
1124
+ export { type AIDifferentialDiagnosisItem, AddInvestigationField, type AddInvestigationFieldProps, AddMedicationField, type AddMedicationFieldProps, type BaseFieldDef, type BiometryIolWorkupFieldDef, type BiometryIolWorkupValue, type BiometryMethod, type CheckboxFieldDef, type ColumnLayout, type Computation, type Condition, type CreateUploadHandlerOptions, type DataSource, type DiagnosisGradeSelection, type DiagnosisTextareaFieldDef, type DiagnosisTextareaValue, type DiagnosticPackage, type DiagnosticPackageTest, DifferentialDiagnosis, type DifferentialDiagnosisFieldDef, type DifferentialDiagnosisItem, type DifferentialDiagnosisProps, type DoctorFrequentItems, DynamicForm, EMAIL_REGEX, type EditableTableColumnDef, type EditableTableFieldDef, type EventDefinition, type ExtractedKeywordMatch, type FieldDef, type FieldHandler, type FieldHandlersMap, type FieldPrefill, FieldRenderer, type FieldState, type FieldType, type FollowupFieldDef, type FollowupValue, FormControls, type FormControlsProps, type FormDef, type FormErrors, FormProvider, type FormState, FormStore, type FormValues, type FormulaComputation, type FormulaExpr, type FunctionalImpairmentDimension, type FunctionalImpairmentScoreFieldDef, type FunctionalImpairmentScoreValue, type GeneralSurgeryExaminationFieldDef, type GeneralSurgeryGradingFieldDef, type GeneralSurgerySmartHistoryFieldDef, type ImageUploadFieldDef, ImageUploadWidget, type Investigation, type InvestigationFrequentItem, type InvestigationSearchResult, type InvestigationsFieldDef, type LayoutNode, type LensAssessmentFieldDef, type LensAssessmentValue, type LocsGrades, MAR_MEDICATION_ORDERS_META_KEY, type MatchedCondition, type MediaUploadFieldDef, MediaUploadWidget, type Medication, type MedicationFrequentItem, type MedicationSearchResult, type MedicationsFieldDef, type NumberFieldDef, type PainScaleFlagsFieldDef, type Permission, type PresignedUploadResponse, type ProcedureFrequentItem, type ProceduresFieldDef, type RadioFieldDef, ReadOnlyForm, ReadOnlyImageUpload, ReadOnlyMediaUpload, ReadOnlySignature, ReadOnlyTable, type ReferralFieldDef, type ReferralItem, type RepeatableFieldDef, type RichTextFieldDef, RichTextWidget, type Rule, type RuleAction, type RuleResult, type ScoreComputation, type ScoreRange, type Section, type SectionChild, type SelectFieldDef, type SelectOption, type SignatureFieldDef, SignatureUploadWidget, type SliderFieldDef, SmartForm, type SmartFormProps, type SmartKeywordsResult, type SmartTextareaFieldDef, type SmartTextareaValue, SmartTextareaWidget, type StaticTextFieldDef, type StoreConfig, type SubmissionData, type SuggestionTextareaFieldDef, type SumComputation, type SurgicalRiskFlagsFieldDef, type SurgicalRiskFlagsValue, type TextFieldDef, type ToggleFieldDef, type ValidationRule, type VitalsFieldDef, type WebhookDef, type Workflow, type WorkflowTransition, createUploadHandler, evaluateRules, fieldMetaRequestsMarMedicationOrdersButton, useField, useFieldHandlers, useForm, useFormStore, useFrequentItems, usePackages, useSmartKeywords, validateField, validateForm };
package/dist/index.d.ts CHANGED
@@ -84,6 +84,16 @@ interface RichTextFieldDef extends BaseFieldDef {
84
84
  interface NumberFieldDef extends BaseFieldDef {
85
85
  type: 'number';
86
86
  }
87
+ /** Single-thumb numeric slider (e.g. VAS 0–10). Value is a number. */
88
+ interface SliderFieldDef extends BaseFieldDef {
89
+ type: 'slider';
90
+ /** Inclusive minimum. Default 0. */
91
+ min?: number;
92
+ /** Inclusive maximum. Default 10. */
93
+ max?: number;
94
+ /** Default 1. */
95
+ step?: number;
96
+ }
87
97
  /** Option for select/radio/checkbox. When score is set, sum computation uses it for aggregation. */
88
98
  interface SelectOption {
89
99
  label: string;
@@ -288,6 +298,12 @@ interface SuggestionTextareaFieldDef extends BaseFieldDef {
288
298
  * as an array of selected chip values derived from the comma-separated textarea string.
289
299
  */
290
300
  parallelChipFieldId?: string;
301
+ /**
302
+ * Optional sibling field ids rendered **inside** the suggestion shell (between chips and the
303
+ * free-text area). Typically `text` / `select` fields (e.g. duration, onset). Those fields
304
+ * should use **`hidden: true`** and be **omitted from `layout`** so they are not shown twice.
305
+ */
306
+ embeddedFieldIds?: string[];
291
307
  } & Record<string, unknown>;
292
308
  }
293
309
  /** LOCS III component grades for one eye (integer scales per LOCS III). */
@@ -379,6 +395,26 @@ interface SurgicalRiskFlagsFieldDef extends BaseFieldDef {
379
395
  cardTitle?: string;
380
396
  } & Record<string, unknown>;
381
397
  }
398
+ /** General surgery OPD: structured smart history (SOCRATES, swelling, GI, breast, anorectal, thyroid + systemic). */
399
+ interface GeneralSurgerySmartHistoryFieldDef extends BaseFieldDef {
400
+ type: 'general_surgery_smart_history';
401
+ }
402
+ /** General surgery OPD: general signs, regional selection, structured abdomen + regional exam cards + notes. */
403
+ interface GeneralSurgeryExaminationFieldDef extends BaseFieldDef {
404
+ type: 'general_surgery_examination';
405
+ }
406
+ /** General surgery OPD: condition-wise grading (Clearsight triggers; no surgery column). */
407
+ interface GeneralSurgeryGradingFieldDef extends BaseFieldDef {
408
+ type: 'general_surgery_grading';
409
+ }
410
+ /** Pain scale (slider) + checkbox flags in one highlight-label shell; reusable across specialties. */
411
+ interface PainScaleFlagsFieldDef extends BaseFieldDef {
412
+ type: 'pain_scale_flags';
413
+ min?: number;
414
+ max?: number;
415
+ step?: number;
416
+ options?: SelectOption[];
417
+ }
382
418
  interface MedicationFrequentItem {
383
419
  id: string;
384
420
  name: string;
@@ -437,7 +473,7 @@ interface DiagnosticPackage {
437
473
  department?: string;
438
474
  tests: DiagnosticPackageTest[];
439
475
  }
440
- type FieldDef = TextFieldDef | RichTextFieldDef | NumberFieldDef | SelectFieldDef | RadioFieldDef | CheckboxFieldDef | RepeatableFieldDef | ImageUploadFieldDef | MediaUploadFieldDef | SignatureFieldDef | EditableTableFieldDef | StaticTextFieldDef | MedicationsFieldDef | InvestigationsFieldDef | ProceduresFieldDef | DifferentialDiagnosisFieldDef | VitalsFieldDef | ReferralFieldDef | FollowupFieldDef | SmartTextareaFieldDef | DiagnosisTextareaFieldDef | SuggestionTextareaFieldDef | LensAssessmentFieldDef | FunctionalImpairmentScoreFieldDef | ToggleFieldDef | BiometryIolWorkupFieldDef | SurgicalRiskFlagsFieldDef | BaseFieldDef;
476
+ type FieldDef = TextFieldDef | RichTextFieldDef | NumberFieldDef | SliderFieldDef | SelectFieldDef | RadioFieldDef | CheckboxFieldDef | RepeatableFieldDef | ImageUploadFieldDef | MediaUploadFieldDef | SignatureFieldDef | EditableTableFieldDef | StaticTextFieldDef | MedicationsFieldDef | InvestigationsFieldDef | ProceduresFieldDef | DifferentialDiagnosisFieldDef | VitalsFieldDef | ReferralFieldDef | FollowupFieldDef | SmartTextareaFieldDef | DiagnosisTextareaFieldDef | SuggestionTextareaFieldDef | LensAssessmentFieldDef | FunctionalImpairmentScoreFieldDef | ToggleFieldDef | BiometryIolWorkupFieldDef | SurgicalRiskFlagsFieldDef | GeneralSurgerySmartHistoryFieldDef | GeneralSurgeryExaminationFieldDef | GeneralSurgeryGradingFieldDef | PainScaleFlagsFieldDef | BaseFieldDef;
441
477
  /** Boolean switch; value is `true` | `false`. */
442
478
  interface ToggleFieldDef extends BaseFieldDef {
443
479
  type: 'toggle';
@@ -1085,4 +1121,4 @@ declare const SmartTextareaWidget: React.FC<{
1085
1121
  fieldId: string;
1086
1122
  }>;
1087
1123
 
1088
- export { type AIDifferentialDiagnosisItem, AddInvestigationField, type AddInvestigationFieldProps, AddMedicationField, type AddMedicationFieldProps, type BaseFieldDef, type BiometryIolWorkupFieldDef, type BiometryIolWorkupValue, type BiometryMethod, type CheckboxFieldDef, type ColumnLayout, type Computation, type Condition, type CreateUploadHandlerOptions, type DataSource, type DiagnosisGradeSelection, type DiagnosisTextareaFieldDef, type DiagnosisTextareaValue, type DiagnosticPackage, type DiagnosticPackageTest, DifferentialDiagnosis, type DifferentialDiagnosisFieldDef, type DifferentialDiagnosisItem, type DifferentialDiagnosisProps, type DoctorFrequentItems, DynamicForm, EMAIL_REGEX, type EditableTableColumnDef, type EditableTableFieldDef, type EventDefinition, type ExtractedKeywordMatch, type FieldDef, type FieldHandler, type FieldHandlersMap, type FieldPrefill, FieldRenderer, type FieldState, type FieldType, type FollowupFieldDef, type FollowupValue, FormControls, type FormControlsProps, type FormDef, type FormErrors, FormProvider, type FormState, FormStore, type FormValues, type FormulaComputation, type FormulaExpr, type FunctionalImpairmentDimension, type FunctionalImpairmentScoreFieldDef, type FunctionalImpairmentScoreValue, type ImageUploadFieldDef, ImageUploadWidget, type Investigation, type InvestigationFrequentItem, type InvestigationSearchResult, type InvestigationsFieldDef, type LayoutNode, type LensAssessmentFieldDef, type LensAssessmentValue, type LocsGrades, MAR_MEDICATION_ORDERS_META_KEY, type MatchedCondition, type MediaUploadFieldDef, MediaUploadWidget, type Medication, type MedicationFrequentItem, type MedicationSearchResult, type MedicationsFieldDef, type NumberFieldDef, type Permission, type PresignedUploadResponse, type ProcedureFrequentItem, type ProceduresFieldDef, type RadioFieldDef, ReadOnlyForm, ReadOnlyImageUpload, ReadOnlyMediaUpload, ReadOnlySignature, ReadOnlyTable, type ReferralFieldDef, type ReferralItem, type RepeatableFieldDef, type RichTextFieldDef, RichTextWidget, type Rule, type RuleAction, type RuleResult, type ScoreComputation, type ScoreRange, type Section, type SectionChild, type SelectFieldDef, type SelectOption, type SignatureFieldDef, SignatureUploadWidget, SmartForm, type SmartFormProps, type SmartKeywordsResult, type SmartTextareaFieldDef, type SmartTextareaValue, SmartTextareaWidget, type StaticTextFieldDef, type StoreConfig, type SubmissionData, type SuggestionTextareaFieldDef, type SumComputation, type SurgicalRiskFlagsFieldDef, type SurgicalRiskFlagsValue, type TextFieldDef, type ToggleFieldDef, type ValidationRule, type VitalsFieldDef, type WebhookDef, type Workflow, type WorkflowTransition, createUploadHandler, evaluateRules, fieldMetaRequestsMarMedicationOrdersButton, useField, useFieldHandlers, useForm, useFormStore, useFrequentItems, usePackages, useSmartKeywords, validateField, validateForm };
1124
+ export { type AIDifferentialDiagnosisItem, AddInvestigationField, type AddInvestigationFieldProps, AddMedicationField, type AddMedicationFieldProps, type BaseFieldDef, type BiometryIolWorkupFieldDef, type BiometryIolWorkupValue, type BiometryMethod, type CheckboxFieldDef, type ColumnLayout, type Computation, type Condition, type CreateUploadHandlerOptions, type DataSource, type DiagnosisGradeSelection, type DiagnosisTextareaFieldDef, type DiagnosisTextareaValue, type DiagnosticPackage, type DiagnosticPackageTest, DifferentialDiagnosis, type DifferentialDiagnosisFieldDef, type DifferentialDiagnosisItem, type DifferentialDiagnosisProps, type DoctorFrequentItems, DynamicForm, EMAIL_REGEX, type EditableTableColumnDef, type EditableTableFieldDef, type EventDefinition, type ExtractedKeywordMatch, type FieldDef, type FieldHandler, type FieldHandlersMap, type FieldPrefill, FieldRenderer, type FieldState, type FieldType, type FollowupFieldDef, type FollowupValue, FormControls, type FormControlsProps, type FormDef, type FormErrors, FormProvider, type FormState, FormStore, type FormValues, type FormulaComputation, type FormulaExpr, type FunctionalImpairmentDimension, type FunctionalImpairmentScoreFieldDef, type FunctionalImpairmentScoreValue, type GeneralSurgeryExaminationFieldDef, type GeneralSurgeryGradingFieldDef, type GeneralSurgerySmartHistoryFieldDef, type ImageUploadFieldDef, ImageUploadWidget, type Investigation, type InvestigationFrequentItem, type InvestigationSearchResult, type InvestigationsFieldDef, type LayoutNode, type LensAssessmentFieldDef, type LensAssessmentValue, type LocsGrades, MAR_MEDICATION_ORDERS_META_KEY, type MatchedCondition, type MediaUploadFieldDef, MediaUploadWidget, type Medication, type MedicationFrequentItem, type MedicationSearchResult, type MedicationsFieldDef, type NumberFieldDef, type PainScaleFlagsFieldDef, type Permission, type PresignedUploadResponse, type ProcedureFrequentItem, type ProceduresFieldDef, type RadioFieldDef, ReadOnlyForm, ReadOnlyImageUpload, ReadOnlyMediaUpload, ReadOnlySignature, ReadOnlyTable, type ReferralFieldDef, type ReferralItem, type RepeatableFieldDef, type RichTextFieldDef, RichTextWidget, type Rule, type RuleAction, type RuleResult, type ScoreComputation, type ScoreRange, type Section, type SectionChild, type SelectFieldDef, type SelectOption, type SignatureFieldDef, SignatureUploadWidget, type SliderFieldDef, SmartForm, type SmartFormProps, type SmartKeywordsResult, type SmartTextareaFieldDef, type SmartTextareaValue, SmartTextareaWidget, type StaticTextFieldDef, type StoreConfig, type SubmissionData, type SuggestionTextareaFieldDef, type SumComputation, type SurgicalRiskFlagsFieldDef, type SurgicalRiskFlagsValue, type TextFieldDef, type ToggleFieldDef, type ValidationRule, type VitalsFieldDef, type WebhookDef, type Workflow, type WorkflowTransition, createUploadHandler, evaluateRules, fieldMetaRequestsMarMedicationOrdersButton, useField, useFieldHandlers, useForm, useFormStore, useFrequentItems, usePackages, useSmartKeywords, validateField, validateForm };