mirror of
https://github.com/temetro/temetro.git
synced 2026-08-30 20:39:06 +00:00
929bec8f31
Stop blocking AI imports/proposals on missing non-critical fields. Records the chat agent drafts now save with safe placeholders, auto-generated file numbers, and a source="ai" marker that surfaces an "Added by AI" badge so a clinician can review/edit them later. Backend: - add `source` (manual|ai) column to patients/appointments/prescriptions (migration 0014) + canonical types, services, validation schemas - relax patient/appointment validation: empty file number allowed, demographic + type/provider/initials fall back to placeholders (initials derived from name) - patients.generateFileNumber() auto-assigns an MRN when one is missing - proposeAppointment accepts a name when no file number resolves; AI commits + /api/ai/import stamp source="ai" Frontend: - `source` on Appointment/Patient/Prescription types; AI commits send source="ai" - reusable <AiBadge> shown on the Patients table/detail and prescriptions list Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.3 KiB
1.3 KiB
coss Fieldset
When to use
- Grouped related controls under one legend/description.
- Complex forms requiring semantic grouping for radios/checkboxes.
Install
npx shadcn@latest add @coss/fieldset
Manual deps from docs:
npm install @base-ui/react
Canonical imports
import { Fieldset, FieldsetLegend } from "@/components/ui/fieldset"
Minimal pattern
<Fieldset>
<FieldsetLegend>Fieldset legend</FieldsetLegend>
</Fieldset>
Patterns from coss particles
Key patterns
Fieldset grouping related fields:
<Fieldset>
<FieldsetLegend>Personal Information</FieldsetLegend>
<Field name="firstName">
<FieldLabel>First name</FieldLabel>
<Input type="text" />
</Field>
<Field name="lastName">
<FieldLabel>Last name</FieldLabel>
<Input type="text" />
</Field>
</Fieldset>
Always include FieldsetLegend as the accessible group heading.
More examples
See p-fieldset-1 for the core pattern.
Common pitfalls
- Using ad-hoc div wrappers instead of semantic fieldset for grouped controls.
- Omitting
FieldsetLegend, reducing accessibility context. - Placing unrelated controls inside one fieldset, hurting form clarity.
Useful particle references
- core patterns:
p-fieldset-1 - form composition references:
p-form-1,p-form-2,p-input-group-24