mirror of
https://github.com/temetro/temetro.git
synced 2026-08-28 11:27:40 +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>
2.4 KiB
2.4 KiB
Installation
Prerequisites
Bklit UI is a shadcn registry. Initialize shadcn in the project first:
npx shadcn@latest init
Registry namespace
Add the @bklit namespace to components.json if it is not already present:
{
"registries": {
"@bklit": "https://ui.bklit.com/r/{name}.json"
}
}
New projects scaffolded with Bklit often include this automatically.
Install a chart
npx shadcn@latest add @bklit/line-chart
Replace line-chart with any chart slug from the catalog. The CLI copies source into your components directory and installs peer dependencies.
Verify project context
npx shadcn@latest info --json
Use the JSON to confirm framework, aliases, Tailwind version, and which @bklit components are already installed.
Import path
After install, import from the charts entry (path may vary by alias — check info --json):
import { LineChart, Line, Grid, XAxis, ChartTooltip } from "@/components/ui/line-chart";
// or from package re-exports when using the npm package directly:
import { LineChart, Line, Grid, XAxis, ChartTooltip } from "@bklitui/ui/charts";
Prefer the import path your project’s shadcn install actually generated.
Common peer dependencies
| Chart | Typical dependencies |
|---|---|
| line-chart, area-chart | @visx/curve, @visx/shape, motion |
| bar-chart | @visx/gradient, @visx/pattern, @visx/shape, motion |
| candlestick-chart | @visx/scale, @visx/shape, @visx/responsive, d3-array, motion |
| live-line-chart | @visx/curve, @visx/scale, @visx/shape, @visx/responsive, @visx/event, d3-array, motion |
| choropleth-chart | @visx/geo, @visx/responsive, @visx/zoom, d3-geo, topojson-client, motion |
| sankey-chart | @visx/gradient, @visx/pattern, @visx/responsive, @visx/sankey, motion |
| scatter-chart | d3-scale, d3-array, motion, react-use-measure |
| pie-chart, ring-chart | @visx/responsive, @visx/shape, motion |
| radar-chart | @visx/responsive, d3-shape, motion |
| funnel-chart | motion |
| gauge-chart | @visx/responsive, motion |
The CLI installs these when adding a chart — do not guess versions; let shadcn add resolve them.
Docs
- Installation: https://ui.bklit.com/docs/installation
- Per-chart install tabs: https://ui.bklit.com/docs/components/