AI Form Builder & JSON Schema
Generate forms using AI prompts, edit templates directly in JSON, and copy ready-to-use clinical form configurations.
Medaius features a dual-builder workspace. Administrators can build forms visually or use the JSON Source Editor combined with the AI Form Builder to generate and refine questionnaires using natural language.
The AI Form Builder Workspace
Under Custom Forms > Create Form (or Edit Template), click the JSON Source tab to open the developer workspace. The screen is divided into three sections:
- AI Form Creator (Left Sidebar): Enter natural language instructions (e.g. "Create a pediatric triage form" or "Add a dropdown list of allergies").
- JSON Source Editor (Middle Pane): Displays the raw JSON configuration. Features include formatting, undo/redo controls, and syntax verification.
- Interactive Preview (Right Pane): Renders the active configuration in real-time, allowing you to test field validation and formatting before publishing.
Editing Existing Forms with AI
The AI builder is context-aware. If the editor contains valid JSON, typing a prompt like "Add an estimated due date field" will edit your existing form in-place rather than generating a new form from scratch.
JSON Form Schema Reference
A custom form template consists of root metadata and a form_config object containing the field layouts.
Root Schema Fields
id: Unique lowercase slug (e.g.,cardiology-intake).name: Human-readable display title.description: Subheading explaining the form's clinical intent.specialty: Clinical specialty category (e.g.,Cardiology,Pediatrics).form_config: Configuration container holding the fields block.
Field Types & Code Examples
Every field in the form_config.fields array must contain an id, type, and label. Below are ready-to-use code blocks for the supported field types:
1. Basic Input Fields
For capturing short text, notes, measurements, or dates.
[
{
"id": "patient_vitals_weight",
"type": "number",
"label": "Weight (kg)",
"required": true
},
{
"id": "symptoms_onset_date",
"type": "date",
"label": "Onset Date of Symptoms"
},
{
"id": "chief_complaint_history",
"type": "textarea",
"label": "Brief History of Present Illness"
}
]2. Multi-Option Selection Fields
For select lists, radios, or checkboxes. These require a populated options list.
[
{
"id": "smoking_status",
"type": "select",
"label": "Smoking History Status",
"options": [
"Never Smoked",
"Current Smoker",
"Former Smoker"
]
},
{
"id": "symptom_frequency",
"type": "radio",
"label": "Frequency of Symptoms",
"options": [
"Constant",
"Intermittent",
"Occasional"
]
},
{
"id": "reported_symptoms_list",
"type": "checkbox_group",
"label": "Mark all reported symptoms",
"options": [
"Cough",
"Fever",
"Shortness of Breath",
"Chest Pain"
]
}
]3. Specialty Fields
For calculated scores, clinician tips, or ratings.
[
{
"id": "clinician_guideline_info",
"type": "info",
"label": "Guideline: If blood pressure exceeds 140/90, please issue a cardiology screening referral."
},
{
"id": "pain_scale_rating",
"type": "rating",
"label": "Assess Pain Level (0 = No Pain, 10 = Severe Pain)"
}
]Complete Ready-to-Use Intake Template
Copy and paste this complete, valid JSON configuration into the JSON Source Editor to build a pediatric screening form instantly:
{
"id": "pediatric-asthma-intake",
"name": "Pediatric Asthma Intake Assessment",
"description": "Standard screening questionnaire for childhood respiratory evaluations.",
"specialty": "Pediatrics",
"form_config": {
"fields": [
{
"id": "patient_age_months",
"type": "number",
"label": "Child Age (in months)",
"required": true
},
{
"id": "cough_duration_days",
"type": "number",
"label": "Duration of cough symptoms (in days)"
},
{
"id": "asthma_severity_rating",
"type": "select",
"label": "Asthma Severity Assessment",
"required": true,
"options": [
"Mild Intermittent",
"Mild Persistent",
"Moderate Persistent",
"Severe Persistent"
]
},
{
"id": "night_awakenings",
"type": "checkbox_group",
"label": "Reported night awakenings frequency",
"options": [
"None",
"1-2 times per month",
"Weekly",
"Nightly"
]
},
{
"id": "inhaler_prescription_needed",
"type": "boolean",
"label": "Issue draft inhaler prescription during this encounter",
"required": true
},
{
"id": "parent_follow_up_instructions",
"type": "textarea",
"label": "Home care and follow-up guidance for parents"
}
]
}
}Was this page helpful?
Help us improve our clinical documentation with your quick feedback.
Public Intake Forms & Patient Self-Service
Publish clinical screening questionnaires and patient intake forms online, share secure pre-fill links, and review patient responses directly in the clinic workspace.
Telehealth & Virtual Consultations
Launch virtual video visits, share consultation links, and transcribe online calls with the AI Scribe.
