formanitor 0.0.41 → 0.0.43
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.cjs +792 -871
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -40
- package/dist/index.d.ts +24 -40
- package/dist/index.mjs +793 -869
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
type FieldType = 'text' | 'number' | 'textarea' | 'diagnosis_textarea' | 'richtext' | 'select' | 'multiselect' | 'radio' | 'repeatable' | 'checkbox' | 'image_upload' | 'media_upload' | 'signature' | 'date' | 'datetime' | 'editable_table' | 'static_text' | 'medications' | 'investigations' | 'procedures' | 'vitals' | 'hidden_vitals' | 'referral' | 'followup' | 'toggle' | string;
|
|
3
|
+
type FieldType = 'text' | 'number' | 'textarea' | 'diagnosis_textarea' | 'richtext' | 'select' | 'multiselect' | 'radio' | 'repeatable' | 'checkbox' | 'image_upload' | 'media_upload' | 'signature' | 'date' | 'datetime' | 'editable_table' | 'static_text' | 'medications' | 'investigations' | 'procedures' | 'vitals' | 'hidden_vitals' | 'referral' | 'followup' | 'toggle' | 'urology_smart_history' | 'urology_examination' | 'urology_pathway' | string;
|
|
4
4
|
interface ValidationRule {
|
|
5
5
|
min?: number;
|
|
6
6
|
max?: number;
|
|
@@ -274,10 +274,10 @@ interface DiagnosisTextareaFieldDef extends BaseFieldDef {
|
|
|
274
274
|
}
|
|
275
275
|
/**
|
|
276
276
|
* Reusable **textarea** with optional **suggestion chips** (schema `options` or `dataSource`).
|
|
277
|
-
* - Value is a **single string
|
|
278
|
-
*
|
|
277
|
+
* - Value is a **single string**; chip clicks toggle option `value` tokens. With schema `options`,
|
|
278
|
+
* chip slugs are written on the **last line** (comma-separated); prose above stays on earlier lines.
|
|
279
279
|
* - Schema `rules` with `op: "contains"` on this field match **token equality** after splitting
|
|
280
|
-
* on commas (see `evaluateRules` / `suggestion_textarea` docs).
|
|
280
|
+
* on commas and newlines (see `evaluateRules` / `suggestion_textarea` docs).
|
|
281
281
|
* - Optionally set **`meta.parallelChipFieldId`** to the id of a **`multiselect`** field (often
|
|
282
282
|
* `hidden`) with the same `options`; that field’s array value is derived from chip tokens in
|
|
283
283
|
* the textarea string so APIs can read a structured list without parsing commas.
|
|
@@ -295,7 +295,7 @@ interface SuggestionTextareaFieldDef extends BaseFieldDef {
|
|
|
295
295
|
suggestionsAriaLabel?: string;
|
|
296
296
|
/**
|
|
297
297
|
* ID of a sibling **`multiselect`** field (usually `hidden: true`). Its value is kept in sync
|
|
298
|
-
* as an array of selected chip values derived from the comma-separated textarea string.
|
|
298
|
+
* as an array of selected chip values derived from the comma- and newline-separated textarea string.
|
|
299
299
|
*/
|
|
300
300
|
parallelChipFieldId?: string;
|
|
301
301
|
/**
|
|
@@ -395,6 +395,21 @@ interface SurgicalRiskFlagsFieldDef extends BaseFieldDef {
|
|
|
395
395
|
cardTitle?: string;
|
|
396
396
|
} & Record<string, unknown>;
|
|
397
397
|
}
|
|
398
|
+
/** Urology OPD: dynamic smart history (SOCRATES, IPSS, haematuria, sexual). */
|
|
399
|
+
interface UrologySmartHistoryFieldDef extends BaseFieldDef {
|
|
400
|
+
type: 'urology_smart_history';
|
|
401
|
+
}
|
|
402
|
+
/** Urology OPD: structured examination (general, abdomen, GU, DRE). */
|
|
403
|
+
interface UrologyExaminationFieldDef extends BaseFieldDef {
|
|
404
|
+
type: 'urology_examination';
|
|
405
|
+
}
|
|
406
|
+
/** Urology OPD: objective pathway metrics and risk toggles (maps to `uro_pathway`). */
|
|
407
|
+
interface UrologyPathwayFieldDef extends BaseFieldDef {
|
|
408
|
+
type: 'urology_pathway';
|
|
409
|
+
meta?: {
|
|
410
|
+
subtitle?: string;
|
|
411
|
+
} & Record<string, unknown>;
|
|
412
|
+
}
|
|
398
413
|
/** General surgery OPD: structured smart history (SOCRATES, swelling, GI, breast, anorectal, thyroid); HOPC is template field `symptoms` embedded in the widget. */
|
|
399
414
|
interface GeneralSurgerySmartHistoryFieldDef extends BaseFieldDef {
|
|
400
415
|
type: 'general_surgery_smart_history';
|
|
@@ -415,22 +430,6 @@ interface PainScaleFlagsFieldDef extends BaseFieldDef {
|
|
|
415
430
|
step?: number;
|
|
416
431
|
options?: SelectOption[];
|
|
417
432
|
}
|
|
418
|
-
/** Urology OPD: SOCRATES, IPSS/QoL, haematuria, sexual history, past notes (panel visibility from chips/syndrome). */
|
|
419
|
-
interface UrologySmartHistoryFieldDef extends BaseFieldDef {
|
|
420
|
-
type: 'urology_smart_history';
|
|
421
|
-
}
|
|
422
|
-
/** Urology OPD: general / abdomen / GU / DRE + notes. */
|
|
423
|
-
interface UrologyExaminationFieldDef extends BaseFieldDef {
|
|
424
|
-
type: 'urology_examination';
|
|
425
|
-
}
|
|
426
|
-
/**
|
|
427
|
-
* Urology OPD: stone/BPH objectives, uroflow, risk (Clearsight decision engine).
|
|
428
|
-
* **`meta.subtitle`**: Optional line rendered inside the white body below `label`
|
|
429
|
-
* (e.g. objective scoring description while `label` stays the pink-bar title).
|
|
430
|
-
*/
|
|
431
|
-
interface UrologyPathwayFieldDef extends BaseFieldDef {
|
|
432
|
-
type: 'urology_pathway';
|
|
433
|
-
}
|
|
434
433
|
interface MedicationFrequentItem {
|
|
435
434
|
id: string;
|
|
436
435
|
name: string;
|
|
@@ -489,7 +488,7 @@ interface DiagnosticPackage {
|
|
|
489
488
|
department?: string;
|
|
490
489
|
tests: DiagnosticPackageTest[];
|
|
491
490
|
}
|
|
492
|
-
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 |
|
|
491
|
+
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 | UrologySmartHistoryFieldDef | UrologyExaminationFieldDef | UrologyPathwayFieldDef | PainScaleFlagsFieldDef | BaseFieldDef;
|
|
493
492
|
/** Boolean switch; value is `true` | `false`. */
|
|
494
493
|
interface ToggleFieldDef extends BaseFieldDef {
|
|
495
494
|
type: 'toggle';
|
|
@@ -504,8 +503,8 @@ interface Condition {
|
|
|
504
503
|
/**
|
|
505
504
|
* For `op: "contains"`:
|
|
506
505
|
* - If the field value is an **array**, checks `value.includes(condition.value)` (e.g. multiselect).
|
|
507
|
-
* - If the field value is a **string** (e.g. `suggestion_textarea`), splits on commas
|
|
508
|
-
* tokens, and checks that one token equals `String(condition.value)` (chip values in text).
|
|
506
|
+
* - If the field value is a **string** (e.g. `suggestion_textarea`), splits on commas and/or line
|
|
507
|
+
* breaks, trims tokens, and checks that one token equals `String(condition.value)` (chip values in text).
|
|
509
508
|
*/
|
|
510
509
|
value: any;
|
|
511
510
|
}
|
|
@@ -633,21 +632,6 @@ interface FormState {
|
|
|
633
632
|
declare const MAR_MEDICATION_ORDERS_META_KEY: "mar_medication_orders";
|
|
634
633
|
declare function fieldMetaRequestsMarMedicationOrdersButton(meta: Record<string, unknown> | undefined): boolean;
|
|
635
634
|
|
|
636
|
-
/** Template shape used for urology detection (submitted schema / API template). */
|
|
637
|
-
type UrologyTemplateRef = Pick<FormDef, 'id' | 'meta'> & {
|
|
638
|
-
specialization?: string;
|
|
639
|
-
};
|
|
640
|
-
/** True when prescription template targets urology (Clearsight OPD parity). */
|
|
641
|
-
declare function isUrologyTemplate(template?: UrologyTemplateRef): boolean;
|
|
642
|
-
/** Urology OPD: fold pathway when template matches or serialized values contain urology fields. */
|
|
643
|
-
declare function shouldFoldUrologyClinicalPathway(template: UrologyTemplateRef, payload: Record<string, unknown>): boolean;
|
|
644
|
-
/**
|
|
645
|
-
* Moves top-level chief complaint + urology pathway fields into structured
|
|
646
|
-
* metadata.clinical_pathways.urology (parity with orthopedic_exam pathway).
|
|
647
|
-
* Called from FormStore serialization so the host dashboard can forward payloads as-is.
|
|
648
|
-
*/
|
|
649
|
-
declare function attachUrologyClinicalPathwayMetadata(payload: Record<string, unknown>, template: UrologyTemplateRef): void;
|
|
650
|
-
|
|
651
635
|
interface SavedState {
|
|
652
636
|
values: FormValues;
|
|
653
637
|
meta: {
|
|
@@ -1152,4 +1136,4 @@ declare const SmartTextareaWidget: React.FC<{
|
|
|
1152
1136
|
fieldId: string;
|
|
1153
1137
|
}>;
|
|
1154
1138
|
|
|
1155
|
-
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 UrologyExaminationFieldDef, type UrologyPathwayFieldDef, type UrologySmartHistoryFieldDef, type
|
|
1139
|
+
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 UrologyExaminationFieldDef, type UrologyPathwayFieldDef, type UrologySmartHistoryFieldDef, 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
type FieldType = 'text' | 'number' | 'textarea' | 'diagnosis_textarea' | 'richtext' | 'select' | 'multiselect' | 'radio' | 'repeatable' | 'checkbox' | 'image_upload' | 'media_upload' | 'signature' | 'date' | 'datetime' | 'editable_table' | 'static_text' | 'medications' | 'investigations' | 'procedures' | 'vitals' | 'hidden_vitals' | 'referral' | 'followup' | 'toggle' | string;
|
|
3
|
+
type FieldType = 'text' | 'number' | 'textarea' | 'diagnosis_textarea' | 'richtext' | 'select' | 'multiselect' | 'radio' | 'repeatable' | 'checkbox' | 'image_upload' | 'media_upload' | 'signature' | 'date' | 'datetime' | 'editable_table' | 'static_text' | 'medications' | 'investigations' | 'procedures' | 'vitals' | 'hidden_vitals' | 'referral' | 'followup' | 'toggle' | 'urology_smart_history' | 'urology_examination' | 'urology_pathway' | string;
|
|
4
4
|
interface ValidationRule {
|
|
5
5
|
min?: number;
|
|
6
6
|
max?: number;
|
|
@@ -274,10 +274,10 @@ interface DiagnosisTextareaFieldDef extends BaseFieldDef {
|
|
|
274
274
|
}
|
|
275
275
|
/**
|
|
276
276
|
* Reusable **textarea** with optional **suggestion chips** (schema `options` or `dataSource`).
|
|
277
|
-
* - Value is a **single string
|
|
278
|
-
*
|
|
277
|
+
* - Value is a **single string**; chip clicks toggle option `value` tokens. With schema `options`,
|
|
278
|
+
* chip slugs are written on the **last line** (comma-separated); prose above stays on earlier lines.
|
|
279
279
|
* - Schema `rules` with `op: "contains"` on this field match **token equality** after splitting
|
|
280
|
-
* on commas (see `evaluateRules` / `suggestion_textarea` docs).
|
|
280
|
+
* on commas and newlines (see `evaluateRules` / `suggestion_textarea` docs).
|
|
281
281
|
* - Optionally set **`meta.parallelChipFieldId`** to the id of a **`multiselect`** field (often
|
|
282
282
|
* `hidden`) with the same `options`; that field’s array value is derived from chip tokens in
|
|
283
283
|
* the textarea string so APIs can read a structured list without parsing commas.
|
|
@@ -295,7 +295,7 @@ interface SuggestionTextareaFieldDef extends BaseFieldDef {
|
|
|
295
295
|
suggestionsAriaLabel?: string;
|
|
296
296
|
/**
|
|
297
297
|
* ID of a sibling **`multiselect`** field (usually `hidden: true`). Its value is kept in sync
|
|
298
|
-
* as an array of selected chip values derived from the comma-separated textarea string.
|
|
298
|
+
* as an array of selected chip values derived from the comma- and newline-separated textarea string.
|
|
299
299
|
*/
|
|
300
300
|
parallelChipFieldId?: string;
|
|
301
301
|
/**
|
|
@@ -395,6 +395,21 @@ interface SurgicalRiskFlagsFieldDef extends BaseFieldDef {
|
|
|
395
395
|
cardTitle?: string;
|
|
396
396
|
} & Record<string, unknown>;
|
|
397
397
|
}
|
|
398
|
+
/** Urology OPD: dynamic smart history (SOCRATES, IPSS, haematuria, sexual). */
|
|
399
|
+
interface UrologySmartHistoryFieldDef extends BaseFieldDef {
|
|
400
|
+
type: 'urology_smart_history';
|
|
401
|
+
}
|
|
402
|
+
/** Urology OPD: structured examination (general, abdomen, GU, DRE). */
|
|
403
|
+
interface UrologyExaminationFieldDef extends BaseFieldDef {
|
|
404
|
+
type: 'urology_examination';
|
|
405
|
+
}
|
|
406
|
+
/** Urology OPD: objective pathway metrics and risk toggles (maps to `uro_pathway`). */
|
|
407
|
+
interface UrologyPathwayFieldDef extends BaseFieldDef {
|
|
408
|
+
type: 'urology_pathway';
|
|
409
|
+
meta?: {
|
|
410
|
+
subtitle?: string;
|
|
411
|
+
} & Record<string, unknown>;
|
|
412
|
+
}
|
|
398
413
|
/** General surgery OPD: structured smart history (SOCRATES, swelling, GI, breast, anorectal, thyroid); HOPC is template field `symptoms` embedded in the widget. */
|
|
399
414
|
interface GeneralSurgerySmartHistoryFieldDef extends BaseFieldDef {
|
|
400
415
|
type: 'general_surgery_smart_history';
|
|
@@ -415,22 +430,6 @@ interface PainScaleFlagsFieldDef extends BaseFieldDef {
|
|
|
415
430
|
step?: number;
|
|
416
431
|
options?: SelectOption[];
|
|
417
432
|
}
|
|
418
|
-
/** Urology OPD: SOCRATES, IPSS/QoL, haematuria, sexual history, past notes (panel visibility from chips/syndrome). */
|
|
419
|
-
interface UrologySmartHistoryFieldDef extends BaseFieldDef {
|
|
420
|
-
type: 'urology_smart_history';
|
|
421
|
-
}
|
|
422
|
-
/** Urology OPD: general / abdomen / GU / DRE + notes. */
|
|
423
|
-
interface UrologyExaminationFieldDef extends BaseFieldDef {
|
|
424
|
-
type: 'urology_examination';
|
|
425
|
-
}
|
|
426
|
-
/**
|
|
427
|
-
* Urology OPD: stone/BPH objectives, uroflow, risk (Clearsight decision engine).
|
|
428
|
-
* **`meta.subtitle`**: Optional line rendered inside the white body below `label`
|
|
429
|
-
* (e.g. objective scoring description while `label` stays the pink-bar title).
|
|
430
|
-
*/
|
|
431
|
-
interface UrologyPathwayFieldDef extends BaseFieldDef {
|
|
432
|
-
type: 'urology_pathway';
|
|
433
|
-
}
|
|
434
433
|
interface MedicationFrequentItem {
|
|
435
434
|
id: string;
|
|
436
435
|
name: string;
|
|
@@ -489,7 +488,7 @@ interface DiagnosticPackage {
|
|
|
489
488
|
department?: string;
|
|
490
489
|
tests: DiagnosticPackageTest[];
|
|
491
490
|
}
|
|
492
|
-
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 |
|
|
491
|
+
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 | UrologySmartHistoryFieldDef | UrologyExaminationFieldDef | UrologyPathwayFieldDef | PainScaleFlagsFieldDef | BaseFieldDef;
|
|
493
492
|
/** Boolean switch; value is `true` | `false`. */
|
|
494
493
|
interface ToggleFieldDef extends BaseFieldDef {
|
|
495
494
|
type: 'toggle';
|
|
@@ -504,8 +503,8 @@ interface Condition {
|
|
|
504
503
|
/**
|
|
505
504
|
* For `op: "contains"`:
|
|
506
505
|
* - If the field value is an **array**, checks `value.includes(condition.value)` (e.g. multiselect).
|
|
507
|
-
* - If the field value is a **string** (e.g. `suggestion_textarea`), splits on commas
|
|
508
|
-
* tokens, and checks that one token equals `String(condition.value)` (chip values in text).
|
|
506
|
+
* - If the field value is a **string** (e.g. `suggestion_textarea`), splits on commas and/or line
|
|
507
|
+
* breaks, trims tokens, and checks that one token equals `String(condition.value)` (chip values in text).
|
|
509
508
|
*/
|
|
510
509
|
value: any;
|
|
511
510
|
}
|
|
@@ -633,21 +632,6 @@ interface FormState {
|
|
|
633
632
|
declare const MAR_MEDICATION_ORDERS_META_KEY: "mar_medication_orders";
|
|
634
633
|
declare function fieldMetaRequestsMarMedicationOrdersButton(meta: Record<string, unknown> | undefined): boolean;
|
|
635
634
|
|
|
636
|
-
/** Template shape used for urology detection (submitted schema / API template). */
|
|
637
|
-
type UrologyTemplateRef = Pick<FormDef, 'id' | 'meta'> & {
|
|
638
|
-
specialization?: string;
|
|
639
|
-
};
|
|
640
|
-
/** True when prescription template targets urology (Clearsight OPD parity). */
|
|
641
|
-
declare function isUrologyTemplate(template?: UrologyTemplateRef): boolean;
|
|
642
|
-
/** Urology OPD: fold pathway when template matches or serialized values contain urology fields. */
|
|
643
|
-
declare function shouldFoldUrologyClinicalPathway(template: UrologyTemplateRef, payload: Record<string, unknown>): boolean;
|
|
644
|
-
/**
|
|
645
|
-
* Moves top-level chief complaint + urology pathway fields into structured
|
|
646
|
-
* metadata.clinical_pathways.urology (parity with orthopedic_exam pathway).
|
|
647
|
-
* Called from FormStore serialization so the host dashboard can forward payloads as-is.
|
|
648
|
-
*/
|
|
649
|
-
declare function attachUrologyClinicalPathwayMetadata(payload: Record<string, unknown>, template: UrologyTemplateRef): void;
|
|
650
|
-
|
|
651
635
|
interface SavedState {
|
|
652
636
|
values: FormValues;
|
|
653
637
|
meta: {
|
|
@@ -1152,4 +1136,4 @@ declare const SmartTextareaWidget: React.FC<{
|
|
|
1152
1136
|
fieldId: string;
|
|
1153
1137
|
}>;
|
|
1154
1138
|
|
|
1155
|
-
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 UrologyExaminationFieldDef, type UrologyPathwayFieldDef, type UrologySmartHistoryFieldDef, type
|
|
1139
|
+
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 UrologyExaminationFieldDef, type UrologyPathwayFieldDef, type UrologySmartHistoryFieldDef, type ValidationRule, type VitalsFieldDef, type WebhookDef, type Workflow, type WorkflowTransition, createUploadHandler, evaluateRules, fieldMetaRequestsMarMedicationOrdersButton, useField, useFieldHandlers, useForm, useFormStore, useFrequentItems, usePackages, useSmartKeywords, validateField, validateForm };
|