chore: initial scaffold + design spec + implementation plan
Skeleton for Osteo Report MVP. Build passes, 7 smoke tests green, real Horse.svg + Horse_head.svg in public/species/equine/. Zod schemas are the contract; store/anatomy/pdf modules are typed stubs throwing "not implemented" awaiting implementation. Spec: docs/superpowers/specs/2026-05-18-osteo-report-mvp-design.md Plan: docs/superpowers/plans/2026-05-18-osteo-report-mvp.md (23 phases, ~70 TDD tasks) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
12a3e48fdf
commit
8ca36b5ccd
104 files changed
+12448
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import { z } from 'zod'
|
||||
import { PractitionerSchema } from './practitioner'
|
||||
import { AnimalSchema, OwnerSchema } from './animal'
|
||||
import { ObservationSchema } from './observation'
|
||||
|
||||
const NextAppointmentSchema = z.discriminatedUnion('kind', [
|
||||
z.object({ kind: z.literal('date'), date: z.string() }),
|
||||
z.object({ kind: z.literal('period'), text: z.string() }),
|
||||
])
|
||||
|
||||
export type NextAppointment = z.infer<typeof NextAppointmentSchema>
|
||||
|
||||
export const ReportSchema = z.object({
|
||||
/** Schema version — always 1 for MVP. Bump on breaking changes. */
|
||||
version: z.literal(1),
|
||||
id: z.string().min(1),
|
||||
/** ISO timestamp of report creation */
|
||||
createdAt: z.string(),
|
||||
/** ISO date of clinical encounter */
|
||||
date: z.string(),
|
||||
practitioner: PractitionerSchema,
|
||||
animal: AnimalSchema,
|
||||
owner: OwnerSchema,
|
||||
observations: z.array(ObservationSchema),
|
||||
conclusion: z.string(),
|
||||
recommendations: z.string(),
|
||||
nextAppointment: NextAppointmentSchema.optional(),
|
||||
})
|
||||
|
||||
export type Report = z.infer<typeof ReportSchema>
|
||||
Reference in new issue
Block a user