diff --git a/.claude/memory/decisions.md b/.claude/memory/decisions.md index 58a0cc70..e3582897 100644 --- a/.claude/memory/decisions.md +++ b/.claude/memory/decisions.md @@ -279,3 +279,20 @@ Status: closed; category kind `observation` vs report Observation collision (C7) Tables species / anatomical_sheets / _versions / _assets. Published immutable via BEFORE UPDATE trigger (every role incl. owner; only published→deprecated with stamps); deprecated frozen; BEFORE DELETE trigger = preconditions (never published, never current, never base of active fork; reports join later) → no session flags, RPC just deletes. One draft per sheet (partial unique index, C8). Document↔row: CHECK `content->'schema_version' = to_jsonb(document_schema_version)`, trigger species match. `private.sheet_document_issues(jsonb)` re-checks the non-recursive error rules at publish + unknown asset ids → defense in depth, same codes as TS (BACKEND_ARCH "SQL doesn't re-implement Zod" kept for shape). Assets content-addressed (sha256, unique per sheet), Storage path `.svg` by convention, fork = metadata copy + `remap_document_assets`. Draft autosave = column-level UPDATE (content, change_note) policy on own draft (unaudited by design); identity (name/slug/description) column policy; visibility via audited `set_sheet_visibility` RPC and draft deletion via `delete_sheet_version` after gate review (sharing + deletion = sensitive state); `last_version_number` counter (no number reuse); content ≤ 2 MiB, byte_size ≤ 20 MiB, reason ≤ 500; `require_actor` refuses deactivated profiles; authz before lookup (unknown id = same 42501); fork copies only referenced assets. can_use_sheet = active ∧ (public ∨ editor) until grants/follows. Official sheet = creator null + is_official, platform admins edit. Alt rejected: session-flag delete bypass (hacky); Zod-equivalent validation only in TS (browser not a boundary); per-sheet asset storage copy on fork (needs worker job). Status: closed; names (`anatomical_sheet_assets`, storage layout, official ownership) listed for user confirmation. + +--- + +## BDR-033 | 2026-10-09 | User decisions on the Step 4 open points (sheets: follow, verification, versions, official, naming, server validation, erasure) + +User validated Step 4 and ruled: (1) public read by visibility, USE of a community sheet requires following its author, official sheets exempt → `can_use_sheet` + follow at community step; (2) private drafts for anyone, community publication only for authorised + verified accounts, student/professor keep own rules → gate in publish/set_visibility at verification step; (3) new publication = current, no auto-deprecation (current behaviour); (4) official sheets platform-owned, admin-run (current model); (5) finding kind `observation` → `consultation_reason` (done, packages/domain); (6) server-side validation mandatory for publication, frontend never a boundary → Zod shape check server-side before community step; (7) account deletion handles dependencies/transfer explicitly, nothing may block erasure forever → retention step anonymises authorship via a system path. +Scope guard from user: implement along the planned steps, keep 4b (equine import) free of community/account features. +Status: closed (recorded in ANATOMICAL_SHEET_MODEL.md §5). + + +--- + +## BDR-034 | 2026-10-09 | Equine import = generated seed, draft only; assets content-addressed in a private bucket read through the sheet + +Importer (packages/anatomy, one-off, deterministic) emits supabase/seed/anatomical-sheets/equine/v1: document.json, legacy-id-map.json, assets.json + SVG copies, IMPORT-REPORT.md (FR, for the osteopath), equine_v1.sql (idempotent: official platform-owned sheet `faunosteo-cheval` private + 2 asset rows + draft v1 via `private.insert_sheet_draft(null,…)`). Golden test = committed artifacts equal a fresh run. Ids: annotation = catalog zone key on exact FR+EN match (26/26), views main/head, trigger head-trigger, asset/sheet uuids derived from sha256 (uuid v5-like). No medical correction: ssb-dysfunctions kept + anomaly; only degraded slugs normalised and declared; 12 anomalies to validate, 6 informative. Seed listed in config sql_paths (every env) and applied by the PGlite harness (`seed/**`, never seed.sql). Storage: bucket anatomical-sheet-assets private, `.svg`, SELECT policy via `private.can_read_sheet_asset_object` (published reference of usable sheet, or editor), no API writes, operator upload script with service key from env. +Alt rejected: data migration for the sheet (immutable file for a draft meant to be edited); TS seeding via PostgREST (needs service key in a committed path); fuzzy zoneMatch at import (26/26 exact, strict equality + report suffices). +Status: closed; publication of v1 = explicit user decision after report review. diff --git a/.claude/memory/evals.md b/.claude/memory/evals.md index 86ae4ce7..929c474e 100644 --- a/.claude/memory/evals.md +++ b/.claude/memory/evals.md @@ -64,3 +64,10 @@ Result: first gate pass → verifier ECARTS(5), security BLOCK(1): private EXECU Anomalies: 6 test-side fixes on first pgTAP run (RLS hides rows → "no change" asserts; data-modifying CTE; collation of `order by`; trigger name order decides errcode; audit list; pg_temp grants). Executor (opus) deviated usefully: RegionCode pattern separate from StableId. Action: LRN-038/039/040, BLK-007. Keep the two-gate pass on every migration step. + +## EVAL-009 | 2026-10-09 | Step 4b equine import — importer tests, pgTAP both engines, Docker build, gates + +Method: packages/anatomy 30 vitest (counts in=out on both sides, special cases, determinism, golden artifacts, guards); pgTAP 001–007 on PGlite and real stack (`db reset`, `db test` 256/256, `gen types` diff clean); root check (61+30+20+278, lint 0, build); `docker build` of the app image; Storage API end-to-end (owner 400 before confirmation → 200 after, alice/anon 400); fresh verifier (C1–C12) + security-auditor (semgrep 130 rules, 0 findings). +Result: first pass verifier ECARTS(4) (self-referential in=out control, undeclared importer-authored labels, docs vs literal sql_paths, silent FR→EN fallback) + security PASS with MEDIUM hash-claim bypass (register_sheet_asset accepts any sha256 → editor reads foreign objects). All fixed: `uploaded_at` + `confirm_sheet_asset_upload` (service role) required by the read predicate, bob-claims-hash pgTAP, authored-label anomalies (27 anomalies now), seeds-listed test, Dockerfile missing workspace manifests (found by building, not by the gates). +Anomalies: real image `storage.protect_delete` aborts direct DELETE tests (LRN-041); pg_temp fixtures need service_role grants; docker build raced the lockfile refresh (rebuild clean). +Action: fresh verifier re-dispatched on the delta; BDR-034, LRN-041. diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index 2bbaf8cf..a1bf3b1a 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -180,3 +180,8 @@ Step 3 Supabase foundation on feature/step-03-supabase-foundation (9 commits, pu - Step 3 validated by user (session 4). chore/supabase-cli-gitignore finished into develop. Step 4 (sheet model) started on feature/step-04-anatomical-sheet-model. - Step 4 (session 4): spec docs/development/ANATOMICAL_SHEET_MODEL.md; packages/domain (Zod doc strict, 17 integrity rules, 60 tests, opus executor); migration 20261008110000 (species, sheets, immutable versions, assets, 11 RPCs, RLS) + pgTAP 005 (95 checks); types regenerated on real stack (Docker now OK), pgTAP 176/176 real + PGlite; publishSheetVersion gate; docs synced. 5 commits on feature/step-04-anatomical-sheet-model. BDR-030/031/032, LRN-038/039. Verifier + security gates dispatched. Next: user validation, Step 4b importer → equine draft. - Gates: verifier ECARTS(5) + security BLOCK(1) on first pass (private EXECUTE never revoked = BLK-007, foundation flaw). Fixed: hardening migration 20261008110100, explicit revokes + pgTAP census, set_sheet_visibility RPC, no direct draft DELETE, caps, authz-first, counter, asset copy scoped, SQL check split, url http(s) only. Real stack 210/210, root check green. Fresh verifier re-dispatched on the delta. + +## 2026-10-09 + +Step 4 validated + finished into develop. User decisions on the 7 open points → BDR-033 (follow-gated use, verified publication, no auto-deprecation, platform-owned official, kind rename, server validation, erasure path). Step 4b on feature/step-04b-equine-import: packages/anatomy importer (opus executor, 25 tests) → seed equine v1 as DRAFT (27 ann / 26 linked / 792 nodes / 612 leaves / 41 vet, 0 integrity issues, 18 anomalies reported, ssb-dysfunctions flagged); Storage migration + policy through the sheet, shim storage tables, harness applies seed/**, pgTAP 006/007 (238/238 real stack), assets uploaded + REST/Storage checks (owner 200, alice/anon 400). BDR-034, LRN-041. Gates dispatched; stop for user validation before Step 5. +- Gates 4b: verifier ECARTS(4) + security PASS/MEDIUM → fixed same session (confirm_sheet_asset_upload + uploaded_at in read predicate, 27 anomalies declared, seeds-listed test, Dockerfile manifests for domain/anatomy, docker build green). Real stack 256/256, Storage e2e verified. EVAL-009. Fresh verifier re-run on delta; stop for user validation. diff --git a/.claude/memory/learnings.md b/.claude/memory/learnings.md index fa8a9756..6c646fdd 100644 --- a/.claude/memory/learnings.md +++ b/.claude/memory/learnings.md @@ -309,3 +309,10 @@ Apply: any pgTAP file with fixtures read while impersonating; any ordered result `alter default privileges in schema X revoke execute on functions from public` does nothing (BLK-007). Pattern: every migration ends with `revoke all on function private.f(args) from public` per function + explicit grants; a pgTAP census (`has_function_privilege('anon'|'authenticated', p.oid, 'execute')` over pg_proc of private/audit, compared to an allowlist via `string_agg(... order by proname::text collate "C")`) fails the next omission. `results_eq` over `name`-typed columns vs text literals raises "could not determine which collation" on PGlite → compare one aggregated string. Trigger functions that call other private functions must be `security definer` once EXECUTE is revoked (the invoking API role no longer holds it). Apply: every Supabase migration; the census is the backstop. + +--- + +## LRN-041 | 2026-10-09 | Real Supabase image vs PGlite shim: storage triggers, pnpm script cwd + +Real `storage.objects` carries `storage.protect_delete` (statement trigger: "Direct deletion from storage tables is not allowed") → a pgTAP that runs DELETE as an API role passes on the shim and aborts the whole file on the real stack; assert write restrictions through a `pg_policies` census instead. Shim stays minimal (buckets/objects columns actually touched). `pnpm --filter pkg script ` runs inside the package dir → resolve CLI paths from `process.env.INIT_CWD`. Node 24 strip-types cannot follow workspace directory imports (`ERR_UNSUPPORTED_DIR_IMPORT`) → tsx for CLIs that import workspace packages. +Apply: every pgTAP touching storage.*; every workspace CLI. diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md index 24a2d08f..6f2e6dc9 100644 --- a/.claude/tasks/TODO.md +++ b/.claude/tasks/TODO.md @@ -61,7 +61,7 @@ feat/findings-tree-v2 merged (FindingsTreePicker tracked in HEAD); all work belo - [x] 3.8 CI: supabase job (start, db reset, test db, gen types diff); check job runs PGlite suite via pnpm -r - [x] 3.9 docs: docs/development/SUPABASE.md (start/reset/test/types/bootstrap owner), CLAUDE.md folder map + scopes, README pointer - [x] 3.10 verify: typecheck, test:run 278 app + 13 supabase (81 pgTAP), lint 0, build OK; BDR-026..029, LRN-035/036, BLK-006, EVAL-006 -- [ ] Step 4 — canonical anatomical sheet model (2026-10-08, branch feature/step-04-anatomical-sheet-model). Scope re-split: model + validation + persistence + tests here; legacy importer → official equine DRAFT + import report = next step (user: no full import yet, draft verified before publication). Spec: docs/development/ANATOMICAL_SHEET_MODEL.md +- [x] Step 4 — canonical anatomical sheet model (2026-10-08, feature/step-04-anatomical-sheet-model merged into develop, USER VALIDATED 2026-10-09; 7 business decisions → BDR-033, spec §5). Scope re-split: model + validation + persistence + tests here; legacy importer → official equine DRAFT + import report = next step (user: no full import yet, draft verified before publication). Spec: docs/development/ANATOMICAL_SHEET_MODEL.md - [x] 4.0 context + spec: business §2.6–2.9/§7/§16/§17.3/§23, OPEN_QUESTIONS C1/C2/C8/C9/Q3/Q5/Q9, audit 07; ANATOMICAL_SHEET_MODEL.md written - [x] 4.1 packages/domain: AnatomicalSheetDocumentSchema (strict, localized {fr,en}, views tree, annotations union, finding tree with category kind), validateSheetDocument (integrity issues), assertPublishable, createEmptySheetDocument; fixture horse-slice; tests per rule + id-stability - [x] 4.2 migration 20261008110000_anatomical_sheets: species (seed equine), enums, sheets/versions/assets, triggers (one draft, published immutable, delete preconditions, species match), helpers can_edit/can_use_sheet, sheet_document_issues, lifecycle RPCs (create/draft/publish/deprecate/delete/fork/archive/restore/delete sheet/register asset), privileges + RLS @@ -69,7 +69,13 @@ feat/findings-tree-v2 merged (FindingsTreePicker tracked in HEAD); all work belo - [x] 4.4 packages/supabase: database.types.ts regenerated (real stack), schema-types test extended (tables, enums list, functions); index.ts row aliases; publishSheetVersion service (domain validation before RPC) + test - [x] 4.5 docs: SUPABASE.md layout/tests, CLAUDE.md folder map + conventions + scopes, packages/README, IMPLEMENTATION_PLAN Step 4 adjustment note, CHANGELOG - [x] 4.6 verify: pnpm check green (61+17+278), db:reset + db:test 210/210 real stack, types in sync; verifier ECARTS(5) + security BLOCK(1) → all fixed (BLK-007 hardening migration, visibility RPC, +32 pgTAP, doc sync); BDR-030..032, LRN-038..040, EVAL-008 -- [ ] Step 4b — legacy importer → official equine sheet as DRAFT (document.json + legacy-id-map + IMPORT-REPORT.md for business verification), publication after user validation +- [ ] Step 4b — equine import (2026-10-09, branch feature/step-04b-equine-import): legacy SVGs + catalog → official equine sheet as DRAFT, import report for business review, no publication + - [x] 4b.0 kind rename observation→consultation_reason (BDR-033 #5); decisions in spec §5 + memory + - [x] 4b.1 packages/anatomy: legacy importer (SVG walker via @xmldom/xmldom, catalog mapper, deterministic ids, legacy-id-map, import report with anomalies incl. ssb-dysfunctions), CLI `pnpm import:equine` writing supabase/seed/anatomical-sheets/equine/v1/{document.json,legacy-id-map.json,IMPORT-REPORT.md,assets/,equine_v1.sql}; tests: counts preserved (27 ann / 26 mapped / 792 nodes / 612 leaves / 41 vet), determinism, Zod + 0 integrity errors, golden artifacts + - [x] 4b.2 migration 20261009100000 sheet asset storage: bucket anatomical-sheet-assets (private), object read policy through the sheet (published refs or editor), no API writes; shim storage tables; pgTAP + - [x] 4b.3 seed: equine_v1.sql idempotent (platform-owned official sheet, private, draft v1, 2 asset rows, fixed ids) in config sql_paths + PGlite harness applies supabase/seed/**; pgTAP 006: draft present, not publishable by non-admin, sheet_document_issues empty, assets match; upload script for the SVG bytes (service key from env, user/operator runs) + - [x] 4b.4 real stack: db reset + db test + types check + assets upload + REST read check; docs (SUPABASE.md, ANATOMICAL_SHEET_MODEL.md §6 import, CLAUDE.md, plan note, CHANGELOG) + - [x] 4b.5 verify: pnpm check green (61+30+20+278), real stack 256/256, types in sync, docker build OK, Storage API 400→200 after confirmation (alice/anon 400); verifier ECARTS(4) + security MEDIUM (hash claim) → fixed (uploaded_at + confirm RPC, authored labels, seeds-listed test, Dockerfile manifests); EVAL-009 --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 6587c4cf..3f53f873 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ Versions follow [Semantic Versioning](https://semver.org/). - **Supabase foundation** — local stack (`supabase/config.toml`), migrations (schemas `private` / `audit`, `profiles`, platform roles with audited RPCs), pgTAP suite run on PGlite (`pnpm test:run`) and on the real stack (`pnpm db:test`), `@faunosteo/supabase` typed client + generated types. No UI change. - **Anatomical sheet model** — `@faunosteo/domain`: canonical sheet document (views tree, annotations with stable ids and explicit laterality, ordered vertebral regions, typed finding categories, explicit annotation → finding zone links, FR/EN labels) with integrity validation; tables `species`, `anatomical_sheets`, `anatomical_sheet_versions` (published rows immutable, one draft per sheet, deletion preconditions), `anatomical_sheet_assets`; lifecycle RPCs (create, draft, publish, deprecate, delete, fork with provenance, archive, assets) audited and under RLS. Spec: `docs/development/ANATOMICAL_SHEET_MODEL.md`. +- **Equine import (Step 4b)** — `@faunosteo/anatomy` deterministic importer: `Horse.svg` + `Horse_head.svg` + `pathologies.json` → canonical document, legacy id map, French import report, idempotent seed creating the official sheet `faunosteo-cheval` as a private DRAFT (never published by code). Storage bucket `anatomical-sheet-assets` (content-addressed SVGs, read through the sheet, operator upload script). + ### Changed (SaaS migration, plan Step 2) - **pnpm workspace** — the application moved to `apps/app` (`@faunosteo/app`) with `git mv`; root commands (`pnpm typecheck|test:run|lint|build|dev`) delegate to the packages. `packages/` reserved, empty. CI workflow added (`.gitea/workflows/ci.yml`). diff --git a/CLAUDE.md b/CLAUDE.md index af91cb4e..5f4c2245 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -198,12 +198,16 @@ faunosteo/ ├─ packages/domain/ ← @faunosteo/domain (pure, no DOM, zod only) │ ├─ src/anatomical-sheet/{schema,validate,create}.ts ← canonical sheet document + integrity rules │ └─ tests/{fixtures/horse-slice.ts,*.test.ts} +├─ packages/anatomy/ ← @faunosteo/anatomy: one-off legacy importer (SVG + catalog → canonical document) +│ ├─ src/legacy/{svg,catalog,regions,ids,report,importer}.ts, src/cli/import-equine.ts +│ └─ tests/ ← counts preserved, special cases, determinism, golden artifacts ├─ packages/supabase/ ← @faunosteo/supabase │ ├─ src/{index,client,database.types,anatomical-sheets}.ts ← typed client, generated types, publish gate │ └─ tests/{client,anatomical-sheets}.test.ts, tests/db/ ← PGlite harness, shim, pgTAP runner, schema↔types test ├─ supabase/ │ ├─ config.toml, seed.sql ← CLI config (public schema only), local dev accounts -│ ├─ migrations/*.sql ← forward-only; foundation, profiles, platform_roles, anatomical_sheets +│ ├─ migrations/*.sql ← forward-only; foundation, profiles, platform_roles, anatomical_sheets, storage +│ ├─ seed/anatomical-sheets/equine/v1/ ← GENERATED by `pnpm import:equine`: document, id map, report, SVG copies, seed SQL │ └─ tests/*.sql ← pgTAP: allowed + denied paths per policy ├─ packages/README.md ← shared packages index ├─ .gitea/workflows/ci.yml ← CI: install, typecheck, test, lint, build, docker @@ -325,7 +329,8 @@ Database (Supabase) from public and granted only to the roles that evaluate them. - A migration is never edited once applied. Each migration ships its pgTAP file with allowed AND denied cases, and a regenerated `database.types.ts`. -- The browser holds the anon key only. `service_role` never appears in env.js, .env.example or code. +- The browser holds the anon key only. The `service_role` key value never appears in env.js, .env.example or code; + operator scripts under `packages/*/scripts/` read it from the environment and are never bundled. - pgTAP files run on PGlite and on the real image: scope counts to fixture ids, pin `collate "C"` on text ordering. ### Anatomical sheet model (packages/domain + migration 20261008110000) @@ -336,6 +341,10 @@ Database (Supabase) `publish_sheet_version`. Integrity rule codes are shared by `validateSheetDocument` (TS) and `private.sheet_document_issues` (SQL); add a rule on both sides and in the spec table. - Document schema change → bump `SHEET_DOCUMENT_SCHEMA_VERSION`, extend the SQL CHECK on `document_schema_version`. +- Official equine sheet = generated seed (`pnpm import:equine`, never edit the output by hand; the golden test fails on drift). + It is a DRAFT until a platform admin publishes it after business review of `IMPORT-REPORT.md`. +- Sheet SVG bytes live in Storage bucket `anatomical-sheet-assets` as `.svg`; uploads are an operator task + (`pnpm assets:upload ` with the service key in env), never from the browser. ### Component stubs - Scaffold stubs render
ComponentName placeholder
diff --git a/Dockerfile b/Dockerfile index ec79d059..27e293d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,8 @@ RUN corepack enable && corepack prepare pnpm@10.13.1 --activate # Workspace manifests first for layer caching (install depends only on these) COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./ COPY apps/app/package.json apps/app/ +COPY packages/domain/package.json packages/domain/ +COPY packages/anatomy/package.json packages/anatomy/ COPY packages/supabase/package.json packages/supabase/ RUN pnpm install --frozen-lockfile diff --git a/docs/development/ANATOMICAL_SHEET_MODEL.md b/docs/development/ANATOMICAL_SHEET_MODEL.md index 35a8bd4a..a81fd079 100644 --- a/docs/development/ANATOMICAL_SHEET_MODEL.md +++ b/docs/development/ANATOMICAL_SHEET_MODEL.md @@ -57,7 +57,7 @@ AnatomicalSheetDocument │ Geometry = circle { cx, cy, r } | polygon { points: [x, y][] ≥ 3 } | path { d } └─ finding_zones: FindingZone[] FindingZone = { id, name: LocalizedText, categories: FindingCategory[] } - FindingCategory = { id, kind: dysfunction | observation | anamnesis | custom, name, description?, children: FindingNode[] } + FindingCategory = { id, kind: dysfunction | consultation_reason | anamnesis | custom, name, description?, children: FindingNode[] } FindingNode = { id, name, description?, requires_vet_referral?, sources?, children? } (recursive) SourceRef = { type: manual | journal | database | web, citation, url? } ``` @@ -269,28 +269,55 @@ with the community step (§17.4). | Migrations reproducible | PGlite replays from zero in `pnpm test:run`; `pnpm db:reset` on the real stack | | Previous tests pass | root `pnpm check` | -## 5. Decisions left to the user +## 5. Business decisions (user, 2026-10-09) -1. **Follow = permission to use a public sheet** (§2.9) is not yet modelled: - today every authenticated user can use any public active sheet. Grants - and follows will narrow `can_use_sheet` at the community step. -2. **Who may create sheets**: any active account for now. Should creation - wait for professional verification (Step 7)? -3. **Deprecation policy**: publishing v2 does not deprecate v1. Should it, - automatically, or stay a manual act? -4. **Table name `anatomical_sheet_assets` and the content-addressed Storage - layout** (`.svg`): confirm before the importer writes files. -5. **Official equine sheet owner**: platform-owned (`creator_user_id = null`, - `is_official = true`, edited by platform admins) or owned by the client's - account? -6. **Finding category kind naming**: `observation` collides with the report - "Observation" (OPEN_QUESTIONS C7). Alternative: `consultation_reason`. -7. **Server-side shape validation**: SQL re-checks references, sizes and the - species, not the full Zod shape (ids pattern, enums, unknown keys). A - client calling the RPC directly can publish a shape-invalid document to - its own sheet. Options: a plpgsql shape check, or publication through an - Edge Function running the Zod schema (community step at the latest). -8. **Account erasure**: `creator_user_id` is `on delete restrict` and the - immutability guard blocks `set null` on `published_by` of published rows, - so deleting an `auth.users` row that owns sheets fails by design until the - retention step (§16) defines reassignment or anonymisation. +The open points of Step 4 were decided as follows. Each line names where +the decision lands; only the naming one is implemented in this document. + +| # | Decision | Where it lands | +| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 1 | Public sheets are readable according to their visibility, but **using** a community sheet for a report requires following its author. Official Faunosteo sheets need no follow. | `can_use_sheet` gains the follow predicate at the community step; official sheets (`is_official`) bypass it. Until then every active account may use any public sheet. | +| 2 | Any account may prepare private drafts; **community publication** is reserved to authorised, verified accounts. Student and professor roles keep their own rules. | `publish_sheet_version` + `set_sheet_visibility('public')` gain a verification check at the identity / verification step. | +| 3 | A new publication becomes the current version; older versions are **not deprecated automatically** and stay readable under the access rules. | Already the behaviour of `publish_sheet_version`; deprecation stays a manual act. | +| 4 | Official sheets are **platform-owned**, administered by authorised accounts. | Already the model: `creator_user_id = null`, `is_official = true`, platform admins edit. | +| 5 | Name anatomical findings apart from the observations typed during a report. | Finding category kind `observation` renamed **`consultation_reason`** (`dysfunction` / `consultation_reason` / `anamnesis` / `custom`). The report-side object keeps the name Observation. | +| 6 | Server-side validation and integrity for every publication; the frontend is never a security boundary. | SQL already re-checks references, sizes and species. The full shape check (Zod) moves server-side before community publication: plpgsql shape rules or an Edge Function gate, decided at the community step. | +| 7 | Account deletion handles dependencies and transfers explicitly (RGPD); no dependency may block the erasure of personal data forever. | Retention step (§16): published versions get their `created_by` / `published_by` anonymised through a dedicated system path (the immutability guard will allow that single transition), personal sheets are transferred or archived, `creator_user_id` keeps `on delete restrict` only as the backstop that forces the explicit path. | + +## 6. Official equine sheet: import (Step 4b) + +`packages/anatomy` holds a one-off, deterministic importer +(`pnpm import:equine`) that reads `Horse.svg`, `Horse_head.svg` and +`pathologies.json` and writes `supabase/seed/anatomical-sheets/equine/v1/`: +the canonical `document.json`, `legacy-id-map.json` (every legacy +`data-anno-id`, category slug and view key → new id), `assets.json` and the +byte-identical SVG copies, `IMPORT-REPORT.md` (French, for the osteopath: +volumes in / out, every mapping, every anomaly to validate) and +`equine_v1.sql`, the idempotent seed that creates the platform-owned sheet +`faunosteo-cheval` (private, official) with its two asset rows and draft v1. + +Rules of the import: + +- ids are explicit and stable: annotation id = catalog zone key when FR and + EN names match exactly (26 / 26), finding zone id = catalog key, views + `main` and `head`, trigger `head-trigger`; nothing matches by label at + runtime; +- no medical correction: catalog ids and labels are kept verbatim + (`ssb-dysfunctions` under `sphenoid` included) and every doubt is an entry + of the report; only technical slugs (degraded category ids) are + normalised, and the report says so; +- no publication: the seed inserts a draft through + `private.insert_sheet_draft` (audited with a null actor) and never calls + `publish_sheet_version`; only a platform admin can publish it, after the + business review of the report (pgTAP 007 pins both); +- the source files under `apps/app/public/species/equine/` stay untouched + and keep serving the current application. + +Storage: bucket `anatomical-sheet-assets` (private, SVG only, 20 MiB cap), +objects `.svg`, read policy `anatomical_sheet_assets_read` through +`private.can_read_sheet_asset_object`: the asset row must be **confirmed** +(`uploaded_at`, set only by `confirm_sheet_asset_upload` with the service +role once the bytes are in the bucket) and either edited by the caller or +referenced by a non-draft version of a usable sheet. A hash a user registers +on their own sheet therefore opens nothing. No API writes (operator upload, +`SUPABASE.md` §3.1). diff --git a/docs/development/IMPLEMENTATION_PLAN.md b/docs/development/IMPLEMENTATION_PLAN.md index 9e8a62e8..9b89c72e 100644 --- a/docs/development/IMPLEMENTATION_PLAN.md +++ b/docs/development/IMPLEMENTATION_PLAN.md @@ -144,6 +144,11 @@ Risks: subtle divergences between parser and importer on the detail trigger (no official equine sheet as a DRAFT with an import report, published only after business review. packages/anatomy is created at Step 4b. Labels use `{ fr, en }` objects, annotation→findings is `finding_zone_id`, finding categories carry a `kind`; see the spec for the final field names. + Step 4b done 2026-10-09: packages/anatomy importer + `pnpm import:equine`, seed + supabase/seed/anatomical-sheets/equine/v1 (draft, not published), Storage bucket + policy + (migration 20261009100000), pgTAP 006/007. Business decisions of 2026-10-09 recorded in + ANATOMICAL_SHEET_MODEL.md §5 (follow-gated use → community step; verified publication → + identity step; erasure path → retention step). ``` ```text diff --git a/docs/development/SUPABASE.md b/docs/development/SUPABASE.md index b137c74f..2f0e4325 100644 --- a/docs/development/SUPABASE.md +++ b/docs/development/SUPABASE.md @@ -14,8 +14,12 @@ supabase/ │ ├─ 20261008100100_profiles.sql profiles + auth.users trigger + RLS │ ├─ 20261008100200_platform_roles.sql platform_role, profile_roles, helpers, RPCs │ ├─ 20261008110000_anatomical_sheets.sql species, sheets, immutable versions, assets, lifecycle RPCs -│ └─ 20261008110100_private_execute_hardening.sql EXECUTE revoked from PUBLIC on the Step 3 helpers +│ ├─ 20261008110100_private_execute_hardening.sql EXECUTE revoked from PUBLIC on the Step 3 helpers +│ └─ 20261009100000_sheet_asset_storage.sql bucket anatomical-sheet-assets + read policy through the sheet ├─ seed.sql LOCAL dev accounts + first owner (never run in prod) +├─ seed/anatomical-sheets/equine/v1/ official equine sheet as a DRAFT, generated by `pnpm import:equine` +│ ├─ equine_v1.sql idempotent seed (sheet, 2 asset rows, draft v1), applied by db reset and by PGlite +│ └─ document.json, legacy-id-map.json, assets.json, assets/*.svg, IMPORT-REPORT.md └─ tests/ pgTAP, one file per concern, allowed AND denied paths packages/supabase/ ├─ src/client.ts createBrowserClient() (anon key, PKCE) @@ -62,6 +66,40 @@ Local endpoints (`config.toml`): `pnpm db:start` prints the `anon` and `service_role` keys. Only the anon key ever reaches the browser. +Two kinds of seed (`config.toml [db.seed] sql_paths`): + +| File | Scope | Content | +| -------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------ | +| `seed.sql` | local only | dev accounts + first owner | +| `seed/…/*.sql` | every environment | versioned reference data, idempotent (today: the official equine sheet as a draft); each file listed explicitly in `sql_paths` | + +The PGlite harness applies every `.sql` under `seed/` after the migrations, +`seed.sql` never (it needs the real auth schema); a test fails when a seed +file is missing from `sql_paths`. On another environment, apply a versioned +seed with `psql -f` from a privileged session, then upload its assets (§3.1). +Never run `supabase db push --include-seed` against a shared database: the +list also contains `seed.sql` and its known local password. + +### 3.1 Sheet assets (Storage) + +SVG files live in the private bucket `anatomical-sheet-assets`, keyed by +content (`.svg`). Reading goes through the sheet (policy +`anatomical_sheet_assets_read`): a published version of a usable sheet, or +any version for its editors. No API role uploads; the operator does, with +the service key, from the generated seed folder: + +```bash +export SUPABASE_URL=http://127.0.0.1:54321 +read -rs SUPABASE_SERVICE_ROLE_KEY && export SUPABASE_SERVICE_ROLE_KEY # typed, not in shell history +pnpm assets:upload supabase/seed/anatomical-sheets/equine/v1 +``` + +The script verifies each file against `assets.json` (sha256, size) before +uploading, keeps objects already present, and calls +`confirm_sheet_asset_upload` (service role only) for each asset row: the +read policy ignores a row whose upload was never confirmed, so a user who +registers a known hash on their own sheet opens nothing. + Seed accounts (local only, password `LocalDev-only-password-1`): | Email | Role | @@ -93,10 +131,10 @@ RLS enabled, no `using (true)` / `with check (true)` policy for `anon` or Two runners, one SQL source of truth (`supabase/tests/*.sql`, pgTAP): -| Command | Engine | Needs Docker | What runs | -| -------------------------------------------- | ------------------------------------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `pnpm --filter @faunosteo/supabase test:run` | PGlite (PostgreSQL 17 in WASM) | no | shim of the Supabase base schema + all migrations + every pgTAP file; schema ↔ types check; client factory; publish gate | -| `pnpm db:test` | `supabase test db` (pg_prove in the local stack) | yes | the same pgTAP files against the real Supabase image | +| Command | Engine | Needs Docker | What runs | +| -------------------------------------------- | ------------------------------------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `pnpm --filter @faunosteo/supabase test:run` | PGlite (PostgreSQL 17 in WASM) | no | shim of the Supabase base schema (auth + storage tables) + all migrations + `seed/**` + every pgTAP file; schema ↔ types check; client factory; publish gate | +| `pnpm db:test` | `supabase test db` (pg_prove in the local stack) | yes | the same pgTAP files against the real Supabase image | `pnpm test:run` at the root runs the PGlite suite together with the app suite. The shim (`packages/supabase/tests/db/supabase-shim.sql`) recreates diff --git a/package.json b/package.json index cbef777b..2dc714f1 100644 --- a/package.json +++ b/package.json @@ -20,12 +20,14 @@ "format": "prettier --write .", "check": "pnpm typecheck && pnpm test:run && pnpm lint && pnpm build", "scaffold:species": "pnpm --filter @faunosteo/app scaffold:species", + "import:equine": "pnpm --filter @faunosteo/anatomy import:equine", "db:start": "supabase start", "db:stop": "supabase stop", "db:reset": "supabase db reset", "db:test": "supabase test db", "db:types": "supabase gen types typescript --local --schema public | prettier --parser typescript > packages/supabase/src/database.types.ts", - "db:types:check": "supabase gen types typescript --local --schema public | prettier --parser typescript | diff - packages/supabase/src/database.types.ts" + "db:types:check": "supabase gen types typescript --local --schema public | prettier --parser typescript | diff - packages/supabase/src/database.types.ts", + "assets:upload": "pnpm --filter @faunosteo/supabase assets:upload" }, "devDependencies": { "pnpm": "10.13.1", diff --git a/packages/anatomy/eslint.config.js b/packages/anatomy/eslint.config.js new file mode 100644 index 00000000..242d5a31 --- /dev/null +++ b/packages/anatomy/eslint.config.js @@ -0,0 +1,20 @@ +import globals from 'globals' +import tseslint from 'typescript-eslint' + +export default tseslint.config( + { ignores: ['node_modules/**'] }, + { + files: ['**/*.ts'], + extends: [...tseslint.configs.recommended], + languageOptions: { + globals: { ...globals.node, ...globals.es2022 }, + }, + rules: { + '@typescript-eslint/no-explicit-any': 'warn', + '@typescript-eslint/no-unused-vars': [ + 'error', + { argsIgnorePattern: '^_' }, + ], + }, + }, +) diff --git a/packages/anatomy/package.json b/packages/anatomy/package.json new file mode 100644 index 00000000..03f90905 --- /dev/null +++ b/packages/anatomy/package.json @@ -0,0 +1,35 @@ +{ + "name": "@faunosteo/anatomy", + "version": "0.1.0", + "private": true, + "description": "Faunosteo anatomy tooling: deterministic legacy importer that turns the historical equine assets into the canonical anatomical sheet draft", + "license": "MIT", + "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts", + "exports": { + ".": "./src/index.ts" + }, + "scripts": { + "typecheck": "tsc -p tsconfig.json --noEmit", + "test": "vitest", + "test:run": "vitest run", + "lint": "eslint . --max-warnings 0", + "build": "tsc -p tsconfig.json --noEmit", + "import:equine": "tsx src/cli/import-equine.ts" + }, + "dependencies": { + "@faunosteo/domain": "workspace:*" + }, + "devDependencies": { + "@types/node": "^20.19.41", + "@xmldom/xmldom": "^0.9.8", + "eslint": "^9.17.0", + "globals": "^15.14.0", + "prettier": "^3.4.2", + "tsx": "^4.19.2", + "typescript": "^5.7.2", + "typescript-eslint": "^8.19.0", + "vitest": "^3.2.7" + } +} diff --git a/packages/anatomy/src/cli/import-equine.ts b/packages/anatomy/src/cli/import-equine.ts new file mode 100644 index 00000000..96cb5cb6 --- /dev/null +++ b/packages/anatomy/src/cli/import-equine.ts @@ -0,0 +1,58 @@ +/** + * Generates supabase/seed/anatomical-sheets/equine/v1/ from the legacy + * equine sources: canonical draft document, legacy id map, import report, + * byte-identical SVG assets with their manifest, and the SQL seed. + * + * pnpm import:equine (from the repository root) + * + * Output is byte-identical across runs; commit it and review the report. + */ +import { copyFile, mkdir, writeFile } from 'node:fs/promises' +import { join } from 'node:path' +import { fileURLToPath } from 'node:url' +import { + EQUINE_SEED_DIR, + EQUINE_SOURCE_PATHS, + importEquineLegacy, + readEquineSources, + renderArtifacts, +} from '../legacy' + +const REPO_ROOT = fileURLToPath(new URL('../../../../', import.meta.url)) + +async function writeTextArtifacts(dir: string, files: Record) { + for (const [name, text] of Object.entries(files)) { + await writeFile(join(dir, name), text, 'utf8') + } +} + +async function copyAssets(dir: string): Promise { + const assetsDir = join(dir, 'assets') + await mkdir(assetsDir, { recursive: true }) + for (const source of [ + EQUINE_SOURCE_PATHS.mainSvg, + EQUINE_SOURCE_PATHS.headSvg, + ]) { + const name = source.slice(source.lastIndexOf('/') + 1) + await copyFile(join(REPO_ROOT, source), join(assetsDir, name)) + } +} + +async function main(): Promise { + const result = importEquineLegacy(await readEquineSources(REPO_ROOT)) + const dir = join(REPO_ROOT, EQUINE_SEED_DIR) + await mkdir(dir, { recursive: true }) + await writeTextArtifacts(dir, await renderArtifacts(result)) + await copyAssets(dir) + const errors = result.issues.filter((i) => i.severity === 'error').length + console.log( + `${EQUINE_SEED_DIR}: ${result.stats.annotations} annotations, ` + + `${result.stats.nodes} nodes, ${result.anomalies.length} anomalies, ` + + `${errors} integrity errors, ${result.issues.length - errors} warnings`, + ) +} + +main().catch((error: unknown) => { + console.error(error instanceof Error ? error.message : error) + process.exit(1) +}) diff --git a/packages/anatomy/src/index.ts b/packages/anatomy/src/index.ts new file mode 100644 index 00000000..bd889bc9 --- /dev/null +++ b/packages/anatomy/src/index.ts @@ -0,0 +1 @@ +export * from './legacy' diff --git a/packages/anatomy/src/legacy/annotations.ts b/packages/anatomy/src/legacy/annotations.ts new file mode 100644 index 00000000..3f3ed3cb --- /dev/null +++ b/packages/anatomy/src/legacy/annotations.ts @@ -0,0 +1,199 @@ +import type { Annotation, Geometry, Laterality } from '@faunosteo/domain' +import { normaliseCategoryId } from './categories' +import { slugify } from './ids' +import { inferRegionCode } from './regions' +import type { LegacyAnnotation } from './svg' +import type { Anomaly, AnnotationRow, RegionInference } from './types' + +/** + * Legacy SVG annotation → canonical annotation. The finding zone link is + * resolved here, once, by exact FR + EN equality with the catalog (audit 06 + * §4); the document then carries finding_zone_id explicitly and nothing + * matches labels at runtime. + */ + +export interface AnnotationContext { + viewId: string + fileName: string + /** `${name_fr}\n${name_en}` → catalog zone key. */ + zoneByNames: ReadonlyMap +} + +export interface MappedAnnotation { + annotation: Annotation + row: AnnotationRow + region: RegionInference | null + anomalies: Anomaly[] +} + +export function zoneNameKey(fr: string, en: string): string { + return `${fr}\n${en}` +} + +function anomaly(code: string, subject: string, message: string): Anomaly { + return { code, level: 'a_valider', subject, message } +} + +function laterality(a: LegacyAnnotation, out: Anomaly[]): Laterality { + if (a.lateral === 'bilateral') return 'bilateral' + if (a.lateral === null || a.lateral === 'unpaired') return 'unpaired' + out.push( + anomaly( + 'annotation.laterality.unknown', + a.id, + `Latéralité « ${a.lateral} » inconnue, importée en « unpaired ».`, + ), + ) + return 'unpaired' +} + +function describeGeometry(geometry: Geometry | null): string { + if (geometry === null) return 'aucune' + if (geometry.type === 'circle') { + return `cercle (${geometry.cx}, ${geometry.cy}) r ${geometry.r}` + } + if (geometry.type === 'polygon') { + return `polygone ${geometry.points.length} points` + } + return 'chemin' +} + +function regionOf(a: LegacyAnnotation, out: Anomaly[]): RegionInference | null { + if (a.special === null) return null + if (a.special !== 'vertebral-precision') { + out.push( + anomaly( + 'annotation.special.unknown', + a.id, + `special « ${a.special} » ignoré.`, + ), + ) + return null + } + const match = inferRegionCode(a.nameFr, a.nameEn) + if (!match) { + out.push( + anomaly( + 'annotation.region.unknown', + a.id, + 'Région vertébrale non déduite.', + ), + ) + } + return { + annotationId: a.id, + label: match?.label ?? a.nameFr ?? a.nameEn ?? a.id, + root: match?.root ?? null, + code: match?.code ?? null, + } +} + +function triggerName(a: LegacyAnnotation, out: Anomaly[]) { + if (a.nameFr && a.nameEn) return { fr: a.nameFr, en: a.nameEn } + out.push({ + code: 'annotation.trigger.unnamed', + level: 'informatif', + subject: a.id, + message: + 'Déclencheur de vue détail sans nom (name null), comme dans le SVG.', + }) + return null +} + +function mapTrigger( + a: LegacyAnnotation, + ctx: AnnotationContext, + out: Anomaly[], +) { + const annotation: Annotation = { + id: `${a.opensDetail}-trigger`, + kind: 'detail_trigger', + view_id: ctx.viewId, + category_id: normaliseCategoryId(a.category ?? ''), + laterality: laterality(a, out), + geometry: a.geometry, + name: triggerName(a, out), + opens_view_id: a.opensDetail ?? '', + } + return { annotation, region: null } +} + +/** Missing labels fall back to the other language, never silently. */ +function observableName(a: LegacyAnnotation, out: Anomaly[]) { + const fr = a.nameFr ?? a.nameEn ?? a.id + if (a.nameFr === null) { + out.push( + anomaly( + 'annotation.name_fr.missing', + a.id, + `data-anno-name-fr absent : nom FR repris de « ${fr} ».`, + ), + ) + } + if (a.nameEn === null) { + out.push( + anomaly( + 'annotation.name_en.missing', + a.id, + `data-anno-name-en absent : nom EN copié du FR « ${fr} », à traduire.`, + ), + ) + } + return { fr, en: a.nameEn ?? fr } +} + +function mapObservable( + a: LegacyAnnotation, + ctx: AnnotationContext, + out: Anomaly[], +) { + const name = observableName(a, out) + const zoneId = ctx.zoneByNames.get(zoneNameKey(name.fr, name.en)) ?? null + if (zoneId === null) { + out.push( + anomaly( + 'annotation.unmapped', + a.id, + 'Annotation non reliée à une zone de constats.', + ), + ) + } + const region = regionOf(a, out) + const annotation: Annotation = { + id: zoneId ?? slugify(name.en), + kind: a.tagName === 'circle' ? 'point' : 'zone', + view_id: ctx.viewId, + category_id: normaliseCategoryId(a.category ?? ''), + laterality: laterality(a, out), + geometry: a.geometry, + name, + finding_zone_id: zoneId, + vertebral_region_code: region?.code ?? null, + } + return { annotation, region } +} + +export function mapAnnotation( + a: LegacyAnnotation, + ctx: AnnotationContext, +): MappedAnnotation { + const anomalies: Anomaly[] = [] + const { annotation, region } = a.opensDetail + ? mapTrigger(a, ctx, anomalies) + : mapObservable(a, ctx, anomalies) + const row: AnnotationRow = { + legacyId: a.id, + newId: annotation.id, + viewId: ctx.viewId, + kind: annotation.kind, + laterality: annotation.laterality, + regionCode: + annotation.kind === 'detail_trigger' + ? null + : annotation.vertebral_region_code, + findingZoneId: + annotation.kind === 'detail_trigger' ? null : annotation.finding_zone_id, + geometry: describeGeometry(annotation.geometry), + } + return { annotation, row, region, anomalies } +} diff --git a/packages/anatomy/src/legacy/artifacts.ts b/packages/anatomy/src/legacy/artifacts.ts new file mode 100644 index 00000000..5ab475a7 --- /dev/null +++ b/packages/anatomy/src/legacy/artifacts.ts @@ -0,0 +1,49 @@ +import { format } from 'prettier' +import { renderImportReport } from './report' +import { renderSeedSql } from './seed' +import type { ImportResult } from './types' + +/** + * Text artifacts of the generated seed folder, keyed by path relative to + * supabase/seed/anatomical-sheets/equine/v1/. JSON and Markdown go + * through Prettier with the repository options so `prettier --check` + * accepts the committed files as generated (no exclusion needed). + */ + +export const SEED_SQL_FILE = 'equine_v1.sql' + +const PRETTIER_OPTIONS = { + semi: false, + singleQuote: true, + tabWidth: 2, + useTabs: false, + trailingComma: 'all', + printWidth: 80, + bracketSpacing: true, + arrowParens: 'always', + endOfLine: 'lf', +} as const + +function formatJson(value: unknown): Promise { + return format(JSON.stringify(value, null, 2), { + ...PRETTIER_OPTIONS, + parser: 'json', + }) +} + +/** Deterministic: same result in, same bytes out. */ +export async function renderArtifacts( + result: ImportResult, +): Promise> { + const documentJson = await formatJson(result.document) + return { + 'document.json': documentJson, + 'legacy-id-map.json': await formatJson(result.legacyIdMap), + 'assets.json': await formatJson(result.assets), + 'IMPORT-REPORT.md': await format(renderImportReport(result), { + ...PRETTIER_OPTIONS, + parser: 'markdown', + }), + [SEED_SQL_FILE]: renderSeedSql({ result, documentJson }), + } +} diff --git a/packages/anatomy/src/legacy/authored-labels.ts b/packages/anatomy/src/legacy/authored-labels.ts new file mode 100644 index 00000000..5b45d199 --- /dev/null +++ b/packages/anatomy/src/legacy/authored-labels.ts @@ -0,0 +1,41 @@ +import type { AnatomicalSheetDocumentInput } from '@faunosteo/domain' +import type { Anomaly } from './types' + +/** + * Lists every FR/EN text the importer writes itself (no source file holds + * it), derived from the document so the list can never drift from what is + * written. Annotation categories are reported by categories.ts. + */ + +export const AUTHORED_LABEL_CODE = 'label.authored' + +function authored(subject: string, text: { fr?: string; en?: string }) { + const parts = [ + text.fr === undefined ? null : `FR « ${text.fr} »`, + text.en === undefined ? null : `EN « ${text.en} »`, + ].filter((part): part is string => part !== null) + const anomaly: Anomaly = { + code: AUTHORED_LABEL_CODE, + level: 'a_valider', + subject, + message: `Libellé écrit par l'importateur : ${parts.join(', ')}.`, + } + return anomaly +} + +export function regionLabelSubject(code: string): string { + return `vertebral_config.${code}` +} + +export function authoredLabelAnomalies( + document: AnatomicalSheetDocumentInput, +): Anomaly[] { + return [ + authored('name', document.name), + authored('description', document.description), + ...document.views.map((v) => authored(`views.${v.id}`, v.name)), + ...document.vertebral_config.regions.map((r) => + authored(regionLabelSubject(r.code), r.name), + ), + ] +} diff --git a/packages/anatomy/src/legacy/catalog-checks.ts b/packages/anatomy/src/legacy/catalog-checks.ts new file mode 100644 index 00000000..7ba450f8 --- /dev/null +++ b/packages/anatomy/src/legacy/catalog-checks.ts @@ -0,0 +1,102 @@ +import type { LegacyCatalog, LegacyNode } from './catalog' +import type { Anomaly } from './types' + +/** + * Catalog-wide findings that need a business decision or an explanation. + * Nothing here alters the data: the importer copies the catalog verbatim + * and these checks only describe what a reviewer must know. + */ + +const PREFIXED = /^(.+)-(dysfunctions|observations)$/ + +/** A prefixed category id that names another zone (sphenoid → ssb-…). */ +function foreignPrefixAnomalies(catalog: LegacyCatalog): Anomaly[] { + const zoneIds = Object.keys(catalog.zones) + const out: Anomaly[] = [] + for (const [zoneId, zone] of Object.entries(catalog.zones)) { + for (const category of zone.categories) { + const match = PREFIXED.exec(category.id) + if (!match || match[1] === zoneId || !zoneIds.includes(match[1]!)) + continue + out.push({ + code: 'finding.category.foreign_prefix', + level: 'a_valider', + subject: `${zoneId}/${category.id}`, + message: + `Identifiant de catégorie dupliqué entre ${zoneId} et ${match[1]} ; ` + + `${zoneId}-${match[2]} attendu ; décision ostéopathe requise. ` + + 'Importé tel quel (non renommé).', + }) + } + } + return out +} + +function childIds(category: LegacyNode): string { + return (category.children ?? []).map((c) => c.id).join(', ') +} + +/** Same 'anamnesis' id everywhere, different content per zone family. */ +function anamnesisVariants(catalog: LegacyCatalog): Anomaly[] { + const variants = new Map() + for (const [zoneId, zone] of Object.entries(catalog.zones)) { + const category = zone.categories.find((c) => c.id === 'anamnesis') + if (!category) continue + const key = childIds(category) + variants.set(key, [...(variants.get(key) ?? []), zoneId]) + } + return [...variants.entries()].map(([children, zones], index) => ({ + code: 'finding.anamnesis.variant', + level: 'informatif', + subject: `anamnesis variante ${index + 1}/${variants.size}`, + message: `Zones ${zones.join(', ')} : ${children}.`, + })) +} + +function collectIds(nodes: readonly LegacyNode[], into: Set): void { + for (const node of nodes) { + into.add(node.id) + collectIds(node.children ?? [], into) + } +} + +/** Locale-independent order: artifacts must not vary with the process. */ +function byCodePoint(a: string, b: string): number { + if (a === b) return 0 + return a < b ? -1 : 1 +} + +/** Node ids are unique among siblings only; a finding is (zone, path). */ +function crossZoneDuplicates(catalog: LegacyCatalog): Anomaly[] { + const zonesById = new Map() + for (const zone of Object.values(catalog.zones)) { + const ids = new Set() + collectIds(zone.categories, ids) + for (const id of ids) zonesById.set(id, (zonesById.get(id) ?? 0) + 1) + } + const shared = [...zonesById.entries()].filter(([, n]) => n > 1) + const top = [...shared].sort((a, b) => b[1] - a[1] || byCodePoint(a[0], b[0])) + return [ + { + code: 'finding.id.shared_across_zones', + level: 'informatif', + subject: `${shared.length} identifiants`, + message: + 'Identifiants de nœuds réutilisés entre zones (unicité entre frères ' + + 'seulement, adressage par zone + chemin). Les plus fréquents : ' + + top + .slice(0, 8) + .map(([id, n]) => `${id} (${n})`) + .join(', ') + + '.', + }, + ] +} + +export function catalogAnomalies(catalog: LegacyCatalog): Anomaly[] { + return [ + ...foreignPrefixAnomalies(catalog), + ...anamnesisVariants(catalog), + ...crossZoneDuplicates(catalog), + ] +} diff --git a/packages/anatomy/src/legacy/catalog.ts b/packages/anatomy/src/legacy/catalog.ts new file mode 100644 index 00000000..da3362ff --- /dev/null +++ b/packages/anatomy/src/legacy/catalog.ts @@ -0,0 +1,250 @@ +import type { + FindingCategoryKind, + FindingNodeInput, + LocalizedOptionalText, + SourceRef, +} from '@faunosteo/domain' +import { isStableId, slugify } from './ids' +import type { Anomaly, ZoneStats } from './types' + +/** + * Legacy findings catalog (pathologies.json, schema 2.0) → canonical + * finding zones in the lean authoring form: optional keys are written only + * when the source carries them, so the document stays as small as the + * catalog and the parser fills the defaults. + */ + +export interface LegacyNode { + id: string + name_fr: string + name_en: string + description_fr?: string + description_en?: string + requires_vet_referral?: boolean + sources?: SourceRef[] + children?: LegacyNode[] +} + +export interface LegacyZone { + id: string + name_fr: string + name_en: string + categories: LegacyNode[] +} + +export interface LegacyCatalog { + schema_version: string + scope_disclaimer?: string + species?: { id: string; name_fr: string; name_en: string } + zones: Record +} + +export interface CategoryInput { + id: string + kind: FindingCategoryKind + name: { fr: string; en: string } + description?: LocalizedOptionalText + children: FindingNodeInput[] +} + +export interface ZoneInput { + id: string + name: { fr: string; en: string } + categories: CategoryInput[] +} + +export interface MappedCatalog { + zones: ZoneInput[] + zoneStats: ZoneStats[] + nodeIdMap: Record + missingDescriptionEn: number + sources: number + anomalies: Anomaly[] +} + +/** Mutable tallies of one catalog walk; never shared between runs. */ +interface WalkState { + nodeIdMap: Record + anomalies: Anomaly[] + missingDescriptionEn: number + sources: number +} + +export function parseLegacyCatalog(json: string): LegacyCatalog { + const catalog = JSON.parse(json) as LegacyCatalog + if (typeof catalog?.zones !== 'object' || catalog.zones === null) { + throw new Error('pathologies.json: "zones" object missing') + } + return catalog +} + +export function categoryKind(categoryId: string): FindingCategoryKind { + if (categoryId.endsWith('-dysfunctions')) return 'dysfunction' + if (categoryId.endsWith('-observations')) return 'consultation_reason' + if (categoryId === 'anamnesis') return 'anamnesis' + return 'custom' +} + +function description(node: LegacyNode): LocalizedOptionalText | undefined { + if (node.description_fr === undefined && node.description_en === undefined) { + return undefined + } + const text: LocalizedOptionalText = {} + if (node.description_fr !== undefined) text.fr = node.description_fr + if (node.description_en !== undefined) text.en = node.description_en + return text +} + +function stableNodeId(id: string, path: string[], state: WalkState): string { + if (isStableId(id)) return id + const next = slugify(id) || 'node' + const key = [...path, id].join('/') + state.nodeIdMap[key] = next + state.anomalies.push({ + code: 'finding.id.slugified', + level: 'a_valider', + subject: key, + message: `Identifiant hors motif stable, remplacé par « ${next} ».`, + }) + return next +} + +function tallyNode(node: LegacyNode, state: WalkState): void { + if (node.description_fr !== undefined && node.description_en === undefined) { + state.missingDescriptionEn += 1 + } + state.sources += node.sources?.length ?? 0 +} + +function mapNode( + node: LegacyNode, + path: string[], + state: WalkState, +): FindingNodeInput { + tallyNode(node, state) + const id = stableNodeId(node.id, path, state) + const out: FindingNodeInput = { + id, + name: { fr: node.name_fr, en: node.name_en }, + } + const text = description(node) + if (text) out.description = text + if (node.requires_vet_referral === true) out.requires_vet_referral = true + if (node.sources) out.sources = node.sources.map((s) => ({ ...s })) + if (node.children) { + out.children = node.children.map((c) => + mapNode(c, [...path, node.id], state), + ) + } + return out +} + +function mapCategory( + zoneId: string, + category: LegacyNode, + state: WalkState, +): CategoryInput { + tallyNode(category, state) + const kind = categoryKind(category.id) + if (kind === 'custom') { + state.anomalies.push({ + code: 'finding.category.kind_unknown', + level: 'a_valider', + subject: `${zoneId}/${category.id}`, + message: 'Type de catégorie non reconnu, importé en « custom ».', + }) + } + const path = [zoneId, category.id] + const out: CategoryInput = { + id: stableNodeId(category.id, [zoneId], state), + kind, + name: { fr: category.name_fr, en: category.name_en }, + children: (category.children ?? []).map((c) => mapNode(c, path, state)), + } + const text = description(category) + if (text) out.description = text + return out +} + +/** Counts categories as nodes, as the audit does (792 = 78 + 714). */ +export function countTree( + nodes: ReadonlyArray, +): TreeCounts { + let total = { nodes: 0, leaves: 0, vetReferrals: 0 } + for (const node of nodes) { + const children = node.children ?? [] + const sub = countTree(children) + total = { + nodes: total.nodes + 1 + sub.nodes, + leaves: total.leaves + sub.leaves + (children.length === 0 ? 1 : 0), + vetReferrals: + total.vetReferrals + + sub.vetReferrals + + (node.requires_vet_referral ? 1 : 0), + } + } + return total +} + +function zoneStatsOf(zone: LegacyZone): ZoneStats { + const counts = countTree(zone.categories) + const categoryLeaves = zone.categories.filter((c) => !c.children?.length) + return { + zoneId: zone.id, + nodes: counts.nodes, + leaves: counts.leaves - categoryLeaves.length, + vetReferrals: counts.vetReferrals, + } +} + +export interface TreeCounts { + nodes: number + leaves: number + vetReferrals: number +} + +/** Throws when the output tree does not hold exactly the input tree. */ +export function assertNothingDropped( + zoneId: string, + before: TreeCounts, + after: TreeCounts, +): void { + const keys = ['nodes', 'leaves', 'vetReferrals'] as const + const diff = keys.filter((key) => before[key] !== after[key]) + if (diff.length === 0) return + const detail = diff.map((k) => `${k} ${before[k]} in, ${after[k]} out`) + throw new Error(`zone ${zoneId}: ${detail.join('; ')}`) +} + +function mapZone(key: string, zone: LegacyZone, state: WalkState): ZoneInput { + if (zone.id !== key) throw new Error(`zone key ${key} ≠ id ${zone.id}`) + const mapped: ZoneInput = { + id: key, + name: { fr: zone.name_fr, en: zone.name_en }, + categories: zone.categories.map((c) => mapCategory(key, c, state)), + } + assertNothingDropped( + key, + countTree(zone.categories), + countTree(mapped.categories), + ) + return mapped +} + +export function mapCatalog(catalog: LegacyCatalog): MappedCatalog { + const state: WalkState = { + nodeIdMap: {}, + anomalies: [], + missingDescriptionEn: 0, + sources: 0, + } + const entries = Object.entries(catalog.zones) + return { + zones: entries.map(([key, zone]) => mapZone(key, zone, state)), + zoneStats: entries.map(([, zone]) => zoneStatsOf(zone)), + nodeIdMap: state.nodeIdMap, + missingDescriptionEn: state.missingDescriptionEn, + sources: state.sources, + anomalies: state.anomalies, + } +} diff --git a/packages/anatomy/src/legacy/categories.ts b/packages/anatomy/src/legacy/categories.ts new file mode 100644 index 00000000..bbabbb0c --- /dev/null +++ b/packages/anatomy/src/legacy/categories.ts @@ -0,0 +1,98 @@ +import type { AnnotationCategory } from '@faunosteo/domain' +import type { LegacyAnnotation } from './svg' +import type { Anomaly } from './types' + +/** + * SVG annotation categories → canonical categories. The legacy editor + * slugified labels byte-wise, so accented letters became '-' + * ("Charnières vertébrales" → charni-res-vert-brales). Those technical + * slugs are normalised here and every change is reported; labels the + * importer had to write are reported as "to validate". + */ + +/** Degraded legacy slug → real slug. Other slugs are kept as they are. */ +const SLUG_FIXES: Readonly> = { + 'charni-res-vert-brales': 'charnieres-vertebrales', + 'cadrans-du-cr-ne': 'cadrans-du-crane', +} + +/** Labels authored by the importer, keyed by normalised slug. */ +const LABELS: Readonly> = { + articulations: { fr: 'Articulations', en: 'Joints' }, + os: { fr: 'Os', en: 'Bones' }, + 'zone-colonne': { fr: 'Zone colonne', en: 'Spine' }, + 'charnieres-vertebrales': { + fr: 'Charnières vertébrales', + en: 'Vertebral hinges', + }, + 'cadrans-du-crane': { fr: 'Cadrans du crâne', en: 'Skull quadrants' }, +} + +export interface MappedCategories { + categories: AnnotationCategory[] + idMap: Record + anomalies: Anomaly[] +} + +export function normaliseCategoryId(legacy: string): string { + return SLUG_FIXES[legacy] ?? legacy +} + +/** + * data-anno-category-name is used only when it is a real label: in the + * equine SVGs it repeats the slug ("articulations", "os"), so the readable + * label of the table wins and the report says so. + */ +function frenchName(legacy: string, categoryName: string | null): string { + const id = normaliseCategoryId(legacy) + if (categoryName && categoryName !== legacy) return categoryName + return LABELS[id]?.fr ?? id +} + +function labelAnomaly(id: string, fr: string, en: string): Anomaly { + return { + code: 'category.label.authored', + level: 'a_valider', + subject: id, + message: `Libellé écrit par l'importateur : FR « ${fr} », EN « ${en} ».`, + } +} + +function slugAnomaly(legacy: string, id: string): Anomaly { + return { + code: 'category.slug.normalised', + level: 'a_valider', + subject: legacy, + message: `Slug technique dégradé (accents perdus) normalisé en « ${id} ».`, + } +} + +function firstSeen(annotations: readonly LegacyAnnotation[]) { + const seen = new Map() + for (const a of annotations) { + if (a.category === null) continue + if (!seen.has(a.category) || seen.get(a.category) === null) { + seen.set(a.category, a.categoryName) + } + } + return seen +} + +/** Categories in order of first appearance across the SVGs. */ +export function mapCategories( + annotations: readonly LegacyAnnotation[], +): MappedCategories { + const result: MappedCategories = { categories: [], idMap: {}, anomalies: [] } + for (const [legacy, categoryName] of firstSeen(annotations)) { + const id = normaliseCategoryId(legacy) + const name = { + fr: frenchName(legacy, categoryName), + en: LABELS[id]?.en ?? id, + } + result.categories.push({ id, name, color: null }) + result.idMap[legacy] = id + if (id !== legacy) result.anomalies.push(slugAnomaly(legacy, id)) + result.anomalies.push(labelAnomaly(id, name.fr, name.en)) + } + return result +} diff --git a/packages/anatomy/src/legacy/ids.ts b/packages/anatomy/src/legacy/ids.ts new file mode 100644 index 00000000..65c8327f --- /dev/null +++ b/packages/anatomy/src/legacy/ids.ts @@ -0,0 +1,54 @@ +import { createHash } from 'node:crypto' +import { STABLE_ID_PATTERN } from '@faunosteo/domain' + +/** + * Deterministic identifiers. The importer must produce byte-identical + * output across runs, so nothing here is random or time-based. + * + * UUIDs are name-based in the RFC 4122 version 5 style, with SHA-256 in + * place of SHA-1: the first 16 bytes of sha256(), the + * version nibble forced to 5 and the variant bits to 10xx. Assets use + * 'faunosteo:asset:' + the file's sha256 (same bytes, same id), the sheet + * uses 'faunosteo:sheet::v'. + */ + +export function sha256Hex(data: Uint8Array | string): string { + return createHash('sha256').update(data).digest('hex') +} + +export function deterministicUuid(name: string): string { + const bytes = createHash('sha256').update(name).digest().subarray(0, 16) + bytes[6] = (bytes[6] & 0x0f) | 0x50 + bytes[8] = (bytes[8] & 0x3f) | 0x80 + const hex = bytes.toString('hex') + return [ + hex.slice(0, 8), + hex.slice(8, 12), + hex.slice(12, 16), + hex.slice(16, 20), + hex.slice(20, 32), + ].join('-') +} + +export function assetIdFromSha256(fileSha256: string): string { + return deterministicUuid(`faunosteo:asset:${fileSha256}`) +} + +export function sheetIdFor(speciesId: string, version: number): string { + return deterministicUuid(`faunosteo:sheet:${speciesId}:v${version}`) +} + +/** Lowercase, accents stripped (NFD), every other run of chars → '-'. */ +export function slugify(label: string): string { + return label + .normalize('NFD') + .replace(/[̀-ͯ]/g, '') + .toLowerCase() + .replace(/[^a-z0-9]+/g, '-') + .replace(/^-+|-+$/g, '') + .slice(0, 64) +} + +export function isStableId(id: string): boolean { + return STABLE_ID_PATTERN.test(id) +} diff --git a/packages/anatomy/src/legacy/importer.ts b/packages/anatomy/src/legacy/importer.ts new file mode 100644 index 00000000..5c8f2d57 --- /dev/null +++ b/packages/anatomy/src/legacy/importer.ts @@ -0,0 +1,330 @@ +import { + AnatomicalSheetDocumentSchema, + SHEET_DOCUMENT_SCHEMA_VERSION, + validateSheetDocument, + type AnatomicalSheetDocumentInput, + type Annotation, + type SheetView, +} from '@faunosteo/domain' +import { + mapAnnotation, + zoneNameKey, + type MappedAnnotation, +} from './annotations' +import { + mapCatalog, + parseLegacyCatalog, + type LegacyCatalog, + type MappedCatalog, +} from './catalog' +import { authoredLabelAnomalies } from './authored-labels' +import { catalogAnomalies } from './catalog-checks' +import { mapCategories, type MappedCategories } from './categories' +import { assetIdFromSha256, sha256Hex, sheetIdFor } from './ids' +import { parseAnnotatedSvg, type ParsedSvg } from './svg' +import type { + Anomaly, + AssetRecord, + EquineLegacyInput, + ImportResult, + ImportStats, + LegacyIdMap, + SourceDigest, + SvgSource, +} from './types' +import { + parseVertebralFormula, + vertebralRegions, + type LegacyVertebralFormula, +} from './vertebrae' + +/** + * One-off, deterministic import of the historical equine assets into the + * first canonical anatomical sheet document (Step 4b). The result is a + * DRAFT for business review: every correction is listed in `anomalies`, + * nothing is published. + */ + +export const EQUINE_SPECIES_ID = 'equine' +export const EQUINE_SHEET_VERSION = 1 +export const MAIN_VIEW_ID = 'main' +export const HEAD_VIEW_ID = 'head' + +interface ParsedSources { + assets: AssetRecord[] + main: ParsedSvg + head: ParsedSvg + catalog: LegacyCatalog + formula: LegacyVertebralFormula +} + +interface Mapped { + annotations: MappedAnnotation[] + categories: MappedCategories + catalog: MappedCatalog +} + +function assetRecord(source: SvgSource): AssetRecord { + const sha256 = sha256Hex(source.bytes) + return { + file: source.fileName, + sha256, + byte_size: source.bytes.byteLength, + svg_asset_id: assetIdFromSha256(sha256), + } +} + +function textDigest(file: string, text: string): SourceDigest { + const bytes = new TextEncoder().encode(text) + return { file, sha256: sha256Hex(bytes), byte_size: bytes.byteLength } +} + +function svgText(source: SvgSource): string { + return new TextDecoder('utf-8', { fatal: true }).decode(source.bytes) +} + +function parseSources(input: EquineLegacyInput): ParsedSources { + return { + assets: [assetRecord(input.mainSvg), assetRecord(input.headSvg)], + main: parseAnnotatedSvg(svgText(input.mainSvg), input.mainSvg.fileName), + head: parseAnnotatedSvg(svgText(input.headSvg), input.headSvg.fileName), + catalog: parseLegacyCatalog(input.catalogJson), + formula: parseVertebralFormula(input.vertebraeSource), + } +} + +function mapSources(sources: ParsedSources): Mapped { + const catalog = mapCatalog(sources.catalog) + const zoneByNames = new Map( + catalog.zones.map((z) => [zoneNameKey(z.name.fr, z.name.en), z.id]), + ) + const views = [ + { viewId: MAIN_VIEW_ID, svg: sources.main, file: sources.assets[0]! }, + { viewId: HEAD_VIEW_ID, svg: sources.head, file: sources.assets[1]! }, + ] + const annotations = views.flatMap(({ viewId, svg, file }) => + svg.annotations.map((a) => + mapAnnotation(a, { viewId, fileName: file.file, zoneByNames }), + ), + ) + const legacy = [...sources.main.annotations, ...sources.head.annotations] + return { annotations, categories: mapCategories(legacy), catalog } +} + +function buildViews(assets: AssetRecord[]): SheetView[] { + return [ + { + id: MAIN_VIEW_ID, + kind: 'main', + name: { fr: 'Vue générale', en: 'Overview' }, + svg_asset_id: assets[0]!.svg_asset_id, + view_box: null, + }, + { + id: HEAD_VIEW_ID, + kind: 'detail', + parent_view_id: MAIN_VIEW_ID, + name: { fr: 'Tête', en: 'Head' }, + svg_asset_id: assets[1]!.svg_asset_id, + view_box: null, + }, + ] +} + +function buildDocument( + sources: ParsedSources, + mapped: Mapped, +): AnatomicalSheetDocumentInput { + const disclaimer = sources.catalog.scope_disclaimer + return { + schema_version: SHEET_DOCUMENT_SCHEMA_VERSION, + species_id: EQUINE_SPECIES_ID, + name: { fr: 'Cheval', en: 'Horse' }, + description: { + fr: 'Fiche anatomique officielle Faunosteo', + en: 'Official Faunosteo anatomical sheet', + }, + scope_disclaimer: disclaimer === undefined ? {} : { fr: disclaimer }, + attribution: { + authors: ['Faunosteo'], + license: null, + notes: + 'Import des données historiques: Horse.svg, Horse_head.svg, ' + + `pathologies.json (schema ${sources.catalog.schema_version})`, + }, + vertebral_config: { regions: vertebralRegions(sources.formula) }, + categories: mapped.categories.categories, + views: buildViews(sources.assets), + annotations: mapped.annotations.map((m) => m.annotation), + finding_zones: mapped.catalog.zones, + } +} + +function buildIdMap(sources: ParsedSources, mapped: Mapped): LegacyIdMap { + return { + views: { [HEAD_VIEW_ID]: HEAD_VIEW_ID }, + annotations: Object.fromEntries( + mapped.annotations.map((m) => [m.row.legacyId, m.row.newId]), + ), + categories: mapped.categories.idMap, + finding_nodes: mapped.catalog.nodeIdMap, + assets: Object.fromEntries( + sources.assets.map((a) => [a.file, a.svg_asset_id]), + ), + } +} + +function countBy( + annotations: readonly Annotation[], + test: (a: Annotation) => boolean, +) { + return annotations.filter(test).length +} + +function buildStats( + sources: ParsedSources, + document: AnatomicalSheetDocumentInput, + mapped: Mapped, +): ImportStats { + const annotations = document.annotations + const totals = mapped.catalog.zoneStats + const sum = (key: 'nodes' | 'leaves' | 'vetReferrals') => + totals.reduce((acc, zone) => acc + zone[key], 0) + return { + legacyAnnotations: + sources.main.annotations.length + sources.head.annotations.length, + annotations: annotations.length, + annotationsByView: { + [MAIN_VIEW_ID]: countBy(annotations, (a) => a.view_id === MAIN_VIEW_ID), + [HEAD_VIEW_ID]: countBy(annotations, (a) => a.view_id === HEAD_VIEW_ID), + }, + linkedAnnotations: countBy( + annotations, + (a) => a.kind !== 'detail_trigger' && a.finding_zone_id !== null, + ), + triggers: countBy(annotations, (a) => a.kind === 'detail_trigger'), + views: document.views.length, + vertebralAnnotations: countBy( + annotations, + (a) => a.kind !== 'detail_trigger' && a.vertebral_region_code !== null, + ), + bilateral: countBy(annotations, (a) => a.laterality === 'bilateral'), + findingZones: document.finding_zones.length, + nodes: sum('nodes'), + leaves: sum('leaves'), + vetReferrals: sum('vetReferrals'), + missingDescriptionEn: mapped.catalog.missingDescriptionEn, + sources: mapped.catalog.sources, + } +} + +/** Every data-anno-id read from the SVGs must be written once. */ +function assertAnnotationsKept(stats: ImportStats): void { + if (stats.legacyAnnotations === stats.annotations) return + throw new Error( + `${stats.legacyAnnotations} annotations read, ${stats.annotations} written`, + ) +} + +function sourceAnomalies( + sources: ParsedSources, + stats: ImportStats, +): Anomaly[] { + const out: Anomaly[] = [] + const add = (code: string, subject: string, message: string) => + out.push({ code, level: 'a_valider', subject, message }) + if (stats.missingDescriptionEn > 0) { + add( + 'finding.description_en.missing', + 'pathologies.json', + `${stats.missingDescriptionEn} descriptions sans traduction anglaise ` + + `(clé « en » absente, rien d'inventé).`, + ) + } + if (sources.catalog.scope_disclaimer !== undefined) { + add( + 'document.scope_disclaimer.no_en', + 'scope_disclaimer', + 'Texte de périmètre légal en français seulement : traduction anglaise à rédiger.', + ) + } + const range = sources.formula.variesRange ?? 'non précisée' + add( + 'vertebral.cd.capped', + 'Cd', + `Caudales plafonnées à ${sources.formula.counts.Cd} pour le sélecteur, ` + + `alors que l'espèce varie (${range}) selon le commentaire source.`, + ) + if (stats.sources === 0) { + add( + 'finding.sources.none', + 'pathologies.json', + 'Aucune source bibliographique sur les nœuds, alors que la règle ' + + 'projet en demande au moins une par entrée.', + ) + } + return out +} + +function informativeNotes(): Anomaly[] { + return [ + { + code: 'annotation.geometry.hitbox', + level: 'informatif', + subject: 'géométrie', + message: + 'Géométrie lue sur le premier élément de chaque annotation (zone ' + + "de clic), le marqueur visuel n'est pas importé.", + }, + ] +} + +function collectAnomalies( + sources: ParsedSources, + mapped: Mapped, + stats: ImportStats, + document: AnatomicalSheetDocumentInput, +): Anomaly[] { + return [ + ...authoredLabelAnomalies(document), + ...sources.main.anomalies, + ...sources.head.anomalies, + ...mapped.annotations.flatMap((m) => m.anomalies), + ...mapped.categories.anomalies, + ...mapped.catalog.anomalies, + ...catalogAnomalies(sources.catalog), + ...sourceAnomalies(sources, stats), + ...informativeNotes(), + ] +} + +export function importEquineLegacy(input: EquineLegacyInput): ImportResult { + const sources = parseSources(input) + const mapped = mapSources(sources) + const document = buildDocument(sources, mapped) + const parsed = AnatomicalSheetDocumentSchema.parse(document) + const stats = buildStats(sources, document, mapped) + assertAnnotationsKept(stats) + return { + document, + legacyIdMap: buildIdMap(sources, mapped), + assets: sources.assets, + sourceDigests: [ + textDigest('pathologies.json', input.catalogJson), + textDigest('vertebrae.ts', input.vertebraeSource), + ], + sheetId: sheetIdFor(EQUINE_SPECIES_ID, EQUINE_SHEET_VERSION), + viewBoxes: { + [MAIN_VIEW_ID]: sources.main.viewBox, + [HEAD_VIEW_ID]: sources.head.viewBox, + }, + annotationRows: mapped.annotations.map((m) => m.row), + regionInferences: mapped.annotations.flatMap((m) => + m.region ? [m.region] : [], + ), + zoneStats: mapped.catalog.zoneStats, + stats, + anomalies: collectAnomalies(sources, mapped, stats, document), + issues: validateSheetDocument(parsed), + } +} diff --git a/packages/anatomy/src/legacy/index.ts b/packages/anatomy/src/legacy/index.ts new file mode 100644 index 00000000..5f5fb417 --- /dev/null +++ b/packages/anatomy/src/legacy/index.ts @@ -0,0 +1,18 @@ +export { importEquineLegacy, HEAD_VIEW_ID, MAIN_VIEW_ID } from './importer' +export { renderArtifacts, SEED_SQL_FILE } from './artifacts' +export { renderImportReport } from './report' +export { renderSeedSql, DOCUMENT_DOLLAR_TAG } from './seed' +export { + readEquineSources, + EQUINE_SEED_DIR, + EQUINE_SOURCE_PATHS, +} from './sources' +export { + assetIdFromSha256, + deterministicUuid, + sha256Hex, + sheetIdFor, + slugify, +} from './ids' +export { inferRegionCode } from './regions' +export type * from './types' diff --git a/packages/anatomy/src/legacy/regions.ts b/packages/anatomy/src/legacy/regions.ts new file mode 100644 index 00000000..0ecf87d3 --- /dev/null +++ b/packages/anatomy/src/legacy/regions.ts @@ -0,0 +1,46 @@ +/** + * Spine region inference from legacy labels, kept in the importer only + * (ANATOMICAL_SHEET_MODEL.md §2: no label parsing at runtime). Same roots + * and order as the legacy regionFromLabel (audit 07 §2): FR label first, + * then EN, first root in test order wins. + */ + +const REGION_ROOTS: ReadonlyArray<{ code: string; roots: string[] }> = [ + { code: 'C', roots: ['cervic'] }, + { code: 'T', roots: ['thorac', 'dors'] }, + { code: 'L', roots: ['lombair', 'lumbar'] }, + { code: 'S', roots: ['sacral', 'sacre'] }, + { code: 'Cd', roots: ['caudal', 'coccyg'] }, +] + +export interface RegionMatch { + code: string + root: string + label: string +} + +function normalise(label: string): string { + return label.normalize('NFD').replace(/[̀-ͯ]/g, '').toLowerCase() +} + +function matchLabel(label: string): RegionMatch | null { + const text = normalise(label) + for (const { code, roots } of REGION_ROOTS) { + const root = roots.find((candidate) => text.includes(candidate)) + if (root) return { code, root, label } + } + return null +} + +/** Null when neither label carries a known root: the caller reports it. */ +export function inferRegionCode( + nameFr: string | null, + nameEn: string | null, +): RegionMatch | null { + const labels = [nameFr, nameEn].filter((l): l is string => Boolean(l)) + for (const label of labels) { + const match = matchLabel(label) + if (match) return match + } + return null +} diff --git a/packages/anatomy/src/legacy/report.ts b/packages/anatomy/src/legacy/report.ts new file mode 100644 index 00000000..f2c1bdb5 --- /dev/null +++ b/packages/anatomy/src/legacy/report.ts @@ -0,0 +1,340 @@ +import { AUTHORED_LABEL_CODE, regionLabelSubject } from './authored-labels' +import { countTree } from './catalog' +import type { Anomaly, ImportResult } from './types' + +/** + * French Markdown import report, written for an osteopath (what to + * validate) and for the developer (what was mapped and how). No dates and + * no environment data: the report is a committed, byte-stable artifact. + */ + +function cell(value: string | number | null): string { + if (value === null) return '-' + return String(value).replace(/\|/g, '\\|').replace(/\n/g, ' ') +} + +function table( + head: string[], + rows: Array>, +): string { + const lines = [head, head.map(() => '---'), ...rows.map((r) => r.map(cell))] + return lines.map((line) => `| ${line.join(' | ')} |`).join('\n') +} + +function code(value: string | null): string { + return value === null ? '-' : `\`${value}\`` +} + +function intro(result: ImportResult): string { + return [ + "# Rapport d'import : fiche anatomique équine v1", + '', + 'Généré par `pnpm import:equine` à partir des données historiques. ' + + 'Ne pas modifier à la main : relancer la commande.', + '', + `Statut : **brouillon** (version 1 en \`draft\`), jamais publié par ` + + `le seed. Fiche \`${result.sheetId}\`, espèce \`${result.document.species_id}\`.`, + '', + 'Les éléments de la section « Anomalies à valider » demandent une ' + + 'décision métier avant toute publication.', + ].join('\n') +} + +function sourcesSection(result: ImportResult): string { + const assetRows = result.assets.map((a) => [ + code(a.file), + a.byte_size, + code(a.sha256), + code(a.svg_asset_id), + ]) + const otherRows = result.sourceDigests.map((d) => [ + code(d.file), + d.byte_size, + code(d.sha256), + '-', + ]) + const viewBoxes = Object.entries(result.viewBoxes).map( + ([view, box]) => + `- vue \`${view}\` : viewBox \`${box ?? 'absent'}\` (view_box du ` + + `document laissé à null, le SVG porte le sien)`, + ) + return [ + '## 1. Sources et empreintes', + '', + table( + ['Fichier', 'Octets', 'sha256', "Id d'asset"], + [...assetRows, ...otherRows], + ), + '', + "Les ids d'asset sont dérivés du sha256 du fichier (UUID déterministe), " + + "les deux SVG sont copiés à l'identique dans `assets/`.", + '', + ...viewBoxes, + ].join('\n') +} + +function volumesSection(result: ImportResult): string { + const s = result.stats + const out = countTree( + result.document.finding_zones.flatMap((z) => z.categories), + ) + const rows: Array<[string, number]> = [ + ['Annotations', s.annotations], + ['dont vue `main` (Horse.svg)', s.annotationsByView.main ?? 0], + ['dont vue `head` (Horse_head.svg)', s.annotationsByView.head ?? 0], + ['Annotations reliées à une zone de constats', s.linkedAnnotations], + ['Déclencheurs de vue détail', s.triggers], + ['Vues', s.views], + ['Zones vertébrales avec code de région', s.vertebralAnnotations], + ['Annotations bilatérales', s.bilateral], + ['Zones de constats (catalogue)', s.findingZones], + ['Nœuds (catégories incluses)', s.nodes], + ['Feuilles', s.leaves], + ['Orientations vétérinaires', s.vetReferrals], + ] + return [ + '## 2. Volumes', + '', + table(['Mesure', 'Valeur'], rows), + '', + 'Contrôle entrée = sortie, compté des deux côtés (sources lues, ' + + "document écrit). L'importateur s'arrête au moindre écart :", + '', + table( + ['Contrôle', 'Lu (sources)', 'Écrit (document)'], + [ + [ + 'Annotations (data-anno-id distincts)', + s.legacyAnnotations, + s.annotations, + ], + ['Nœuds (catégories incluses)', s.nodes, out.nodes], + ['Feuilles', s.leaves, out.leaves], + ['Orientations vétérinaires', s.vetReferrals, out.vetReferrals], + ], + ), + ].join('\n') +} + +function annotationsSection(result: ImportResult): string { + const rows = result.annotationRows.map((r) => [ + code(r.legacyId), + code(r.newId), + r.viewId, + r.kind, + r.laterality, + r.regionCode, + r.findingZoneId === null ? '-' : code(r.findingZoneId), + r.geometry, + ]) + return [ + '## 3. Annotations', + '', + table( + [ + 'Id historique', + 'Nouvel id', + 'Vue', + 'Type', + 'Latéralité', + 'Région', + 'Zone de constats', + 'Géométrie', + ], + rows, + ), + ].join('\n') +} + +function categoriesSection(result: ImportResult): string { + const legacyOf = Object.fromEntries( + Object.entries(result.legacyIdMap.categories).map(([legacy, id]) => [ + id, + legacy, + ]), + ) + const authored = new Set( + result.anomalies + .filter((a) => a.code === 'category.label.authored') + .map((a) => a.subject), + ) + const rows = result.document.categories.map((c) => [ + code(legacyOf[c.id] ?? c.id), + code(c.id), + c.name.fr, + c.name.en, + authored.has(c.id) ? 'importateur, à valider' : 'SVG', + ]) + return [ + "## 4. Catégories d'annotation", + '', + table( + ['Id SVG', 'Id', 'Libellé FR', 'Libellé EN', 'Origine du libellé'], + rows, + ), + '', + "Couleur : `null` partout (les couleurs du SVG restent dans l'asset). " + + 'Dans les SVG, `data-anno-category-name` répète le slug (`articulations`, ' + + "`os`) : ce n'est pas un libellé, le libellé lisible de la table " + + "de l'importateur est utilisé.", + ].join('\n') +} + +function vertebralSection(result: ImportResult): string { + const authored = new Set( + result.anomalies + .filter((a) => a.code === AUTHORED_LABEL_CODE) + .map((a) => a.subject), + ) + const regions = result.document.vertebral_config.regions.map((r) => [ + code(r.code), + r.name.fr, + r.name.en, + r.count, + authored.has(regionLabelSubject(r.code)) + ? 'importateur, à valider' + : 'source', + ]) + const inferences = result.regionInferences.map((i) => [ + code(result.legacyIdMap.annotations[i.annotationId] ?? i.annotationId), + i.label, + i.root === null ? '-' : code(i.root), + code(i.code), + ]) + return [ + '## 5. Configuration vertébrale', + '', + table( + ['Code', 'Nom FR', 'Nom EN', 'Vertèbres', 'Origine du libellé'], + regions, + ), + '', + 'Nombres de vertèbres : `vertebrae.ts`. Noms de région : écrits par ' + + "l'importateur (aucune source ne les porte).", + '', + 'Codes de région déduits des libellés (racines `cervic`, `thorac`/`dors`, ' + + '`lombair`/`lumbar`, `sacral`/`sacre`, `caudal`/`coccyg`, FR puis ' + + 'EN). Déduction faite une fois ici, le document porte le code :', + '', + table(['Annotation', 'Libellé lu', 'Racine', 'Code'], inferences), + ].join('\n') +} + +function findingsSection(result: ImportResult): string { + const names = new Map( + result.document.finding_zones.map((z) => [z.id, z.name.fr]), + ) + const rows = result.zoneStats.map((z) => [ + code(z.zoneId), + names.get(z.zoneId) ?? '-', + z.nodes, + z.leaves, + z.vetReferrals, + ]) + const s = result.stats + rows.push(['**Total**', '', s.nodes, s.leaves, s.vetReferrals]) + return [ + '## 6. Arbre de constats par zone', + '', + 'Copie fidèle du catalogue : ids, libellés, descriptions présentes, ' + + 'orientations vétérinaires et sources. Ordre des zones et des catégories ' + + 'conservé. Nœuds = catégories incluses.', + '', + table(['Zone', 'Nom', 'Nœuds', 'Feuilles', 'Orientations vét.'], rows), + ].join('\n') +} + +function anomalyRows(anomalies: readonly Anomaly[]) { + return anomalies.map((a) => [code(a.code), a.subject, a.message]) +} + +function anomaliesSection(result: ImportResult): string { + const toValidate = result.anomalies.filter((a) => a.level === 'a_valider') + const informative = result.anomalies.filter((a) => a.level === 'informatif') + return [ + '## 7. Anomalies à valider', + '', + `${toValidate.length} points demandent une décision, ${informative.length} sont informatifs.`, + '', + '### À valider', + '', + table(['Code', 'Objet', 'Détail'], anomalyRows(toValidate)), + '', + '### Informatif', + '', + table(['Code', 'Objet', 'Détail'], anomalyRows(informative)), + ].join('\n') +} + +/** Source keys the document does not carry, and where they live now. */ +const NOT_CARRIED_OVER = [ + '`schema_version` du catalogue (`2.0`) : version du format historique, ' + + 'remplacée par `schema_version: 1` du document canonique ; la valeur ' + + "d'origine est citée dans `attribution.notes`.", + 'bloc `species` du catalogue (`equine`, Cheval / Horse) : porté par ' + + '`species_id` du document et par la table `public.species` ; le nom ' + + 'de la fiche est écrit séparément (voir anomalies `label.authored`).', + 'second élément graphique de chaque annotation (marqueur visuel) : ' + + "reste dans l'asset SVG copié à l'identique, le document ne garde que " + + 'la zone de clic.', + '`data-anno-category-name` : répète le slug technique (`articulations`, ' + + "`os`), ce n'est pas un libellé ; le libellé de catégorie vient de la " + + "table de l'importateur (section 4).", +] + +function notImportedSection(result: ImportResult): string { + const dropped = result.annotationRows.filter((r) => r.geometry === 'aucune') + const lines = + dropped.length === 0 + ? ['Aucune donnée métier écartée.'] + : dropped.map( + (r) => `- géométrie de \`${r.legacyId}\` (forme non prise en charge)`, + ) + return [ + '## 8. Données non importées', + '', + ...lines, + '', + 'Non repris par construction :', + '', + ...NOT_CARRIED_OVER.map((line) => `- ${line}`), + ].join('\n') +} + +function validationSection(result: ImportResult): string { + const errors = result.issues.filter((i) => i.severity === 'error') + const warnings = result.issues.filter((i) => i.severity === 'warning') + const rows = result.issues.map((i) => [ + i.severity, + code(i.code), + code(i.path), + i.message, + ]) + return [ + '## 9. Résultat de validation', + '', + '- Forme (`AnatomicalSheetDocumentSchema`) : conforme.', + `- Intégrité (\`validateSheetDocument\`) : ${errors.length} erreur(s), ` + + `${warnings.length} avertissement(s).`, + ...(rows.length + ? ['', table(['Gravité', 'Code', 'Chemin', 'Message'], rows)] + : []), + ].join('\n') +} + +export function renderImportReport(result: ImportResult): string { + return ( + [ + intro(result), + sourcesSection(result), + volumesSection(result), + annotationsSection(result), + categoriesSection(result), + vertebralSection(result), + findingsSection(result), + anomaliesSection(result), + notImportedSection(result), + validationSection(result), + ].join('\n\n') + '\n' + ) +} diff --git a/packages/anatomy/src/legacy/seed.ts b/packages/anatomy/src/legacy/seed.ts new file mode 100644 index 00000000..7686df82 --- /dev/null +++ b/packages/anatomy/src/legacy/seed.ts @@ -0,0 +1,92 @@ +import type { ImportResult } from './types' + +/** + * Idempotent PostgreSQL seed of the official equine sheet as a DRAFT. + * Runs as the database owner in `supabase db reset` and in the PGlite + * harness. It never publishes: publication is a human act through + * publish_sheet_version once the import report is validated. + */ + +export const DOCUMENT_DOLLAR_TAG = '$equine_doc$' + +const SHEET_DESCRIPTION = + 'Fiche anatomique officielle du cheval ' + + '(import des données historiques, brouillon à valider)' + +export interface SeedSqlParams { + result: ImportResult + /** document.json text, embedded verbatim in a dollar-quoted literal. */ + documentJson: string +} + +/** Only ever fed fixed ASCII values; doubled quotes keep it literal-safe. */ +function sqlText(value: string): string { + return `'${value.replace(/'/g, "''")}'` +} + +function header(): string { + return [ + '-- Official equine anatomical sheet, version 1, DRAFT.', + '-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand.', + '-- Idempotent. Never publishes: the version stays in status draft until a', + '-- platform admin validates IMPORT-REPORT.md and publishes it by hand.', + ].join('\n') +} + +function sheetInsert(sheetId: string): string { + return [ + 'insert into public.anatomical_sheets', + ' (id, species_id, name, slug, description, creator_user_id, is_official, visibility)', + 'values (', + ` ${sqlText(sheetId)}, 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval',`, + ` ${sqlText(SHEET_DESCRIPTION)},`, + " null, true, 'private'", + ')', + 'on conflict (id) do nothing;', + ].join('\n') +} + +function assetInserts(result: ImportResult): string { + const rows = result.assets.map( + (a) => + ` (${sqlText(a.svg_asset_id)}, ${sqlText(result.sheetId)}, ${sqlText(a.sha256)}, ` + + `${a.byte_size}, 'image/svg+xml', ${sqlText(a.file)})`, + ) + return [ + 'insert into public.anatomical_sheet_assets', + ' (id, sheet_id, sha256, byte_size, content_type, file_name)', + 'values', + rows.join(',\n'), + 'on conflict (sheet_id, sha256) do nothing;', + ].join('\n') +} + +function draftInsert(sheetId: string, documentJson: string): string { + if (documentJson.includes(DOCUMENT_DOLLAR_TAG)) { + throw new Error( + `document JSON contains the dollar-quote tag ${DOCUMENT_DOLLAR_TAG}`, + ) + } + return [ + 'select private.insert_sheet_draft(', + ' null,', + ` ${sqlText(sheetId)},`, + ` ${DOCUMENT_DOLLAR_TAG}${documentJson.trimEnd()}${DOCUMENT_DOLLAR_TAG}::jsonb,`, + " 'Import des données équines historiques (Horse.svg, Horse_head.svg, pathologies.json)'", + ')', + 'where not exists (', + ` select 1 from public.anatomical_sheet_versions where sheet_id = ${sqlText(sheetId)}`, + ');', + ].join('\n') +} + +export function renderSeedSql({ result, documentJson }: SeedSqlParams): string { + return ( + [ + header(), + sheetInsert(result.sheetId), + assetInserts(result), + draftInsert(result.sheetId, documentJson), + ].join('\n\n') + '\n' + ) +} diff --git a/packages/anatomy/src/legacy/sources.ts b/packages/anatomy/src/legacy/sources.ts new file mode 100644 index 00000000..4d1249df --- /dev/null +++ b/packages/anatomy/src/legacy/sources.ts @@ -0,0 +1,45 @@ +import { readFile } from 'node:fs/promises' +import { join } from 'node:path' +import type { EquineLegacyInput } from './types' + +/** + * Locations of the legacy equine sources and of the generated seed, both + * relative to the repository root. Shared by the CLI and the golden tests. + */ + +export const EQUINE_SOURCE_PATHS = { + mainSvg: 'apps/app/public/species/equine/Horse.svg', + headSvg: 'apps/app/public/species/equine/Horse_head.svg', + catalog: 'apps/app/src/domain/species/equine/pathologies.json', + vertebrae: 'apps/app/src/domain/species/equine/vertebrae.ts', +} as const + +export const EQUINE_SEED_DIR = 'supabase/seed/anatomical-sheets/equine/v1' + +function fileName(path: string): string { + return path.slice(path.lastIndexOf('/') + 1) +} + +export async function readEquineSources( + repoRoot: string, +): Promise { + const read = (path: string) => readFile(join(repoRoot, path)) + const [main, head, catalog, vertebrae] = await Promise.all([ + read(EQUINE_SOURCE_PATHS.mainSvg), + read(EQUINE_SOURCE_PATHS.headSvg), + read(EQUINE_SOURCE_PATHS.catalog), + read(EQUINE_SOURCE_PATHS.vertebrae), + ]) + return { + mainSvg: { + fileName: fileName(EQUINE_SOURCE_PATHS.mainSvg), + bytes: new Uint8Array(main), + }, + headSvg: { + fileName: fileName(EQUINE_SOURCE_PATHS.headSvg), + bytes: new Uint8Array(head), + }, + catalogJson: catalog.toString('utf8'), + vertebraeSource: vertebrae.toString('utf8'), + } +} diff --git a/packages/anatomy/src/legacy/svg.ts b/packages/anatomy/src/legacy/svg.ts new file mode 100644 index 00000000..9dc7a222 --- /dev/null +++ b/packages/anatomy/src/legacy/svg.ts @@ -0,0 +1,115 @@ +import { DOMParser, type Element } from '@xmldom/xmldom' +import type { Geometry } from '@faunosteo/domain' +import type { Anomaly } from './types' + +/** + * Reads the annotation layer of a legacy SVG (docs/ANATOMY-SVG-CONVENTION.md). + * Each annotation is drawn by one or two elements sharing a data-anno-id + * (hitbox first, visual marker second); the importer keeps one record per + * id, attributes and geometry taken from the first element. + */ + +export interface LegacyAnnotation { + id: string + tagName: string + elementCount: number + nameFr: string | null + nameEn: string | null + category: string | null + categoryName: string | null + lateral: string | null + special: string | null + opensDetail: string | null + geometry: Geometry | null +} + +export interface ParsedSvg { + viewBox: string | null + annotations: LegacyAnnotation[] + anomalies: Anomaly[] +} + +function attr(element: Element, name: string): string | null { + return element.hasAttribute(name) ? element.getAttribute(name) : null +} + +function parsePoints(raw: string): Array<[number, number]> { + const numbers = raw + .trim() + .split(/[\s,]+/) + .map(Number) + const pairs: Array<[number, number]> = [] + for (let i = 0; i + 1 < numbers.length; i += 2) { + pairs.push([numbers[i]!, numbers[i + 1]!]) + } + return pairs +} + +/** Circle and polygon are the only shapes the legacy editor produces. */ +function readGeometry(element: Element): Geometry | null { + if (element.tagName === 'circle') { + return { + type: 'circle', + cx: Number(attr(element, 'cx')), + cy: Number(attr(element, 'cy')), + r: Number(attr(element, 'r')), + } + } + if (element.tagName === 'polygon') { + return { + type: 'polygon', + points: parsePoints(attr(element, 'points') ?? ''), + } + } + return null +} + +function readAnnotation(element: Element, id: string): LegacyAnnotation { + return { + id, + tagName: element.tagName, + elementCount: 1, + nameFr: attr(element, 'data-anno-name-fr'), + nameEn: attr(element, 'data-anno-name-en'), + category: attr(element, 'data-anno-category'), + categoryName: attr(element, 'data-anno-category-name'), + lateral: attr(element, 'data-anno-lateral'), + special: attr(element, 'data-anno-special'), + opensDetail: attr(element, 'data-anno-opens-detail'), + geometry: readGeometry(element), + } +} + +function geometryAnomaly(fileName: string, a: LegacyAnnotation): Anomaly { + return { + code: 'svg.geometry.unsupported', + level: 'a_valider', + subject: `${fileName} ${a.id}`, + message: `Élément <${a.tagName}> non pris en charge : géométrie non importée (null).`, + } +} + +/** Document order is kept: it is the order of the annotations table. */ +export function parseAnnotatedSvg(text: string, fileName: string): ParsedSvg { + const doc = new DOMParser().parseFromString(text, 'image/svg+xml') + const root = doc.documentElement + const byId = new Map() + const elements = doc.getElementsByTagName('*') + for (let i = 0; i < elements.length; i += 1) { + const element = elements.item(i)! + const id = attr(element, 'data-anno-id') + if (id === null) continue + const known = byId.get(id) + if (known) known.elementCount += 1 + else byId.set(id, readAnnotation(element, id)) + } + const annotations = [...byId.values()] + const anomalies = annotations + .filter((a) => a.geometry === null) + .map((a) => geometryAnomaly(fileName, a)) + return { + viewBox: root ? attr(root, 'viewBox') : null, + annotations, + anomalies, + } +} diff --git a/packages/anatomy/src/legacy/types.ts b/packages/anatomy/src/legacy/types.ts new file mode 100644 index 00000000..f83422bd --- /dev/null +++ b/packages/anatomy/src/legacy/types.ts @@ -0,0 +1,115 @@ +import type { + AnatomicalSheetDocumentInput, + SheetIssue, +} from '@faunosteo/domain' + +/** + * Shared shapes of the legacy importer. Anomalies are never silent: every + * correction or gap the importer meets lands in the import report so an + * osteopath can validate it before the draft is published. + */ + +/** 'a_valider' needs a business decision; 'informatif' only explains. */ +export type AnomalyLevel = 'a_valider' | 'informatif' + +export interface Anomaly { + code: string + level: AnomalyLevel + subject: string + message: string +} + +/** One SVG file handed to the importer, bytes untouched. */ +export interface SvgSource { + fileName: string + bytes: Uint8Array +} + +/** The four legacy sources, read by the caller (CLI or tests). */ +export interface EquineLegacyInput { + mainSvg: SvgSource + headSvg: SvgSource + catalogJson: string + vertebraeSource: string +} + +export interface AssetRecord { + file: string + sha256: string + byte_size: number + svg_asset_id: string +} + +export interface LegacyIdMap { + views: Record + annotations: Record + categories: Record + finding_nodes: Record + assets: Record +} + +/** How the region code of a spine annotation was inferred from labels. */ +export interface RegionInference { + annotationId: string + label: string + root: string | null + code: string | null +} + +export interface AnnotationRow { + legacyId: string + newId: string + viewId: string + kind: string + laterality: string + regionCode: string | null + findingZoneId: string | null + geometry: string +} + +export interface ZoneStats { + zoneId: string + nodes: number + leaves: number + vetReferrals: number +} + +/** Digest of a non-asset source, shown in the report. */ +export interface SourceDigest { + file: string + sha256: string + byte_size: number +} + +export interface ImportStats { + legacyAnnotations: number + annotations: number + annotationsByView: Record + linkedAnnotations: number + triggers: number + views: number + vertebralAnnotations: number + bilateral: number + findingZones: number + nodes: number + leaves: number + vetReferrals: number + missingDescriptionEn: number + sources: number +} + +/** Everything the report and the seed need, computed once. */ +export interface ImportResult { + document: AnatomicalSheetDocumentInput + legacyIdMap: LegacyIdMap + assets: AssetRecord[] + sourceDigests: SourceDigest[] + sheetId: string + viewBoxes: Record + annotationRows: AnnotationRow[] + regionInferences: RegionInference[] + zoneStats: ZoneStats[] + stats: ImportStats + anomalies: Anomaly[] + issues: SheetIssue[] +} diff --git a/packages/anatomy/src/legacy/vertebrae.ts b/packages/anatomy/src/legacy/vertebrae.ts new file mode 100644 index 00000000..165fa0c2 --- /dev/null +++ b/packages/anatomy/src/legacy/vertebrae.ts @@ -0,0 +1,51 @@ +/** + * Reads the legacy vertebral formula from the source text of + * apps/app/src/domain/species/equine/vertebrae.ts. The file is parsed as + * text, not imported: it depends on the app's '@/…' alias, which this + * package does not resolve. + */ + +export interface LegacyVertebralFormula { + counts: Record + /** "varies A–B" range from the source comment, when stated. */ + variesRange: string | null +} + +const REGION_ORDER = ['C', 'T', 'L', 'S', 'Cd'] as const + +export function parseVertebralFormula(source: string): LegacyVertebralFormula { + const body = /=\s*\{([^}]*)\}/.exec(source)?.[1] + if (!body) throw new Error('vertebrae.ts: formula object not found') + const counts: Record = {} + for (const match of body.matchAll(/(\w+)\s*:\s*(\d+)/g)) { + counts[match[1]!] = Number(match[2]) + } + for (const code of REGION_ORDER) { + if (!(code in counts)) + throw new Error(`vertebrae.ts: region ${code} missing`) + } + const range = /varies\s+(\d+)\s*[–-]\s*(\d+)/.exec(source) + return { + counts, + variesRange: range ? `${range[1]}–${range[2]}` : null, + } +} + +export const VERTEBRAL_REGION_ORDER = REGION_ORDER + +const REGION_NAMES: Readonly> = { + C: { fr: 'Cervicales', en: 'Cervical' }, + T: { fr: 'Thoraciques', en: 'Thoracic' }, + L: { fr: 'Lombaires', en: 'Lumbar' }, + S: { fr: 'Sacrales', en: 'Sacral' }, + Cd: { fr: 'Caudales', en: 'Caudal' }, +} + +/** Ordered C → Cd, the order of the legacy picker tabs. */ +export function vertebralRegions(formula: LegacyVertebralFormula) { + return REGION_ORDER.map((code) => ({ + code, + name: { ...REGION_NAMES[code]! }, + count: formula.counts[code]!, + })) +} diff --git a/packages/anatomy/tests/document.test.ts b/packages/anatomy/tests/document.test.ts new file mode 100644 index 00000000..60912537 --- /dev/null +++ b/packages/anatomy/tests/document.test.ts @@ -0,0 +1,23 @@ +import { + AnatomicalSheetDocumentSchema, + validateSheetDocument, +} from '@faunosteo/domain' +import { importEquineLegacy, renderArtifacts } from '../src' +import { loadInput, runImport } from './helpers' + +describe('equine document', () => { + it('parses and validates with no error and no warning', async () => { + const { document, issues } = await runImport() + const parsed = AnatomicalSheetDocumentSchema.parse(document) + expect(validateSheetDocument(parsed)).toEqual([]) + expect(issues).toEqual([]) + }) + + it('is deterministic: same result and same bytes on two runs', async () => { + const input = await loadInput() + const first = importEquineLegacy(input) + const second = importEquineLegacy(input) + expect(second).toEqual(first) + expect(await renderArtifacts(second)).toEqual(await renderArtifacts(first)) + }) +}) diff --git a/packages/anatomy/tests/helpers.ts b/packages/anatomy/tests/helpers.ts new file mode 100644 index 00000000..65924dc1 --- /dev/null +++ b/packages/anatomy/tests/helpers.ts @@ -0,0 +1,36 @@ +import { readFile } from 'node:fs/promises' +import { fileURLToPath } from 'node:url' +import { join } from 'node:path' +import { + EQUINE_SOURCE_PATHS, + importEquineLegacy, + readEquineSources, + type EquineLegacyInput, + type ImportResult, +} from '../src' +import type { LegacyCatalog } from '../src/legacy/catalog' + +/** Tests run on the real legacy sources, never on copies. */ +export const REPO_ROOT = fileURLToPath(new URL('../../../', import.meta.url)) + +export function loadInput(): Promise { + return readEquineSources(REPO_ROOT) +} + +export async function runImport(): Promise { + return importEquineLegacy(await loadInput()) +} + +export async function loadCatalog(): Promise { + const text = await readFile( + join(REPO_ROOT, EQUINE_SOURCE_PATHS.catalog), + 'utf8', + ) + return JSON.parse(text) as LegacyCatalog +} + +export async function legacyAnnoIds(path: string): Promise { + const text = await readFile(join(REPO_ROOT, path), 'utf8') + const ids = [...text.matchAll(/data-anno-id="([^"]+)"/g)].map((m) => m[1]!) + return [...new Set(ids)] +} diff --git a/packages/anatomy/tests/importer.counts.test.ts b/packages/anatomy/tests/importer.counts.test.ts new file mode 100644 index 00000000..4dcc23fd --- /dev/null +++ b/packages/anatomy/tests/importer.counts.test.ts @@ -0,0 +1,103 @@ +import type { FindingNodeInput } from '@faunosteo/domain' +import { EQUINE_SOURCE_PATHS, type ImportResult } from '../src' +import { legacyAnnoIds, runImport } from './helpers' + +let result: ImportResult + +beforeAll(async () => { + result = await runImport() +}) + +describe('equine import volumes', () => { + it('imports 27 annotations, 26 linked to a finding zone', () => { + const annotations = result.document.annotations + expect(annotations).toHaveLength(27) + const linked = annotations.filter( + (a) => a.kind !== 'detail_trigger' && a.finding_zone_id !== null, + ) + expect(linked).toHaveLength(26) + }) + + it('has two views and one trigger opening head from main', () => { + expect(result.document.views.map((v) => v.id)).toEqual(['main', 'head']) + const triggers = result.document.annotations.filter( + (a) => a.kind === 'detail_trigger', + ) + expect(triggers).toHaveLength(1) + expect(triggers[0]).toMatchObject({ + view_id: 'main', + opens_view_id: 'head', + }) + }) + + it('codes exactly the five zone-colonne polygons with C, T, L, S, Cd', () => { + const coded = result.document.annotations.filter( + (a) => a.kind !== 'detail_trigger' && a.vertebral_region_code !== null, + ) + expect(coded).toHaveLength(5) + expect(new Set(coded.map((a) => a.kind))).toEqual(new Set(['zone'])) + expect(new Set(coded.map((a) => a.category_id))).toEqual( + new Set(['zone-colonne']), + ) + const codes = coded.map((a) => + a.kind === 'detail_trigger' ? null : a.vertebral_region_code, + ) + expect(new Set(codes)).toEqual(new Set(['C', 'T', 'L', 'S', 'Cd'])) + }) + + it('counts 9 bilateral annotations', () => { + const bilateral = result.document.annotations.filter( + (a) => a.laterality === 'bilateral', + ) + expect(bilateral).toHaveLength(9) + }) + + it('writes 792 nodes, 612 leaves, 41 vet referrals in the document', () => { + const counts = { nodes: 0, leaves: 0, vet: 0 } + const walk = (nodes: readonly FindingNodeInput[]): void => { + for (const node of nodes) { + counts.nodes += 1 + if (!node.children?.length) counts.leaves += 1 + if (node.requires_vet_referral === true) counts.vet += 1 + walk(node.children ?? []) + } + } + for (const zone of result.document.finding_zones) { + counts.nodes += zone.categories.length + for (const category of zone.categories) walk(category.children) + } + expect(counts).toEqual({ nodes: 792, leaves: 612, vet: 41 }) + }) + + it('reports the input side from the sources: 27 ids, 26 zones, 792/612/41', () => { + expect(result.document.finding_zones).toHaveLength(26) + expect(result.stats).toMatchObject({ + legacyAnnotations: 27, + findingZones: 26, + nodes: 792, + leaves: 612, + vetReferrals: 41, + }) + }) + + it('maps every data-anno-id of both SVGs', async () => { + const ids = [ + ...(await legacyAnnoIds(EQUINE_SOURCE_PATHS.mainSvg)), + ...(await legacyAnnoIds(EQUINE_SOURCE_PATHS.headSvg)), + ] + expect(ids).toHaveLength(27) + expect(Object.keys(result.legacyIdMap.annotations).sort()).toEqual( + ids.sort(), + ) + }) + + it('places the nine head annotations in view head', async () => { + const headIds = await legacyAnnoIds(EQUINE_SOURCE_PATHS.headSvg) + const newIds = new Set( + headIds.map((id) => result.legacyIdMap.annotations[id]), + ) + const inHead = result.document.annotations.filter((a) => newIds.has(a.id)) + expect(inHead).toHaveLength(9) + expect(inHead.every((a) => a.view_id === 'head')).toBe(true) + }) +}) diff --git a/packages/anatomy/tests/importer.guards.test.ts b/packages/anatomy/tests/importer.guards.test.ts new file mode 100644 index 00000000..82817fbb --- /dev/null +++ b/packages/anatomy/tests/importer.guards.test.ts @@ -0,0 +1,46 @@ +import { renderSeedSql, DOCUMENT_DOLLAR_TAG } from '../src' +import { mapAnnotation } from '../src/legacy/annotations' +import { assertNothingDropped } from '../src/legacy/catalog' +import { parseAnnotatedSvg } from '../src/legacy/svg' +import { runImport } from './helpers' + +/** Guards that never fire on today's data, proven on synthetic inputs. */ + +const SVG_WITHOUT_EN = ` + + +` + +describe('importer guards', () => { + it('throws when a zone loses a vet referral', () => { + const before = { nodes: 10, leaves: 7, vetReferrals: 2 } + const after = { nodes: 10, leaves: 7, vetReferrals: 1 } + expect(() => assertNothingDropped('hip', before, after)).toThrow( + 'zone hip: vetReferrals 2 in, 1 out', + ) + expect(() => assertNothingDropped('hip', before, before)).not.toThrow() + }) + + it('copies FR into EN when data-anno-name-en is absent, and says so', () => { + const [legacy] = parseAnnotatedSvg(SVG_WITHOUT_EN, 'x.svg').annotations + const mapped = mapAnnotation(legacy!, { + viewId: 'main', + fileName: 'x.svg', + zoneByNames: new Map(), + }) + expect(mapped.annotation.name).toEqual({ fr: 'Garrot', en: 'Garrot' }) + expect(mapped.anomalies.map((a) => [a.code, a.level])).toContainEqual([ + 'annotation.name_en.missing', + 'a_valider', + ]) + }) + + it('refuses a document that contains the dollar-quote tag', async () => { + const result = await runImport() + const documentJson = JSON.stringify({ note: DOCUMENT_DOLLAR_TAG }) + expect(() => renderSeedSql({ result, documentJson })).toThrow( + DOCUMENT_DOLLAR_TAG, + ) + }) +}) diff --git a/packages/anatomy/tests/importer.special-cases.test.ts b/packages/anatomy/tests/importer.special-cases.test.ts new file mode 100644 index 00000000..cc359487 --- /dev/null +++ b/packages/anatomy/tests/importer.special-cases.test.ts @@ -0,0 +1,128 @@ +import type { FindingNodeInput } from '@faunosteo/domain' +import { renderImportReport, type ImportResult } from '../src' +import type { LegacyCatalog, LegacyNode } from '../src/legacy/catalog' +import { loadCatalog, runImport } from './helpers' + +let result: ImportResult +let catalog: LegacyCatalog + +beforeAll(async () => { + ;[result, catalog] = await Promise.all([runImport(), loadCatalog()]) +}) + +function annotation(id: string) { + const found = result.document.annotations.find((a) => a.id === id) + if (!found) throw new Error(`annotation ${id} missing`) + return found +} + +function zone(id: string) { + const found = result.document.finding_zones.find((z) => z.id === id) + if (!found) throw new Error(`zone ${id} missing`) + return found +} + +/** Id skeleton of a tree: same shape whatever the label language. */ +function idTree( + nodes: ReadonlyArray, +): unknown[] { + return nodes.map((n) => [n.id, idTree(n.children ?? [])]) +} + +describe('equine import special cases', () => { + it('turns vertebral-precision into a region code', () => { + expect(annotation('lumbar')).toMatchObject({ + kind: 'zone', + vertebral_region_code: 'L', + finding_zone_id: 'lumbar', + }) + expect(annotation('caudal')).toMatchObject({ vertebral_region_code: 'Cd' }) + }) + + it('makes data-anno-lateral explicit', () => { + expect(annotation('hip').laterality).toBe('bilateral') + expect(annotation('c7-t1').laterality).toBe('unpaired') + }) + + it('imports the trigger without name and without finding zone', () => { + const trigger = annotation('head-trigger') + expect(trigger.kind).toBe('detail_trigger') + expect(trigger.name).toBeNull() + expect(trigger).not.toHaveProperty('finding_zone_id') + }) + + it('keeps ssb-dysfunctions under sphenoid and names it in the report', () => { + expect(zone('sphenoid').categories[0]!.id).toBe('ssb-dysfunctions') + expect(zone('ssb').categories[0]!.id).toBe('ssb-dysfunctions') + const report = renderImportReport(result) + expect(report).toContain('sphenoid/ssb-dysfunctions') + expect(report).toContain('sphenoid-dysfunctions attendu') + }) + + it('keeps the anamnesis category in all zones with its three variants', () => { + const imported = result.document.finding_zones.map((z) => { + const category = z.categories.find((c) => c.id === 'anamnesis') + expect(category?.kind).toBe('anamnesis') + return idTree(category?.children ?? []).join('|') + }) + const legacy = Object.values(catalog.zones).map((z) => + idTree( + z.categories.find((c) => c.id === 'anamnesis')!.children ?? [], + ).join('|'), + ) + expect(imported).toHaveLength(26) + expect(imported).toEqual(legacy) + expect(new Set(imported).size).toBe(3) + }) + + it('writes no en key where description_en is absent', () => { + const category = zone('parietal').categories.find( + (c) => c.id === 'anamnesis', + )! + expect(category.description).toEqual({ + fr: catalog.zones.parietal!.categories[2]!.description_fr, + }) + const mobility = zone('parietal').categories[0]!.children[0]! + expect(mobility.description).toBeDefined() + expect(mobility.description).not.toHaveProperty('en') + }) + + it('maps category kinds from their ids', () => { + const kinds = zone('hip').categories.map((c) => [c.id, c.kind]) + expect(kinds).toEqual([ + ['hip-dysfunctions', 'dysfunction'], + ['hip-observations', 'consultation_reason'], + ['anamnesis', 'anamnesis'], + ]) + }) + + it('preserves node ids at every level of every zone', () => { + for (const [key, legacy] of Object.entries(catalog.zones)) { + expect(idTree(zone(key).categories)).toEqual(idTree(legacy.categories)) + } + }) + + it('writes the lean form: no default keys on plain leaves', () => { + const leaf = zone('parietal').categories[0]!.children[0]!.children![0]! + expect(Object.keys(leaf).sort()).toEqual(['id', 'name']) + }) +}) + +describe('importer-authored labels', () => { + it('declares every label written without a source', () => { + const subjects = result.anomalies + .filter((a) => a.code === 'label.authored' && a.level === 'a_valider') + .map((a) => a.subject) + expect(subjects).toEqual([ + 'name', + 'description', + 'views.main', + 'views.head', + 'vertebral_config.C', + 'vertebral_config.T', + 'vertebral_config.L', + 'vertebral_config.S', + 'vertebral_config.Cd', + ]) + }) +}) diff --git a/packages/anatomy/tests/seed.golden.test.ts b/packages/anatomy/tests/seed.golden.test.ts new file mode 100644 index 00000000..351c060c --- /dev/null +++ b/packages/anatomy/tests/seed.golden.test.ts @@ -0,0 +1,49 @@ +import { readFile } from 'node:fs/promises' +import { join } from 'node:path' +import { + EQUINE_SEED_DIR, + EQUINE_SOURCE_PATHS, + SEED_SQL_FILE, + renderArtifacts, + sha256Hex, + type AssetRecord, +} from '../src' +import { REPO_ROOT, runImport } from './helpers' + +const seedDir = join(REPO_ROOT, EQUINE_SEED_DIR) +let artifacts: Record + +beforeAll(async () => { + artifacts = await renderArtifacts(await runImport()) +}) + +describe('committed equine seed (golden)', () => { + it.each([ + 'document.json', + 'legacy-id-map.json', + 'assets.json', + SEED_SQL_FILE, + 'IMPORT-REPORT.md', + ])('%s equals a fresh run (rerun pnpm import:equine)', async (file) => { + const committed = await readFile(join(seedDir, file), 'utf8') + expect(committed).toBe(artifacts[file]) + }) + + it('copies the SVG assets byte for byte with the recorded sha256', async () => { + const assets = JSON.parse(artifacts['assets.json']!) as AssetRecord[] + const sources = [EQUINE_SOURCE_PATHS.mainSvg, EQUINE_SOURCE_PATHS.headSvg] + for (const [index, asset] of assets.entries()) { + const copy = await readFile(join(seedDir, 'assets', asset.file)) + const original = await readFile(join(REPO_ROOT, sources[index]!)) + expect(copy.equals(original)).toBe(true) + expect(sha256Hex(copy)).toBe(asset.sha256) + expect(copy.byteLength).toBe(asset.byte_size) + } + }) + + it('seeds a draft and never publishes', () => { + const sql = artifacts[SEED_SQL_FILE]! + expect(sql).toContain('private.insert_sheet_draft') + expect(sql).not.toContain('publish_sheet_version') + }) +}) diff --git a/packages/anatomy/tsconfig.json b/packages/anatomy/tsconfig.json new file mode 100644 index 00000000..99d2ea87 --- /dev/null +++ b/packages/anatomy/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "target": "ES2022", + "lib": ["ES2022"], + "module": "ESNext", + "moduleResolution": "bundler", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "skipLibCheck": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "isolatedModules": true, + "types": ["node", "vitest/globals"], + "noEmit": true + }, + "include": ["src", "tests"], + "exclude": ["node_modules"] +} diff --git a/packages/anatomy/vitest.config.ts b/packages/anatomy/vitest.config.ts new file mode 100644 index 00000000..f6374039 --- /dev/null +++ b/packages/anatomy/vitest.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { + environment: 'node', + globals: true, + include: ['tests/**/*.test.ts'], + }, +}) diff --git a/packages/domain/src/anatomical-sheet/schema.ts b/packages/domain/src/anatomical-sheet/schema.ts index 19c304ad..9879c556 100644 --- a/packages/domain/src/anatomical-sheet/schema.ts +++ b/packages/domain/src/anatomical-sheet/schema.ts @@ -217,7 +217,7 @@ export const FindingNodeSchema: z.ZodType< /** Typed business buckets; creators may add their own as 'custom'. */ export const FindingCategoryKindSchema = z.enum([ 'dysfunction', - 'observation', + 'consultation_reason', 'anamnesis', 'custom', ]) diff --git a/packages/domain/tests/fixtures/horse-slice.ts b/packages/domain/tests/fixtures/horse-slice.ts index 4f05c2f1..a1fecf92 100644 --- a/packages/domain/tests/fixtures/horse-slice.ts +++ b/packages/domain/tests/fixtures/horse-slice.ts @@ -86,7 +86,7 @@ const HIP_ZONE = { }, { id: 'hip-observations', - kind: 'observation', + kind: 'consultation_reason', name: OBSERVATIONS_NAME, children: [ { @@ -139,7 +139,7 @@ const CERVICAL_ZONE = { }, { id: 'cervical-observations', - kind: 'observation', + kind: 'consultation_reason', name: OBSERVATIONS_NAME, children: [ { @@ -177,7 +177,7 @@ const C7_T1_ZONE = { }, { id: 'c7-t1-observations', - kind: 'observation', + kind: 'consultation_reason', name: OBSERVATIONS_NAME, children: [ leaf( @@ -211,7 +211,7 @@ const ATM_ZONE = { }, { id: 'atm-observations', - kind: 'observation', + kind: 'consultation_reason', name: OBSERVATIONS_NAME, children: [ leaf( @@ -258,7 +258,7 @@ const SPHENOID_ZONE = { }, { id: 'sphenoid-observations', - kind: 'observation', + kind: 'consultation_reason', name: OBSERVATIONS_NAME, children: [ leaf( diff --git a/packages/supabase/package.json b/packages/supabase/package.json index 5e899890..9040d825 100644 --- a/packages/supabase/package.json +++ b/packages/supabase/package.json @@ -16,7 +16,8 @@ "test": "vitest", "test:run": "vitest run", "lint": "eslint . --max-warnings 0", - "build": "tsc -p tsconfig.json --noEmit" + "build": "tsc -p tsconfig.json --noEmit", + "assets:upload": "node scripts/upload-sheet-assets.ts" }, "dependencies": { "@faunosteo/domain": "workspace:*", diff --git a/packages/supabase/scripts/upload-sheet-assets.ts b/packages/supabase/scripts/upload-sheet-assets.ts new file mode 100644 index 00000000..10c9b01b --- /dev/null +++ b/packages/supabase/scripts/upload-sheet-assets.ts @@ -0,0 +1,99 @@ +/** + * Uploads the SVG assets of a generated sheet seed into the Storage bucket + * anatomical-sheet-assets, content-addressed (.svg). + * + * Operator tool: needs the service key, which never ships to the browser. + * Reads SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY from the environment + * (local stack: `pnpm supabase status` prints them). Idempotent: an object + * whose sha256 already exists is kept, a local file whose bytes differ from + * the manifest is refused, and each asset row is confirmed server-side + * (confirm_sheet_asset_upload) so the read policy can trust it. + * + * pnpm assets:upload supabase/seed/anatomical-sheets/equine/v1 + */ +import { createHash } from 'node:crypto' +import { readFile } from 'node:fs/promises' +import { basename, join, resolve } from 'node:path' +import { createClient } from '@supabase/supabase-js' + +const BUCKET = 'anatomical-sheet-assets' + +interface AssetEntry { + file: string + sha256: string + byte_size: number + svg_asset_id: string +} + +const SHA256_PATTERN = /^[0-9a-f]{64}$/ +const UUID_PATTERN = /^[0-9a-f-]{36}$/ + +/** The manifest is committed data, still: no path separators, hex hash, uuid. */ +function assertEntry(entry: AssetEntry): void { + if (basename(entry.file) !== entry.file || entry.file.startsWith('.')) { + throw new Error(`${entry.file}: file must be a plain file name`) + } + if (!SHA256_PATTERN.test(entry.sha256)) + throw new Error(`${entry.file}: bad sha256`) + if (!UUID_PATTERN.test(entry.svg_asset_id)) + throw new Error(`${entry.file}: bad asset id`) +} + +function requireEnv(name: string): string { + const value = process.env[name] + if (!value) throw new Error(`${name} is required`) + return value +} + +async function readManifest(dir: string): Promise { + const raw = await readFile(join(dir, 'assets.json'), 'utf8') + const entries = JSON.parse(raw) as AssetEntry[] + entries.forEach(assertEntry) + return entries +} + +/** The bytes on disk must still match what the seed recorded. */ +async function readVerified(dir: string, entry: AssetEntry): Promise { + const bytes = await readFile(join(dir, 'assets', entry.file)) + const sha256 = createHash('sha256').update(bytes).digest('hex') + if (sha256 !== entry.sha256 || bytes.length !== entry.byte_size) { + throw new Error(`${entry.file}: bytes differ from assets.json`) + } + return bytes +} + +async function main(): Promise { + // pnpm runs package scripts inside the package: resolve from the caller's directory. + const dir = resolve( + process.env.INIT_CWD ?? process.cwd(), + process.argv[2] ?? '.', + ) + const client = createClient( + requireEnv('SUPABASE_URL'), + requireEnv('SUPABASE_SERVICE_ROLE_KEY'), + { auth: { persistSession: false } }, + ) + for (const entry of await readManifest(dir)) { + const key = `${entry.sha256}.svg` + const bytes = await readVerified(dir, entry) + const { error } = await client.storage + .from(BUCKET) + .upload(key, bytes, { contentType: 'image/svg+xml', upsert: false }) + if (error && !/already exists/i.test(error.message)) { + throw new Error(`${key}: ${error.message}`) + } + // The asset row becomes readable only once the server records the upload. + const confirmed = await client.rpc('confirm_sheet_asset_upload', { + asset_id: entry.svg_asset_id, + }) + if (confirmed.error) throw new Error(`${key}: ${confirmed.error.message}`) + console.log( + `${error ? 'kept' : 'uploaded'} ${key} (${entry.file}), confirmed`, + ) + } +} + +main().catch((error: unknown) => { + console.error(error instanceof Error ? error.message : error) + process.exit(1) +}) diff --git a/packages/supabase/src/database.types.ts b/packages/supabase/src/database.types.ts index e6b1e77a..1290eb9b 100644 --- a/packages/supabase/src/database.types.ts +++ b/packages/supabase/src/database.types.ts @@ -19,6 +19,7 @@ export type Database = { id: string sha256: string sheet_id: string + uploaded_at: string | null } ComputedFields: never Insert: { @@ -30,6 +31,7 @@ export type Database = { id?: string sha256: string sheet_id: string + uploaded_at?: string | null } Update: { byte_size?: number @@ -40,6 +42,7 @@ export type Database = { id?: string sha256?: string sheet_id?: string + uploaded_at?: string | null } Relationships: [ { @@ -369,6 +372,10 @@ export type Database = { } Functions: { archive_anatomical_sheet: { Args: { sheet_id: string }; Returns: string } + confirm_sheet_asset_upload: { + Args: { asset_id: string } + Returns: string + } create_anatomical_sheet: { Args: { description?: string diff --git a/packages/supabase/tests/db/harness.ts b/packages/supabase/tests/db/harness.ts index f4be7604..228a6540 100644 --- a/packages/supabase/tests/db/harness.ts +++ b/packages/supabase/tests/db/harness.ts @@ -1,6 +1,8 @@ /** * PGlite harness: a real PostgreSQL (WASM) that applies the Supabase shim, - * then every migration under supabase/migrations, in filename order. + * then every migration under supabase/migrations, in filename order, then + * the versioned seeds under supabase/seed (same files `supabase db reset` + * applies through config.toml sql_paths). * Lets the pgTAP suite and the schema checks run without Docker. The same * SQL runs unchanged under `supabase test db` on the real stack. */ @@ -15,6 +17,8 @@ export const repoRoot = resolve(here, '../../../..') export const supabaseDir = join(repoRoot, 'supabase') export const migrationsDir = join(supabaseDir, 'migrations') export const pgTapTestsDir = join(supabaseDir, 'tests') +/** Versioned seeds (reference data such as the official sheets); seed.sql itself needs the real auth schema and stays out. The CLI reads literal paths from config.toml: the seeds test checks every file here is listed. */ +export const seedDir = join(supabaseDir, 'seed') async function listSqlFiles(dir: string): Promise { const entries = await readdir(dir) @@ -29,6 +33,12 @@ export async function listPgTapTests(): Promise { return listSqlFiles(pgTapTestsDir) } +/** Every .sql under supabase/seed, recursively, in path order. */ +export async function listSeeds(): Promise { + const entries = await readdir(seedDir, { recursive: true }).catch(() => []) + return entries.filter((f) => f.endsWith('.sql')).sort() +} + /** Boots PGlite, installs the shim and applies all migrations. */ export async function createMigratedDatabase(): Promise { const db = await PGlite.create({ extensions: { pgtap } }) @@ -39,6 +49,9 @@ export async function createMigratedDatabase(): Promise { for (const file of await listMigrations()) { await db.exec(await readFile(join(migrationsDir, file), 'utf8')) } + for (const file of await listSeeds()) { + await db.exec(await readFile(join(seedDir, file), 'utf8')) + } return db } diff --git a/packages/supabase/tests/db/schema-types.test.ts b/packages/supabase/tests/db/schema-types.test.ts index 815c1326..584b3a4c 100644 --- a/packages/supabase/tests/db/schema-types.test.ts +++ b/packages/supabase/tests/db/schema-types.test.ts @@ -29,6 +29,7 @@ const expectedColumns = { 'id', 'sha256', 'sheet_id', + 'uploaded_at', ], anatomical_sheet_versions: [ 'change_note', @@ -106,6 +107,7 @@ type FunctionArgs = { } const expectedFunctionArgs = { archive_anatomical_sheet: ['sheet_id'], + confirm_sheet_asset_upload: ['asset_id'], create_anatomical_sheet: [ 'description', 'document', diff --git a/packages/supabase/tests/db/seeds.test.ts b/packages/supabase/tests/db/seeds.test.ts new file mode 100644 index 00000000..141cd0f8 --- /dev/null +++ b/packages/supabase/tests/db/seeds.test.ts @@ -0,0 +1,20 @@ +import { readFile } from 'node:fs/promises' +import { join, relative } from 'node:path' +import { listSeeds, seedDir, supabaseDir } from './harness' + +/** + * The CLI applies only the literal files of config.toml sql_paths, while the + * harness applies every seed on disk: a seed forgotten in the list would pass + * here and never reach `supabase db reset`. + */ +describe('versioned seeds', () => { + it('are all listed in config.toml [db.seed] sql_paths', async () => { + const config = await readFile(join(supabaseDir, 'config.toml'), 'utf8') + const line = config.match(/^sql_paths\s*=\s*\[(.*)\]/m)?.[1] ?? '' + const listed = [...line.matchAll(/"([^"]+)"/g)].map((m) => m[1]) + for (const file of await listSeeds()) { + const path = './' + relative(supabaseDir, join(seedDir, file)) + expect(listed, `${path} missing from sql_paths`).toContain(path) + } + }) +}) diff --git a/packages/supabase/tests/db/supabase-shim.sql b/packages/supabase/tests/db/supabase-shim.sql index 066394cd..42a7fe9f 100644 --- a/packages/supabase/tests/db/supabase-shim.sql +++ b/packages/supabase/tests/db/supabase-shim.sql @@ -73,3 +73,35 @@ grant usage on schema extensions to anon, authenticated, service_role; alter default privileges in schema public grant all on tables to anon, authenticated, service_role; alter default privileges in schema public grant all on functions to anon, authenticated, service_role; alter default privileges in schema public grant all on sequences to anon, authenticated, service_role; + +-- Storage schema stand-in (buckets + objects only, the columns the +-- migrations and tests touch). The real stack ships the full schema owned by +-- supabase_storage_admin; policies declared on storage.objects apply there. +create schema storage; +grant usage on schema storage to anon, authenticated, service_role; + +create table storage.buckets ( + id text primary key, + name text not null, + owner uuid, + public boolean default false, + file_size_limit bigint, + allowed_mime_types text[], + created_at timestamptz default now(), + updated_at timestamptz default now() +); + +create table storage.objects ( + id uuid primary key default gen_random_uuid(), + bucket_id text references storage.buckets (id), + name text, + owner uuid, + metadata jsonb, + created_at timestamptz default now(), + updated_at timestamptz default now(), + last_accessed_at timestamptz default now() +); + +alter table storage.objects enable row level security; +grant select on storage.buckets to anon, authenticated, service_role; +grant select, insert, update, delete on storage.objects to anon, authenticated, service_role; diff --git a/packages/supabase/tsconfig.json b/packages/supabase/tsconfig.json index 985fbacd..259f16dc 100644 --- a/packages/supabase/tsconfig.json +++ b/packages/supabase/tsconfig.json @@ -16,6 +16,6 @@ "types": ["node", "vitest/globals"], "noEmit": true }, - "include": ["src", "tests"], + "include": ["src", "tests", "scripts"], "exclude": ["node_modules"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2477e57b..2ede2c9b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,7 +47,7 @@ importers: devDependencies: '@tailwindcss/vite': specifier: ^4.3.0 - version: 4.3.0(vite@7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)) + version: 4.3.0(vite@7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15)) '@testing-library/jest-dom': specifier: ^6.6.3 version: 6.9.1 @@ -68,7 +68,7 @@ importers: version: 19.2.3(@types/react@19.2.14) '@vitejs/plugin-react-swc': specifier: ^3.7.2 - version: 3.11.0(vite@7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)) + version: 3.11.0(vite@7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15)) eslint: specifier: ^9.17.0 version: 9.39.4(jiti@2.7.0) @@ -92,10 +92,44 @@ importers: version: 8.59.3(eslint@9.39.4(jiti@2.7.0))(typescript@5.9.3) vite: specifier: ^7.3.6 - version: 7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0) + version: 7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15) vitest: specifier: ^3.2.7 - version: 3.2.7(@types/node@20.19.41)(happy-dom@20.10.6)(jiti@2.7.0)(lightningcss@1.32.0) + version: 3.2.7(@types/node@20.19.41)(happy-dom@20.10.6)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15) + + packages/anatomy: + dependencies: + '@faunosteo/domain': + specifier: workspace:* + version: link:../domain + devDependencies: + '@types/node': + specifier: ^20.19.41 + version: 20.19.41 + '@xmldom/xmldom': + specifier: ^0.9.8 + version: 0.9.12 + eslint: + specifier: ^9.17.0 + version: 9.39.4(jiti@2.7.0) + globals: + specifier: ^15.14.0 + version: 15.15.0 + prettier: + specifier: ^3.4.2 + version: 3.8.3 + tsx: + specifier: ^4.19.2 + version: 4.23.15 + typescript: + specifier: ^5.7.2 + version: 5.9.3 + typescript-eslint: + specifier: ^8.19.0 + version: 8.59.3(eslint@9.39.4(jiti@2.7.0))(typescript@5.9.3) + vitest: + specifier: ^3.2.7 + version: 3.2.7(@types/node@20.19.41)(happy-dom@20.10.6)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15) packages/domain: dependencies: @@ -120,7 +154,7 @@ importers: version: 8.59.3(eslint@9.39.4(jiti@2.7.0))(typescript@5.9.3) vitest: specifier: ^3.2.7 - version: 3.2.7(@types/node@20.19.41)(happy-dom@20.10.6)(jiti@2.7.0)(lightningcss@1.32.0) + version: 3.2.7(@types/node@20.19.41)(happy-dom@20.10.6)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15) packages/supabase: dependencies: @@ -151,7 +185,7 @@ importers: version: 8.59.3(eslint@9.39.4(jiti@2.7.0))(typescript@5.9.3) vitest: specifier: ^3.2.7 - version: 3.2.7(@types/node@20.19.41)(happy-dom@20.10.6)(jiti@2.7.0)(lightningcss@1.32.0) + version: 3.2.7(@types/node@20.19.41)(happy-dom@20.10.6)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15) packages: @@ -961,6 +995,10 @@ packages: '@vitest/utils@3.2.7': resolution: {integrity: sha512-x6BDOd7dyo3PFLY3I9/HJ25X/6OurhGXk2/B9gOZNPF7XDVjeBK4k01lQE5uvDpbuheErh91qYuE1E2OEjK3Rw==} + '@xmldom/xmldom@0.9.12': + resolution: {integrity: sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A==} + engines: {node: '>=14.6'} + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -2071,6 +2109,11 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tsx@4.23.15: + resolution: {integrity: sha512-Yiex1Ovn8z2xPpOWckIiysV1SSyRMY9BkLF++q0yKiDxCqRhosKfMg3janKkiLBwZ5c/YryloKwGZcrEmtwxKw==} + engines: {node: '>=18.0.0'} + hasBin: true + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -2706,12 +2749,12 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.3.0 '@tailwindcss/oxide-win32-x64-msvc': 4.3.0 - '@tailwindcss/vite@4.3.0(vite@7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0))': + '@tailwindcss/vite@4.3.0(vite@7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15))': dependencies: '@tailwindcss/node': 4.3.0 '@tailwindcss/oxide': 4.3.0 tailwindcss: 4.3.0 - vite: 7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0) + vite: 7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15) '@testing-library/dom@10.4.1': dependencies: @@ -2871,11 +2914,11 @@ snapshots: '@typescript-eslint/types': 8.59.3 eslint-visitor-keys: 5.0.1 - '@vitejs/plugin-react-swc@3.11.0(vite@7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0))': + '@vitejs/plugin-react-swc@3.11.0(vite@7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15))': dependencies: '@rolldown/pluginutils': 1.0.0-beta.27 '@swc/core': 1.15.33 - vite: 7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0) + vite: 7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15) transitivePeerDependencies: - '@swc/helpers' @@ -2887,13 +2930,13 @@ snapshots: chai: 5.3.3 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.7(vite@7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0))': + '@vitest/mocker@3.2.7(vite@7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15))': dependencies: '@vitest/spy': 3.2.7 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0) + vite: 7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15) '@vitest/pretty-format@3.2.7': dependencies: @@ -2921,6 +2964,8 @@ snapshots: loupe: 3.2.1 tinyrainbow: 2.0.0 + '@xmldom/xmldom@0.9.12': {} + acorn-jsx@5.3.2(acorn@8.16.0): dependencies: acorn: 8.16.0 @@ -4210,6 +4255,12 @@ snapshots: tslib@2.8.1: {} + tsx@4.23.15: + dependencies: + esbuild: 0.28.1 + optionalDependencies: + fsevents: 2.3.3 + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 @@ -4273,13 +4324,13 @@ snapshots: dependencies: punycode: 2.3.1 - vite-node@3.2.4(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0): + vite-node@3.2.4(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15): dependencies: cac: 6.7.14 debug: 4.4.3 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0) + vite: 7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15) transitivePeerDependencies: - '@types/node' - jiti @@ -4294,7 +4345,7 @@ snapshots: - tsx - yaml - vite@7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0): + vite@7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15): dependencies: esbuild: 0.28.1 fdir: 6.5.0(picomatch@4.0.4) @@ -4307,12 +4358,13 @@ snapshots: fsevents: 2.3.3 jiti: 2.7.0 lightningcss: 1.32.0 + tsx: 4.23.15 - vitest@3.2.7(@types/node@20.19.41)(happy-dom@20.10.6)(jiti@2.7.0)(lightningcss@1.32.0): + vitest@3.2.7(@types/node@20.19.41)(happy-dom@20.10.6)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15): dependencies: '@types/chai': 5.2.3 '@vitest/expect': 3.2.7 - '@vitest/mocker': 3.2.7(vite@7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)) + '@vitest/mocker': 3.2.7(vite@7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15)) '@vitest/pretty-format': 3.2.7 '@vitest/runner': 3.2.7 '@vitest/snapshot': 3.2.7 @@ -4330,8 +4382,8 @@ snapshots: tinyglobby: 0.2.16 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0) - vite-node: 3.2.4(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0) + vite: 7.3.6(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15) + vite-node: 3.2.4(@types/node@20.19.41)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.23.15) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 20.19.41 diff --git a/supabase/config.toml b/supabase/config.toml index bcf6f023..8d18afc2 100644 --- a/supabase/config.toml +++ b/supabase/config.toml @@ -31,8 +31,12 @@ schema_paths = [] [db.seed] enabled = true -# Local development data only (dev accounts + first owner). Never run in prod. -sql_paths = ["./seed.sql"] +# seed.sql: local development accounts + first owner, LOCAL ONLY (never +# `db push --include-seed` against a shared database: it would run this file). +# seed/...: versioned reference data (official anatomical sheets as drafts), +# idempotent. The CLI takes literal paths: list every new seed file here; the +# PGlite harness test fails when one is missing (docs/development/SUPABASE.md §3). +sql_paths = ["./seed.sql", "./seed/anatomical-sheets/equine/v1/equine_v1.sql"] [realtime] # Not used before the cloud-reports step. diff --git a/supabase/migrations/20261009100000_sheet_asset_storage.sql b/supabase/migrations/20261009100000_sheet_asset_storage.sql new file mode 100644 index 00000000..01d973ec --- /dev/null +++ b/supabase/migrations/20261009100000_sheet_asset_storage.sql @@ -0,0 +1,107 @@ +-- Storage for the SVG assets of anatomical sheets (business architecture +-- §15, ANATOMICAL_SHEET_MODEL.md §3 "assets"). +-- +-- Bucket anatomical-sheet-assets, private. Objects are content-addressed: +-- key = .svg, so two sheets with the same drawing share one object +-- and a copy of a sheet never copies bytes. Reading an object is authorised +-- THROUGH a sheet: an asset row the caller may use or edit AND whose upload +-- was confirmed server-side (uploaded_at), never through a hash a user +-- merely registered; drafts stay visible to editors only, as the sheet rows +-- do. No API role writes objects: uploads are an operator / server task +-- (import tool with the service key) until the editor step adds a signed +-- upload path. + +insert into storage.buckets (id, name, public, file_size_limit, allowed_mime_types) +values ('anatomical-sheet-assets', 'anatomical-sheet-assets', false, 20971520, array['image/svg+xml']) +on conflict (id) do update + set public = false, file_size_limit = excluded.file_size_limit, + allowed_mime_types = excluded.allowed_mime_types; + +-- --------------------------------------------------------------------------- +-- Upload confirmation. An editor may register any sha256 as metadata, so a +-- hash alone must never open an object: the read predicate requires +-- uploaded_at, which only the operator / server path (service role) sets +-- after the bytes have landed in the bucket for that sheet. +-- --------------------------------------------------------------------------- +alter table public.anatomical_sheet_assets + add column uploaded_at timestamptz; + +comment on column public.anatomical_sheet_assets.uploaded_at is + 'Set by confirm_sheet_asset_upload (service role) once the object .svg exists for this sheet. Null = metadata only, object not readable through this row.'; + +create index anatomical_sheet_assets_sha256_idx on public.anatomical_sheet_assets (sha256); + +create or replace function public.confirm_sheet_asset_upload(asset_id uuid) +returns uuid +language plpgsql +security definer +set search_path = '' +as $$ +begin + update public.anatomical_sheet_assets + set uploaded_at = now() + where id = asset_id and uploaded_at is null; + if not found and not exists (select 1 from public.anatomical_sheet_assets where id = asset_id) then + raise exception 'unknown asset %', asset_id using errcode = 'P0002'; + end if; + perform private.log_event( + auth.uid(), 'anatomical_sheet_asset.uploaded', 'anatomical_sheet_asset', asset_id + ); + return asset_id; +end; +$$; + +comment on function public.confirm_sheet_asset_upload(uuid) is + 'Operator / server only (service role): marks the asset bytes as present in Storage. Idempotent.'; + +revoke all on function public.confirm_sheet_asset_upload(uuid) from public, anon, authenticated; +grant execute on function public.confirm_sheet_asset_upload(uuid) to service_role; + +-- --------------------------------------------------------------------------- +-- Read predicate: a confirmed asset row of a sheet the caller edits, or of a +-- usable sheet whose non-draft version references it. Sargable on sha256. +-- --------------------------------------------------------------------------- +create or replace function private.can_read_sheet_asset_object(p_user_id uuid, p_object_name text) +returns boolean +language sql +stable +security definer +set search_path = '' +as $$ + select exists ( + select 1 + from public.anatomical_sheet_assets a + where a.sha256 = left(p_object_name, 64) + and p_object_name = a.sha256 || '.svg' + and a.uploaded_at is not null + and ( + private.can_edit_sheet(p_user_id, a.sheet_id) + or ( + private.can_use_sheet(p_user_id, a.sheet_id) + and exists ( + select 1 from public.anatomical_sheet_versions v + where v.sheet_id = a.sheet_id + and v.status <> 'draft' + and a.id::text = any (private.sheet_document_asset_ids(v.content)) + ) + ) + ) + ); +$$; + +comment on function private.can_read_sheet_asset_object(uuid, text) is + 'Storage read predicate for bucket anatomical-sheet-assets: object .svg whose upload is confirmed, referenced by a published version of a usable sheet, or by any version of a sheet the caller edits.'; + +revoke all on function private.can_read_sheet_asset_object(uuid, text) from public; +grant execute on function private.can_read_sheet_asset_object(uuid, text) to authenticated; + +create policy anatomical_sheet_assets_read + on storage.objects + for select + to authenticated + using ( + bucket_id = 'anatomical-sheet-assets' + and private.can_read_sheet_asset_object((select auth.uid()), name) + ); + +-- No INSERT / UPDATE / DELETE policy for API roles on this bucket. diff --git a/supabase/seed/anatomical-sheets/equine/v1/IMPORT-REPORT.md b/supabase/seed/anatomical-sheets/equine/v1/IMPORT-REPORT.md new file mode 100644 index 00000000..edce7970 --- /dev/null +++ b/supabase/seed/anatomical-sheets/equine/v1/IMPORT-REPORT.md @@ -0,0 +1,204 @@ +# Rapport d'import : fiche anatomique équine v1 + +Généré par `pnpm import:equine` à partir des données historiques. Ne pas modifier à la main : relancer la commande. + +Statut : **brouillon** (version 1 en `draft`), jamais publié par le seed. Fiche `503dc301-a8b1-50d4-9e44-0919b2fc2916`, espèce `equine`. + +Les éléments de la section « Anomalies à valider » demandent une décision métier avant toute publication. + +## 1. Sources et empreintes + +| Fichier | Octets | sha256 | Id d'asset | +| ------------------ | ------ | ------------------------------------------------------------------ | -------------------------------------- | +| `Horse.svg` | 145770 | `5fe3819c8bf07f18fcc51f40f3d06b1bc82e6202a62afa003e8639867b5b212d` | `8bc2cd09-5fca-54c6-a78e-bdd3f6abaa3a` | +| `Horse_head.svg` | 139079 | `9c03b98c0e55e3f684ce314b88dab2a0e11f488af6cc9140d61e1b2d5f9cb94c` | `5043348c-b84b-50c3-bbf8-01ff539d163c` | +| `pathologies.json` | 174156 | `cc28300a20d850b5232bf00a1e5c4622b07f19a84a39de2e728831dc1e253643` | - | +| `vertebrae.ts` | 303 | `51c9ea9ad6e36039cf77e078b3c231952629140f3c5b67d523fe8f2840a464c9` | - | + +Les ids d'asset sont dérivés du sha256 du fichier (UUID déterministe), les deux SVG sont copiés à l'identique dans `assets/`. + +- vue `main` : viewBox `0 0 2073.4 1629.4` (view_box du document laissé à null, le SVG porte le sien) +- vue `head` : viewBox `60 100 500 380` (view_box du document laissé à null, le SVG porte le sien) + +## 2. Volumes + +| Mesure | Valeur | +| ------------------------------------------ | ------ | +| Annotations | 27 | +| dont vue `main` (Horse.svg) | 18 | +| dont vue `head` (Horse_head.svg) | 9 | +| Annotations reliées à une zone de constats | 26 | +| Déclencheurs de vue détail | 1 | +| Vues | 2 | +| Zones vertébrales avec code de région | 5 | +| Annotations bilatérales | 9 | +| Zones de constats (catalogue) | 26 | +| Nœuds (catégories incluses) | 792 | +| Feuilles | 612 | +| Orientations vétérinaires | 41 | + +Contrôle entrée = sortie, compté des deux côtés (sources lues, document écrit). L'importateur s'arrête au moindre écart : + +| Contrôle | Lu (sources) | Écrit (document) | +| ------------------------------------ | ------------ | ---------------- | +| Annotations (data-anno-id distincts) | 27 | 27 | +| Nœuds (catégories incluses) | 792 | 792 | +| Feuilles | 612 | 612 | +| Orientations vétérinaires | 41 | 41 | + +## 3. Annotations + +| Id historique | Nouvel id | Vue | Type | Latéralité | Région | Zone de constats | Géométrie | +| ---------------- | ---------------- | ---- | -------------- | ---------- | ------ | ---------------- | -------------------------------------------------- | +| `point-mpbwrkp0` | `hind-fetlock` | main | point | bilateral | - | `hind-fetlock` | cercle (1523, 1397) r 34 | +| `point-mpbwsi9q` | `hock` | main | point | bilateral | - | `hock` | cercle (1542, 1159) r 34 | +| `point-mpbwt4fa` | `stifle` | main | point | bilateral | - | `stifle` | cercle (1464, 918) r 34 | +| `point-mpbwtst0` | `hip` | main | point | bilateral | - | `hip` | cercle (1516, 695) r 34 | +| `point-mpbwugty` | `sacroiliac` | main | point | bilateral | - | `sacroiliac` | cercle (1590, 606) r 34 | +| `point-mpbwv4xy` | `shoulder` | main | point | bilateral | - | `shoulder` | cercle (784, 907) r 34 | +| `point-mpbwvpvt` | `elbow` | main | point | bilateral | - | `elbow` | cercle (743.0451049804688, 1193) r 34 | +| `point-mpbwwaru` | `fore-fetlock` | main | point | bilateral | - | `fore-fetlock` | cercle (736, 1379) r 34 | +| `point-mpbwwxvn` | `fore-sesamoids` | main | point | bilateral | - | `fore-sesamoids` | cercle (784, 1371) r 34 | +| `point-mpbwxnb4` | `l6-s1` | main | point | unpaired | - | `l6-s1` | cercle (1424.2662353515625, 431) r 30 | +| `point-mpbwyd9i` | `t18-l1` | main | point | unpaired | - | `t18-l1` | cercle (1117.97705078125, 469.1115417480469) r 30 | +| `point-mpbwyyc9` | `c7-t1` | main | point | unpaired | - | `c7-t1` | cercle (840.1692504882812, 399.0752258300781) r 30 | +| `zone-mpbx00jq` | `caudal` | main | zone | unpaired | Cd | `caudal` | polygone 7 points | +| `zone-mpbx0xnp` | `sacral` | main | zone | unpaired | S | `sacral` | polygone 8 points | +| `zone-mpbx1rm9` | `lumbar` | main | zone | unpaired | L | `lumbar` | polygone 7 points | +| `zone-mpbx2rpe` | `thoracic` | main | zone | unpaired | T | `thoracic` | polygone 9 points | +| `zone-mpbx5hx2` | `cervical` | main | zone | unpaired | C | `cervical` | polygone 17 points | +| `zone-mpby55kd` | `head-trigger` | main | detail_trigger | unpaired | - | - | polygone 15 points | +| `point-mpbykomv` | `parietal` | head | point | unpaired | - | `parietal` | cercle (348, 161) r 27 | +| `point-mpbylh35` | `frontal` | head | point | unpaired | - | `frontal` | cercle (277, 214) r 27 | +| `point-mpbymcln` | `sphenoid` | head | point | unpaired | - | `sphenoid` | cercle (299, 298) r 27 | +| `point-mpbyn2k3` | `temporal` | head | point | unpaired | - | `temporal` | cercle (368, 236) r 27 | +| `point-mpbynls5` | `occipital` | head | point | unpaired | - | `occipital` | cercle (441, 190) r 27 | +| `point-mpbyo7zq` | `atm` | head | point | unpaired | - | `atm` | cercle (384.94287109375, 314.0172882080078) r 27 | +| `point-mpbyphay` | `ssb` | head | point | unpaired | - | `ssb` | cercle (430, 266) r 27 | +| `point-mpbyq841` | `hyoid` | head | point | unpaired | - | `hyoid` | cercle (376, 399) r 27 | +| `point-mpbyqxbg` | `c0-c1` | head | point | unpaired | - | `c0-c1` | cercle (470, 333) r 27 | + +## 4. Catégories d'annotation + +| Id SVG | Id | Libellé FR | Libellé EN | Origine du libellé | +| ------------------------ | ------------------------ | ---------------------- | ---------------- | ---------------------- | +| `articulations` | `articulations` | Articulations | Joints | importateur, à valider | +| `os` | `os` | Os | Bones | importateur, à valider | +| `charni-res-vert-brales` | `charnieres-vertebrales` | Charnières vertébrales | Vertebral hinges | importateur, à valider | +| `zone-colonne` | `zone-colonne` | Zone colonne | Spine | importateur, à valider | +| `cadrans-du-cr-ne` | `cadrans-du-crane` | Cadrans du crâne | Skull quadrants | importateur, à valider | + +Couleur : `null` partout (les couleurs du SVG restent dans l'asset). Dans les SVG, `data-anno-category-name` répète le slug (`articulations`, `os`) : ce n'est pas un libellé, le libellé lisible de la table de l'importateur est utilisé. + +## 5. Configuration vertébrale + +| Code | Nom FR | Nom EN | Vertèbres | Origine du libellé | +| ---- | ----------- | -------- | --------- | ---------------------- | +| `C` | Cervicales | Cervical | 7 | importateur, à valider | +| `T` | Thoraciques | Thoracic | 18 | importateur, à valider | +| `L` | Lombaires | Lumbar | 6 | importateur, à valider | +| `S` | Sacrales | Sacral | 5 | importateur, à valider | +| `Cd` | Caudales | Caudal | 18 | importateur, à valider | + +Nombres de vertèbres : `vertebrae.ts`. Noms de région : écrits par l'importateur (aucune source ne les porte). + +Codes de région déduits des libellés (racines `cervic`, `thorac`/`dors`, `lombair`/`lumbar`, `sacral`/`sacre`, `caudal`/`coccyg`, FR puis EN). Déduction faite une fois ici, le document porte le code : + +| Annotation | Libellé lu | Racine | Code | +| ---------- | --------------------- | --------- | ---- | +| `caudal` | Vertèbres caudales | `caudal` | `Cd` | +| `sacral` | Vertèbres sacrales | `sacral` | `S` | +| `lumbar` | Vertèbres lombaires | `lombair` | `L` | +| `thoracic` | Vertèbres thoraciques | `thorac` | `T` | +| `cervical` | Vertèbres cervicales | `cervic` | `C` | + +## 6. Arbre de constats par zone + +Copie fidèle du catalogue : ids, libellés, descriptions présentes, orientations vétérinaires et sources. Ordre des zones et des catégories conservé. Nœuds = catégories incluses. + +| Zone | Nom | Nœuds | Feuilles | Orientations vét. | +| ---------------- | --------------------------------------- | ----- | -------- | ----------------- | +| `parietal` | Pariétal | 26 | 19 | 0 | +| `frontal` | Frontal | 29 | 22 | 2 | +| `sphenoid` | Sphénoïde | 42 | 34 | 1 | +| `temporal` | Temporel | 27 | 20 | 0 | +| `occipital` | Occipital | 26 | 19 | 0 | +| `ssb` | Synchondrose Sphéno-Basilaire (SSB) | 42 | 34 | 1 | +| `atm` | Articulation Temporo-Mandibulaire (ATM) | 34 | 28 | 2 | +| `hyoid` | Hyoïde | 26 | 20 | 1 | +| `c0-c1` | Charnière C0-C1 (occipito-atloïdienne) | 28 | 22 | 2 | +| `cervical` | Vertèbres cervicales | 34 | 26 | 3 | +| `c7-t1` | Charnière C7-T1 (cervico-thoracique) | 27 | 21 | 1 | +| `shoulder` | Épaule (scapulo-humérale) | 33 | 26 | 2 | +| `elbow` | Coude (huméro-radial) | 30 | 23 | 2 | +| `fore-fetlock` | Boulet ant. (métacarpo-phalangien) | 29 | 22 | 2 | +| `fore-sesamoids` | Sésamoïdes ant. (boulet) | 22 | 16 | 2 | +| `thoracic` | Vertèbres thoraciques | 38 | 29 | 2 | +| `t18-l1` | Charnière T18-L1 (dorso-lombaire) | 27 | 21 | 1 | +| `lumbar` | Vertèbres lombaires | 34 | 26 | 2 | +| `l6-s1` | Charnière L6-S1 (lombo-sacrée) | 27 | 21 | 1 | +| `sacral` | Vertèbres sacrales | 29 | 22 | 2 | +| `sacroiliac` | Articulation Sacro-Iliaque | 33 | 26 | 2 | +| `hip` | Hanche (coxo-fémorale) | 32 | 25 | 2 | +| `stifle` | Grasset (fémoro-tibial) | 32 | 25 | 3 | +| `hock` | Jarret (tarsien) | 32 | 25 | 2 | +| `hind-fetlock` | Boulet post. (métatarso-phalangien) | 29 | 22 | 2 | +| `caudal` | Vertèbres caudales | 24 | 18 | 1 | +| **Total** | | 792 | 612 | 41 | + +## 7. Anomalies à valider + +21 points demandent une décision, 6 sont informatifs. + +### À valider + +| Code | Objet | Détail | +| --------------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `label.authored` | name | Libellé écrit par l'importateur : FR « Cheval », EN « Horse ». | +| `label.authored` | description | Libellé écrit par l'importateur : FR « Fiche anatomique officielle Faunosteo », EN « Official Faunosteo anatomical sheet ». | +| `label.authored` | views.main | Libellé écrit par l'importateur : FR « Vue générale », EN « Overview ». | +| `label.authored` | views.head | Libellé écrit par l'importateur : FR « Tête », EN « Head ». | +| `label.authored` | vertebral_config.C | Libellé écrit par l'importateur : FR « Cervicales », EN « Cervical ». | +| `label.authored` | vertebral_config.T | Libellé écrit par l'importateur : FR « Thoraciques », EN « Thoracic ». | +| `label.authored` | vertebral_config.L | Libellé écrit par l'importateur : FR « Lombaires », EN « Lumbar ». | +| `label.authored` | vertebral_config.S | Libellé écrit par l'importateur : FR « Sacrales », EN « Sacral ». | +| `label.authored` | vertebral_config.Cd | Libellé écrit par l'importateur : FR « Caudales », EN « Caudal ». | +| `category.label.authored` | articulations | Libellé écrit par l'importateur : FR « Articulations », EN « Joints ». | +| `category.label.authored` | os | Libellé écrit par l'importateur : FR « Os », EN « Bones ». | +| `category.slug.normalised` | charni-res-vert-brales | Slug technique dégradé (accents perdus) normalisé en « charnieres-vertebrales ». | +| `category.label.authored` | charnieres-vertebrales | Libellé écrit par l'importateur : FR « Charnières vertébrales », EN « Vertebral hinges ». | +| `category.label.authored` | zone-colonne | Libellé écrit par l'importateur : FR « Zone colonne », EN « Spine ». | +| `category.slug.normalised` | cadrans-du-cr-ne | Slug technique dégradé (accents perdus) normalisé en « cadrans-du-crane ». | +| `category.label.authored` | cadrans-du-crane | Libellé écrit par l'importateur : FR « Cadrans du crâne », EN « Skull quadrants ». | +| `finding.category.foreign_prefix` | sphenoid/ssb-dysfunctions | Identifiant de catégorie dupliqué entre sphenoid et ssb ; sphenoid-dysfunctions attendu ; décision ostéopathe requise. Importé tel quel (non renommé). | +| `finding.description_en.missing` | pathologies.json | 62 descriptions sans traduction anglaise (clé « en » absente, rien d'inventé). | +| `document.scope_disclaimer.no_en` | scope_disclaimer | Texte de périmètre légal en français seulement : traduction anglaise à rédiger. | +| `vertebral.cd.capped` | Cd | Caudales plafonnées à 18 pour le sélecteur, alors que l'espèce varie (15–21) selon le commentaire source. | +| `finding.sources.none` | pathologies.json | Aucune source bibliographique sur les nœuds, alors que la règle projet en demande au moins une par entrée. | + +### Informatif + +| Code | Objet | Détail | +| -------------------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `annotation.trigger.unnamed` | zone-mpby55kd | Déclencheur de vue détail sans nom (name null), comme dans le SVG. | +| `finding.anamnesis.variant` | anamnesis variante 1/3 | Zones parietal, frontal, sphenoid, temporal, occipital, ssb, atm, hyoid : trauma-direct, stress-context, posture-context, dental-context, post-veterinary, no-identified-cause. | +| `finding.anamnesis.variant` | anamnesis variante 2/3 | Zones c0-c1, cervical, c7-t1, thoracic, t18-l1, lumbar, l6-s1, sacral, caudal : trauma-direct, saddle-context, posture-context, stress-context, post-veterinary, no-identified-cause. | +| `finding.anamnesis.variant` | anamnesis variante 3/3 | Zones shoulder, elbow, fore-fetlock, fore-sesamoids, sacroiliac, hip, stifle, hock, hind-fetlock : trauma-direct, sport-context, posture-context, stress-context, post-veterinary, no-identified-cause. | +| `finding.id.shared_across_zones` | 110 identifiants | Identifiants de nœuds réutilisés entre zones (unicité entre frères seulement, adressage par zone + chemin). Les plus fréquents : anamnesis (26), no-identified-cause (26), post-veterinary (26), posture-context (26), stress-context (26), trauma-direct (26), mechanical (19), muscular (19). | +| `annotation.geometry.hitbox` | géométrie | Géométrie lue sur le premier élément de chaque annotation (zone de clic), le marqueur visuel n'est pas importé. | + +## 8. Données non importées + +Aucune donnée métier écartée. + +Non repris par construction : + +- `schema_version` du catalogue (`2.0`) : version du format historique, remplacée par `schema_version: 1` du document canonique ; la valeur d'origine est citée dans `attribution.notes`. +- bloc `species` du catalogue (`equine`, Cheval / Horse) : porté par `species_id` du document et par la table `public.species` ; le nom de la fiche est écrit séparément (voir anomalies `label.authored`). +- second élément graphique de chaque annotation (marqueur visuel) : reste dans l'asset SVG copié à l'identique, le document ne garde que la zone de clic. +- `data-anno-category-name` : répète le slug technique (`articulations`, `os`), ce n'est pas un libellé ; le libellé de catégorie vient de la table de l'importateur (section 4). + +## 9. Résultat de validation + +- Forme (`AnatomicalSheetDocumentSchema`) : conforme. +- Intégrité (`validateSheetDocument`) : 0 erreur(s), 0 avertissement(s). diff --git a/supabase/seed/anatomical-sheets/equine/v1/assets.json b/supabase/seed/anatomical-sheets/equine/v1/assets.json new file mode 100644 index 00000000..2ab6ab8a --- /dev/null +++ b/supabase/seed/anatomical-sheets/equine/v1/assets.json @@ -0,0 +1,14 @@ +[ + { + "file": "Horse.svg", + "sha256": "5fe3819c8bf07f18fcc51f40f3d06b1bc82e6202a62afa003e8639867b5b212d", + "byte_size": 145770, + "svg_asset_id": "8bc2cd09-5fca-54c6-a78e-bdd3f6abaa3a" + }, + { + "file": "Horse_head.svg", + "sha256": "9c03b98c0e55e3f684ce314b88dab2a0e11f488af6cc9140d61e1b2d5f9cb94c", + "byte_size": 139079, + "svg_asset_id": "5043348c-b84b-50c3-bbf8-01ff539d163c" + } +] diff --git a/supabase/seed/anatomical-sheets/equine/v1/assets/Horse.svg b/supabase/seed/anatomical-sheets/equine/v1/assets/Horse.svg new file mode 100644 index 00000000..ec946b03 --- /dev/null +++ b/supabase/seed/anatomical-sheets/equine/v1/assets/Horse.svg @@ -0,0 +1,704 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Boulet post. (métatarso-phalangien) / Hind fetlockBoulet post. (métatarso-phalangien) / Hind fetlockJarret (tarsien) / HockJarret (tarsien) / HockGrasset (fémoro-tibial) / StifleGrasset (fémoro-tibial) / StifleHanche (coxo-fémorale) / Hip jointHanche (coxo-fémorale) / Hip jointArticulation Sacro-Iliaque / Sacroiliac JointArticulation Sacro-Iliaque / Sacroiliac JointÉpaule (scapulo-humérale) / Shoulder jointÉpaule (scapulo-humérale) / Shoulder jointCoude (huméro-radial) / Elbow jointCoude (huméro-radial) / Elbow jointBoulet ant. (métacarpo-phalangien) / Fore fetlockBoulet ant. (métacarpo-phalangien) / Fore fetlockSésamoïdes ant. (boulet) / Forelimb SesamoidsSésamoïdes ant. (boulet) / Forelimb SesamoidsCharnière L6-S1 (lombo-sacrée) / L6-S1 (Lumbosacral)Charnière L6-S1 (lombo-sacrée) / L6-S1 (Lumbosacral)Charnière T18-L1 (dorso-lombaire) / T18-L1 (Thoracolumbar)Charnière T18-L1 (dorso-lombaire) / T18-L1 (Thoracolumbar)Charnière C7-T1 (cervico-thoracique) / C7-T1 (Cervicothoracic)Charnière C7-T1 (cervico-thoracique) / C7-T1 (Cervicothoracic)Vertèbres caudales / Coccygeal VertebraeVertèbres sacrales / Sacral VertebraeVertèbres lombaires / Lumbar VertebraeVertèbres thoraciques / Thoracic VertebraeVertèbres cervicales / Cervical Vertebrae🔍 Zoom: head \ No newline at end of file diff --git a/supabase/seed/anatomical-sheets/equine/v1/assets/Horse_head.svg b/supabase/seed/anatomical-sheets/equine/v1/assets/Horse_head.svg new file mode 100644 index 00000000..5eb056c0 --- /dev/null +++ b/supabase/seed/anatomical-sheets/equine/v1/assets/Horse_head.svg @@ -0,0 +1,704 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Pariétal / Parietal bonePariétal / Parietal boneFrontal / Frontal boneFrontal / Frontal boneSphénoïde / SphenoidSphénoïde / SphenoidTemporel / TemporalTemporel / TemporalOccipital / OccipitalOccipital / OccipitalArticulation Temporo-Mandibulaire (ATM) / Temporomandibular Joint (TMJ)Articulation Temporo-Mandibulaire (ATM) / Temporomandibular Joint (TMJ)Synchondrose Sphéno-Basilaire (SSB) / Spheno-Basilar Synchondrosis (SBS)Synchondrose Sphéno-Basilaire (SSB) / Spheno-Basilar Synchondrosis (SBS)Hyoïde / HyoidHyoïde / HyoidCharnière C0-C1 (occipito-atloïdienne) / C0-C1 (Occipito-atlantal)Charnière C0-C1 (occipito-atloïdienne) / C0-C1 (Occipito-atlantal) \ No newline at end of file diff --git a/supabase/seed/anatomical-sheets/equine/v1/document.json b/supabase/seed/anatomical-sheets/equine/v1/document.json new file mode 100644 index 00000000..8a55835b --- /dev/null +++ b/supabase/seed/anatomical-sheets/equine/v1/document.json @@ -0,0 +1,7142 @@ +{ + "schema_version": 1, + "species_id": "equine", + "name": { + "fr": "Cheval", + "en": "Horse" + }, + "description": { + "fr": "Fiche anatomique officielle Faunosteo", + "en": "Official Faunosteo anatomical sheet" + }, + "scope_disclaimer": { + "fr": "Les éléments listés correspondent au périmètre légal de l'ostéopathie animale : dysfonctions ostéopathiques palpées, observations cliniques et motifs de consultation. Aucun diagnostic médical n'est posé. Toute pathologie organique relève du vétérinaire." + }, + "attribution": { + "authors": ["Faunosteo"], + "license": null, + "notes": "Import des données historiques: Horse.svg, Horse_head.svg, pathologies.json (schema 2.0)" + }, + "vertebral_config": { + "regions": [ + { + "code": "C", + "name": { + "fr": "Cervicales", + "en": "Cervical" + }, + "count": 7 + }, + { + "code": "T", + "name": { + "fr": "Thoraciques", + "en": "Thoracic" + }, + "count": 18 + }, + { + "code": "L", + "name": { + "fr": "Lombaires", + "en": "Lumbar" + }, + "count": 6 + }, + { + "code": "S", + "name": { + "fr": "Sacrales", + "en": "Sacral" + }, + "count": 5 + }, + { + "code": "Cd", + "name": { + "fr": "Caudales", + "en": "Caudal" + }, + "count": 18 + } + ] + }, + "categories": [ + { + "id": "articulations", + "name": { + "fr": "Articulations", + "en": "Joints" + }, + "color": null + }, + { + "id": "os", + "name": { + "fr": "Os", + "en": "Bones" + }, + "color": null + }, + { + "id": "charnieres-vertebrales", + "name": { + "fr": "Charnières vertébrales", + "en": "Vertebral hinges" + }, + "color": null + }, + { + "id": "zone-colonne", + "name": { + "fr": "Zone colonne", + "en": "Spine" + }, + "color": null + }, + { + "id": "cadrans-du-crane", + "name": { + "fr": "Cadrans du crâne", + "en": "Skull quadrants" + }, + "color": null + } + ], + "views": [ + { + "id": "main", + "kind": "main", + "name": { + "fr": "Vue générale", + "en": "Overview" + }, + "svg_asset_id": "8bc2cd09-5fca-54c6-a78e-bdd3f6abaa3a", + "view_box": null + }, + { + "id": "head", + "kind": "detail", + "parent_view_id": "main", + "name": { + "fr": "Tête", + "en": "Head" + }, + "svg_asset_id": "5043348c-b84b-50c3-bbf8-01ff539d163c", + "view_box": null + } + ], + "annotations": [ + { + "id": "hind-fetlock", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 1523, + "cy": 1397, + "r": 34 + }, + "name": { + "fr": "Boulet post. (métatarso-phalangien)", + "en": "Hind fetlock" + }, + "finding_zone_id": "hind-fetlock", + "vertebral_region_code": null + }, + { + "id": "hock", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 1542, + "cy": 1159, + "r": 34 + }, + "name": { + "fr": "Jarret (tarsien)", + "en": "Hock" + }, + "finding_zone_id": "hock", + "vertebral_region_code": null + }, + { + "id": "stifle", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 1464, + "cy": 918, + "r": 34 + }, + "name": { + "fr": "Grasset (fémoro-tibial)", + "en": "Stifle" + }, + "finding_zone_id": "stifle", + "vertebral_region_code": null + }, + { + "id": "hip", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 1516, + "cy": 695, + "r": 34 + }, + "name": { + "fr": "Hanche (coxo-fémorale)", + "en": "Hip joint" + }, + "finding_zone_id": "hip", + "vertebral_region_code": null + }, + { + "id": "sacroiliac", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 1590, + "cy": 606, + "r": 34 + }, + "name": { + "fr": "Articulation Sacro-Iliaque", + "en": "Sacroiliac Joint" + }, + "finding_zone_id": "sacroiliac", + "vertebral_region_code": null + }, + { + "id": "shoulder", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 784, + "cy": 907, + "r": 34 + }, + "name": { + "fr": "Épaule (scapulo-humérale)", + "en": "Shoulder joint" + }, + "finding_zone_id": "shoulder", + "vertebral_region_code": null + }, + { + "id": "elbow", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 743.0451049804688, + "cy": 1193, + "r": 34 + }, + "name": { + "fr": "Coude (huméro-radial)", + "en": "Elbow joint" + }, + "finding_zone_id": "elbow", + "vertebral_region_code": null + }, + { + "id": "fore-fetlock", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 736, + "cy": 1379, + "r": 34 + }, + "name": { + "fr": "Boulet ant. (métacarpo-phalangien)", + "en": "Fore fetlock" + }, + "finding_zone_id": "fore-fetlock", + "vertebral_region_code": null + }, + { + "id": "fore-sesamoids", + "kind": "point", + "view_id": "main", + "category_id": "os", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 784, + "cy": 1371, + "r": 34 + }, + "name": { + "fr": "Sésamoïdes ant. (boulet)", + "en": "Forelimb Sesamoids" + }, + "finding_zone_id": "fore-sesamoids", + "vertebral_region_code": null + }, + { + "id": "l6-s1", + "kind": "point", + "view_id": "main", + "category_id": "charnieres-vertebrales", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 1424.2662353515625, + "cy": 431, + "r": 30 + }, + "name": { + "fr": "Charnière L6-S1 (lombo-sacrée)", + "en": "L6-S1 (Lumbosacral)" + }, + "finding_zone_id": "l6-s1", + "vertebral_region_code": null + }, + { + "id": "t18-l1", + "kind": "point", + "view_id": "main", + "category_id": "charnieres-vertebrales", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 1117.97705078125, + "cy": 469.1115417480469, + "r": 30 + }, + "name": { + "fr": "Charnière T18-L1 (dorso-lombaire)", + "en": "T18-L1 (Thoracolumbar)" + }, + "finding_zone_id": "t18-l1", + "vertebral_region_code": null + }, + { + "id": "c7-t1", + "kind": "point", + "view_id": "main", + "category_id": "charnieres-vertebrales", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 840.1692504882812, + "cy": 399.0752258300781, + "r": 30 + }, + "name": { + "fr": "Charnière C7-T1 (cervico-thoracique)", + "en": "C7-T1 (Cervicothoracic)" + }, + "finding_zone_id": "c7-t1", + "vertebral_region_code": null + }, + { + "id": "caudal", + "kind": "zone", + "view_id": "main", + "category_id": "zone-colonne", + "laterality": "unpaired", + "geometry": { + "type": "polygon", + "points": [ + [1655, 545], + [1662, 513], + [1742, 565], + [1780, 618], + [1763, 628], + [1724, 590], + [1682, 569] + ] + }, + "name": { + "fr": "Vertèbres caudales", + "en": "Coccygeal Vertebrae" + }, + "finding_zone_id": "caudal", + "vertebral_region_code": "Cd" + }, + { + "id": "sacral", + "kind": "zone", + "view_id": "main", + "category_id": "zone-colonne", + "laterality": "unpaired", + "geometry": { + "type": "polygon", + "points": [ + [1438, 461], + [1418.5, 556.2], + [1510.8, 539.5], + [1595, 538.2], + [1641, 552], + [1641, 510], + [1606, 485], + [1515, 468] + ] + }, + "name": { + "fr": "Vertèbres sacrales", + "en": "Sacral Vertebrae" + }, + "finding_zone_id": "sacral", + "vertebral_region_code": "S" + }, + { + "id": "lumbar", + "kind": "zone", + "view_id": "main", + "category_id": "zone-colonne", + "laterality": "unpaired", + "geometry": { + "type": "polygon", + "points": [ + [1401.3, 457.1], + [1386, 562], + [1232, 562], + [1130, 552], + [1131.4, 503.2], + [1260, 475], + [1361, 454.4] + ] + }, + "name": { + "fr": "Vertèbres lombaires", + "en": "Lumbar Vertebrae" + }, + "finding_zone_id": "lumbar", + "vertebral_region_code": "L" + }, + { + "id": "thoracic", + "kind": "zone", + "view_id": "main", + "category_id": "zone-colonne", + "laterality": "unpaired", + "geometry": { + "type": "polygon", + "points": [ + [1109.9, 497.7], + [1103, 558.9], + [1010.3, 558.9], + [915, 552], + [873.9, 530.7], + [826.8, 509.5], + [841, 422], + [960, 482], + [1068, 496] + ] + }, + "name": { + "fr": "Vertèbres thoraciques", + "en": "Thoracic Vertebrae" + }, + "finding_zone_id": "thoracic", + "vertebral_region_code": "T" + }, + { + "id": "cervical", + "kind": "zone", + "view_id": "main", + "category_id": "zone-colonne", + "laterality": "unpaired", + "geometry": { + "type": "polygon", + "points": [ + [468, 276], + [489, 216], + [558, 248], + [586, 339], + [607, 401], + [625, 447], + [649, 510], + [695.1, 528.4], + [728.9, 520.1], + [765.3, 472.8], + [816.8, 453], + [796.5, 543.7], + [730, 600], + [646, 604], + [593, 565], + [552, 461], + [524, 370] + ] + }, + "name": { + "fr": "Vertèbres cervicales", + "en": "Cervical Vertebrae" + }, + "finding_zone_id": "cervical", + "vertebral_region_code": "C" + }, + { + "id": "head-trigger", + "kind": "detail_trigger", + "view_id": "main", + "category_id": "articulations", + "laterality": "unpaired", + "geometry": { + "type": "polygon", + "points": [ + [454, 332], + [429, 202], + [408, 150], + [349, 154], + [300, 188], + [269, 216], + [234, 279], + [192, 318], + [164, 384], + [175, 457], + [234, 468], + [265, 450], + [328, 419], + [405, 394], + [443, 408] + ] + }, + "name": null, + "opens_view_id": "head" + }, + { + "id": "parietal", + "kind": "point", + "view_id": "head", + "category_id": "cadrans-du-crane", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 348, + "cy": 161, + "r": 27 + }, + "name": { + "fr": "Pariétal", + "en": "Parietal bone" + }, + "finding_zone_id": "parietal", + "vertebral_region_code": null + }, + { + "id": "frontal", + "kind": "point", + "view_id": "head", + "category_id": "cadrans-du-crane", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 277, + "cy": 214, + "r": 27 + }, + "name": { + "fr": "Frontal", + "en": "Frontal bone" + }, + "finding_zone_id": "frontal", + "vertebral_region_code": null + }, + { + "id": "sphenoid", + "kind": "point", + "view_id": "head", + "category_id": "cadrans-du-crane", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 299, + "cy": 298, + "r": 27 + }, + "name": { + "fr": "Sphénoïde", + "en": "Sphenoid" + }, + "finding_zone_id": "sphenoid", + "vertebral_region_code": null + }, + { + "id": "temporal", + "kind": "point", + "view_id": "head", + "category_id": "cadrans-du-crane", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 368, + "cy": 236, + "r": 27 + }, + "name": { + "fr": "Temporel", + "en": "Temporal" + }, + "finding_zone_id": "temporal", + "vertebral_region_code": null + }, + { + "id": "occipital", + "kind": "point", + "view_id": "head", + "category_id": "cadrans-du-crane", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 441, + "cy": 190, + "r": 27 + }, + "name": { + "fr": "Occipital", + "en": "Occipital" + }, + "finding_zone_id": "occipital", + "vertebral_region_code": null + }, + { + "id": "atm", + "kind": "point", + "view_id": "head", + "category_id": "articulations", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 384.94287109375, + "cy": 314.0172882080078, + "r": 27 + }, + "name": { + "fr": "Articulation Temporo-Mandibulaire (ATM)", + "en": "Temporomandibular Joint (TMJ)" + }, + "finding_zone_id": "atm", + "vertebral_region_code": null + }, + { + "id": "ssb", + "kind": "point", + "view_id": "head", + "category_id": "articulations", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 430, + "cy": 266, + "r": 27 + }, + "name": { + "fr": "Synchondrose Sphéno-Basilaire (SSB)", + "en": "Spheno-Basilar Synchondrosis (SBS)" + }, + "finding_zone_id": "ssb", + "vertebral_region_code": null + }, + { + "id": "hyoid", + "kind": "point", + "view_id": "head", + "category_id": "os", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 376, + "cy": 399, + "r": 27 + }, + "name": { + "fr": "Hyoïde", + "en": "Hyoid" + }, + "finding_zone_id": "hyoid", + "vertebral_region_code": null + }, + { + "id": "c0-c1", + "kind": "point", + "view_id": "head", + "category_id": "charnieres-vertebrales", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 470, + "cy": 333, + "r": 27 + }, + "name": { + "fr": "Charnière C0-C1 (occipito-atloïdienne)", + "en": "C0-C1 (Occipito-atlantal)" + }, + "finding_zone_id": "c0-c1", + "vertebral_region_code": null + } + ], + "finding_zones": [ + { + "id": "parietal", + "name": { + "fr": "Pariétal", + "en": "Parietal bone" + }, + "categories": [ + { + "id": "parietal-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "mobility", + "name": { + "fr": "Lésions de mobilité", + "en": "Mobility lesions" + }, + "description": { + "fr": "Dysfonctions de mobilité de l'os sur le mécanisme respiratoire primaire (palpées)" + }, + "children": [ + { + "id": "flexion-external-rotation", + "name": { + "fr": "En flexion (rotation externe)", + "en": "Flexion (external rotation)" + } + }, + { + "id": "extension-internal-rotation", + "name": { + "fr": "En extension (rotation interne)", + "en": "Extension (internal rotation)" + } + }, + { + "id": "global-restriction", + "name": { + "fr": "Restriction de mobilité globale", + "en": "Global mobility restriction" + } + } + ] + }, + { + "id": "intraosseous", + "name": { + "fr": "Lésions intra-osseuses", + "en": "Intra-osseous lesions" + }, + "children": [ + { + "id": "squama-deformation", + "name": { + "fr": "Déformation de l'écaille pariétale palpée", + "en": "Palpated parietal squama deformation" + } + }, + { + "id": "interparietal-compression", + "name": { + "fr": "Compression interpariétale", + "en": "Interparietal compression" + } + } + ] + }, + { + "id": "sutures", + "name": { + "fr": "Restrictions de sutures", + "en": "Suture restrictions" + }, + "children": [ + { + "id": "frontoparietal", + "name": { + "fr": "Suture fronto-pariétale (coronale)", + "en": "Frontoparietal suture (coronal)" + } + }, + { + "id": "parieto-occipital", + "name": { + "fr": "Suture pariéto-occipitale (lambdoïde)", + "en": "Parieto-occipital suture (lambdoid)" + } + }, + { + "id": "parieto-temporal", + "name": { + "fr": "Suture pariéto-temporale (squameuse)", + "en": "Parieto-temporal suture (squamous)" + } + }, + { + "id": "sphenoparietal", + "name": { + "fr": "Suture sphéno-pariétale", + "en": "Sphenoparietal suture" + } + }, + { + "id": "interparietal", + "name": { + "fr": "Suture interpariétale (sagittale)", + "en": "Interparietal suture (sagittal)" + } + } + ] + } + ] + }, + { + "id": "parietal-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "behavior-change", + "name": { + "fr": "Modifications comportementales rapportées", + "en": "Reported behavioral changes" + }, + "children": [ + { + "id": "head-touch-hypersensitivity", + "name": { + "fr": "Hypersensibilité au toucher de la tête", + "en": "Head touch hypersensitivity" + } + }, + { + "id": "new-irritability", + "name": { + "fr": "Irritabilité nouvelle au harnachement de tête", + "en": "New irritability with head tack" + } + } + ] + }, + { + "id": "post-trauma-head", + "name": { + "fr": "Suite de traumatisme crânien (choc, coup)", + "en": "Post head trauma (blow, impact)" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "frontal", + "name": { + "fr": "Frontal", + "en": "Frontal bone" + }, + "categories": [ + { + "id": "frontal-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "mobility", + "name": { + "fr": "Lésions de mobilité", + "en": "Mobility lesions" + }, + "description": { + "fr": "Dysfonctions de mobilité de l'os sur le mécanisme respiratoire primaire (palpées)" + }, + "children": [ + { + "id": "flexion-external-rotation", + "name": { + "fr": "En flexion (rotation externe)", + "en": "Flexion (external rotation)" + } + }, + { + "id": "extension-internal-rotation", + "name": { + "fr": "En extension (rotation interne)", + "en": "Extension (internal rotation)" + } + }, + { + "id": "global-restriction", + "name": { + "fr": "Restriction de mobilité globale", + "en": "Global mobility restriction" + } + } + ] + }, + { + "id": "intraosseous", + "name": { + "fr": "Lésions intra-osseuses", + "en": "Intra-osseous lesions" + }, + "children": [ + { + "id": "metopic-compression", + "name": { + "fr": "Compression métopique (suture interfrontale persistante)", + "en": "Metopic compression (persistent interfrontal suture)" + } + }, + { + "id": "squama-deformation", + "name": { + "fr": "Déformation de l'écaille frontale palpée", + "en": "Palpated frontal squama deformation" + } + } + ] + }, + { + "id": "sutures", + "name": { + "fr": "Restrictions de sutures", + "en": "Suture restrictions" + }, + "children": [ + { + "id": "frontoparietal", + "name": { + "fr": "Suture fronto-pariétale (coronale)", + "en": "Frontoparietal suture (coronal)" + } + }, + { + "id": "frontosphenoidal", + "name": { + "fr": "Suture fronto-sphénoïdale", + "en": "Frontosphenoidal suture" + } + }, + { + "id": "frontonasal", + "name": { + "fr": "Suture fronto-nasale", + "en": "Frontonasal suture" + } + }, + { + "id": "frontolacrimal", + "name": { + "fr": "Suture fronto-lacrymale", + "en": "Frontolacrimal suture" + } + }, + { + "id": "frontozygomatic", + "name": { + "fr": "Suture fronto-zygomatique", + "en": "Frontozygomatic suture" + } + }, + { + "id": "interfrontal", + "name": { + "fr": "Suture interfrontale (métopique)", + "en": "Interfrontal suture (metopic)" + } + } + ] + } + ] + }, + { + "id": "frontal-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "behavior-change", + "name": { + "fr": "Modifications comportementales rapportées", + "en": "Reported behavioral changes" + }, + "children": [ + { + "id": "head-touch-hypersensitivity", + "name": { + "fr": "Hypersensibilité au toucher de la tête", + "en": "Head touch hypersensitivity" + } + }, + { + "id": "new-irritability", + "name": { + "fr": "Irritabilité nouvelle au harnachement de tête", + "en": "New irritability with head tack" + } + } + ] + }, + { + "id": "head-rubbing", + "name": { + "fr": "Frottements répétés de la tête rapportés", + "en": "Reported repeated head rubbing" + }, + "description": { + "fr": "Si récent ou intense, orienter vers vétérinaire (écarter cause cutanée/sinusale) avant intervention ostéo." + }, + "requires_vet_referral": true + }, + { + "id": "frontal-relief-asymmetry", + "name": { + "fr": "Asymétrie de relief frontal observée", + "en": "Observed frontal relief asymmetry" + }, + "description": { + "fr": "Si nouvelle, orienter vers vétérinaire (écarter atteinte osseuse/sinusale) avant intervention ostéo." + }, + "requires_vet_referral": true + }, + { + "id": "post-trauma-head", + "name": { + "fr": "Suite de traumatisme crânien (choc, coup)", + "en": "Post head trauma (blow, impact)" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "sphenoid", + "name": { + "fr": "Sphénoïde", + "en": "Sphenoid" + }, + "categories": [ + { + "id": "ssb-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "physiological", + "name": { + "fr": "Lésions physiologiques (SSB)", + "en": "Physiological lesions (SBS)" + }, + "description": { + "fr": "Dysfonctions sur les axes anatomiques normaux du mouvement crânien" + }, + "children": [ + { + "id": "flexion", + "name": { + "fr": "Flexion", + "en": "Flexion" + }, + "description": { + "fr": "Exagération du mouvement d'inspiration crânienne — corps du sphénoïde haut" + } + }, + { + "id": "extension", + "name": { + "fr": "Extension", + "en": "Extension" + }, + "description": { + "fr": "Exagération du mouvement d'expiration crânienne — corps du sphénoïde bas" + } + }, + { + "id": "torsion-right", + "name": { + "fr": "Torsion droite", + "en": "Right torsion" + }, + "description": { + "fr": "Rotation inverse sphénoïde/occiput sur l'axe antéro-postérieur" + } + }, + { + "id": "torsion-left", + "name": { + "fr": "Torsion gauche", + "en": "Left torsion" + } + }, + { + "id": "sidebending-rotation-right", + "name": { + "fr": "Side-bending rotation droite", + "en": "Right side-bending rotation" + }, + "description": { + "fr": "Inclinaison + rotation du même côté" + } + }, + { + "id": "sidebending-rotation-left", + "name": { + "fr": "Side-bending rotation gauche", + "en": "Left side-bending rotation" + } + } + ] + }, + { + "id": "traumatic", + "name": { + "fr": "Lésions non-physiologiques / traumatiques", + "en": "Non-physiological / traumatic lesions" + }, + "description": { + "fr": "Dysfonctions post-traumatiques (palpées)" + }, + "children": [ + { + "id": "vertical-strain-superior", + "name": { + "fr": "Strain vertical haut", + "en": "Superior vertical strain" + }, + "description": { + "fr": "Corps du sphénoïde déplacé vers le haut vs occiput" + } + }, + { + "id": "vertical-strain-inferior", + "name": { + "fr": "Strain vertical bas", + "en": "Inferior vertical strain" + } + }, + { + "id": "lateral-strain-right", + "name": { + "fr": "Strain latéral droit", + "en": "Right lateral strain" + } + }, + { + "id": "lateral-strain-left", + "name": { + "fr": "Strain latéral gauche", + "en": "Left lateral strain" + } + }, + { + "id": "compression", + "name": { + "fr": "Compression SSB", + "en": "SBS compression" + }, + "description": { + "fr": "Perte d'amplitude du mécanisme respiratoire primaire" + } + } + ] + }, + { + "id": "intraosseous", + "name": { + "fr": "Lésions intra-osseuses", + "en": "Intra-osseous lesions" + }, + "children": [ + { + "id": "pre-post-sphenoid", + "name": { + "fr": "Désengagement pré-sphénoïde / post-sphénoïde", + "en": "Pre-sphenoid / post-sphenoid disengagement" + } + }, + { + "id": "lesser-wings", + "name": { + "fr": "Dysfonction des petites ailes", + "en": "Lesser wings dysfunction" + } + }, + { + "id": "greater-wings", + "name": { + "fr": "Dysfonction des grandes ailes", + "en": "Greater wings dysfunction" + } + } + ] + }, + { + "id": "sutures", + "name": { + "fr": "Restrictions de sutures", + "en": "Suture restrictions" + }, + "children": [ + { + "id": "sphenopetrosal", + "name": { + "fr": "Suture sphéno-pétreuse", + "en": "Sphenopetrosal suture" + } + }, + { + "id": "sphenosquamous", + "name": { + "fr": "Suture sphéno-squameuse", + "en": "Sphenosquamous suture" + } + }, + { + "id": "sphenoparietal", + "name": { + "fr": "Suture sphéno-pariétale", + "en": "Sphenoparietal suture" + } + }, + { + "id": "frontosphenoidal", + "name": { + "fr": "Suture fronto-sphénoïdale", + "en": "Frontosphenoidal suture" + } + }, + { + "id": "sphenozygomatic", + "name": { + "fr": "Suture sphéno-zygomatique", + "en": "Sphenozygomatic suture" + } + }, + { + "id": "sphenomaxillary", + "name": { + "fr": "Suture sphéno-maxillaire", + "en": "Sphenomaxillary suture" + } + }, + { + "id": "sphenovomerian", + "name": { + "fr": "Suture sphéno-vomérienne", + "en": "Sphenovomerine suture" + } + }, + { + "id": "sphenopalatine", + "name": { + "fr": "Suture sphéno-palatine", + "en": "Sphenopalatine suture" + } + } + ] + } + ] + }, + { + "id": "sphenoid-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "behavior-change", + "name": { + "fr": "Modifications comportementales rapportées", + "en": "Reported behavioral changes" + }, + "children": [ + { + "id": "irritability", + "name": { + "fr": "Irritabilité / agressivité nouvelle", + "en": "New irritability / aggressiveness" + } + }, + { + "id": "withdrawal", + "name": { + "fr": "Apathie / repli", + "en": "Apathy / withdrawal" + } + }, + { + "id": "hypersensitivity", + "name": { + "fr": "Hypersensibilité au toucher de la tête", + "en": "Head touch hypersensitivity" + } + } + ] + }, + { + "id": "performance-drop", + "name": { + "fr": "Baisse de performance inexpliquée", + "en": "Unexplained performance drop" + } + }, + { + "id": "cycle-irregularity", + "name": { + "fr": "Irrégularité de cyclicité rapportée", + "en": "Reported cycle irregularity" + }, + "requires_vet_referral": true + }, + { + "id": "post-trauma-head", + "name": { + "fr": "Suite de traumatisme crânien", + "en": "Post head trauma" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "temporal", + "name": { + "fr": "Temporel", + "en": "Temporal" + }, + "categories": [ + { + "id": "temporal-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "mobility", + "name": { + "fr": "Lésions de mobilité", + "en": "Mobility lesions" + }, + "description": { + "fr": "Dysfonctions de mobilité de l'os sur le mécanisme respiratoire primaire (palpées)" + }, + "children": [ + { + "id": "temporal-anteriority", + "name": { + "fr": "Antériorité / postériorité temporale", + "en": "Temporal anteriority / posteriority" + } + }, + { + "id": "flexion-external-rotation", + "name": { + "fr": "En flexion (rotation externe)", + "en": "Flexion (external rotation)" + } + }, + { + "id": "extension-internal-rotation", + "name": { + "fr": "En extension (rotation interne)", + "en": "Extension (internal rotation)" + } + }, + { + "id": "global-restriction", + "name": { + "fr": "Restriction de mobilité globale", + "en": "Global mobility restriction" + } + } + ] + }, + { + "id": "intraosseous", + "name": { + "fr": "Lésions intra-osseuses", + "en": "Intra-osseous lesions" + }, + "children": [ + { + "id": "petrosquamous", + "name": { + "fr": "Dysfonction pétro-squameuse", + "en": "Petrosquamous dysfunction" + } + }, + { + "id": "tympanic-part", + "name": { + "fr": "Dysfonction de la partie tympanique", + "en": "Tympanic part dysfunction" + } + } + ] + }, + { + "id": "sutures", + "name": { + "fr": "Restrictions de sutures", + "en": "Suture restrictions" + }, + "children": [ + { + "id": "parieto-temporal", + "name": { + "fr": "Suture pariéto-temporale (squameuse)", + "en": "Parieto-temporal suture (squamous)" + } + }, + { + "id": "sphenosquamous", + "name": { + "fr": "Suture sphéno-squameuse", + "en": "Sphenosquamous suture" + } + }, + { + "id": "occipitomastoid", + "name": { + "fr": "Suture occipito-mastoïdienne", + "en": "Occipitomastoid suture" + } + }, + { + "id": "temporozygomatic", + "name": { + "fr": "Suture temporo-zygomatique", + "en": "Temporozygomatic suture" + } + }, + { + "id": "petro-occipital", + "name": { + "fr": "Suture pétro-occipitale", + "en": "Petro-occipital suture" + } + } + ] + } + ] + }, + { + "id": "temporal-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "behavior-change", + "name": { + "fr": "Modifications comportementales rapportées", + "en": "Reported behavioral changes" + }, + "children": [ + { + "id": "head-touch-hypersensitivity", + "name": { + "fr": "Hypersensibilité au toucher de la tête", + "en": "Head touch hypersensitivity" + } + }, + { + "id": "new-irritability", + "name": { + "fr": "Irritabilité nouvelle au harnachement de tête", + "en": "New irritability with head tack" + } + } + ] + }, + { + "id": "post-trauma-head", + "name": { + "fr": "Suite de traumatisme crânien (choc, coup)", + "en": "Post head trauma (blow, impact)" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "occipital", + "name": { + "fr": "Occipital", + "en": "Occipital" + }, + "categories": [ + { + "id": "occipital-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "mobility", + "name": { + "fr": "Lésions de mobilité", + "en": "Mobility lesions" + }, + "description": { + "fr": "Dysfonctions de mobilité de l'os sur le mécanisme respiratoire primaire (palpées)" + }, + "children": [ + { + "id": "condylar-compression", + "name": { + "fr": "Compression condylienne", + "en": "Condylar compression" + } + }, + { + "id": "flexion-external-rotation", + "name": { + "fr": "En flexion (rotation externe)", + "en": "Flexion (external rotation)" + } + }, + { + "id": "extension-internal-rotation", + "name": { + "fr": "En extension (rotation interne)", + "en": "Extension (internal rotation)" + } + }, + { + "id": "global-restriction", + "name": { + "fr": "Restriction de mobilité globale", + "en": "Global mobility restriction" + } + } + ] + }, + { + "id": "intraosseous", + "name": { + "fr": "Lésions intra-osseuses", + "en": "Intra-osseous lesions" + }, + "children": [ + { + "id": "squama-part", + "name": { + "fr": "Dysfonction de l'écaille (supra-occipital)", + "en": "Squamous part dysfunction (supraoccipital)" + } + }, + { + "id": "condylar-parts", + "name": { + "fr": "Dysfonction des parties condyliennes (exo-occipital)", + "en": "Condylar parts dysfunction (exoccipital)" + } + }, + { + "id": "basilar-part", + "name": { + "fr": "Dysfonction de la partie basilaire", + "en": "Basilar part dysfunction" + } + } + ] + }, + { + "id": "sutures", + "name": { + "fr": "Restrictions de sutures", + "en": "Suture restrictions" + }, + "children": [ + { + "id": "parieto-occipital", + "name": { + "fr": "Suture pariéto-occipitale (lambdoïde)", + "en": "Parieto-occipital suture (lambdoid)" + } + }, + { + "id": "occipitomastoid", + "name": { + "fr": "Suture occipito-mastoïdienne", + "en": "Occipitomastoid suture" + } + }, + { + "id": "petro-occipital", + "name": { + "fr": "Suture pétro-occipitale", + "en": "Petro-occipital suture" + } + } + ] + } + ] + }, + { + "id": "occipital-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "behavior-change", + "name": { + "fr": "Modifications comportementales rapportées", + "en": "Reported behavioral changes" + }, + "children": [ + { + "id": "head-touch-hypersensitivity", + "name": { + "fr": "Hypersensibilité au toucher de la tête", + "en": "Head touch hypersensitivity" + } + }, + { + "id": "new-irritability", + "name": { + "fr": "Irritabilité nouvelle au harnachement de tête", + "en": "New irritability with head tack" + } + } + ] + }, + { + "id": "post-trauma-head", + "name": { + "fr": "Suite de traumatisme crânien (choc, coup)", + "en": "Post head trauma (blow, impact)" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "ssb", + "name": { + "fr": "Synchondrose Sphéno-Basilaire (SSB)", + "en": "Spheno-Basilar Synchondrosis (SBS)" + }, + "categories": [ + { + "id": "ssb-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "physiological", + "name": { + "fr": "Lésions physiologiques (SSB)", + "en": "Physiological lesions (SBS)" + }, + "description": { + "fr": "Dysfonctions sur les axes anatomiques normaux du mouvement crânien" + }, + "children": [ + { + "id": "flexion", + "name": { + "fr": "Flexion", + "en": "Flexion" + }, + "description": { + "fr": "Exagération du mouvement d'inspiration crânienne — corps du sphénoïde haut" + } + }, + { + "id": "extension", + "name": { + "fr": "Extension", + "en": "Extension" + }, + "description": { + "fr": "Exagération du mouvement d'expiration crânienne — corps du sphénoïde bas" + } + }, + { + "id": "torsion-right", + "name": { + "fr": "Torsion droite", + "en": "Right torsion" + }, + "description": { + "fr": "Rotation inverse sphénoïde/occiput sur l'axe antéro-postérieur" + } + }, + { + "id": "torsion-left", + "name": { + "fr": "Torsion gauche", + "en": "Left torsion" + } + }, + { + "id": "sidebending-rotation-right", + "name": { + "fr": "Side-bending rotation droite", + "en": "Right side-bending rotation" + }, + "description": { + "fr": "Inclinaison + rotation du même côté" + } + }, + { + "id": "sidebending-rotation-left", + "name": { + "fr": "Side-bending rotation gauche", + "en": "Left side-bending rotation" + } + } + ] + }, + { + "id": "traumatic", + "name": { + "fr": "Lésions non-physiologiques / traumatiques", + "en": "Non-physiological / traumatic lesions" + }, + "description": { + "fr": "Dysfonctions post-traumatiques (palpées)" + }, + "children": [ + { + "id": "vertical-strain-superior", + "name": { + "fr": "Strain vertical haut", + "en": "Superior vertical strain" + }, + "description": { + "fr": "Corps du sphénoïde déplacé vers le haut vs occiput" + } + }, + { + "id": "vertical-strain-inferior", + "name": { + "fr": "Strain vertical bas", + "en": "Inferior vertical strain" + } + }, + { + "id": "lateral-strain-right", + "name": { + "fr": "Strain latéral droit", + "en": "Right lateral strain" + } + }, + { + "id": "lateral-strain-left", + "name": { + "fr": "Strain latéral gauche", + "en": "Left lateral strain" + } + }, + { + "id": "compression", + "name": { + "fr": "Compression SSB", + "en": "SBS compression" + }, + "description": { + "fr": "Perte d'amplitude du mécanisme respiratoire primaire" + } + } + ] + }, + { + "id": "intraosseous", + "name": { + "fr": "Lésions intra-osseuses", + "en": "Intra-osseous lesions" + }, + "children": [ + { + "id": "pre-post-sphenoid", + "name": { + "fr": "Désengagement pré-sphénoïde / post-sphénoïde", + "en": "Pre-sphenoid / post-sphenoid disengagement" + } + }, + { + "id": "lesser-wings", + "name": { + "fr": "Dysfonction des petites ailes", + "en": "Lesser wings dysfunction" + } + }, + { + "id": "greater-wings", + "name": { + "fr": "Dysfonction des grandes ailes", + "en": "Greater wings dysfunction" + } + } + ] + }, + { + "id": "sutures", + "name": { + "fr": "Restrictions de sutures", + "en": "Suture restrictions" + }, + "children": [ + { + "id": "sphenopetrosal", + "name": { + "fr": "Suture sphéno-pétreuse", + "en": "Sphenopetrosal suture" + } + }, + { + "id": "sphenosquamous", + "name": { + "fr": "Suture sphéno-squameuse", + "en": "Sphenosquamous suture" + } + }, + { + "id": "sphenoparietal", + "name": { + "fr": "Suture sphéno-pariétale", + "en": "Sphenoparietal suture" + } + }, + { + "id": "frontosphenoidal", + "name": { + "fr": "Suture fronto-sphénoïdale", + "en": "Frontosphenoidal suture" + } + }, + { + "id": "sphenozygomatic", + "name": { + "fr": "Suture sphéno-zygomatique", + "en": "Sphenozygomatic suture" + } + }, + { + "id": "sphenomaxillary", + "name": { + "fr": "Suture sphéno-maxillaire", + "en": "Sphenomaxillary suture" + } + }, + { + "id": "sphenovomerian", + "name": { + "fr": "Suture sphéno-vomérienne", + "en": "Sphenovomerine suture" + } + }, + { + "id": "sphenopalatine", + "name": { + "fr": "Suture sphéno-palatine", + "en": "Sphenopalatine suture" + } + } + ] + } + ] + }, + { + "id": "ssb-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "behavior-change", + "name": { + "fr": "Modifications comportementales rapportées", + "en": "Reported behavioral changes" + }, + "children": [ + { + "id": "irritability", + "name": { + "fr": "Irritabilité / agressivité nouvelle", + "en": "New irritability / aggressiveness" + } + }, + { + "id": "withdrawal", + "name": { + "fr": "Apathie / repli", + "en": "Apathy / withdrawal" + } + }, + { + "id": "hypersensitivity", + "name": { + "fr": "Hypersensibilité au toucher de la tête", + "en": "Head touch hypersensitivity" + } + } + ] + }, + { + "id": "performance-drop", + "name": { + "fr": "Baisse de performance inexpliquée", + "en": "Unexplained performance drop" + } + }, + { + "id": "cycle-irregularity", + "name": { + "fr": "Irrégularité de cyclicité rapportée", + "en": "Reported cycle irregularity" + }, + "requires_vet_referral": true + }, + { + "id": "post-trauma-head", + "name": { + "fr": "Suite de traumatisme crânien", + "en": "Post head trauma" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "atm", + "name": { + "fr": "Articulation Temporo-Mandibulaire (ATM)", + "en": "Temporomandibular Joint (TMJ)" + }, + "categories": [ + { + "id": "atm-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques de l'ATM", + "en": "Osteopathic TMJ dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-opening", + "name": { + "fr": "Restriction à l'ouverture", + "en": "Opening restriction" + } + }, + { + "id": "restriction-closing", + "name": { + "fr": "Restriction à la fermeture", + "en": "Closing restriction" + } + }, + { + "id": "restriction-lateral", + "name": { + "fr": "Restriction en latéralité", + "en": "Lateral restriction" + } + }, + { + "id": "restriction-protrusion", + "name": { + "fr": "Restriction en protraction/rétraction", + "en": "Protrusion/retraction restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions des muscles masticateurs", + "en": "Masticatory muscle tensions" + }, + "children": [ + { + "id": "masseter-tension", + "name": { + "fr": "Tension du masséter", + "en": "Masseter tension" + } + }, + { + "id": "temporalis-tension", + "name": { + "fr": "Tension du temporal", + "en": "Temporalis tension" + } + }, + { + "id": "pterygoid-tension", + "name": { + "fr": "Tension des ptérygoïdiens", + "en": "Pterygoid tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "lateral-deviation-jaw", + "name": { + "fr": "Latéro-déviation de la mâchoire", + "en": "Mandibular lateral deviation" + } + }, + { + "id": "asymmetric-dental-wear", + "name": { + "fr": "Asymétrie d'usure dentaire (à confirmer par praticien dentaire)", + "en": "Asymmetric dental wear (to confirm with dental practitioner)" + } + }, + { + "id": "opening-deviation", + "name": { + "fr": "Déviation à l'ouverture", + "en": "Opening deviation" + } + }, + { + "id": "asymmetric-amplitude", + "name": { + "fr": "Amplitude asymétrique d'ouverture", + "en": "Asymmetric opening amplitude" + } + } + ] + } + ] + }, + { + "id": "atm-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "bit-defense", + "name": { + "fr": "Réactions de défense au mors", + "en": "Defense reactions to bit" + } + }, + { + "id": "headshaking", + "name": { + "fr": "Headshaking (secouement de tête)", + "en": "Headshaking" + }, + "requires_vet_referral": true + }, + { + "id": "head-tilt-saddle", + "name": { + "fr": "Inclinaison de tête sous selle", + "en": "Head tilt under saddle" + } + }, + { + "id": "slow-eating", + "name": { + "fr": "Difficulté à mâcher / alimentation lente", + "en": "Chewing difficulty / slow eating" + } + }, + { + "id": "drops-food", + "name": { + "fr": "Laisse tomber de la nourriture", + "en": "Drops food while eating" + } + }, + { + "id": "hand-contact-refusal", + "name": { + "fr": "Refus du contact main du cavalier", + "en": "Refusal of rider's hand contact" + } + }, + { + "id": "false-bend", + "name": { + "fr": "Faux pli / fausse incurvation au travail", + "en": "False bend / curvature at work" + } + }, + { + "id": "post-dental-care", + "name": { + "fr": "Suite de soin dentaire", + "en": "Post dental care" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "hyoid", + "name": { + "fr": "Hyoïde", + "en": "Hyoid" + }, + "categories": [ + { + "id": "hyoid-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "mobility", + "name": { + "fr": "Restrictions de mobilité de l'appareil hyoïdien", + "en": "Hyoid apparatus mobility restrictions" + }, + "children": [ + { + "id": "global-restriction", + "name": { + "fr": "Restriction de mobilité globale", + "en": "Global mobility restriction" + } + }, + { + "id": "lateral-deviation", + "name": { + "fr": "Déviation latérale palpée", + "en": "Palpated lateral deviation" + } + }, + { + "id": "swing-restriction", + "name": { + "fr": "Restriction du balancier (déglutition)", + "en": "Swing restriction (swallowing)" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires associées", + "en": "Associated muscle tensions" + }, + "children": [ + { + "id": "suprahyoid-tension", + "name": { + "fr": "Tension des muscles sus-hyoïdiens", + "en": "Suprahyoid muscle tension" + } + }, + { + "id": "infrahyoid-tension", + "name": { + "fr": "Tension des muscles sous-hyoïdiens (sterno-hyoïdien)", + "en": "Infrahyoid muscle tension (sternohyoid)" + } + }, + { + "id": "stylohyoid-tension", + "name": { + "fr": "Tension du stylo-hyoïdien (lien temporal/ATM)", + "en": "Stylohyoid tension (temporal/TMJ link)" + } + }, + { + "id": "tongue-base-tension", + "name": { + "fr": "Tension des muscles de la base de langue", + "en": "Tongue base muscle tension" + } + } + ] + }, + { + "id": "intraosseous", + "name": { + "fr": "Lésions intra-osseuses", + "en": "Intra-osseous lesions" + }, + "children": [ + { + "id": "stylohyoid-bone", + "name": { + "fr": "Dysfonction du stylo-hyal palpée", + "en": "Palpated stylohyoid bone dysfunction" + } + }, + { + "id": "basihyoid", + "name": { + "fr": "Dysfonction du basi-hyal palpée", + "en": "Palpated basihyoid dysfunction" + } + } + ] + } + ] + }, + { + "id": "hyoid-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "bit-defense", + "name": { + "fr": "Réactions de défense au mors / dans le contact", + "en": "Defense reactions to bit / in contact" + } + }, + { + "id": "tongue-over-bit", + "name": { + "fr": "Langue passée par-dessus le mors rapportée", + "en": "Reported tongue-over-bit" + } + }, + { + "id": "swallowing-difficulty", + "name": { + "fr": "Difficulté de déglutition rapportée", + "en": "Reported swallowing difficulty" + }, + "description": { + "fr": "Une difficulté de déglutition impose d'écarter une cause médicale/neurologique : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + }, + { + "id": "head-carriage-resistance", + "name": { + "fr": "Résistance dans le port de tête", + "en": "Head carriage resistance" + } + }, + { + "id": "post-dental-care", + "name": { + "fr": "Suite de soin dentaire", + "en": "Post dental care" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "c0-c1", + "name": { + "fr": "Charnière C0-C1 (occipito-atloïdienne)", + "en": "C0-C1 (Occipito-atlantal)" + }, + "categories": [ + { + "id": "c0-c1-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations de la charnière", + "en": "Junction restrictions / fixations" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "fixation", + "name": { + "fr": "Fixation de la charnière", + "en": "Junction fixation" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires locales", + "en": "Local muscle tensions" + }, + "children": [ + { + "id": "rectus-capitis-tension", + "name": { + "fr": "Tension des droits de la tête", + "en": "Rectus capitis tension" + } + }, + { + "id": "obliquus-capitis-tension", + "name": { + "fr": "Tension des obliques de la tête", + "en": "Obliquus capitis tension" + } + }, + { + "id": "splenius-tension", + "name": { + "fr": "Tension du splénius", + "en": "Splenius tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "alignment-asymmetry", + "name": { + "fr": "Asymétrie d'alignement à la jonction observée", + "en": "Observed junction alignment asymmetry" + } + } + ] + } + ] + }, + { + "id": "c0-c1-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "poll-sensitivity", + "name": { + "fr": "Sensibilité de la nuque rapportée", + "en": "Reported poll sensitivity" + } + }, + { + "id": "head-carriage", + "name": { + "fr": "Difficulté de flexion de nuque / port de tête", + "en": "Poll flexion difficulty / head carriage" + } + }, + { + "id": "headshaking", + "name": { + "fr": "Headshaking (secouement de tête)", + "en": "Headshaking" + }, + "requires_vet_referral": true + }, + { + "id": "bridle-resistance", + "name": { + "fr": "Résistance à la mise en main", + "en": "Resistance to coming on the bit" + } + }, + { + "id": "palpation-sensitivity", + "name": { + "fr": "Sensibilité à la palpation rapportée", + "en": "Reported palpation sensitivity" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "cervical", + "name": { + "fr": "Vertèbres cervicales", + "en": "Cervical Vertebrae" + }, + "categories": [ + { + "id": "cervical-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations segmentaires", + "en": "Segmental restrictions / fixations" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "localized-fixation", + "name": { + "fr": "Fixation segmentaire localisée (C2–C7)", + "en": "Localized segmental fixation (C2–C7)" + } + } + ] + }, + { + "id": "group", + "name": { + "fr": "Dysfonctions de groupe", + "en": "Group dysfunctions" + }, + "children": [ + { + "id": "nsr-group", + "name": { + "fr": "Dysfonction de groupe en neutralité (NSR)", + "en": "Neutral group dysfunction (NSR)" + } + }, + { + "id": "functional-scoliotic-attitude", + "name": { + "fr": "Attitude scoliotique fonctionnelle observée", + "en": "Observed functional scoliotic attitude" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires paravertébrales", + "en": "Paravertebral muscle tensions" + }, + "children": [ + { + "id": "splenius-tension", + "name": { + "fr": "Tension du splénius", + "en": "Splenius tension" + } + }, + { + "id": "longissimus-capitis-cervicis", + "name": { + "fr": "Tension du longissimus de la tête / du cou", + "en": "Longissimus capitis / cervicis tension" + } + }, + { + "id": "scalenus-tension", + "name": { + "fr": "Tension du scalène", + "en": "Scalenus tension" + } + }, + { + "id": "brachiocephalicus-tension", + "name": { + "fr": "Tension du brachio-céphalique", + "en": "Brachiocephalicus tension" + } + }, + { + "id": "multifidus-cervicis", + "name": { + "fr": "Tension du multifide cervical", + "en": "Cervical multifidus tension" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "lateral-bend-asymmetry", + "name": { + "fr": "Asymétrie d'incurvation gauche/droite", + "en": "Left/right bend asymmetry" + } + }, + { + "id": "muscle-relief-asymmetry", + "name": { + "fr": "Asymétrie de relief musculaire gauche/droite", + "en": "Left/right muscle relief asymmetry" + } + } + ] + } + ] + }, + { + "id": "cervical-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Travail monté / locomotion", + "en": "Ridden work / locomotion" + }, + "children": [ + { + "id": "bend-asymmetry-work", + "name": { + "fr": "Incurvation difficile d'un côté au travail", + "en": "Bend difficulty on one side at work" + } + }, + { + "id": "head-carriage", + "name": { + "fr": "Port de tête / encolure anormal rapporté", + "en": "Reported abnormal head/neck carriage" + } + }, + { + "id": "contact-resistance", + "name": { + "fr": "Résistance au contact / mise en main", + "en": "Contact / on-the-bit resistance" + } + } + ] + }, + { + "id": "stumbling-proprioceptive", + "name": { + "fr": "Trébuchements / déficit proprioceptif rapporté", + "en": "Reported stumbling / proprioceptive deficit" + }, + "description": { + "fr": "Un déficit proprioceptif évoque une cause neurologique : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + }, + { + "id": "palpation-sensitivity", + "name": { + "fr": "Sensibilité à la palpation rapportée", + "en": "Reported palpation sensitivity" + }, + "requires_vet_referral": true + }, + { + "id": "new-stiffness", + "name": { + "fr": "Raideur nouvelle / récente", + "en": "New / recent stiffness" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "c7-t1", + "name": { + "fr": "Charnière C7-T1 (cervico-thoracique)", + "en": "C7-T1 (Cervicothoracic)" + }, + "categories": [ + { + "id": "c7-t1-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations de la charnière", + "en": "Junction restrictions / fixations" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "fixation", + "name": { + "fr": "Fixation de la charnière", + "en": "Junction fixation" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires locales", + "en": "Local muscle tensions" + }, + "children": [ + { + "id": "scalenus-tension", + "name": { + "fr": "Tension du scalène", + "en": "Scalenus tension" + } + }, + { + "id": "serratus-tension", + "name": { + "fr": "Tension du dentelé ventral du cou", + "en": "Ventral serratus tension" + } + }, + { + "id": "brachiocephalicus-tension", + "name": { + "fr": "Tension du brachio-céphalique", + "en": "Brachiocephalicus tension" + } + }, + { + "id": "deep-cervical-tension", + "name": { + "fr": "Tension des muscles cervicaux profonds", + "en": "Deep cervical muscle tension" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "alignment-asymmetry", + "name": { + "fr": "Asymétrie d'alignement à la jonction observée", + "en": "Observed junction alignment asymmetry" + } + } + ] + } + ] + }, + { + "id": "c7-t1-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "base-neck-stiffness", + "name": { + "fr": "Raideur de la base de l'encolure", + "en": "Base-of-neck stiffness" + } + }, + { + "id": "forelimb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude des antérieurs", + "en": "Lack of forelimb engagement / amplitude" + } + }, + { + "id": "ewe-neck-posture", + "name": { + "fr": "Posture d'encolure renversée rapportée", + "en": "Reported ewe-neck posture" + } + }, + { + "id": "forelimb-lameness", + "name": { + "fr": "Boiterie antérieure rapportée", + "en": "Reported forelimb lameness" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "shoulder", + "name": { + "fr": "Épaule (scapulo-humérale)", + "en": "Shoulder joint" + }, + "categories": [ + { + "id": "shoulder-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-abduction-adduction", + "name": { + "fr": "Restriction en abduction/adduction", + "en": "Abduction/adduction restriction" + } + }, + { + "id": "restriction-glide", + "name": { + "fr": "Restriction de glissement cranio-caudal", + "en": "Cranio-caudal glide restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "supraspinatus-infraspinatus", + "name": { + "fr": "Tension du sus-/sous-épineux", + "en": "Supraspinatus / infraspinatus tension" + } + }, + { + "id": "subscapularis-tension", + "name": { + "fr": "Tension du sous-scapulaire", + "en": "Subscapularis tension" + } + }, + { + "id": "deltoid-tension", + "name": { + "fr": "Tension du deltoïde", + "en": "Deltoid tension" + } + }, + { + "id": "biceps-brachii-tension", + "name": { + "fr": "Tension du biceps brachial", + "en": "Biceps brachii tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + }, + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "scapula-position-asymmetry", + "name": { + "fr": "Asymétrie de position de la scapula", + "en": "Scapular position asymmetry" + } + } + ] + } + ] + }, + { + "id": "shoulder-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Locomotion / travail monté", + "en": "Locomotion / ridden work" + }, + "children": [ + { + "id": "canter-difficulty", + "name": { + "fr": "Difficulté / refus au départ au galop", + "en": "Difficulty / refusal at canter departure" + } + }, + { + "id": "backing-difficulty", + "name": { + "fr": "Reculer difficile ou de travers", + "en": "Difficult or crooked backing" + } + }, + { + "id": "limb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude du membre", + "en": "Lack of limb engagement / amplitude" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "shortened-cranial-phase", + "name": { + "fr": "Phase antérieure du pas raccourcie rapportée", + "en": "Reported shortened cranial stride phase" + } + }, + { + "id": "limb-lameness", + "name": { + "fr": "Boiterie rapportée (membre concerné)", + "en": "Reported lameness (affected limb)" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "elbow", + "name": { + "fr": "Coude (huméro-radial)", + "en": "Elbow joint" + }, + "categories": [ + { + "id": "elbow-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateromedial", + "name": { + "fr": "Restriction en jeu latéro-médial", + "en": "Lateromedial play restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "triceps-tension", + "name": { + "fr": "Tension du triceps brachial", + "en": "Triceps brachii tension" + } + }, + { + "id": "biceps-brachialis-tension", + "name": { + "fr": "Tension du biceps / brachial", + "en": "Biceps / brachialis tension" + } + }, + { + "id": "carpal-extensors-origin", + "name": { + "fr": "Tension des origines des extenseurs du carpe", + "en": "Carpal extensors origin tension" + } + }, + { + "id": "carpal-flexors-origin", + "name": { + "fr": "Tension des origines des fléchisseurs du carpe", + "en": "Carpal flexors origin tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + }, + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + } + ] + } + ] + }, + { + "id": "elbow-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Locomotion / travail monté", + "en": "Locomotion / ridden work" + }, + "children": [ + { + "id": "canter-difficulty", + "name": { + "fr": "Difficulté / refus au départ au galop", + "en": "Difficulty / refusal at canter departure" + } + }, + { + "id": "backing-difficulty", + "name": { + "fr": "Reculer difficile ou de travers", + "en": "Difficult or crooked backing" + } + }, + { + "id": "limb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude du membre", + "en": "Lack of limb engagement / amplitude" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "limb-lameness", + "name": { + "fr": "Boiterie rapportée (membre concerné)", + "en": "Reported lameness (affected limb)" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "fore-fetlock", + "name": { + "fr": "Boulet ant. (métacarpo-phalangien)", + "en": "Fore fetlock" + }, + "categories": [ + { + "id": "fore-fetlock-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateromedial", + "name": { + "fr": "Restriction en jeu latéro-médial", + "en": "Lateromedial play restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "digital-flexors-tendon", + "name": { + "fr": "Tension des tendons fléchisseurs digitaux palpée", + "en": "Palpated digital flexor tendons tension" + } + }, + { + "id": "digital-extensor-tendon", + "name": { + "fr": "Tension du tendon extenseur digital", + "en": "Digital extensor tendon tension" + } + }, + { + "id": "palmar-fascia", + "name": { + "fr": "Tension de la fascia palmaire", + "en": "Palmar fascia tension" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + }, + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "fetlock-axis-asymmetry", + "name": { + "fr": "Asymétrie d'axe du boulet observée", + "en": "Observed fetlock axis asymmetry" + } + } + ] + } + ] + }, + { + "id": "fore-fetlock-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Locomotion / travail monté", + "en": "Locomotion / ridden work" + }, + "children": [ + { + "id": "canter-difficulty", + "name": { + "fr": "Difficulté / refus au départ au galop", + "en": "Difficulty / refusal at canter departure" + } + }, + { + "id": "backing-difficulty", + "name": { + "fr": "Reculer difficile ou de travers", + "en": "Difficult or crooked backing" + } + }, + { + "id": "limb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude du membre", + "en": "Lack of limb engagement / amplitude" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "limb-lameness", + "name": { + "fr": "Boiterie rapportée (membre concerné)", + "en": "Reported lameness (affected limb)" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "fore-sesamoids", + "name": { + "fr": "Sésamoïdes ant. (boulet)", + "en": "Forelimb Sesamoids" + }, + "categories": [ + { + "id": "fore-sesamoids-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "mobility", + "name": { + "fr": "Restrictions de mobilité", + "en": "Mobility restrictions" + }, + "children": [ + { + "id": "sesamoid-glide-restriction", + "name": { + "fr": "Restriction de glissement sésamoïdien", + "en": "Sesamoid glide restriction" + } + }, + { + "id": "medial-sesamoid", + "name": { + "fr": "Restriction du sésamoïde médial", + "en": "Medial sesamoid restriction" + } + }, + { + "id": "lateral-sesamoid", + "name": { + "fr": "Restriction du sésamoïde latéral", + "en": "Lateral sesamoid restriction" + } + } + ] + }, + { + "id": "ligamentous", + "name": { + "fr": "Tensions ligamentaires / tendineuses associées", + "en": "Associated ligamentous / tendinous tensions" + }, + "children": [ + { + "id": "intersesamoidean", + "name": { + "fr": "Tension du ligament inter-sésamoïdien palpée", + "en": "Palpated intersesamoidean ligament tension" + } + }, + { + "id": "flexor-tendon-glide", + "name": { + "fr": "Restriction de glissement du tendon fléchisseur", + "en": "Flexor tendon glide restriction" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "sesamoid-asymmetry", + "name": { + "fr": "Asymétrie de position sésamoïdienne palpée", + "en": "Palpated sesamoid position asymmetry" + } + }, + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + } + ] + } + ] + }, + { + "id": "fore-sesamoids-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "local-sensitivity", + "name": { + "fr": "Sensibilité locale rapportée", + "en": "Reported local sensitivity" + }, + "description": { + "fr": "Une sensibilité marquée de la région du boulet impose d'écarter une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + }, + { + "id": "shortened-stride", + "name": { + "fr": "Foulée antérieure raccourcie rapportée", + "en": "Reported shortened forelimb stride" + } + }, + { + "id": "forelimb-lameness", + "name": { + "fr": "Boiterie antérieure rapportée", + "en": "Reported forelimb lameness" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "thoracic", + "name": { + "fr": "Vertèbres thoraciques", + "en": "Thoracic Vertebrae" + }, + "categories": [ + { + "id": "thoracic-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations segmentaires", + "en": "Segmental restrictions / fixations" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "localized-fixation", + "name": { + "fr": "Fixation segmentaire localisée (T1–T18)", + "en": "Localized segmental fixation (T1–T18)" + } + } + ] + }, + { + "id": "costovertebral", + "name": { + "fr": "Restrictions costo-vertébrales", + "en": "Costovertebral restrictions" + }, + "children": [ + { + "id": "rib-head-restriction", + "name": { + "fr": "Restriction de tête de côte", + "en": "Rib head restriction" + } + }, + { + "id": "rib-respiratory-restriction", + "name": { + "fr": "Restriction costale au mouvement respiratoire", + "en": "Costal respiratory motion restriction" + } + } + ] + }, + { + "id": "group", + "name": { + "fr": "Dysfonctions de groupe", + "en": "Group dysfunctions" + }, + "children": [ + { + "id": "nsr-group", + "name": { + "fr": "Dysfonction de groupe en neutralité (NSR)", + "en": "Neutral group dysfunction (NSR)" + } + }, + { + "id": "functional-scoliotic-attitude", + "name": { + "fr": "Attitude scoliotique fonctionnelle observée", + "en": "Observed functional scoliotic attitude" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires paravertébrales", + "en": "Paravertebral muscle tensions" + }, + "children": [ + { + "id": "longissimus-tension", + "name": { + "fr": "Tension du long dorsal (longissimus)", + "en": "Longissimus tension" + } + }, + { + "id": "iliocostalis-tension", + "name": { + "fr": "Tension de l'ilio-costal", + "en": "Iliocostalis tension" + } + }, + { + "id": "trapezius-tension", + "name": { + "fr": "Tension du trapèze", + "en": "Trapezius tension" + } + }, + { + "id": "latissimus-tension", + "name": { + "fr": "Tension du grand dorsal", + "en": "Latissimus dorsi tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "muscle-relief-asymmetry", + "name": { + "fr": "Asymétrie de relief musculaire gauche/droite", + "en": "Left/right muscle relief asymmetry" + } + }, + { + "id": "withers-asymmetry", + "name": { + "fr": "Asymétrie de la région du garrot observée", + "en": "Observed withers region asymmetry" + } + } + ] + } + ] + }, + { + "id": "thoracic-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Travail monté / locomotion", + "en": "Ridden work / locomotion" + }, + "children": [ + { + "id": "saddle-region-sensitivity", + "name": { + "fr": "Sensibilité de la région de la selle rapportée", + "en": "Reported saddle-region sensitivity" + } + }, + { + "id": "cold-backed", + "name": { + "fr": "Dos froid / défense à la mise en selle rapportée", + "en": "Reported cold-backed / mounting defense" + } + }, + { + "id": "hindquarter-engagement", + "name": { + "fr": "Défaut de transmission dos / arrière-main", + "en": "Lack of back / hindquarter transmission" + } + }, + { + "id": "bucking", + "name": { + "fr": "Sauts de mouton / coups de cul au travail", + "en": "Bucking at work" + } + } + ] + }, + { + "id": "girthing-defense", + "name": { + "fr": "Défense / sensibilité au sanglage", + "en": "Girthing defense / sensitivity" + } + }, + { + "id": "palpation-sensitivity", + "name": { + "fr": "Sensibilité à la palpation rapportée", + "en": "Reported palpation sensitivity" + }, + "requires_vet_referral": true + }, + { + "id": "new-stiffness", + "name": { + "fr": "Raideur nouvelle / récente", + "en": "New / recent stiffness" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "t18-l1", + "name": { + "fr": "Charnière T18-L1 (dorso-lombaire)", + "en": "T18-L1 (Thoracolumbar)" + }, + "categories": [ + { + "id": "t18-l1-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations de la charnière", + "en": "Junction restrictions / fixations" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "fixation", + "name": { + "fr": "Fixation de la charnière", + "en": "Junction fixation" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires locales", + "en": "Local muscle tensions" + }, + "children": [ + { + "id": "longissimus-tension", + "name": { + "fr": "Tension du long dorsal (longissimus)", + "en": "Longissimus tension" + } + }, + { + "id": "iliocostalis-tension", + "name": { + "fr": "Tension de l'ilio-costal", + "en": "Iliocostalis tension" + } + }, + { + "id": "thoracolumbar-fascia", + "name": { + "fr": "Tension du fascia thoraco-lombaire", + "en": "Thoracolumbar fascia tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "alignment-asymmetry", + "name": { + "fr": "Asymétrie d'alignement à la jonction observée", + "en": "Observed junction alignment asymmetry" + } + } + ] + } + ] + }, + { + "id": "t18-l1-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "back-mobility-loss", + "name": { + "fr": "Perte de mobilité du dos à la jonction rapportée", + "en": "Reported back mobility loss at junction" + } + }, + { + "id": "saddle-rear-sensitivity", + "name": { + "fr": "Sensibilité à l'arrière de la selle rapportée", + "en": "Reported rear-saddle sensitivity" + } + }, + { + "id": "transmission-defect", + "name": { + "fr": "Défaut de transmission avant-main / arrière-main", + "en": "Fore/hindquarter transmission defect" + } + }, + { + "id": "palpation-sensitivity", + "name": { + "fr": "Sensibilité à la palpation rapportée", + "en": "Reported palpation sensitivity" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "lumbar", + "name": { + "fr": "Vertèbres lombaires", + "en": "Lumbar Vertebrae" + }, + "categories": [ + { + "id": "lumbar-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations segmentaires", + "en": "Segmental restrictions / fixations" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "localized-fixation", + "name": { + "fr": "Fixation segmentaire localisée (L1–L6)", + "en": "Localized segmental fixation (L1–L6)" + } + } + ] + }, + { + "id": "group", + "name": { + "fr": "Dysfonctions de groupe", + "en": "Group dysfunctions" + }, + "children": [ + { + "id": "nsr-group", + "name": { + "fr": "Dysfonction de groupe en neutralité (NSR)", + "en": "Neutral group dysfunction (NSR)" + } + }, + { + "id": "functional-scoliotic-attitude", + "name": { + "fr": "Attitude scoliotique fonctionnelle observée", + "en": "Observed functional scoliotic attitude" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires paravertébrales", + "en": "Paravertebral muscle tensions" + }, + "children": [ + { + "id": "longissimus-tension", + "name": { + "fr": "Tension du long dorsal (longissimus)", + "en": "Longissimus tension" + } + }, + { + "id": "iliocostalis-tension", + "name": { + "fr": "Tension de l'ilio-costal", + "en": "Iliocostalis tension" + } + }, + { + "id": "psoas-tension", + "name": { + "fr": "Tension du psoas / muscles sous-lombaires", + "en": "Psoas / sublumbar muscle tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "muscle-relief-asymmetry", + "name": { + "fr": "Asymétrie de relief musculaire gauche/droite", + "en": "Left/right muscle relief asymmetry" + } + }, + { + "id": "pelvic-tilt-asymmetry", + "name": { + "fr": "Bascule / asymétrie du bassin observée", + "en": "Observed pelvic tilt / asymmetry" + } + } + ] + } + ] + }, + { + "id": "lumbar-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Travail monté / locomotion", + "en": "Ridden work / locomotion" + }, + "children": [ + { + "id": "hollow-back-under-rider", + "name": { + "fr": "Dos creusé / sensible sous le cavalier", + "en": "Hollow / sensitive back under rider" + } + }, + { + "id": "hindlimb-engagement", + "name": { + "fr": "Défaut d'engagement des postérieurs", + "en": "Lack of hindlimb engagement" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + }, + { + "id": "blocking-at-work", + "name": { + "fr": "Cheval qui se bloque au travail", + "en": "Horse that locks up at work" + } + } + ] + }, + { + "id": "girthing-defense", + "name": { + "fr": "Défense / sensibilité au sanglage", + "en": "Girthing defense / sensitivity" + } + }, + { + "id": "palpation-sensitivity", + "name": { + "fr": "Sensibilité à la palpation rapportée", + "en": "Reported palpation sensitivity" + }, + "requires_vet_referral": true + }, + { + "id": "new-stiffness", + "name": { + "fr": "Raideur nouvelle / récente", + "en": "New / recent stiffness" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "l6-s1", + "name": { + "fr": "Charnière L6-S1 (lombo-sacrée)", + "en": "L6-S1 (Lumbosacral)" + }, + "categories": [ + { + "id": "l6-s1-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations de la charnière", + "en": "Junction restrictions / fixations" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "fixation", + "name": { + "fr": "Fixation de la charnière", + "en": "Junction fixation" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires locales", + "en": "Local muscle tensions" + }, + "children": [ + { + "id": "psoas-tension", + "name": { + "fr": "Tension du psoas / muscles sous-lombaires", + "en": "Psoas / sublumbar muscle tension" + } + }, + { + "id": "longissimus-tension", + "name": { + "fr": "Tension du long dorsal (longissimus)", + "en": "Longissimus tension" + } + }, + { + "id": "gluteal-tension", + "name": { + "fr": "Tension des fessiers", + "en": "Gluteal tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "alignment-asymmetry", + "name": { + "fr": "Asymétrie d'alignement à la jonction observée", + "en": "Observed junction alignment asymmetry" + } + } + ] + } + ] + }, + { + "id": "l6-s1-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "hindlimb-engagement", + "name": { + "fr": "Défaut d'engagement des postérieurs", + "en": "Lack of hindlimb engagement" + } + }, + { + "id": "canter-quality", + "name": { + "fr": "Galop désuni / qualité du galop rapportée", + "en": "Reported disunited / poor-quality canter" + } + }, + { + "id": "jumping-propulsion", + "name": { + "fr": "Défaut de propulsion à l'obstacle", + "en": "Lack of propulsion at jumping" + } + }, + { + "id": "palpation-sensitivity", + "name": { + "fr": "Sensibilité à la palpation rapportée", + "en": "Reported palpation sensitivity" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "sacral", + "name": { + "fr": "Vertèbres sacrales", + "en": "Sacral Vertebrae" + }, + "categories": [ + { + "id": "sacral-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "mobility", + "name": { + "fr": "Restrictions de mobilité sacrée", + "en": "Sacral mobility restrictions" + }, + "children": [ + { + "id": "nutation-restriction", + "name": { + "fr": "Restriction en nutation", + "en": "Nutation restriction" + } + }, + { + "id": "counternutation-restriction", + "name": { + "fr": "Restriction en contre-nutation", + "en": "Counternutation restriction" + } + }, + { + "id": "sacral-torsion", + "name": { + "fr": "Torsion sacrée palpée", + "en": "Palpated sacral torsion" + } + }, + { + "id": "lateralisation", + "name": { + "fr": "Latéralisation sacrée palpée", + "en": "Palpated sacral lateralisation" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires associées", + "en": "Associated muscle tensions" + }, + "children": [ + { + "id": "gluteal-tension", + "name": { + "fr": "Tension des fessiers", + "en": "Gluteal tension" + } + }, + { + "id": "longissimus-tension", + "name": { + "fr": "Tension du long dorsal (longissimus)", + "en": "Longissimus tension" + } + }, + { + "id": "sacrocaudalis-tension", + "name": { + "fr": "Tension des muscles sacro-caudaux", + "en": "Sacrocaudalis tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "tuber-sacrale-asymmetry", + "name": { + "fr": "Asymétrie des tubérosités sacrales observée", + "en": "Observed tuber sacrale asymmetry" + } + }, + { + "id": "pelvic-obliquity", + "name": { + "fr": "Obliquité du bassin observée", + "en": "Observed pelvic obliquity" + } + } + ] + } + ] + }, + { + "id": "sacral-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Travail monté / locomotion", + "en": "Ridden work / locomotion" + }, + "children": [ + { + "id": "hindlimb-propulsion", + "name": { + "fr": "Défaut de propulsion des postérieurs", + "en": "Lack of hindlimb propulsion" + } + }, + { + "id": "canter-quality", + "name": { + "fr": "Galop désuni / qualité du galop rapportée", + "en": "Reported disunited / poor-quality canter" + } + }, + { + "id": "bunny-hopping", + "name": { + "fr": "Postérieurs sautillant ensemble rapporté", + "en": "Reported bunny-hopping behind" + } + } + ] + }, + { + "id": "tail-carriage", + "name": { + "fr": "Port de queue anormal rapporté", + "en": "Reported abnormal tail carriage" + } + }, + { + "id": "palpation-sensitivity", + "name": { + "fr": "Sensibilité à la palpation rapportée", + "en": "Reported palpation sensitivity" + }, + "requires_vet_referral": true + }, + { + "id": "new-stiffness", + "name": { + "fr": "Raideur nouvelle / récente", + "en": "New / recent stiffness" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "sacroiliac", + "name": { + "fr": "Articulation Sacro-Iliaque", + "en": "Sacroiliac Joint" + }, + "categories": [ + { + "id": "sacroiliac-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "nutation-restriction", + "name": { + "fr": "Restriction en nutation", + "en": "Nutation restriction" + } + }, + { + "id": "counternutation-restriction", + "name": { + "fr": "Restriction en contre-nutation", + "en": "Counternutation restriction" + } + }, + { + "id": "iliac-rotation", + "name": { + "fr": "Restriction de rotation iliaque", + "en": "Iliac rotation restriction" + } + }, + { + "id": "shear-restriction", + "name": { + "fr": "Restriction de cisaillement / glissement", + "en": "Shear / glide restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "gluteus-medius-tension", + "name": { + "fr": "Tension du moyen fessier", + "en": "Gluteus medius tension" + } + }, + { + "id": "longissimus-tension", + "name": { + "fr": "Tension du long dorsal (longissimus)", + "en": "Longissimus tension" + } + }, + { + "id": "biceps-femoris-tension", + "name": { + "fr": "Tension du biceps fémoral", + "en": "Biceps femoris tension" + } + }, + { + "id": "sacrotuberous-tension", + "name": { + "fr": "Tension du ligament sacro-sciatique palpée", + "en": "Palpated sacrosciatic ligament tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "tuber-sacrale-asymmetry", + "name": { + "fr": "Asymétrie des tubérosités sacrales observée", + "en": "Observed tuber sacrale asymmetry" + } + }, + { + "id": "tuber-coxae-asymmetry", + "name": { + "fr": "Asymétrie des pointes de hanche observée", + "en": "Observed tuber coxae asymmetry" + } + }, + { + "id": "pelvic-obliquity", + "name": { + "fr": "Obliquité du bassin observée", + "en": "Observed pelvic obliquity" + } + } + ] + } + ] + }, + { + "id": "sacroiliac-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Travail monté / locomotion", + "en": "Ridden work / locomotion" + }, + "children": [ + { + "id": "hindlimb-engagement", + "name": { + "fr": "Défaut d'engagement des postérieurs", + "en": "Lack of hindlimb engagement" + } + }, + { + "id": "canter-disunited", + "name": { + "fr": "Galop désuni / changements de pied difficiles", + "en": "Disunited canter / difficult flying changes" + } + }, + { + "id": "bunny-hopping", + "name": { + "fr": "Postérieurs sautillant ensemble rapporté", + "en": "Reported bunny-hopping behind" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "croup-asymmetry", + "name": { + "fr": "Asymétrie de croupe rapportée", + "en": "Reported croup asymmetry" + } + }, + { + "id": "hindlimb-lameness", + "name": { + "fr": "Boiterie postérieure rapportée", + "en": "Reported hindlimb lameness" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "hip", + "name": { + "fr": "Hanche (coxo-fémorale)", + "en": "Hip joint" + }, + "categories": [ + { + "id": "hip-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-abduction-adduction", + "name": { + "fr": "Restriction en abduction/adduction", + "en": "Abduction/adduction restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "gluteal-group-tension", + "name": { + "fr": "Tension du groupe fessier", + "en": "Gluteal group tension" + } + }, + { + "id": "iliopsoas-tension", + "name": { + "fr": "Tension de l'ilio-psoas", + "en": "Iliopsoas tension" + } + }, + { + "id": "adductors-tension", + "name": { + "fr": "Tension des adducteurs", + "en": "Adductors tension" + } + }, + { + "id": "biceps-femoris-tension", + "name": { + "fr": "Tension du biceps fémoral", + "en": "Biceps femoris tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + }, + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "croup-asymmetry", + "name": { + "fr": "Asymétrie de croupe observée", + "en": "Observed croup asymmetry" + } + } + ] + } + ] + }, + { + "id": "hip-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Locomotion / travail monté", + "en": "Locomotion / ridden work" + }, + "children": [ + { + "id": "canter-difficulty", + "name": { + "fr": "Difficulté / refus au départ au galop", + "en": "Difficulty / refusal at canter departure" + } + }, + { + "id": "backing-difficulty", + "name": { + "fr": "Reculer difficile ou de travers", + "en": "Difficult or crooked backing" + } + }, + { + "id": "limb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude du membre", + "en": "Lack of limb engagement / amplitude" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "limb-lameness", + "name": { + "fr": "Boiterie rapportée (membre concerné)", + "en": "Reported lameness (affected limb)" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "stifle", + "name": { + "fr": "Grasset (fémoro-tibial)", + "en": "Stifle" + }, + "categories": [ + { + "id": "stifle-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-patellar-glide", + "name": { + "fr": "Restriction de glissement rotulien", + "en": "Patellar glide restriction" + } + }, + { + "id": "restriction-tibial-rotation", + "name": { + "fr": "Restriction de rotation tibiale", + "en": "Tibial rotation restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "quadriceps-tension", + "name": { + "fr": "Tension du quadriceps fémoral", + "en": "Quadriceps femoris tension" + } + }, + { + "id": "hamstrings-tension", + "name": { + "fr": "Tension des ischio-jambiers", + "en": "Hamstring tension" + } + }, + { + "id": "tfl-tension", + "name": { + "fr": "Tension du tenseur du fascia lata", + "en": "Tensor fasciae latae tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + }, + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "patellar-lateral-deviation", + "name": { + "fr": "Latéro-déviation rotulienne observée", + "en": "Observed patellar lateral deviation" + } + } + ] + } + ] + }, + { + "id": "stifle-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Locomotion / travail monté", + "en": "Locomotion / ridden work" + }, + "children": [ + { + "id": "canter-difficulty", + "name": { + "fr": "Difficulté / refus au départ au galop", + "en": "Difficulty / refusal at canter departure" + } + }, + { + "id": "backing-difficulty", + "name": { + "fr": "Reculer difficile ou de travers", + "en": "Difficult or crooked backing" + } + }, + { + "id": "limb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude du membre", + "en": "Lack of limb engagement / amplitude" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "patellar-catching", + "name": { + "fr": "Accrochement rotulien intermittent rapporté", + "en": "Reported intermittent patellar catching" + }, + "description": { + "fr": "Peut nécessiter un avis vétérinaire (accrochement de la rotule) : orienter avant intervention ostéo." + }, + "requires_vet_referral": true + }, + { + "id": "limb-lameness", + "name": { + "fr": "Boiterie rapportée (membre concerné)", + "en": "Reported lameness (affected limb)" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "hock", + "name": { + "fr": "Jarret (tarsien)", + "en": "Hock" + }, + "categories": [ + { + "id": "hock-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction de rotation (tarso-crural)", + "en": "Rotation restriction (tarsocrural)" + } + }, + { + "id": "restriction-small-joints", + "name": { + "fr": "Restriction de jeu des petites articulations tarsiennes", + "en": "Small tarsal joints play restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "gastrocnemius-tension", + "name": { + "fr": "Tension du gastrocnémien", + "en": "Gastrocnemius tension" + } + }, + { + "id": "peroneus-tertius", + "name": { + "fr": "Tension du péronier tiers / appareil réciproque", + "en": "Peroneus tertius / reciprocal apparatus tension" + } + }, + { + "id": "deep-digital-flexor", + "name": { + "fr": "Tension du fléchisseur profond du doigt", + "en": "Deep digital flexor tension" + } + }, + { + "id": "tibialis-cranialis", + "name": { + "fr": "Tension du tibial crânial", + "en": "Cranial tibial tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + }, + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "hock-axis-asymmetry", + "name": { + "fr": "Asymétrie d'axe du jarret observée", + "en": "Observed hock axis asymmetry" + } + } + ] + } + ] + }, + { + "id": "hock-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Locomotion / travail monté", + "en": "Locomotion / ridden work" + }, + "children": [ + { + "id": "canter-difficulty", + "name": { + "fr": "Difficulté / refus au départ au galop", + "en": "Difficulty / refusal at canter departure" + } + }, + { + "id": "backing-difficulty", + "name": { + "fr": "Reculer difficile ou de travers", + "en": "Difficult or crooked backing" + } + }, + { + "id": "limb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude du membre", + "en": "Lack of limb engagement / amplitude" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "limb-lameness", + "name": { + "fr": "Boiterie rapportée (membre concerné)", + "en": "Reported lameness (affected limb)" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "hind-fetlock", + "name": { + "fr": "Boulet post. (métatarso-phalangien)", + "en": "Hind fetlock" + }, + "categories": [ + { + "id": "hind-fetlock-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateromedial", + "name": { + "fr": "Restriction en jeu latéro-médial", + "en": "Lateromedial play restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "digital-flexors-tendon", + "name": { + "fr": "Tension des tendons fléchisseurs digitaux palpée", + "en": "Palpated digital flexor tendons tension" + } + }, + { + "id": "digital-extensor-tendon", + "name": { + "fr": "Tension du tendon extenseur digital", + "en": "Digital extensor tendon tension" + } + }, + { + "id": "plantar-fascia", + "name": { + "fr": "Tension de la fascia plantaire", + "en": "Plantar fascia tension" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + }, + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "fetlock-axis-asymmetry", + "name": { + "fr": "Asymétrie d'axe du boulet observée", + "en": "Observed fetlock axis asymmetry" + } + } + ] + } + ] + }, + { + "id": "hind-fetlock-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Locomotion / travail monté", + "en": "Locomotion / ridden work" + }, + "children": [ + { + "id": "canter-difficulty", + "name": { + "fr": "Difficulté / refus au départ au galop", + "en": "Difficulty / refusal at canter departure" + } + }, + { + "id": "backing-difficulty", + "name": { + "fr": "Reculer difficile ou de travers", + "en": "Difficult or crooked backing" + } + }, + { + "id": "limb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude du membre", + "en": "Lack of limb engagement / amplitude" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "limb-lameness", + "name": { + "fr": "Boiterie rapportée (membre concerné)", + "en": "Reported lameness (affected limb)" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "caudal", + "name": { + "fr": "Vertèbres caudales", + "en": "Coccygeal Vertebrae" + }, + "categories": [ + { + "id": "caudal-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations segmentaires", + "en": "Segmental restrictions / fixations" + }, + "children": [ + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-dorsoventral", + "name": { + "fr": "Restriction dorso-ventrale", + "en": "Dorsoventral restriction" + } + }, + { + "id": "localized-fixation", + "name": { + "fr": "Fixation segmentaire localisée", + "en": "Localized segmental fixation" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires associées", + "en": "Associated muscle tensions" + }, + "children": [ + { + "id": "sacrocaudalis-dorsalis", + "name": { + "fr": "Tension du sacro-caudal dorsal", + "en": "Sacrocaudalis dorsalis tension" + } + }, + { + "id": "sacrocaudalis-ventralis", + "name": { + "fr": "Tension du sacro-caudal ventral", + "en": "Sacrocaudalis ventralis tension" + } + }, + { + "id": "coccygeus-tension", + "name": { + "fr": "Tension du coccygien", + "en": "Coccygeus tension" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "tail-deviation", + "name": { + "fr": "Déviation latérale de la queue observée", + "en": "Observed lateral tail deviation" + } + }, + { + "id": "tail-carriage-asymmetry", + "name": { + "fr": "Asymétrie de port de queue observée", + "en": "Observed tail carriage asymmetry" + } + } + ] + } + ] + }, + { + "id": "caudal-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "tail-clamped", + "name": { + "fr": "Queue serrée / plaquée rapportée", + "en": "Reported clamped tail" + } + }, + { + "id": "tail-swishing", + "name": { + "fr": "Battements de queue répétés au travail", + "en": "Repeated tail swishing at work" + } + }, + { + "id": "tail-deviation-new", + "name": { + "fr": "Déviation nouvelle de la queue rapportée", + "en": "Reported new tail deviation" + }, + "description": { + "fr": "Une déviation nouvelle peut évoquer une cause neurologique/traumatique : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + }, + { + "id": "tail-handling-sensitivity", + "name": { + "fr": "Sensibilité à la manipulation de la queue rapportée", + "en": "Reported tail-handling sensitivity" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + } + ] +} diff --git a/supabase/seed/anatomical-sheets/equine/v1/equine_v1.sql b/supabase/seed/anatomical-sheets/equine/v1/equine_v1.sql new file mode 100644 index 00000000..c22c2301 --- /dev/null +++ b/supabase/seed/anatomical-sheets/equine/v1/equine_v1.sql @@ -0,0 +1,7171 @@ +-- Official equine anatomical sheet, version 1, DRAFT. +-- Generated by `pnpm import:equine` (packages/anatomy): do not edit by hand. +-- Idempotent. Never publishes: the version stays in status draft until a +-- platform admin validates IMPORT-REPORT.md and publishes it by hand. + +insert into public.anatomical_sheets + (id, species_id, name, slug, description, creator_user_id, is_official, visibility) +values ( + '503dc301-a8b1-50d4-9e44-0919b2fc2916', 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval', + 'Fiche anatomique officielle du cheval (import des données historiques, brouillon à valider)', + null, true, 'private' +) +on conflict (id) do nothing; + +insert into public.anatomical_sheet_assets + (id, sheet_id, sha256, byte_size, content_type, file_name) +values + ('8bc2cd09-5fca-54c6-a78e-bdd3f6abaa3a', '503dc301-a8b1-50d4-9e44-0919b2fc2916', '5fe3819c8bf07f18fcc51f40f3d06b1bc82e6202a62afa003e8639867b5b212d', 145770, 'image/svg+xml', 'Horse.svg'), + ('5043348c-b84b-50c3-bbf8-01ff539d163c', '503dc301-a8b1-50d4-9e44-0919b2fc2916', '9c03b98c0e55e3f684ce314b88dab2a0e11f488af6cc9140d61e1b2d5f9cb94c', 139079, 'image/svg+xml', 'Horse_head.svg') +on conflict (sheet_id, sha256) do nothing; + +select private.insert_sheet_draft( + null, + '503dc301-a8b1-50d4-9e44-0919b2fc2916', + $equine_doc${ + "schema_version": 1, + "species_id": "equine", + "name": { + "fr": "Cheval", + "en": "Horse" + }, + "description": { + "fr": "Fiche anatomique officielle Faunosteo", + "en": "Official Faunosteo anatomical sheet" + }, + "scope_disclaimer": { + "fr": "Les éléments listés correspondent au périmètre légal de l'ostéopathie animale : dysfonctions ostéopathiques palpées, observations cliniques et motifs de consultation. Aucun diagnostic médical n'est posé. Toute pathologie organique relève du vétérinaire." + }, + "attribution": { + "authors": ["Faunosteo"], + "license": null, + "notes": "Import des données historiques: Horse.svg, Horse_head.svg, pathologies.json (schema 2.0)" + }, + "vertebral_config": { + "regions": [ + { + "code": "C", + "name": { + "fr": "Cervicales", + "en": "Cervical" + }, + "count": 7 + }, + { + "code": "T", + "name": { + "fr": "Thoraciques", + "en": "Thoracic" + }, + "count": 18 + }, + { + "code": "L", + "name": { + "fr": "Lombaires", + "en": "Lumbar" + }, + "count": 6 + }, + { + "code": "S", + "name": { + "fr": "Sacrales", + "en": "Sacral" + }, + "count": 5 + }, + { + "code": "Cd", + "name": { + "fr": "Caudales", + "en": "Caudal" + }, + "count": 18 + } + ] + }, + "categories": [ + { + "id": "articulations", + "name": { + "fr": "Articulations", + "en": "Joints" + }, + "color": null + }, + { + "id": "os", + "name": { + "fr": "Os", + "en": "Bones" + }, + "color": null + }, + { + "id": "charnieres-vertebrales", + "name": { + "fr": "Charnières vertébrales", + "en": "Vertebral hinges" + }, + "color": null + }, + { + "id": "zone-colonne", + "name": { + "fr": "Zone colonne", + "en": "Spine" + }, + "color": null + }, + { + "id": "cadrans-du-crane", + "name": { + "fr": "Cadrans du crâne", + "en": "Skull quadrants" + }, + "color": null + } + ], + "views": [ + { + "id": "main", + "kind": "main", + "name": { + "fr": "Vue générale", + "en": "Overview" + }, + "svg_asset_id": "8bc2cd09-5fca-54c6-a78e-bdd3f6abaa3a", + "view_box": null + }, + { + "id": "head", + "kind": "detail", + "parent_view_id": "main", + "name": { + "fr": "Tête", + "en": "Head" + }, + "svg_asset_id": "5043348c-b84b-50c3-bbf8-01ff539d163c", + "view_box": null + } + ], + "annotations": [ + { + "id": "hind-fetlock", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 1523, + "cy": 1397, + "r": 34 + }, + "name": { + "fr": "Boulet post. (métatarso-phalangien)", + "en": "Hind fetlock" + }, + "finding_zone_id": "hind-fetlock", + "vertebral_region_code": null + }, + { + "id": "hock", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 1542, + "cy": 1159, + "r": 34 + }, + "name": { + "fr": "Jarret (tarsien)", + "en": "Hock" + }, + "finding_zone_id": "hock", + "vertebral_region_code": null + }, + { + "id": "stifle", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 1464, + "cy": 918, + "r": 34 + }, + "name": { + "fr": "Grasset (fémoro-tibial)", + "en": "Stifle" + }, + "finding_zone_id": "stifle", + "vertebral_region_code": null + }, + { + "id": "hip", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 1516, + "cy": 695, + "r": 34 + }, + "name": { + "fr": "Hanche (coxo-fémorale)", + "en": "Hip joint" + }, + "finding_zone_id": "hip", + "vertebral_region_code": null + }, + { + "id": "sacroiliac", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 1590, + "cy": 606, + "r": 34 + }, + "name": { + "fr": "Articulation Sacro-Iliaque", + "en": "Sacroiliac Joint" + }, + "finding_zone_id": "sacroiliac", + "vertebral_region_code": null + }, + { + "id": "shoulder", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 784, + "cy": 907, + "r": 34 + }, + "name": { + "fr": "Épaule (scapulo-humérale)", + "en": "Shoulder joint" + }, + "finding_zone_id": "shoulder", + "vertebral_region_code": null + }, + { + "id": "elbow", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 743.0451049804688, + "cy": 1193, + "r": 34 + }, + "name": { + "fr": "Coude (huméro-radial)", + "en": "Elbow joint" + }, + "finding_zone_id": "elbow", + "vertebral_region_code": null + }, + { + "id": "fore-fetlock", + "kind": "point", + "view_id": "main", + "category_id": "articulations", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 736, + "cy": 1379, + "r": 34 + }, + "name": { + "fr": "Boulet ant. (métacarpo-phalangien)", + "en": "Fore fetlock" + }, + "finding_zone_id": "fore-fetlock", + "vertebral_region_code": null + }, + { + "id": "fore-sesamoids", + "kind": "point", + "view_id": "main", + "category_id": "os", + "laterality": "bilateral", + "geometry": { + "type": "circle", + "cx": 784, + "cy": 1371, + "r": 34 + }, + "name": { + "fr": "Sésamoïdes ant. (boulet)", + "en": "Forelimb Sesamoids" + }, + "finding_zone_id": "fore-sesamoids", + "vertebral_region_code": null + }, + { + "id": "l6-s1", + "kind": "point", + "view_id": "main", + "category_id": "charnieres-vertebrales", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 1424.2662353515625, + "cy": 431, + "r": 30 + }, + "name": { + "fr": "Charnière L6-S1 (lombo-sacrée)", + "en": "L6-S1 (Lumbosacral)" + }, + "finding_zone_id": "l6-s1", + "vertebral_region_code": null + }, + { + "id": "t18-l1", + "kind": "point", + "view_id": "main", + "category_id": "charnieres-vertebrales", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 1117.97705078125, + "cy": 469.1115417480469, + "r": 30 + }, + "name": { + "fr": "Charnière T18-L1 (dorso-lombaire)", + "en": "T18-L1 (Thoracolumbar)" + }, + "finding_zone_id": "t18-l1", + "vertebral_region_code": null + }, + { + "id": "c7-t1", + "kind": "point", + "view_id": "main", + "category_id": "charnieres-vertebrales", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 840.1692504882812, + "cy": 399.0752258300781, + "r": 30 + }, + "name": { + "fr": "Charnière C7-T1 (cervico-thoracique)", + "en": "C7-T1 (Cervicothoracic)" + }, + "finding_zone_id": "c7-t1", + "vertebral_region_code": null + }, + { + "id": "caudal", + "kind": "zone", + "view_id": "main", + "category_id": "zone-colonne", + "laterality": "unpaired", + "geometry": { + "type": "polygon", + "points": [ + [1655, 545], + [1662, 513], + [1742, 565], + [1780, 618], + [1763, 628], + [1724, 590], + [1682, 569] + ] + }, + "name": { + "fr": "Vertèbres caudales", + "en": "Coccygeal Vertebrae" + }, + "finding_zone_id": "caudal", + "vertebral_region_code": "Cd" + }, + { + "id": "sacral", + "kind": "zone", + "view_id": "main", + "category_id": "zone-colonne", + "laterality": "unpaired", + "geometry": { + "type": "polygon", + "points": [ + [1438, 461], + [1418.5, 556.2], + [1510.8, 539.5], + [1595, 538.2], + [1641, 552], + [1641, 510], + [1606, 485], + [1515, 468] + ] + }, + "name": { + "fr": "Vertèbres sacrales", + "en": "Sacral Vertebrae" + }, + "finding_zone_id": "sacral", + "vertebral_region_code": "S" + }, + { + "id": "lumbar", + "kind": "zone", + "view_id": "main", + "category_id": "zone-colonne", + "laterality": "unpaired", + "geometry": { + "type": "polygon", + "points": [ + [1401.3, 457.1], + [1386, 562], + [1232, 562], + [1130, 552], + [1131.4, 503.2], + [1260, 475], + [1361, 454.4] + ] + }, + "name": { + "fr": "Vertèbres lombaires", + "en": "Lumbar Vertebrae" + }, + "finding_zone_id": "lumbar", + "vertebral_region_code": "L" + }, + { + "id": "thoracic", + "kind": "zone", + "view_id": "main", + "category_id": "zone-colonne", + "laterality": "unpaired", + "geometry": { + "type": "polygon", + "points": [ + [1109.9, 497.7], + [1103, 558.9], + [1010.3, 558.9], + [915, 552], + [873.9, 530.7], + [826.8, 509.5], + [841, 422], + [960, 482], + [1068, 496] + ] + }, + "name": { + "fr": "Vertèbres thoraciques", + "en": "Thoracic Vertebrae" + }, + "finding_zone_id": "thoracic", + "vertebral_region_code": "T" + }, + { + "id": "cervical", + "kind": "zone", + "view_id": "main", + "category_id": "zone-colonne", + "laterality": "unpaired", + "geometry": { + "type": "polygon", + "points": [ + [468, 276], + [489, 216], + [558, 248], + [586, 339], + [607, 401], + [625, 447], + [649, 510], + [695.1, 528.4], + [728.9, 520.1], + [765.3, 472.8], + [816.8, 453], + [796.5, 543.7], + [730, 600], + [646, 604], + [593, 565], + [552, 461], + [524, 370] + ] + }, + "name": { + "fr": "Vertèbres cervicales", + "en": "Cervical Vertebrae" + }, + "finding_zone_id": "cervical", + "vertebral_region_code": "C" + }, + { + "id": "head-trigger", + "kind": "detail_trigger", + "view_id": "main", + "category_id": "articulations", + "laterality": "unpaired", + "geometry": { + "type": "polygon", + "points": [ + [454, 332], + [429, 202], + [408, 150], + [349, 154], + [300, 188], + [269, 216], + [234, 279], + [192, 318], + [164, 384], + [175, 457], + [234, 468], + [265, 450], + [328, 419], + [405, 394], + [443, 408] + ] + }, + "name": null, + "opens_view_id": "head" + }, + { + "id": "parietal", + "kind": "point", + "view_id": "head", + "category_id": "cadrans-du-crane", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 348, + "cy": 161, + "r": 27 + }, + "name": { + "fr": "Pariétal", + "en": "Parietal bone" + }, + "finding_zone_id": "parietal", + "vertebral_region_code": null + }, + { + "id": "frontal", + "kind": "point", + "view_id": "head", + "category_id": "cadrans-du-crane", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 277, + "cy": 214, + "r": 27 + }, + "name": { + "fr": "Frontal", + "en": "Frontal bone" + }, + "finding_zone_id": "frontal", + "vertebral_region_code": null + }, + { + "id": "sphenoid", + "kind": "point", + "view_id": "head", + "category_id": "cadrans-du-crane", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 299, + "cy": 298, + "r": 27 + }, + "name": { + "fr": "Sphénoïde", + "en": "Sphenoid" + }, + "finding_zone_id": "sphenoid", + "vertebral_region_code": null + }, + { + "id": "temporal", + "kind": "point", + "view_id": "head", + "category_id": "cadrans-du-crane", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 368, + "cy": 236, + "r": 27 + }, + "name": { + "fr": "Temporel", + "en": "Temporal" + }, + "finding_zone_id": "temporal", + "vertebral_region_code": null + }, + { + "id": "occipital", + "kind": "point", + "view_id": "head", + "category_id": "cadrans-du-crane", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 441, + "cy": 190, + "r": 27 + }, + "name": { + "fr": "Occipital", + "en": "Occipital" + }, + "finding_zone_id": "occipital", + "vertebral_region_code": null + }, + { + "id": "atm", + "kind": "point", + "view_id": "head", + "category_id": "articulations", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 384.94287109375, + "cy": 314.0172882080078, + "r": 27 + }, + "name": { + "fr": "Articulation Temporo-Mandibulaire (ATM)", + "en": "Temporomandibular Joint (TMJ)" + }, + "finding_zone_id": "atm", + "vertebral_region_code": null + }, + { + "id": "ssb", + "kind": "point", + "view_id": "head", + "category_id": "articulations", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 430, + "cy": 266, + "r": 27 + }, + "name": { + "fr": "Synchondrose Sphéno-Basilaire (SSB)", + "en": "Spheno-Basilar Synchondrosis (SBS)" + }, + "finding_zone_id": "ssb", + "vertebral_region_code": null + }, + { + "id": "hyoid", + "kind": "point", + "view_id": "head", + "category_id": "os", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 376, + "cy": 399, + "r": 27 + }, + "name": { + "fr": "Hyoïde", + "en": "Hyoid" + }, + "finding_zone_id": "hyoid", + "vertebral_region_code": null + }, + { + "id": "c0-c1", + "kind": "point", + "view_id": "head", + "category_id": "charnieres-vertebrales", + "laterality": "unpaired", + "geometry": { + "type": "circle", + "cx": 470, + "cy": 333, + "r": 27 + }, + "name": { + "fr": "Charnière C0-C1 (occipito-atloïdienne)", + "en": "C0-C1 (Occipito-atlantal)" + }, + "finding_zone_id": "c0-c1", + "vertebral_region_code": null + } + ], + "finding_zones": [ + { + "id": "parietal", + "name": { + "fr": "Pariétal", + "en": "Parietal bone" + }, + "categories": [ + { + "id": "parietal-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "mobility", + "name": { + "fr": "Lésions de mobilité", + "en": "Mobility lesions" + }, + "description": { + "fr": "Dysfonctions de mobilité de l'os sur le mécanisme respiratoire primaire (palpées)" + }, + "children": [ + { + "id": "flexion-external-rotation", + "name": { + "fr": "En flexion (rotation externe)", + "en": "Flexion (external rotation)" + } + }, + { + "id": "extension-internal-rotation", + "name": { + "fr": "En extension (rotation interne)", + "en": "Extension (internal rotation)" + } + }, + { + "id": "global-restriction", + "name": { + "fr": "Restriction de mobilité globale", + "en": "Global mobility restriction" + } + } + ] + }, + { + "id": "intraosseous", + "name": { + "fr": "Lésions intra-osseuses", + "en": "Intra-osseous lesions" + }, + "children": [ + { + "id": "squama-deformation", + "name": { + "fr": "Déformation de l'écaille pariétale palpée", + "en": "Palpated parietal squama deformation" + } + }, + { + "id": "interparietal-compression", + "name": { + "fr": "Compression interpariétale", + "en": "Interparietal compression" + } + } + ] + }, + { + "id": "sutures", + "name": { + "fr": "Restrictions de sutures", + "en": "Suture restrictions" + }, + "children": [ + { + "id": "frontoparietal", + "name": { + "fr": "Suture fronto-pariétale (coronale)", + "en": "Frontoparietal suture (coronal)" + } + }, + { + "id": "parieto-occipital", + "name": { + "fr": "Suture pariéto-occipitale (lambdoïde)", + "en": "Parieto-occipital suture (lambdoid)" + } + }, + { + "id": "parieto-temporal", + "name": { + "fr": "Suture pariéto-temporale (squameuse)", + "en": "Parieto-temporal suture (squamous)" + } + }, + { + "id": "sphenoparietal", + "name": { + "fr": "Suture sphéno-pariétale", + "en": "Sphenoparietal suture" + } + }, + { + "id": "interparietal", + "name": { + "fr": "Suture interpariétale (sagittale)", + "en": "Interparietal suture (sagittal)" + } + } + ] + } + ] + }, + { + "id": "parietal-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "behavior-change", + "name": { + "fr": "Modifications comportementales rapportées", + "en": "Reported behavioral changes" + }, + "children": [ + { + "id": "head-touch-hypersensitivity", + "name": { + "fr": "Hypersensibilité au toucher de la tête", + "en": "Head touch hypersensitivity" + } + }, + { + "id": "new-irritability", + "name": { + "fr": "Irritabilité nouvelle au harnachement de tête", + "en": "New irritability with head tack" + } + } + ] + }, + { + "id": "post-trauma-head", + "name": { + "fr": "Suite de traumatisme crânien (choc, coup)", + "en": "Post head trauma (blow, impact)" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "frontal", + "name": { + "fr": "Frontal", + "en": "Frontal bone" + }, + "categories": [ + { + "id": "frontal-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "mobility", + "name": { + "fr": "Lésions de mobilité", + "en": "Mobility lesions" + }, + "description": { + "fr": "Dysfonctions de mobilité de l'os sur le mécanisme respiratoire primaire (palpées)" + }, + "children": [ + { + "id": "flexion-external-rotation", + "name": { + "fr": "En flexion (rotation externe)", + "en": "Flexion (external rotation)" + } + }, + { + "id": "extension-internal-rotation", + "name": { + "fr": "En extension (rotation interne)", + "en": "Extension (internal rotation)" + } + }, + { + "id": "global-restriction", + "name": { + "fr": "Restriction de mobilité globale", + "en": "Global mobility restriction" + } + } + ] + }, + { + "id": "intraosseous", + "name": { + "fr": "Lésions intra-osseuses", + "en": "Intra-osseous lesions" + }, + "children": [ + { + "id": "metopic-compression", + "name": { + "fr": "Compression métopique (suture interfrontale persistante)", + "en": "Metopic compression (persistent interfrontal suture)" + } + }, + { + "id": "squama-deformation", + "name": { + "fr": "Déformation de l'écaille frontale palpée", + "en": "Palpated frontal squama deformation" + } + } + ] + }, + { + "id": "sutures", + "name": { + "fr": "Restrictions de sutures", + "en": "Suture restrictions" + }, + "children": [ + { + "id": "frontoparietal", + "name": { + "fr": "Suture fronto-pariétale (coronale)", + "en": "Frontoparietal suture (coronal)" + } + }, + { + "id": "frontosphenoidal", + "name": { + "fr": "Suture fronto-sphénoïdale", + "en": "Frontosphenoidal suture" + } + }, + { + "id": "frontonasal", + "name": { + "fr": "Suture fronto-nasale", + "en": "Frontonasal suture" + } + }, + { + "id": "frontolacrimal", + "name": { + "fr": "Suture fronto-lacrymale", + "en": "Frontolacrimal suture" + } + }, + { + "id": "frontozygomatic", + "name": { + "fr": "Suture fronto-zygomatique", + "en": "Frontozygomatic suture" + } + }, + { + "id": "interfrontal", + "name": { + "fr": "Suture interfrontale (métopique)", + "en": "Interfrontal suture (metopic)" + } + } + ] + } + ] + }, + { + "id": "frontal-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "behavior-change", + "name": { + "fr": "Modifications comportementales rapportées", + "en": "Reported behavioral changes" + }, + "children": [ + { + "id": "head-touch-hypersensitivity", + "name": { + "fr": "Hypersensibilité au toucher de la tête", + "en": "Head touch hypersensitivity" + } + }, + { + "id": "new-irritability", + "name": { + "fr": "Irritabilité nouvelle au harnachement de tête", + "en": "New irritability with head tack" + } + } + ] + }, + { + "id": "head-rubbing", + "name": { + "fr": "Frottements répétés de la tête rapportés", + "en": "Reported repeated head rubbing" + }, + "description": { + "fr": "Si récent ou intense, orienter vers vétérinaire (écarter cause cutanée/sinusale) avant intervention ostéo." + }, + "requires_vet_referral": true + }, + { + "id": "frontal-relief-asymmetry", + "name": { + "fr": "Asymétrie de relief frontal observée", + "en": "Observed frontal relief asymmetry" + }, + "description": { + "fr": "Si nouvelle, orienter vers vétérinaire (écarter atteinte osseuse/sinusale) avant intervention ostéo." + }, + "requires_vet_referral": true + }, + { + "id": "post-trauma-head", + "name": { + "fr": "Suite de traumatisme crânien (choc, coup)", + "en": "Post head trauma (blow, impact)" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "sphenoid", + "name": { + "fr": "Sphénoïde", + "en": "Sphenoid" + }, + "categories": [ + { + "id": "ssb-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "physiological", + "name": { + "fr": "Lésions physiologiques (SSB)", + "en": "Physiological lesions (SBS)" + }, + "description": { + "fr": "Dysfonctions sur les axes anatomiques normaux du mouvement crânien" + }, + "children": [ + { + "id": "flexion", + "name": { + "fr": "Flexion", + "en": "Flexion" + }, + "description": { + "fr": "Exagération du mouvement d'inspiration crânienne — corps du sphénoïde haut" + } + }, + { + "id": "extension", + "name": { + "fr": "Extension", + "en": "Extension" + }, + "description": { + "fr": "Exagération du mouvement d'expiration crânienne — corps du sphénoïde bas" + } + }, + { + "id": "torsion-right", + "name": { + "fr": "Torsion droite", + "en": "Right torsion" + }, + "description": { + "fr": "Rotation inverse sphénoïde/occiput sur l'axe antéro-postérieur" + } + }, + { + "id": "torsion-left", + "name": { + "fr": "Torsion gauche", + "en": "Left torsion" + } + }, + { + "id": "sidebending-rotation-right", + "name": { + "fr": "Side-bending rotation droite", + "en": "Right side-bending rotation" + }, + "description": { + "fr": "Inclinaison + rotation du même côté" + } + }, + { + "id": "sidebending-rotation-left", + "name": { + "fr": "Side-bending rotation gauche", + "en": "Left side-bending rotation" + } + } + ] + }, + { + "id": "traumatic", + "name": { + "fr": "Lésions non-physiologiques / traumatiques", + "en": "Non-physiological / traumatic lesions" + }, + "description": { + "fr": "Dysfonctions post-traumatiques (palpées)" + }, + "children": [ + { + "id": "vertical-strain-superior", + "name": { + "fr": "Strain vertical haut", + "en": "Superior vertical strain" + }, + "description": { + "fr": "Corps du sphénoïde déplacé vers le haut vs occiput" + } + }, + { + "id": "vertical-strain-inferior", + "name": { + "fr": "Strain vertical bas", + "en": "Inferior vertical strain" + } + }, + { + "id": "lateral-strain-right", + "name": { + "fr": "Strain latéral droit", + "en": "Right lateral strain" + } + }, + { + "id": "lateral-strain-left", + "name": { + "fr": "Strain latéral gauche", + "en": "Left lateral strain" + } + }, + { + "id": "compression", + "name": { + "fr": "Compression SSB", + "en": "SBS compression" + }, + "description": { + "fr": "Perte d'amplitude du mécanisme respiratoire primaire" + } + } + ] + }, + { + "id": "intraosseous", + "name": { + "fr": "Lésions intra-osseuses", + "en": "Intra-osseous lesions" + }, + "children": [ + { + "id": "pre-post-sphenoid", + "name": { + "fr": "Désengagement pré-sphénoïde / post-sphénoïde", + "en": "Pre-sphenoid / post-sphenoid disengagement" + } + }, + { + "id": "lesser-wings", + "name": { + "fr": "Dysfonction des petites ailes", + "en": "Lesser wings dysfunction" + } + }, + { + "id": "greater-wings", + "name": { + "fr": "Dysfonction des grandes ailes", + "en": "Greater wings dysfunction" + } + } + ] + }, + { + "id": "sutures", + "name": { + "fr": "Restrictions de sutures", + "en": "Suture restrictions" + }, + "children": [ + { + "id": "sphenopetrosal", + "name": { + "fr": "Suture sphéno-pétreuse", + "en": "Sphenopetrosal suture" + } + }, + { + "id": "sphenosquamous", + "name": { + "fr": "Suture sphéno-squameuse", + "en": "Sphenosquamous suture" + } + }, + { + "id": "sphenoparietal", + "name": { + "fr": "Suture sphéno-pariétale", + "en": "Sphenoparietal suture" + } + }, + { + "id": "frontosphenoidal", + "name": { + "fr": "Suture fronto-sphénoïdale", + "en": "Frontosphenoidal suture" + } + }, + { + "id": "sphenozygomatic", + "name": { + "fr": "Suture sphéno-zygomatique", + "en": "Sphenozygomatic suture" + } + }, + { + "id": "sphenomaxillary", + "name": { + "fr": "Suture sphéno-maxillaire", + "en": "Sphenomaxillary suture" + } + }, + { + "id": "sphenovomerian", + "name": { + "fr": "Suture sphéno-vomérienne", + "en": "Sphenovomerine suture" + } + }, + { + "id": "sphenopalatine", + "name": { + "fr": "Suture sphéno-palatine", + "en": "Sphenopalatine suture" + } + } + ] + } + ] + }, + { + "id": "sphenoid-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "behavior-change", + "name": { + "fr": "Modifications comportementales rapportées", + "en": "Reported behavioral changes" + }, + "children": [ + { + "id": "irritability", + "name": { + "fr": "Irritabilité / agressivité nouvelle", + "en": "New irritability / aggressiveness" + } + }, + { + "id": "withdrawal", + "name": { + "fr": "Apathie / repli", + "en": "Apathy / withdrawal" + } + }, + { + "id": "hypersensitivity", + "name": { + "fr": "Hypersensibilité au toucher de la tête", + "en": "Head touch hypersensitivity" + } + } + ] + }, + { + "id": "performance-drop", + "name": { + "fr": "Baisse de performance inexpliquée", + "en": "Unexplained performance drop" + } + }, + { + "id": "cycle-irregularity", + "name": { + "fr": "Irrégularité de cyclicité rapportée", + "en": "Reported cycle irregularity" + }, + "requires_vet_referral": true + }, + { + "id": "post-trauma-head", + "name": { + "fr": "Suite de traumatisme crânien", + "en": "Post head trauma" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "temporal", + "name": { + "fr": "Temporel", + "en": "Temporal" + }, + "categories": [ + { + "id": "temporal-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "mobility", + "name": { + "fr": "Lésions de mobilité", + "en": "Mobility lesions" + }, + "description": { + "fr": "Dysfonctions de mobilité de l'os sur le mécanisme respiratoire primaire (palpées)" + }, + "children": [ + { + "id": "temporal-anteriority", + "name": { + "fr": "Antériorité / postériorité temporale", + "en": "Temporal anteriority / posteriority" + } + }, + { + "id": "flexion-external-rotation", + "name": { + "fr": "En flexion (rotation externe)", + "en": "Flexion (external rotation)" + } + }, + { + "id": "extension-internal-rotation", + "name": { + "fr": "En extension (rotation interne)", + "en": "Extension (internal rotation)" + } + }, + { + "id": "global-restriction", + "name": { + "fr": "Restriction de mobilité globale", + "en": "Global mobility restriction" + } + } + ] + }, + { + "id": "intraosseous", + "name": { + "fr": "Lésions intra-osseuses", + "en": "Intra-osseous lesions" + }, + "children": [ + { + "id": "petrosquamous", + "name": { + "fr": "Dysfonction pétro-squameuse", + "en": "Petrosquamous dysfunction" + } + }, + { + "id": "tympanic-part", + "name": { + "fr": "Dysfonction de la partie tympanique", + "en": "Tympanic part dysfunction" + } + } + ] + }, + { + "id": "sutures", + "name": { + "fr": "Restrictions de sutures", + "en": "Suture restrictions" + }, + "children": [ + { + "id": "parieto-temporal", + "name": { + "fr": "Suture pariéto-temporale (squameuse)", + "en": "Parieto-temporal suture (squamous)" + } + }, + { + "id": "sphenosquamous", + "name": { + "fr": "Suture sphéno-squameuse", + "en": "Sphenosquamous suture" + } + }, + { + "id": "occipitomastoid", + "name": { + "fr": "Suture occipito-mastoïdienne", + "en": "Occipitomastoid suture" + } + }, + { + "id": "temporozygomatic", + "name": { + "fr": "Suture temporo-zygomatique", + "en": "Temporozygomatic suture" + } + }, + { + "id": "petro-occipital", + "name": { + "fr": "Suture pétro-occipitale", + "en": "Petro-occipital suture" + } + } + ] + } + ] + }, + { + "id": "temporal-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "behavior-change", + "name": { + "fr": "Modifications comportementales rapportées", + "en": "Reported behavioral changes" + }, + "children": [ + { + "id": "head-touch-hypersensitivity", + "name": { + "fr": "Hypersensibilité au toucher de la tête", + "en": "Head touch hypersensitivity" + } + }, + { + "id": "new-irritability", + "name": { + "fr": "Irritabilité nouvelle au harnachement de tête", + "en": "New irritability with head tack" + } + } + ] + }, + { + "id": "post-trauma-head", + "name": { + "fr": "Suite de traumatisme crânien (choc, coup)", + "en": "Post head trauma (blow, impact)" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "occipital", + "name": { + "fr": "Occipital", + "en": "Occipital" + }, + "categories": [ + { + "id": "occipital-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "mobility", + "name": { + "fr": "Lésions de mobilité", + "en": "Mobility lesions" + }, + "description": { + "fr": "Dysfonctions de mobilité de l'os sur le mécanisme respiratoire primaire (palpées)" + }, + "children": [ + { + "id": "condylar-compression", + "name": { + "fr": "Compression condylienne", + "en": "Condylar compression" + } + }, + { + "id": "flexion-external-rotation", + "name": { + "fr": "En flexion (rotation externe)", + "en": "Flexion (external rotation)" + } + }, + { + "id": "extension-internal-rotation", + "name": { + "fr": "En extension (rotation interne)", + "en": "Extension (internal rotation)" + } + }, + { + "id": "global-restriction", + "name": { + "fr": "Restriction de mobilité globale", + "en": "Global mobility restriction" + } + } + ] + }, + { + "id": "intraosseous", + "name": { + "fr": "Lésions intra-osseuses", + "en": "Intra-osseous lesions" + }, + "children": [ + { + "id": "squama-part", + "name": { + "fr": "Dysfonction de l'écaille (supra-occipital)", + "en": "Squamous part dysfunction (supraoccipital)" + } + }, + { + "id": "condylar-parts", + "name": { + "fr": "Dysfonction des parties condyliennes (exo-occipital)", + "en": "Condylar parts dysfunction (exoccipital)" + } + }, + { + "id": "basilar-part", + "name": { + "fr": "Dysfonction de la partie basilaire", + "en": "Basilar part dysfunction" + } + } + ] + }, + { + "id": "sutures", + "name": { + "fr": "Restrictions de sutures", + "en": "Suture restrictions" + }, + "children": [ + { + "id": "parieto-occipital", + "name": { + "fr": "Suture pariéto-occipitale (lambdoïde)", + "en": "Parieto-occipital suture (lambdoid)" + } + }, + { + "id": "occipitomastoid", + "name": { + "fr": "Suture occipito-mastoïdienne", + "en": "Occipitomastoid suture" + } + }, + { + "id": "petro-occipital", + "name": { + "fr": "Suture pétro-occipitale", + "en": "Petro-occipital suture" + } + } + ] + } + ] + }, + { + "id": "occipital-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "behavior-change", + "name": { + "fr": "Modifications comportementales rapportées", + "en": "Reported behavioral changes" + }, + "children": [ + { + "id": "head-touch-hypersensitivity", + "name": { + "fr": "Hypersensibilité au toucher de la tête", + "en": "Head touch hypersensitivity" + } + }, + { + "id": "new-irritability", + "name": { + "fr": "Irritabilité nouvelle au harnachement de tête", + "en": "New irritability with head tack" + } + } + ] + }, + { + "id": "post-trauma-head", + "name": { + "fr": "Suite de traumatisme crânien (choc, coup)", + "en": "Post head trauma (blow, impact)" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "ssb", + "name": { + "fr": "Synchondrose Sphéno-Basilaire (SSB)", + "en": "Spheno-Basilar Synchondrosis (SBS)" + }, + "categories": [ + { + "id": "ssb-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "physiological", + "name": { + "fr": "Lésions physiologiques (SSB)", + "en": "Physiological lesions (SBS)" + }, + "description": { + "fr": "Dysfonctions sur les axes anatomiques normaux du mouvement crânien" + }, + "children": [ + { + "id": "flexion", + "name": { + "fr": "Flexion", + "en": "Flexion" + }, + "description": { + "fr": "Exagération du mouvement d'inspiration crânienne — corps du sphénoïde haut" + } + }, + { + "id": "extension", + "name": { + "fr": "Extension", + "en": "Extension" + }, + "description": { + "fr": "Exagération du mouvement d'expiration crânienne — corps du sphénoïde bas" + } + }, + { + "id": "torsion-right", + "name": { + "fr": "Torsion droite", + "en": "Right torsion" + }, + "description": { + "fr": "Rotation inverse sphénoïde/occiput sur l'axe antéro-postérieur" + } + }, + { + "id": "torsion-left", + "name": { + "fr": "Torsion gauche", + "en": "Left torsion" + } + }, + { + "id": "sidebending-rotation-right", + "name": { + "fr": "Side-bending rotation droite", + "en": "Right side-bending rotation" + }, + "description": { + "fr": "Inclinaison + rotation du même côté" + } + }, + { + "id": "sidebending-rotation-left", + "name": { + "fr": "Side-bending rotation gauche", + "en": "Left side-bending rotation" + } + } + ] + }, + { + "id": "traumatic", + "name": { + "fr": "Lésions non-physiologiques / traumatiques", + "en": "Non-physiological / traumatic lesions" + }, + "description": { + "fr": "Dysfonctions post-traumatiques (palpées)" + }, + "children": [ + { + "id": "vertical-strain-superior", + "name": { + "fr": "Strain vertical haut", + "en": "Superior vertical strain" + }, + "description": { + "fr": "Corps du sphénoïde déplacé vers le haut vs occiput" + } + }, + { + "id": "vertical-strain-inferior", + "name": { + "fr": "Strain vertical bas", + "en": "Inferior vertical strain" + } + }, + { + "id": "lateral-strain-right", + "name": { + "fr": "Strain latéral droit", + "en": "Right lateral strain" + } + }, + { + "id": "lateral-strain-left", + "name": { + "fr": "Strain latéral gauche", + "en": "Left lateral strain" + } + }, + { + "id": "compression", + "name": { + "fr": "Compression SSB", + "en": "SBS compression" + }, + "description": { + "fr": "Perte d'amplitude du mécanisme respiratoire primaire" + } + } + ] + }, + { + "id": "intraosseous", + "name": { + "fr": "Lésions intra-osseuses", + "en": "Intra-osseous lesions" + }, + "children": [ + { + "id": "pre-post-sphenoid", + "name": { + "fr": "Désengagement pré-sphénoïde / post-sphénoïde", + "en": "Pre-sphenoid / post-sphenoid disengagement" + } + }, + { + "id": "lesser-wings", + "name": { + "fr": "Dysfonction des petites ailes", + "en": "Lesser wings dysfunction" + } + }, + { + "id": "greater-wings", + "name": { + "fr": "Dysfonction des grandes ailes", + "en": "Greater wings dysfunction" + } + } + ] + }, + { + "id": "sutures", + "name": { + "fr": "Restrictions de sutures", + "en": "Suture restrictions" + }, + "children": [ + { + "id": "sphenopetrosal", + "name": { + "fr": "Suture sphéno-pétreuse", + "en": "Sphenopetrosal suture" + } + }, + { + "id": "sphenosquamous", + "name": { + "fr": "Suture sphéno-squameuse", + "en": "Sphenosquamous suture" + } + }, + { + "id": "sphenoparietal", + "name": { + "fr": "Suture sphéno-pariétale", + "en": "Sphenoparietal suture" + } + }, + { + "id": "frontosphenoidal", + "name": { + "fr": "Suture fronto-sphénoïdale", + "en": "Frontosphenoidal suture" + } + }, + { + "id": "sphenozygomatic", + "name": { + "fr": "Suture sphéno-zygomatique", + "en": "Sphenozygomatic suture" + } + }, + { + "id": "sphenomaxillary", + "name": { + "fr": "Suture sphéno-maxillaire", + "en": "Sphenomaxillary suture" + } + }, + { + "id": "sphenovomerian", + "name": { + "fr": "Suture sphéno-vomérienne", + "en": "Sphenovomerine suture" + } + }, + { + "id": "sphenopalatine", + "name": { + "fr": "Suture sphéno-palatine", + "en": "Sphenopalatine suture" + } + } + ] + } + ] + }, + { + "id": "ssb-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "behavior-change", + "name": { + "fr": "Modifications comportementales rapportées", + "en": "Reported behavioral changes" + }, + "children": [ + { + "id": "irritability", + "name": { + "fr": "Irritabilité / agressivité nouvelle", + "en": "New irritability / aggressiveness" + } + }, + { + "id": "withdrawal", + "name": { + "fr": "Apathie / repli", + "en": "Apathy / withdrawal" + } + }, + { + "id": "hypersensitivity", + "name": { + "fr": "Hypersensibilité au toucher de la tête", + "en": "Head touch hypersensitivity" + } + } + ] + }, + { + "id": "performance-drop", + "name": { + "fr": "Baisse de performance inexpliquée", + "en": "Unexplained performance drop" + } + }, + { + "id": "cycle-irregularity", + "name": { + "fr": "Irrégularité de cyclicité rapportée", + "en": "Reported cycle irregularity" + }, + "requires_vet_referral": true + }, + { + "id": "post-trauma-head", + "name": { + "fr": "Suite de traumatisme crânien", + "en": "Post head trauma" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "atm", + "name": { + "fr": "Articulation Temporo-Mandibulaire (ATM)", + "en": "Temporomandibular Joint (TMJ)" + }, + "categories": [ + { + "id": "atm-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques de l'ATM", + "en": "Osteopathic TMJ dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-opening", + "name": { + "fr": "Restriction à l'ouverture", + "en": "Opening restriction" + } + }, + { + "id": "restriction-closing", + "name": { + "fr": "Restriction à la fermeture", + "en": "Closing restriction" + } + }, + { + "id": "restriction-lateral", + "name": { + "fr": "Restriction en latéralité", + "en": "Lateral restriction" + } + }, + { + "id": "restriction-protrusion", + "name": { + "fr": "Restriction en protraction/rétraction", + "en": "Protrusion/retraction restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions des muscles masticateurs", + "en": "Masticatory muscle tensions" + }, + "children": [ + { + "id": "masseter-tension", + "name": { + "fr": "Tension du masséter", + "en": "Masseter tension" + } + }, + { + "id": "temporalis-tension", + "name": { + "fr": "Tension du temporal", + "en": "Temporalis tension" + } + }, + { + "id": "pterygoid-tension", + "name": { + "fr": "Tension des ptérygoïdiens", + "en": "Pterygoid tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "lateral-deviation-jaw", + "name": { + "fr": "Latéro-déviation de la mâchoire", + "en": "Mandibular lateral deviation" + } + }, + { + "id": "asymmetric-dental-wear", + "name": { + "fr": "Asymétrie d'usure dentaire (à confirmer par praticien dentaire)", + "en": "Asymmetric dental wear (to confirm with dental practitioner)" + } + }, + { + "id": "opening-deviation", + "name": { + "fr": "Déviation à l'ouverture", + "en": "Opening deviation" + } + }, + { + "id": "asymmetric-amplitude", + "name": { + "fr": "Amplitude asymétrique d'ouverture", + "en": "Asymmetric opening amplitude" + } + } + ] + } + ] + }, + { + "id": "atm-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "bit-defense", + "name": { + "fr": "Réactions de défense au mors", + "en": "Defense reactions to bit" + } + }, + { + "id": "headshaking", + "name": { + "fr": "Headshaking (secouement de tête)", + "en": "Headshaking" + }, + "requires_vet_referral": true + }, + { + "id": "head-tilt-saddle", + "name": { + "fr": "Inclinaison de tête sous selle", + "en": "Head tilt under saddle" + } + }, + { + "id": "slow-eating", + "name": { + "fr": "Difficulté à mâcher / alimentation lente", + "en": "Chewing difficulty / slow eating" + } + }, + { + "id": "drops-food", + "name": { + "fr": "Laisse tomber de la nourriture", + "en": "Drops food while eating" + } + }, + { + "id": "hand-contact-refusal", + "name": { + "fr": "Refus du contact main du cavalier", + "en": "Refusal of rider's hand contact" + } + }, + { + "id": "false-bend", + "name": { + "fr": "Faux pli / fausse incurvation au travail", + "en": "False bend / curvature at work" + } + }, + { + "id": "post-dental-care", + "name": { + "fr": "Suite de soin dentaire", + "en": "Post dental care" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "hyoid", + "name": { + "fr": "Hyoïde", + "en": "Hyoid" + }, + "categories": [ + { + "id": "hyoid-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "mobility", + "name": { + "fr": "Restrictions de mobilité de l'appareil hyoïdien", + "en": "Hyoid apparatus mobility restrictions" + }, + "children": [ + { + "id": "global-restriction", + "name": { + "fr": "Restriction de mobilité globale", + "en": "Global mobility restriction" + } + }, + { + "id": "lateral-deviation", + "name": { + "fr": "Déviation latérale palpée", + "en": "Palpated lateral deviation" + } + }, + { + "id": "swing-restriction", + "name": { + "fr": "Restriction du balancier (déglutition)", + "en": "Swing restriction (swallowing)" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires associées", + "en": "Associated muscle tensions" + }, + "children": [ + { + "id": "suprahyoid-tension", + "name": { + "fr": "Tension des muscles sus-hyoïdiens", + "en": "Suprahyoid muscle tension" + } + }, + { + "id": "infrahyoid-tension", + "name": { + "fr": "Tension des muscles sous-hyoïdiens (sterno-hyoïdien)", + "en": "Infrahyoid muscle tension (sternohyoid)" + } + }, + { + "id": "stylohyoid-tension", + "name": { + "fr": "Tension du stylo-hyoïdien (lien temporal/ATM)", + "en": "Stylohyoid tension (temporal/TMJ link)" + } + }, + { + "id": "tongue-base-tension", + "name": { + "fr": "Tension des muscles de la base de langue", + "en": "Tongue base muscle tension" + } + } + ] + }, + { + "id": "intraosseous", + "name": { + "fr": "Lésions intra-osseuses", + "en": "Intra-osseous lesions" + }, + "children": [ + { + "id": "stylohyoid-bone", + "name": { + "fr": "Dysfonction du stylo-hyal palpée", + "en": "Palpated stylohyoid bone dysfunction" + } + }, + { + "id": "basihyoid", + "name": { + "fr": "Dysfonction du basi-hyal palpée", + "en": "Palpated basihyoid dysfunction" + } + } + ] + } + ] + }, + { + "id": "hyoid-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "bit-defense", + "name": { + "fr": "Réactions de défense au mors / dans le contact", + "en": "Defense reactions to bit / in contact" + } + }, + { + "id": "tongue-over-bit", + "name": { + "fr": "Langue passée par-dessus le mors rapportée", + "en": "Reported tongue-over-bit" + } + }, + { + "id": "swallowing-difficulty", + "name": { + "fr": "Difficulté de déglutition rapportée", + "en": "Reported swallowing difficulty" + }, + "description": { + "fr": "Une difficulté de déglutition impose d'écarter une cause médicale/neurologique : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + }, + { + "id": "head-carriage-resistance", + "name": { + "fr": "Résistance dans le port de tête", + "en": "Head carriage resistance" + } + }, + { + "id": "post-dental-care", + "name": { + "fr": "Suite de soin dentaire", + "en": "Post dental care" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural (harnachement, position de travail)", + "en": "Postural context" + } + }, + { + "id": "dental-context", + "name": { + "fr": "Suite de soin dentaire récent", + "en": "Post recent dental care" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "c0-c1", + "name": { + "fr": "Charnière C0-C1 (occipito-atloïdienne)", + "en": "C0-C1 (Occipito-atlantal)" + }, + "categories": [ + { + "id": "c0-c1-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations de la charnière", + "en": "Junction restrictions / fixations" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "fixation", + "name": { + "fr": "Fixation de la charnière", + "en": "Junction fixation" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires locales", + "en": "Local muscle tensions" + }, + "children": [ + { + "id": "rectus-capitis-tension", + "name": { + "fr": "Tension des droits de la tête", + "en": "Rectus capitis tension" + } + }, + { + "id": "obliquus-capitis-tension", + "name": { + "fr": "Tension des obliques de la tête", + "en": "Obliquus capitis tension" + } + }, + { + "id": "splenius-tension", + "name": { + "fr": "Tension du splénius", + "en": "Splenius tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "alignment-asymmetry", + "name": { + "fr": "Asymétrie d'alignement à la jonction observée", + "en": "Observed junction alignment asymmetry" + } + } + ] + } + ] + }, + { + "id": "c0-c1-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "poll-sensitivity", + "name": { + "fr": "Sensibilité de la nuque rapportée", + "en": "Reported poll sensitivity" + } + }, + { + "id": "head-carriage", + "name": { + "fr": "Difficulté de flexion de nuque / port de tête", + "en": "Poll flexion difficulty / head carriage" + } + }, + { + "id": "headshaking", + "name": { + "fr": "Headshaking (secouement de tête)", + "en": "Headshaking" + }, + "requires_vet_referral": true + }, + { + "id": "bridle-resistance", + "name": { + "fr": "Résistance à la mise en main", + "en": "Resistance to coming on the bit" + } + }, + { + "id": "palpation-sensitivity", + "name": { + "fr": "Sensibilité à la palpation rapportée", + "en": "Reported palpation sensitivity" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "cervical", + "name": { + "fr": "Vertèbres cervicales", + "en": "Cervical Vertebrae" + }, + "categories": [ + { + "id": "cervical-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations segmentaires", + "en": "Segmental restrictions / fixations" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "localized-fixation", + "name": { + "fr": "Fixation segmentaire localisée (C2–C7)", + "en": "Localized segmental fixation (C2–C7)" + } + } + ] + }, + { + "id": "group", + "name": { + "fr": "Dysfonctions de groupe", + "en": "Group dysfunctions" + }, + "children": [ + { + "id": "nsr-group", + "name": { + "fr": "Dysfonction de groupe en neutralité (NSR)", + "en": "Neutral group dysfunction (NSR)" + } + }, + { + "id": "functional-scoliotic-attitude", + "name": { + "fr": "Attitude scoliotique fonctionnelle observée", + "en": "Observed functional scoliotic attitude" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires paravertébrales", + "en": "Paravertebral muscle tensions" + }, + "children": [ + { + "id": "splenius-tension", + "name": { + "fr": "Tension du splénius", + "en": "Splenius tension" + } + }, + { + "id": "longissimus-capitis-cervicis", + "name": { + "fr": "Tension du longissimus de la tête / du cou", + "en": "Longissimus capitis / cervicis tension" + } + }, + { + "id": "scalenus-tension", + "name": { + "fr": "Tension du scalène", + "en": "Scalenus tension" + } + }, + { + "id": "brachiocephalicus-tension", + "name": { + "fr": "Tension du brachio-céphalique", + "en": "Brachiocephalicus tension" + } + }, + { + "id": "multifidus-cervicis", + "name": { + "fr": "Tension du multifide cervical", + "en": "Cervical multifidus tension" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "lateral-bend-asymmetry", + "name": { + "fr": "Asymétrie d'incurvation gauche/droite", + "en": "Left/right bend asymmetry" + } + }, + { + "id": "muscle-relief-asymmetry", + "name": { + "fr": "Asymétrie de relief musculaire gauche/droite", + "en": "Left/right muscle relief asymmetry" + } + } + ] + } + ] + }, + { + "id": "cervical-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Travail monté / locomotion", + "en": "Ridden work / locomotion" + }, + "children": [ + { + "id": "bend-asymmetry-work", + "name": { + "fr": "Incurvation difficile d'un côté au travail", + "en": "Bend difficulty on one side at work" + } + }, + { + "id": "head-carriage", + "name": { + "fr": "Port de tête / encolure anormal rapporté", + "en": "Reported abnormal head/neck carriage" + } + }, + { + "id": "contact-resistance", + "name": { + "fr": "Résistance au contact / mise en main", + "en": "Contact / on-the-bit resistance" + } + } + ] + }, + { + "id": "stumbling-proprioceptive", + "name": { + "fr": "Trébuchements / déficit proprioceptif rapporté", + "en": "Reported stumbling / proprioceptive deficit" + }, + "description": { + "fr": "Un déficit proprioceptif évoque une cause neurologique : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + }, + { + "id": "palpation-sensitivity", + "name": { + "fr": "Sensibilité à la palpation rapportée", + "en": "Reported palpation sensitivity" + }, + "requires_vet_referral": true + }, + { + "id": "new-stiffness", + "name": { + "fr": "Raideur nouvelle / récente", + "en": "New / recent stiffness" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "c7-t1", + "name": { + "fr": "Charnière C7-T1 (cervico-thoracique)", + "en": "C7-T1 (Cervicothoracic)" + }, + "categories": [ + { + "id": "c7-t1-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations de la charnière", + "en": "Junction restrictions / fixations" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "fixation", + "name": { + "fr": "Fixation de la charnière", + "en": "Junction fixation" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires locales", + "en": "Local muscle tensions" + }, + "children": [ + { + "id": "scalenus-tension", + "name": { + "fr": "Tension du scalène", + "en": "Scalenus tension" + } + }, + { + "id": "serratus-tension", + "name": { + "fr": "Tension du dentelé ventral du cou", + "en": "Ventral serratus tension" + } + }, + { + "id": "brachiocephalicus-tension", + "name": { + "fr": "Tension du brachio-céphalique", + "en": "Brachiocephalicus tension" + } + }, + { + "id": "deep-cervical-tension", + "name": { + "fr": "Tension des muscles cervicaux profonds", + "en": "Deep cervical muscle tension" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "alignment-asymmetry", + "name": { + "fr": "Asymétrie d'alignement à la jonction observée", + "en": "Observed junction alignment asymmetry" + } + } + ] + } + ] + }, + { + "id": "c7-t1-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "base-neck-stiffness", + "name": { + "fr": "Raideur de la base de l'encolure", + "en": "Base-of-neck stiffness" + } + }, + { + "id": "forelimb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude des antérieurs", + "en": "Lack of forelimb engagement / amplitude" + } + }, + { + "id": "ewe-neck-posture", + "name": { + "fr": "Posture d'encolure renversée rapportée", + "en": "Reported ewe-neck posture" + } + }, + { + "id": "forelimb-lameness", + "name": { + "fr": "Boiterie antérieure rapportée", + "en": "Reported forelimb lameness" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "shoulder", + "name": { + "fr": "Épaule (scapulo-humérale)", + "en": "Shoulder joint" + }, + "categories": [ + { + "id": "shoulder-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-abduction-adduction", + "name": { + "fr": "Restriction en abduction/adduction", + "en": "Abduction/adduction restriction" + } + }, + { + "id": "restriction-glide", + "name": { + "fr": "Restriction de glissement cranio-caudal", + "en": "Cranio-caudal glide restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "supraspinatus-infraspinatus", + "name": { + "fr": "Tension du sus-/sous-épineux", + "en": "Supraspinatus / infraspinatus tension" + } + }, + { + "id": "subscapularis-tension", + "name": { + "fr": "Tension du sous-scapulaire", + "en": "Subscapularis tension" + } + }, + { + "id": "deltoid-tension", + "name": { + "fr": "Tension du deltoïde", + "en": "Deltoid tension" + } + }, + { + "id": "biceps-brachii-tension", + "name": { + "fr": "Tension du biceps brachial", + "en": "Biceps brachii tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + }, + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "scapula-position-asymmetry", + "name": { + "fr": "Asymétrie de position de la scapula", + "en": "Scapular position asymmetry" + } + } + ] + } + ] + }, + { + "id": "shoulder-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Locomotion / travail monté", + "en": "Locomotion / ridden work" + }, + "children": [ + { + "id": "canter-difficulty", + "name": { + "fr": "Difficulté / refus au départ au galop", + "en": "Difficulty / refusal at canter departure" + } + }, + { + "id": "backing-difficulty", + "name": { + "fr": "Reculer difficile ou de travers", + "en": "Difficult or crooked backing" + } + }, + { + "id": "limb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude du membre", + "en": "Lack of limb engagement / amplitude" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "shortened-cranial-phase", + "name": { + "fr": "Phase antérieure du pas raccourcie rapportée", + "en": "Reported shortened cranial stride phase" + } + }, + { + "id": "limb-lameness", + "name": { + "fr": "Boiterie rapportée (membre concerné)", + "en": "Reported lameness (affected limb)" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "elbow", + "name": { + "fr": "Coude (huméro-radial)", + "en": "Elbow joint" + }, + "categories": [ + { + "id": "elbow-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateromedial", + "name": { + "fr": "Restriction en jeu latéro-médial", + "en": "Lateromedial play restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "triceps-tension", + "name": { + "fr": "Tension du triceps brachial", + "en": "Triceps brachii tension" + } + }, + { + "id": "biceps-brachialis-tension", + "name": { + "fr": "Tension du biceps / brachial", + "en": "Biceps / brachialis tension" + } + }, + { + "id": "carpal-extensors-origin", + "name": { + "fr": "Tension des origines des extenseurs du carpe", + "en": "Carpal extensors origin tension" + } + }, + { + "id": "carpal-flexors-origin", + "name": { + "fr": "Tension des origines des fléchisseurs du carpe", + "en": "Carpal flexors origin tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + }, + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + } + ] + } + ] + }, + { + "id": "elbow-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Locomotion / travail monté", + "en": "Locomotion / ridden work" + }, + "children": [ + { + "id": "canter-difficulty", + "name": { + "fr": "Difficulté / refus au départ au galop", + "en": "Difficulty / refusal at canter departure" + } + }, + { + "id": "backing-difficulty", + "name": { + "fr": "Reculer difficile ou de travers", + "en": "Difficult or crooked backing" + } + }, + { + "id": "limb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude du membre", + "en": "Lack of limb engagement / amplitude" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "limb-lameness", + "name": { + "fr": "Boiterie rapportée (membre concerné)", + "en": "Reported lameness (affected limb)" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "fore-fetlock", + "name": { + "fr": "Boulet ant. (métacarpo-phalangien)", + "en": "Fore fetlock" + }, + "categories": [ + { + "id": "fore-fetlock-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateromedial", + "name": { + "fr": "Restriction en jeu latéro-médial", + "en": "Lateromedial play restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "digital-flexors-tendon", + "name": { + "fr": "Tension des tendons fléchisseurs digitaux palpée", + "en": "Palpated digital flexor tendons tension" + } + }, + { + "id": "digital-extensor-tendon", + "name": { + "fr": "Tension du tendon extenseur digital", + "en": "Digital extensor tendon tension" + } + }, + { + "id": "palmar-fascia", + "name": { + "fr": "Tension de la fascia palmaire", + "en": "Palmar fascia tension" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + }, + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "fetlock-axis-asymmetry", + "name": { + "fr": "Asymétrie d'axe du boulet observée", + "en": "Observed fetlock axis asymmetry" + } + } + ] + } + ] + }, + { + "id": "fore-fetlock-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Locomotion / travail monté", + "en": "Locomotion / ridden work" + }, + "children": [ + { + "id": "canter-difficulty", + "name": { + "fr": "Difficulté / refus au départ au galop", + "en": "Difficulty / refusal at canter departure" + } + }, + { + "id": "backing-difficulty", + "name": { + "fr": "Reculer difficile ou de travers", + "en": "Difficult or crooked backing" + } + }, + { + "id": "limb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude du membre", + "en": "Lack of limb engagement / amplitude" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "limb-lameness", + "name": { + "fr": "Boiterie rapportée (membre concerné)", + "en": "Reported lameness (affected limb)" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "fore-sesamoids", + "name": { + "fr": "Sésamoïdes ant. (boulet)", + "en": "Forelimb Sesamoids" + }, + "categories": [ + { + "id": "fore-sesamoids-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "mobility", + "name": { + "fr": "Restrictions de mobilité", + "en": "Mobility restrictions" + }, + "children": [ + { + "id": "sesamoid-glide-restriction", + "name": { + "fr": "Restriction de glissement sésamoïdien", + "en": "Sesamoid glide restriction" + } + }, + { + "id": "medial-sesamoid", + "name": { + "fr": "Restriction du sésamoïde médial", + "en": "Medial sesamoid restriction" + } + }, + { + "id": "lateral-sesamoid", + "name": { + "fr": "Restriction du sésamoïde latéral", + "en": "Lateral sesamoid restriction" + } + } + ] + }, + { + "id": "ligamentous", + "name": { + "fr": "Tensions ligamentaires / tendineuses associées", + "en": "Associated ligamentous / tendinous tensions" + }, + "children": [ + { + "id": "intersesamoidean", + "name": { + "fr": "Tension du ligament inter-sésamoïdien palpée", + "en": "Palpated intersesamoidean ligament tension" + } + }, + { + "id": "flexor-tendon-glide", + "name": { + "fr": "Restriction de glissement du tendon fléchisseur", + "en": "Flexor tendon glide restriction" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "sesamoid-asymmetry", + "name": { + "fr": "Asymétrie de position sésamoïdienne palpée", + "en": "Palpated sesamoid position asymmetry" + } + }, + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + } + ] + } + ] + }, + { + "id": "fore-sesamoids-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "local-sensitivity", + "name": { + "fr": "Sensibilité locale rapportée", + "en": "Reported local sensitivity" + }, + "description": { + "fr": "Une sensibilité marquée de la région du boulet impose d'écarter une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + }, + { + "id": "shortened-stride", + "name": { + "fr": "Foulée antérieure raccourcie rapportée", + "en": "Reported shortened forelimb stride" + } + }, + { + "id": "forelimb-lameness", + "name": { + "fr": "Boiterie antérieure rapportée", + "en": "Reported forelimb lameness" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "thoracic", + "name": { + "fr": "Vertèbres thoraciques", + "en": "Thoracic Vertebrae" + }, + "categories": [ + { + "id": "thoracic-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations segmentaires", + "en": "Segmental restrictions / fixations" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "localized-fixation", + "name": { + "fr": "Fixation segmentaire localisée (T1–T18)", + "en": "Localized segmental fixation (T1–T18)" + } + } + ] + }, + { + "id": "costovertebral", + "name": { + "fr": "Restrictions costo-vertébrales", + "en": "Costovertebral restrictions" + }, + "children": [ + { + "id": "rib-head-restriction", + "name": { + "fr": "Restriction de tête de côte", + "en": "Rib head restriction" + } + }, + { + "id": "rib-respiratory-restriction", + "name": { + "fr": "Restriction costale au mouvement respiratoire", + "en": "Costal respiratory motion restriction" + } + } + ] + }, + { + "id": "group", + "name": { + "fr": "Dysfonctions de groupe", + "en": "Group dysfunctions" + }, + "children": [ + { + "id": "nsr-group", + "name": { + "fr": "Dysfonction de groupe en neutralité (NSR)", + "en": "Neutral group dysfunction (NSR)" + } + }, + { + "id": "functional-scoliotic-attitude", + "name": { + "fr": "Attitude scoliotique fonctionnelle observée", + "en": "Observed functional scoliotic attitude" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires paravertébrales", + "en": "Paravertebral muscle tensions" + }, + "children": [ + { + "id": "longissimus-tension", + "name": { + "fr": "Tension du long dorsal (longissimus)", + "en": "Longissimus tension" + } + }, + { + "id": "iliocostalis-tension", + "name": { + "fr": "Tension de l'ilio-costal", + "en": "Iliocostalis tension" + } + }, + { + "id": "trapezius-tension", + "name": { + "fr": "Tension du trapèze", + "en": "Trapezius tension" + } + }, + { + "id": "latissimus-tension", + "name": { + "fr": "Tension du grand dorsal", + "en": "Latissimus dorsi tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "muscle-relief-asymmetry", + "name": { + "fr": "Asymétrie de relief musculaire gauche/droite", + "en": "Left/right muscle relief asymmetry" + } + }, + { + "id": "withers-asymmetry", + "name": { + "fr": "Asymétrie de la région du garrot observée", + "en": "Observed withers region asymmetry" + } + } + ] + } + ] + }, + { + "id": "thoracic-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Travail monté / locomotion", + "en": "Ridden work / locomotion" + }, + "children": [ + { + "id": "saddle-region-sensitivity", + "name": { + "fr": "Sensibilité de la région de la selle rapportée", + "en": "Reported saddle-region sensitivity" + } + }, + { + "id": "cold-backed", + "name": { + "fr": "Dos froid / défense à la mise en selle rapportée", + "en": "Reported cold-backed / mounting defense" + } + }, + { + "id": "hindquarter-engagement", + "name": { + "fr": "Défaut de transmission dos / arrière-main", + "en": "Lack of back / hindquarter transmission" + } + }, + { + "id": "bucking", + "name": { + "fr": "Sauts de mouton / coups de cul au travail", + "en": "Bucking at work" + } + } + ] + }, + { + "id": "girthing-defense", + "name": { + "fr": "Défense / sensibilité au sanglage", + "en": "Girthing defense / sensitivity" + } + }, + { + "id": "palpation-sensitivity", + "name": { + "fr": "Sensibilité à la palpation rapportée", + "en": "Reported palpation sensitivity" + }, + "requires_vet_referral": true + }, + { + "id": "new-stiffness", + "name": { + "fr": "Raideur nouvelle / récente", + "en": "New / recent stiffness" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "t18-l1", + "name": { + "fr": "Charnière T18-L1 (dorso-lombaire)", + "en": "T18-L1 (Thoracolumbar)" + }, + "categories": [ + { + "id": "t18-l1-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations de la charnière", + "en": "Junction restrictions / fixations" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "fixation", + "name": { + "fr": "Fixation de la charnière", + "en": "Junction fixation" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires locales", + "en": "Local muscle tensions" + }, + "children": [ + { + "id": "longissimus-tension", + "name": { + "fr": "Tension du long dorsal (longissimus)", + "en": "Longissimus tension" + } + }, + { + "id": "iliocostalis-tension", + "name": { + "fr": "Tension de l'ilio-costal", + "en": "Iliocostalis tension" + } + }, + { + "id": "thoracolumbar-fascia", + "name": { + "fr": "Tension du fascia thoraco-lombaire", + "en": "Thoracolumbar fascia tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "alignment-asymmetry", + "name": { + "fr": "Asymétrie d'alignement à la jonction observée", + "en": "Observed junction alignment asymmetry" + } + } + ] + } + ] + }, + { + "id": "t18-l1-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "back-mobility-loss", + "name": { + "fr": "Perte de mobilité du dos à la jonction rapportée", + "en": "Reported back mobility loss at junction" + } + }, + { + "id": "saddle-rear-sensitivity", + "name": { + "fr": "Sensibilité à l'arrière de la selle rapportée", + "en": "Reported rear-saddle sensitivity" + } + }, + { + "id": "transmission-defect", + "name": { + "fr": "Défaut de transmission avant-main / arrière-main", + "en": "Fore/hindquarter transmission defect" + } + }, + { + "id": "palpation-sensitivity", + "name": { + "fr": "Sensibilité à la palpation rapportée", + "en": "Reported palpation sensitivity" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "lumbar", + "name": { + "fr": "Vertèbres lombaires", + "en": "Lumbar Vertebrae" + }, + "categories": [ + { + "id": "lumbar-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations segmentaires", + "en": "Segmental restrictions / fixations" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "localized-fixation", + "name": { + "fr": "Fixation segmentaire localisée (L1–L6)", + "en": "Localized segmental fixation (L1–L6)" + } + } + ] + }, + { + "id": "group", + "name": { + "fr": "Dysfonctions de groupe", + "en": "Group dysfunctions" + }, + "children": [ + { + "id": "nsr-group", + "name": { + "fr": "Dysfonction de groupe en neutralité (NSR)", + "en": "Neutral group dysfunction (NSR)" + } + }, + { + "id": "functional-scoliotic-attitude", + "name": { + "fr": "Attitude scoliotique fonctionnelle observée", + "en": "Observed functional scoliotic attitude" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires paravertébrales", + "en": "Paravertebral muscle tensions" + }, + "children": [ + { + "id": "longissimus-tension", + "name": { + "fr": "Tension du long dorsal (longissimus)", + "en": "Longissimus tension" + } + }, + { + "id": "iliocostalis-tension", + "name": { + "fr": "Tension de l'ilio-costal", + "en": "Iliocostalis tension" + } + }, + { + "id": "psoas-tension", + "name": { + "fr": "Tension du psoas / muscles sous-lombaires", + "en": "Psoas / sublumbar muscle tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "muscle-relief-asymmetry", + "name": { + "fr": "Asymétrie de relief musculaire gauche/droite", + "en": "Left/right muscle relief asymmetry" + } + }, + { + "id": "pelvic-tilt-asymmetry", + "name": { + "fr": "Bascule / asymétrie du bassin observée", + "en": "Observed pelvic tilt / asymmetry" + } + } + ] + } + ] + }, + { + "id": "lumbar-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Travail monté / locomotion", + "en": "Ridden work / locomotion" + }, + "children": [ + { + "id": "hollow-back-under-rider", + "name": { + "fr": "Dos creusé / sensible sous le cavalier", + "en": "Hollow / sensitive back under rider" + } + }, + { + "id": "hindlimb-engagement", + "name": { + "fr": "Défaut d'engagement des postérieurs", + "en": "Lack of hindlimb engagement" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + }, + { + "id": "blocking-at-work", + "name": { + "fr": "Cheval qui se bloque au travail", + "en": "Horse that locks up at work" + } + } + ] + }, + { + "id": "girthing-defense", + "name": { + "fr": "Défense / sensibilité au sanglage", + "en": "Girthing defense / sensitivity" + } + }, + { + "id": "palpation-sensitivity", + "name": { + "fr": "Sensibilité à la palpation rapportée", + "en": "Reported palpation sensitivity" + }, + "requires_vet_referral": true + }, + { + "id": "new-stiffness", + "name": { + "fr": "Raideur nouvelle / récente", + "en": "New / recent stiffness" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "l6-s1", + "name": { + "fr": "Charnière L6-S1 (lombo-sacrée)", + "en": "L6-S1 (Lumbosacral)" + }, + "categories": [ + { + "id": "l6-s1-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations de la charnière", + "en": "Junction restrictions / fixations" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "fixation", + "name": { + "fr": "Fixation de la charnière", + "en": "Junction fixation" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires locales", + "en": "Local muscle tensions" + }, + "children": [ + { + "id": "psoas-tension", + "name": { + "fr": "Tension du psoas / muscles sous-lombaires", + "en": "Psoas / sublumbar muscle tension" + } + }, + { + "id": "longissimus-tension", + "name": { + "fr": "Tension du long dorsal (longissimus)", + "en": "Longissimus tension" + } + }, + { + "id": "gluteal-tension", + "name": { + "fr": "Tension des fessiers", + "en": "Gluteal tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "alignment-asymmetry", + "name": { + "fr": "Asymétrie d'alignement à la jonction observée", + "en": "Observed junction alignment asymmetry" + } + } + ] + } + ] + }, + { + "id": "l6-s1-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "hindlimb-engagement", + "name": { + "fr": "Défaut d'engagement des postérieurs", + "en": "Lack of hindlimb engagement" + } + }, + { + "id": "canter-quality", + "name": { + "fr": "Galop désuni / qualité du galop rapportée", + "en": "Reported disunited / poor-quality canter" + } + }, + { + "id": "jumping-propulsion", + "name": { + "fr": "Défaut de propulsion à l'obstacle", + "en": "Lack of propulsion at jumping" + } + }, + { + "id": "palpation-sensitivity", + "name": { + "fr": "Sensibilité à la palpation rapportée", + "en": "Reported palpation sensitivity" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "sacral", + "name": { + "fr": "Vertèbres sacrales", + "en": "Sacral Vertebrae" + }, + "categories": [ + { + "id": "sacral-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "mobility", + "name": { + "fr": "Restrictions de mobilité sacrée", + "en": "Sacral mobility restrictions" + }, + "children": [ + { + "id": "nutation-restriction", + "name": { + "fr": "Restriction en nutation", + "en": "Nutation restriction" + } + }, + { + "id": "counternutation-restriction", + "name": { + "fr": "Restriction en contre-nutation", + "en": "Counternutation restriction" + } + }, + { + "id": "sacral-torsion", + "name": { + "fr": "Torsion sacrée palpée", + "en": "Palpated sacral torsion" + } + }, + { + "id": "lateralisation", + "name": { + "fr": "Latéralisation sacrée palpée", + "en": "Palpated sacral lateralisation" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires associées", + "en": "Associated muscle tensions" + }, + "children": [ + { + "id": "gluteal-tension", + "name": { + "fr": "Tension des fessiers", + "en": "Gluteal tension" + } + }, + { + "id": "longissimus-tension", + "name": { + "fr": "Tension du long dorsal (longissimus)", + "en": "Longissimus tension" + } + }, + { + "id": "sacrocaudalis-tension", + "name": { + "fr": "Tension des muscles sacro-caudaux", + "en": "Sacrocaudalis tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "tuber-sacrale-asymmetry", + "name": { + "fr": "Asymétrie des tubérosités sacrales observée", + "en": "Observed tuber sacrale asymmetry" + } + }, + { + "id": "pelvic-obliquity", + "name": { + "fr": "Obliquité du bassin observée", + "en": "Observed pelvic obliquity" + } + } + ] + } + ] + }, + { + "id": "sacral-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Travail monté / locomotion", + "en": "Ridden work / locomotion" + }, + "children": [ + { + "id": "hindlimb-propulsion", + "name": { + "fr": "Défaut de propulsion des postérieurs", + "en": "Lack of hindlimb propulsion" + } + }, + { + "id": "canter-quality", + "name": { + "fr": "Galop désuni / qualité du galop rapportée", + "en": "Reported disunited / poor-quality canter" + } + }, + { + "id": "bunny-hopping", + "name": { + "fr": "Postérieurs sautillant ensemble rapporté", + "en": "Reported bunny-hopping behind" + } + } + ] + }, + { + "id": "tail-carriage", + "name": { + "fr": "Port de queue anormal rapporté", + "en": "Reported abnormal tail carriage" + } + }, + { + "id": "palpation-sensitivity", + "name": { + "fr": "Sensibilité à la palpation rapportée", + "en": "Reported palpation sensitivity" + }, + "requires_vet_referral": true + }, + { + "id": "new-stiffness", + "name": { + "fr": "Raideur nouvelle / récente", + "en": "New / recent stiffness" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "sacroiliac", + "name": { + "fr": "Articulation Sacro-Iliaque", + "en": "Sacroiliac Joint" + }, + "categories": [ + { + "id": "sacroiliac-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "nutation-restriction", + "name": { + "fr": "Restriction en nutation", + "en": "Nutation restriction" + } + }, + { + "id": "counternutation-restriction", + "name": { + "fr": "Restriction en contre-nutation", + "en": "Counternutation restriction" + } + }, + { + "id": "iliac-rotation", + "name": { + "fr": "Restriction de rotation iliaque", + "en": "Iliac rotation restriction" + } + }, + { + "id": "shear-restriction", + "name": { + "fr": "Restriction de cisaillement / glissement", + "en": "Shear / glide restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "gluteus-medius-tension", + "name": { + "fr": "Tension du moyen fessier", + "en": "Gluteus medius tension" + } + }, + { + "id": "longissimus-tension", + "name": { + "fr": "Tension du long dorsal (longissimus)", + "en": "Longissimus tension" + } + }, + { + "id": "biceps-femoris-tension", + "name": { + "fr": "Tension du biceps fémoral", + "en": "Biceps femoris tension" + } + }, + { + "id": "sacrotuberous-tension", + "name": { + "fr": "Tension du ligament sacro-sciatique palpée", + "en": "Palpated sacrosciatic ligament tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "tuber-sacrale-asymmetry", + "name": { + "fr": "Asymétrie des tubérosités sacrales observée", + "en": "Observed tuber sacrale asymmetry" + } + }, + { + "id": "tuber-coxae-asymmetry", + "name": { + "fr": "Asymétrie des pointes de hanche observée", + "en": "Observed tuber coxae asymmetry" + } + }, + { + "id": "pelvic-obliquity", + "name": { + "fr": "Obliquité du bassin observée", + "en": "Observed pelvic obliquity" + } + } + ] + } + ] + }, + { + "id": "sacroiliac-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Travail monté / locomotion", + "en": "Ridden work / locomotion" + }, + "children": [ + { + "id": "hindlimb-engagement", + "name": { + "fr": "Défaut d'engagement des postérieurs", + "en": "Lack of hindlimb engagement" + } + }, + { + "id": "canter-disunited", + "name": { + "fr": "Galop désuni / changements de pied difficiles", + "en": "Disunited canter / difficult flying changes" + } + }, + { + "id": "bunny-hopping", + "name": { + "fr": "Postérieurs sautillant ensemble rapporté", + "en": "Reported bunny-hopping behind" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "croup-asymmetry", + "name": { + "fr": "Asymétrie de croupe rapportée", + "en": "Reported croup asymmetry" + } + }, + { + "id": "hindlimb-lameness", + "name": { + "fr": "Boiterie postérieure rapportée", + "en": "Reported hindlimb lameness" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "hip", + "name": { + "fr": "Hanche (coxo-fémorale)", + "en": "Hip joint" + }, + "categories": [ + { + "id": "hip-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-abduction-adduction", + "name": { + "fr": "Restriction en abduction/adduction", + "en": "Abduction/adduction restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction en rotation", + "en": "Rotation restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "gluteal-group-tension", + "name": { + "fr": "Tension du groupe fessier", + "en": "Gluteal group tension" + } + }, + { + "id": "iliopsoas-tension", + "name": { + "fr": "Tension de l'ilio-psoas", + "en": "Iliopsoas tension" + } + }, + { + "id": "adductors-tension", + "name": { + "fr": "Tension des adducteurs", + "en": "Adductors tension" + } + }, + { + "id": "biceps-femoris-tension", + "name": { + "fr": "Tension du biceps fémoral", + "en": "Biceps femoris tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + }, + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "croup-asymmetry", + "name": { + "fr": "Asymétrie de croupe observée", + "en": "Observed croup asymmetry" + } + } + ] + } + ] + }, + { + "id": "hip-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Locomotion / travail monté", + "en": "Locomotion / ridden work" + }, + "children": [ + { + "id": "canter-difficulty", + "name": { + "fr": "Difficulté / refus au départ au galop", + "en": "Difficulty / refusal at canter departure" + } + }, + { + "id": "backing-difficulty", + "name": { + "fr": "Reculer difficile ou de travers", + "en": "Difficult or crooked backing" + } + }, + { + "id": "limb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude du membre", + "en": "Lack of limb engagement / amplitude" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "limb-lameness", + "name": { + "fr": "Boiterie rapportée (membre concerné)", + "en": "Reported lameness (affected limb)" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "stifle", + "name": { + "fr": "Grasset (fémoro-tibial)", + "en": "Stifle" + }, + "categories": [ + { + "id": "stifle-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-patellar-glide", + "name": { + "fr": "Restriction de glissement rotulien", + "en": "Patellar glide restriction" + } + }, + { + "id": "restriction-tibial-rotation", + "name": { + "fr": "Restriction de rotation tibiale", + "en": "Tibial rotation restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "quadriceps-tension", + "name": { + "fr": "Tension du quadriceps fémoral", + "en": "Quadriceps femoris tension" + } + }, + { + "id": "hamstrings-tension", + "name": { + "fr": "Tension des ischio-jambiers", + "en": "Hamstring tension" + } + }, + { + "id": "tfl-tension", + "name": { + "fr": "Tension du tenseur du fascia lata", + "en": "Tensor fasciae latae tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + }, + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "patellar-lateral-deviation", + "name": { + "fr": "Latéro-déviation rotulienne observée", + "en": "Observed patellar lateral deviation" + } + } + ] + } + ] + }, + { + "id": "stifle-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Locomotion / travail monté", + "en": "Locomotion / ridden work" + }, + "children": [ + { + "id": "canter-difficulty", + "name": { + "fr": "Difficulté / refus au départ au galop", + "en": "Difficulty / refusal at canter departure" + } + }, + { + "id": "backing-difficulty", + "name": { + "fr": "Reculer difficile ou de travers", + "en": "Difficult or crooked backing" + } + }, + { + "id": "limb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude du membre", + "en": "Lack of limb engagement / amplitude" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "patellar-catching", + "name": { + "fr": "Accrochement rotulien intermittent rapporté", + "en": "Reported intermittent patellar catching" + }, + "description": { + "fr": "Peut nécessiter un avis vétérinaire (accrochement de la rotule) : orienter avant intervention ostéo." + }, + "requires_vet_referral": true + }, + { + "id": "limb-lameness", + "name": { + "fr": "Boiterie rapportée (membre concerné)", + "en": "Reported lameness (affected limb)" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "hock", + "name": { + "fr": "Jarret (tarsien)", + "en": "Hock" + }, + "categories": [ + { + "id": "hock-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-rotation", + "name": { + "fr": "Restriction de rotation (tarso-crural)", + "en": "Rotation restriction (tarsocrural)" + } + }, + { + "id": "restriction-small-joints", + "name": { + "fr": "Restriction de jeu des petites articulations tarsiennes", + "en": "Small tarsal joints play restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "gastrocnemius-tension", + "name": { + "fr": "Tension du gastrocnémien", + "en": "Gastrocnemius tension" + } + }, + { + "id": "peroneus-tertius", + "name": { + "fr": "Tension du péronier tiers / appareil réciproque", + "en": "Peroneus tertius / reciprocal apparatus tension" + } + }, + { + "id": "deep-digital-flexor", + "name": { + "fr": "Tension du fléchisseur profond du doigt", + "en": "Deep digital flexor tension" + } + }, + { + "id": "tibialis-cranialis", + "name": { + "fr": "Tension du tibial crânial", + "en": "Cranial tibial tension" + } + }, + { + "id": "trigger-points", + "name": { + "fr": "Points de tension myofasciaux", + "en": "Myofascial trigger points" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + }, + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "hock-axis-asymmetry", + "name": { + "fr": "Asymétrie d'axe du jarret observée", + "en": "Observed hock axis asymmetry" + } + } + ] + } + ] + }, + { + "id": "hock-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Locomotion / travail monté", + "en": "Locomotion / ridden work" + }, + "children": [ + { + "id": "canter-difficulty", + "name": { + "fr": "Difficulté / refus au départ au galop", + "en": "Difficulty / refusal at canter departure" + } + }, + { + "id": "backing-difficulty", + "name": { + "fr": "Reculer difficile ou de travers", + "en": "Difficult or crooked backing" + } + }, + { + "id": "limb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude du membre", + "en": "Lack of limb engagement / amplitude" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "limb-lameness", + "name": { + "fr": "Boiterie rapportée (membre concerné)", + "en": "Reported lameness (affected limb)" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "hind-fetlock", + "name": { + "fr": "Boulet post. (métatarso-phalangien)", + "en": "Hind fetlock" + }, + "categories": [ + { + "id": "hind-fetlock-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "articular", + "name": { + "fr": "Restrictions de mobilité articulaire", + "en": "Articular mobility restrictions" + }, + "children": [ + { + "id": "restriction-flexion", + "name": { + "fr": "Restriction en flexion", + "en": "Flexion restriction" + } + }, + { + "id": "restriction-extension", + "name": { + "fr": "Restriction en extension", + "en": "Extension restriction" + } + }, + { + "id": "restriction-lateromedial", + "name": { + "fr": "Restriction en jeu latéro-médial", + "en": "Lateromedial play restriction" + } + }, + { + "id": "hypomobility", + "name": { + "fr": "Hypomobilité globale", + "en": "Global hypomobility" + } + }, + { + "id": "hypermobility", + "name": { + "fr": "Hypermobilité / laxité perçue", + "en": "Hypermobility / perceived laxity" + }, + "description": { + "fr": "Une laxité perçue peut évoquer une atteinte ligamentaire : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires péri-articulaires", + "en": "Peri-articular muscle tensions" + }, + "children": [ + { + "id": "digital-flexors-tendon", + "name": { + "fr": "Tension des tendons fléchisseurs digitaux palpée", + "en": "Palpated digital flexor tendons tension" + } + }, + { + "id": "digital-extensor-tendon", + "name": { + "fr": "Tension du tendon extenseur digital", + "en": "Digital extensor tendon tension" + } + }, + { + "id": "plantar-fascia", + "name": { + "fr": "Tension de la fascia plantaire", + "en": "Plantar fascia tension" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "weight-bearing-asymmetry", + "name": { + "fr": "Asymétrie de report de poids au repos", + "en": "Resting weight-bearing asymmetry" + } + }, + { + "id": "amplitude-asymmetry", + "name": { + "fr": "Asymétrie d'amplitude gauche/droite", + "en": "Left/right amplitude asymmetry" + } + }, + { + "id": "fetlock-axis-asymmetry", + "name": { + "fr": "Asymétrie d'axe du boulet observée", + "en": "Observed fetlock axis asymmetry" + } + } + ] + } + ] + }, + { + "id": "hind-fetlock-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "ridden-work", + "name": { + "fr": "Locomotion / travail monté", + "en": "Locomotion / ridden work" + }, + "children": [ + { + "id": "canter-difficulty", + "name": { + "fr": "Difficulté / refus au départ au galop", + "en": "Difficulty / refusal at canter departure" + } + }, + { + "id": "backing-difficulty", + "name": { + "fr": "Reculer difficile ou de travers", + "en": "Difficult or crooked backing" + } + }, + { + "id": "limb-engagement", + "name": { + "fr": "Défaut d'engagement / d'amplitude du membre", + "en": "Lack of limb engagement / amplitude" + } + }, + { + "id": "jumping-difficulty", + "name": { + "fr": "Difficulté / refus à l'obstacle", + "en": "Difficulty / refusal at jumping" + } + } + ] + }, + { + "id": "limb-lameness", + "name": { + "fr": "Boiterie rapportée (membre concerné)", + "en": "Reported lameness (affected limb)" + }, + "requires_vet_referral": true + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "sport-context", + "name": { + "fr": "Contexte sportif (discipline, intensité, sol)", + "en": "Sport context (discipline, intensity, footing)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / d'aplombs", + "en": "Postural / conformation context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + }, + { + "id": "caudal", + "name": { + "fr": "Vertèbres caudales", + "en": "Coccygeal Vertebrae" + }, + "categories": [ + { + "id": "caudal-dysfunctions", + "kind": "dysfunction", + "name": { + "fr": "Dysfonctions ostéopathiques", + "en": "Osteopathic dysfunctions" + }, + "children": [ + { + "id": "segmental", + "name": { + "fr": "Restrictions / fixations segmentaires", + "en": "Segmental restrictions / fixations" + }, + "children": [ + { + "id": "restriction-lateroflexion", + "name": { + "fr": "Restriction en latéroflexion", + "en": "Lateroflexion restriction" + } + }, + { + "id": "restriction-dorsoventral", + "name": { + "fr": "Restriction dorso-ventrale", + "en": "Dorsoventral restriction" + } + }, + { + "id": "localized-fixation", + "name": { + "fr": "Fixation segmentaire localisée", + "en": "Localized segmental fixation" + } + } + ] + }, + { + "id": "muscular", + "name": { + "fr": "Tensions musculaires associées", + "en": "Associated muscle tensions" + }, + "children": [ + { + "id": "sacrocaudalis-dorsalis", + "name": { + "fr": "Tension du sacro-caudal dorsal", + "en": "Sacrocaudalis dorsalis tension" + } + }, + { + "id": "sacrocaudalis-ventralis", + "name": { + "fr": "Tension du sacro-caudal ventral", + "en": "Sacrocaudalis ventralis tension" + } + }, + { + "id": "coccygeus-tension", + "name": { + "fr": "Tension du coccygien", + "en": "Coccygeus tension" + } + } + ] + }, + { + "id": "mechanical", + "name": { + "fr": "Asymétries mécaniques observées", + "en": "Observed mechanical asymmetries" + }, + "children": [ + { + "id": "tail-deviation", + "name": { + "fr": "Déviation latérale de la queue observée", + "en": "Observed lateral tail deviation" + } + }, + { + "id": "tail-carriage-asymmetry", + "name": { + "fr": "Asymétrie de port de queue observée", + "en": "Observed tail carriage asymmetry" + } + } + ] + } + ] + }, + { + "id": "caudal-observations", + "kind": "consultation_reason", + "name": { + "fr": "Observations / motifs de consultation", + "en": "Observations / consultation reasons" + }, + "children": [ + { + "id": "tail-clamped", + "name": { + "fr": "Queue serrée / plaquée rapportée", + "en": "Reported clamped tail" + } + }, + { + "id": "tail-swishing", + "name": { + "fr": "Battements de queue répétés au travail", + "en": "Repeated tail swishing at work" + } + }, + { + "id": "tail-deviation-new", + "name": { + "fr": "Déviation nouvelle de la queue rapportée", + "en": "Reported new tail deviation" + }, + "description": { + "fr": "Une déviation nouvelle peut évoquer une cause neurologique/traumatique : orienter vers vétérinaire avant intervention ostéo." + }, + "requires_vet_referral": true + }, + { + "id": "tail-handling-sensitivity", + "name": { + "fr": "Sensibilité à la manipulation de la queue rapportée", + "en": "Reported tail-handling sensitivity" + } + } + ] + }, + { + "id": "anamnesis", + "kind": "anamnesis", + "name": { + "fr": "Anamnèse / facteurs rapportés", + "en": "Anamnesis / reported factors" + }, + "children": [ + { + "id": "trauma-direct", + "name": { + "fr": "Traumatisme rapporté (choc, chute)", + "en": "Reported trauma (blow, fall)" + } + }, + { + "id": "saddle-context", + "name": { + "fr": "Contexte de sellerie (selle inadaptée, poids du cavalier)", + "en": "Saddle context (ill-fitting saddle, rider weight)" + } + }, + { + "id": "posture-context", + "name": { + "fr": "Contexte postural / de travail", + "en": "Postural / work context" + } + }, + { + "id": "stress-context", + "name": { + "fr": "Contexte de stress / changement", + "en": "Stress / change context" + } + }, + { + "id": "post-veterinary", + "name": { + "fr": "Suite d'intervention vétérinaire", + "en": "Post veterinary intervention" + } + }, + { + "id": "no-identified-cause", + "name": { + "fr": "Pas de cause identifiée", + "en": "No identified cause" + } + } + ], + "description": { + "fr": "Facteurs rapportés par le propriétaire lors de l'anamnèse" + } + } + ] + } + ] +}$equine_doc$::jsonb, + 'Import des données équines historiques (Horse.svg, Horse_head.svg, pathologies.json)' +) +where not exists ( + select 1 from public.anatomical_sheet_versions where sheet_id = '503dc301-a8b1-50d4-9e44-0919b2fc2916' +); diff --git a/supabase/seed/anatomical-sheets/equine/v1/legacy-id-map.json b/supabase/seed/anatomical-sheets/equine/v1/legacy-id-map.json new file mode 100644 index 00000000..97da0348 --- /dev/null +++ b/supabase/seed/anatomical-sheets/equine/v1/legacy-id-map.json @@ -0,0 +1,46 @@ +{ + "views": { + "head": "head" + }, + "annotations": { + "point-mpbwrkp0": "hind-fetlock", + "point-mpbwsi9q": "hock", + "point-mpbwt4fa": "stifle", + "point-mpbwtst0": "hip", + "point-mpbwugty": "sacroiliac", + "point-mpbwv4xy": "shoulder", + "point-mpbwvpvt": "elbow", + "point-mpbwwaru": "fore-fetlock", + "point-mpbwwxvn": "fore-sesamoids", + "point-mpbwxnb4": "l6-s1", + "point-mpbwyd9i": "t18-l1", + "point-mpbwyyc9": "c7-t1", + "zone-mpbx00jq": "caudal", + "zone-mpbx0xnp": "sacral", + "zone-mpbx1rm9": "lumbar", + "zone-mpbx2rpe": "thoracic", + "zone-mpbx5hx2": "cervical", + "zone-mpby55kd": "head-trigger", + "point-mpbykomv": "parietal", + "point-mpbylh35": "frontal", + "point-mpbymcln": "sphenoid", + "point-mpbyn2k3": "temporal", + "point-mpbynls5": "occipital", + "point-mpbyo7zq": "atm", + "point-mpbyphay": "ssb", + "point-mpbyq841": "hyoid", + "point-mpbyqxbg": "c0-c1" + }, + "categories": { + "articulations": "articulations", + "os": "os", + "charni-res-vert-brales": "charnieres-vertebrales", + "zone-colonne": "zone-colonne", + "cadrans-du-cr-ne": "cadrans-du-crane" + }, + "finding_nodes": {}, + "assets": { + "Horse.svg": "8bc2cd09-5fca-54c6-a78e-bdd3f6abaa3a", + "Horse_head.svg": "5043348c-b84b-50c3-bbf8-01ff539d163c" + } +} diff --git a/supabase/tests/001_schema.sql b/supabase/tests/001_schema.sql index a2a12645..7b5289ab 100644 --- a/supabase/tests/001_schema.sql +++ b/supabase/tests/001_schema.sql @@ -62,7 +62,7 @@ select is( (select string_agg(p.proname::text, ',' order by p.proname::text collate "C") from pg_proc p join pg_namespace n on n.oid = p.pronamespace where n.nspname in ('private', 'audit') and has_function_privilege('authenticated', p.oid, 'execute')), - 'can_edit_sheet,can_use_sheet,has_platform_role,is_platform_admin,is_platform_moderator,is_platform_owner,is_support', + 'can_edit_sheet,can_read_sheet_asset_object,can_use_sheet,has_platform_role,is_platform_admin,is_platform_moderator,is_platform_owner,is_support', 'authenticated executes only the policy predicates in private' ); diff --git a/supabase/tests/005_anatomical_sheets.sql b/supabase/tests/005_anatomical_sheets.sql index 7c44ba0f..2434f7b2 100644 --- a/supabase/tests/005_anatomical_sheets.sql +++ b/supabase/tests/005_anatomical_sheets.sql @@ -586,7 +586,7 @@ select throws_ok( ); select set_config('request.jwt.claims', '{"sub":"20000000-0000-0000-0000-000000000001","role":"authenticated"}', true); insert into pg_temp.ids select 'official', public.create_anatomical_sheet( - 'equine', 'Faunosteo / Cheval', 'faunosteo-cheval', pg_temp.sheet_doc(null), 'Fiche officielle', 'public', true + 'equine', 'Officielle test', 'officielle-test', pg_temp.sheet_doc(null), 'Fiche officielle', 'public', true ); select results_eq( $$ select creator_user_id, is_official, visibility::text from public.anatomical_sheets where id = pg_temp.id('official') $$, diff --git a/supabase/tests/006_sheet_asset_storage.sql b/supabase/tests/006_sheet_asset_storage.sql new file mode 100644 index 00000000..4aea4e98 --- /dev/null +++ b/supabase/tests/006_sheet_asset_storage.sql @@ -0,0 +1,155 @@ +-- Storage read policy on bucket anatomical-sheet-assets: an object is readable +-- through a sheet (published reference for users, any version for editors), +-- never through its hash alone. No API writes. +begin; +select plan(28); + +insert into auth.users (id, email) values + ('30000000-0000-0000-0000-00000000000a', 'alice-assets@test.local'), + ('30000000-0000-0000-0000-00000000000b', 'bob-assets@test.local'); + +create table pg_temp.ids (key text primary key, id uuid not null); +create function pg_temp.id(p_key text) returns uuid language sql stable +as $$ select id from pg_temp.ids where key = p_key $$; +grant all on pg_temp.ids to anon, authenticated, service_role; +grant execute on function pg_temp.id(text) to anon, authenticated, service_role; + +-- Minimal publishable document with one main view on a given asset. +create function pg_temp.doc(p_asset uuid) returns jsonb language sql as $$ + select jsonb_build_object( + 'schema_version', 1, 'species_id', 'equine', + 'name', jsonb_build_object('fr', 'A', 'en', 'A'), + 'description', '{}'::jsonb, 'scope_disclaimer', '{}'::jsonb, + 'attribution', jsonb_build_object('authors', '[]'::jsonb, 'license', null, 'notes', null), + 'vertebral_config', jsonb_build_object('regions', '[]'::jsonb), + 'categories', '[]'::jsonb, + 'views', jsonb_build_array(jsonb_build_object('id', 'main', 'kind', 'main', + 'name', jsonb_build_object('fr', 'V', 'en', 'V'), 'svg_asset_id', p_asset, 'view_box', null)), + 'annotations', '[]'::jsonb, 'finding_zones', '[]'::jsonb); +$$; +grant execute on function pg_temp.doc(uuid) to authenticated, service_role; + +-- 1. Bucket contract +select is((select public from storage.buckets where id = 'anatomical-sheet-assets'), false, 'bucket is private'); +select is( + (select allowed_mime_types from storage.buckets where id = 'anatomical-sheet-assets'), + array['image/svg+xml'], 'bucket accepts SVG only' +); +select is( + (select count(*) from pg_policies where schemaname = 'storage' and tablename = 'objects' + and policyname = 'anatomical_sheet_assets_read' and cmd = 'SELECT'), + 1::bigint, 'one SELECT policy on storage.objects for the bucket' +); +select is( + (select count(*) from pg_policies where schemaname = 'storage' and tablename = 'objects' + and policyname like 'anatomical_sheet_assets%' and cmd <> 'SELECT'), + 0::bigint, 'no write policy on the bucket for API roles' +); + +-- 2. Alice: sheet with published v1 on asset A, draft v2 on asset B; C is registered but unreferenced +set local role authenticated; +select set_config('request.jwt.claims', '{"sub":"30000000-0000-0000-0000-00000000000a","role":"authenticated"}', true); +insert into pg_temp.ids select 'sheet', public.create_anatomical_sheet('equine', 'Assets', 'assets-test', pg_temp.doc(null)); +insert into pg_temp.ids select 'a', public.register_sheet_asset(pg_temp.id('sheet'), repeat('a', 64), 100, 'A.svg'); +insert into pg_temp.ids select 'b', public.register_sheet_asset(pg_temp.id('sheet'), repeat('b', 64), 100, 'B.svg'); +insert into pg_temp.ids select 'c', public.register_sheet_asset(pg_temp.id('sheet'), repeat('c', 64), 100, 'C.svg'); +insert into pg_temp.ids select 'v1', id from public.anatomical_sheet_versions where sheet_id = pg_temp.id('sheet'); +update public.anatomical_sheet_versions set content = pg_temp.doc(pg_temp.id('a')) where id = pg_temp.id('v1'); +select lives_ok($$ select public.publish_sheet_version(pg_temp.id('v1')) $$, 'v1 published on asset A'); +insert into pg_temp.ids select 'v2', public.create_sheet_draft(pg_temp.id('sheet')); +update public.anatomical_sheet_versions set content = pg_temp.doc(pg_temp.id('b')) where id = pg_temp.id('v2'); + +-- Objects uploaded by the operator (owner session), then confirmed through the +-- service-role RPC for A and B only; C stays metadata without bytes. +reset role; +insert into storage.objects (bucket_id, name) values + ('anatomical-sheet-assets', repeat('a', 64) || '.svg'), + ('anatomical-sheet-assets', repeat('b', 64) || '.svg'), + ('anatomical-sheet-assets', repeat('c', 64) || '.svg'), + ('anatomical-sheet-assets', repeat('d', 64) || '.svg'); +set local role authenticated; +select set_config('request.jwt.claims', '{"sub":"30000000-0000-0000-0000-00000000000a","role":"authenticated"}', true); +select is((select count(*) from storage.objects where bucket_id = 'anatomical-sheet-assets'), 0::bigint, 'nothing is readable before the upload is confirmed'); +select throws_ok( + $$ select public.confirm_sheet_asset_upload(pg_temp.id('a')) $$, + '42501', null, 'an editor cannot confirm an upload (service role only)' +); +set local role service_role; +select lives_ok($$ select public.confirm_sheet_asset_upload(pg_temp.id('a')) $$, 'service role confirms asset A'); +select lives_ok($$ select public.confirm_sheet_asset_upload(pg_temp.id('b')) $$, 'service role confirms asset B'); +select is(public.confirm_sheet_asset_upload(pg_temp.id('a')), pg_temp.id('a'), 'confirming twice is idempotent'); +reset role; + +-- 3. Editor reads every object of her sheet (published, draft, unreferenced), not foreign ones +set local role authenticated; +select set_config('request.jwt.claims', '{"sub":"30000000-0000-0000-0000-00000000000a","role":"authenticated"}', true); +select results_eq( + $$ select name from storage.objects where bucket_id = 'anatomical-sheet-assets' order by name $$, + $$ values (repeat('a', 64) || '.svg'), (repeat('b', 64) || '.svg') $$, + 'editor reads the confirmed objects of her sheet; unconfirmed and foreign objects stay hidden' +); + +-- 4. Bob: private sheet → nothing; claiming the hash on his own sheet opens nothing +select set_config('request.jwt.claims', '{"sub":"30000000-0000-0000-0000-00000000000b","role":"authenticated"}', true); +select is((select count(*) from storage.objects where bucket_id = 'anatomical-sheet-assets'), 0::bigint, 'other user reads nothing from a private sheet'); +insert into pg_temp.ids select 'bob-sheet', public.create_anatomical_sheet('equine', 'Claim', 'claim-test', pg_temp.doc(null)); +select lives_ok( + $$ select public.register_sheet_asset(pg_temp.id('bob-sheet'), repeat('a', 64), 100, 'A.svg') $$, + 'bob registers the known hash on his own sheet' +); +select is((select count(*) from storage.objects where bucket_id = 'anatomical-sheet-assets'), 0::bigint, 'a self-registered hash without a confirmed upload opens no object'); +select set_config('request.jwt.claims', '{"sub":"30000000-0000-0000-0000-00000000000a","role":"authenticated"}', true); +select lives_ok($$ select public.set_sheet_visibility(pg_temp.id('sheet'), 'public') $$, 'alice makes the sheet public'); +select set_config('request.jwt.claims', '{"sub":"30000000-0000-0000-0000-00000000000b","role":"authenticated"}', true); +select results_eq( + $$ select name from storage.objects where bucket_id = 'anatomical-sheet-assets' order by name $$, + $$ values (repeat('a', 64) || '.svg') $$, + 'other user reads only the object a published version references (not the draft asset, not the unreferenced one)' +); +select throws_ok( + $$ insert into storage.objects (bucket_id, name) values ('anatomical-sheet-assets', 'x.svg') $$, + '42501', null, 'authenticated cannot upload into the bucket' +); +-- The real image also carries storage.protect_delete (statement trigger), so a +-- direct DELETE is asserted through the policy census, not by running it. +select is( + (select count(*) from pg_policies where schemaname = 'storage' and tablename = 'objects' + and cmd in ('INSERT', 'UPDATE', 'DELETE') + and (coalesce(qual, '') like '%anatomical-sheet-assets%' or coalesce(with_check, '') like '%anatomical-sheet-assets%')), + 0::bigint, 'no API role has an insert/update/delete policy on the bucket objects' +); + +-- Name variants never match the strict key +select set_config('request.jwt.claims', '{"sub":"30000000-0000-0000-0000-00000000000a","role":"authenticated"}', true); +select ok( + not private.can_read_sheet_asset_object('30000000-0000-0000-0000-00000000000a', repeat('a', 64)) + and not private.can_read_sheet_asset_object('30000000-0000-0000-0000-00000000000a', upper(repeat('a', 64)) || '.svg') + and not private.can_read_sheet_asset_object('30000000-0000-0000-0000-00000000000a', 'x/' || repeat('a', 64) || '.svg') + and not private.can_read_sheet_asset_object('30000000-0000-0000-0000-00000000000a', repeat('a', 64) || '.svg/'), + 'object name must be exactly .svg' +); +-- A deprecated version still publishes its asset +select lives_ok($$ select public.publish_sheet_version(pg_temp.id('v2')) $$, 'v2 (asset B) published'); +select lives_ok($$ select public.deprecate_sheet_version(pg_temp.id('v1'), 'old') $$, 'v1 (asset A) deprecated'); +select set_config('request.jwt.claims', '{"sub":"30000000-0000-0000-0000-00000000000b","role":"authenticated"}', true); +select results_eq( + $$ select name from storage.objects where bucket_id = 'anatomical-sheet-assets' order by name $$, + $$ values (repeat('a', 64) || '.svg'), (repeat('b', 64) || '.svg') $$, + 'published and deprecated references both open the object for users of a public sheet' +); + +-- 5. Archived sheet hides objects from others; anon sees nothing +select set_config('request.jwt.claims', '{"sub":"30000000-0000-0000-0000-00000000000a","role":"authenticated"}', true); +select lives_ok($$ select public.archive_anatomical_sheet(pg_temp.id('sheet')) $$, 'alice archives'); +select set_config('request.jwt.claims', '{"sub":"30000000-0000-0000-0000-00000000000b","role":"authenticated"}', true); +select is((select count(*) from storage.objects where bucket_id = 'anatomical-sheet-assets'), 0::bigint, 'archived sheet: others read nothing'); +select set_config('request.jwt.claims', '{"sub":"30000000-0000-0000-0000-00000000000a","role":"authenticated"}', true); +select lives_ok($$ select public.restore_anatomical_sheet(pg_temp.id('sheet')) $$, 'alice restores'); +select lives_ok($$ select public.delete_anatomical_sheet(pg_temp.id('sheet')) $$, 'alice soft-deletes the sheet'); +select is((select count(*) from storage.objects where bucket_id = 'anatomical-sheet-assets'), 0::bigint, 'deleted sheet: even the creator reads nothing'); +set local role anon; +select set_config('request.jwt.claims', '', true); +select is((select count(*) from storage.objects where bucket_id = 'anatomical-sheet-assets'), 0::bigint, 'anon reads nothing'); + +select * from finish(); +rollback; diff --git a/supabase/tests/007_equine_seed.sql b/supabase/tests/007_equine_seed.sql new file mode 100644 index 00000000..24d70229 --- /dev/null +++ b/supabase/tests/007_equine_seed.sql @@ -0,0 +1,98 @@ +-- Official equine sheet seed (supabase/seed/anatomical-sheets/equine/v1): +-- present as a platform-owned DRAFT, never published by the seed, publishable +-- by platform admins only, content accepted by the SQL referential gate. +begin; +select plan(18); + +insert into auth.users (id, email) values + ('40000000-0000-0000-0000-000000000001', 'root-seed@test.local'), + ('40000000-0000-0000-0000-00000000000a', 'alice-seed@test.local'); +select private.assign_platform_role(null, '40000000-0000-0000-0000-000000000001', 'owner'); + +create table pg_temp.ids (key text primary key, id uuid not null); +create function pg_temp.id(p_key text) returns uuid language sql stable +as $$ select id from pg_temp.ids where key = p_key $$; +grant all on pg_temp.ids to anon, authenticated, service_role; +grant execute on function pg_temp.id(text) to anon, authenticated, service_role; + +insert into pg_temp.ids select 'sheet', id from public.anatomical_sheets where slug = 'faunosteo-cheval' and is_official; +insert into pg_temp.ids select 'draft', id from public.anatomical_sheet_versions where sheet_id = pg_temp.id('sheet'); + +-- 1. Seeded state +select results_eq( + $$ select species_id, creator_user_id, is_official, visibility::text, status::text, current_version_id + from public.anatomical_sheets where id = pg_temp.id('sheet') $$, + $$ values ('equine', null::uuid, true, 'private', 'active', null::uuid) $$, + 'official equine sheet: platform-owned, private, active, no published version' +); +select results_eq( + $$ select version_number, status::text, document_schema_version, published_at + from public.anatomical_sheet_versions where sheet_id = pg_temp.id('sheet') $$, + $$ values (1, 'draft', 1, null::timestamptz) $$, + 'exactly one version, draft v1, never published' +); +select is((select count(*) from public.anatomical_sheet_assets where sheet_id = pg_temp.id('sheet')), 2::bigint, 'two SVG assets registered'); +select is( + (select content ->> 'species_id' from public.anatomical_sheet_versions where id = pg_temp.id('draft')), + 'equine', 'document species is equine' +); +select is( + (select jsonb_array_length(content -> 'views') from public.anatomical_sheet_versions where id = pg_temp.id('draft')), + 2, 'document has two views' +); +select is( + (select jsonb_array_length(content -> 'annotations') from public.anatomical_sheet_versions where id = pg_temp.id('draft')), + 27, 'document has 27 annotations' +); +select is( + (select jsonb_array_length(content -> 'finding_zones') from public.anatomical_sheet_versions where id = pg_temp.id('draft')), + 26, 'document has 26 finding zones' +); +select is( + (select private.sheet_document_issues(content) from public.anatomical_sheet_versions where id = pg_temp.id('draft')), + '{}'::text[], 'SQL referential gate finds no issue' +); +select is( + (select private.sheet_document_unknown_assets(sheet_id, content) from public.anatomical_sheet_versions where id = pg_temp.id('draft')), + '{}'::text[], 'every view asset is registered for the sheet' +); +select is( + (select count(*) from audit.audit_logs where resource_id = pg_temp.id('draft') and action = 'anatomical_sheet_version.created' and actor_user_id is null), + 1::bigint, 'the seed import is audited as a system action' +); + +-- 2. Nobody publishes it by accident: plain users cannot even see the draft +set local role authenticated; +select set_config('request.jwt.claims', '{"sub":"40000000-0000-0000-0000-00000000000a","role":"authenticated"}', true); +select is((select count(*) from public.anatomical_sheets where id = pg_temp.id('sheet')), 0::bigint, 'a private official draft is invisible to plain users'); +select throws_ok( + $$ select public.publish_sheet_version(pg_temp.id('draft')) $$, + '42501', null, 'a plain user cannot publish the official draft' +); +-- A platform admin can (the explicit decision step), and the gate would accept the document +select set_config('request.jwt.claims', '{"sub":"40000000-0000-0000-0000-000000000001","role":"authenticated"}', true); +select is((select count(*) from public.anatomical_sheet_versions where id = pg_temp.id('draft')), 1::bigint, 'a platform admin sees the official draft'); +select lives_ok($$ select public.publish_sheet_version(pg_temp.id('draft')) $$, 'a platform admin could publish it (rolled back here)'); + +-- 3. Storage: the seed registers metadata only; after the operator upload + confirmation, +-- a platform admin reads both objects and a plain user none. +reset role; +insert into storage.objects (bucket_id, name) + select 'anatomical-sheet-assets', a.sha256 || '.svg' from public.anatomical_sheet_assets a where a.sheet_id = pg_temp.id('sheet'); +set local role authenticated; +select set_config('request.jwt.claims', '{"sub":"40000000-0000-0000-0000-000000000001","role":"authenticated"}', true); +select is((select count(*) from storage.objects where bucket_id = 'anatomical-sheet-assets'), 0::bigint, 'seed objects are not readable before confirmation'); +set local role service_role; +select is( + (select count(*) from public.anatomical_sheet_assets a where a.sheet_id = pg_temp.id('sheet') + and public.confirm_sheet_asset_upload(a.id) = a.id), + 2::bigint, 'operator confirms the two uploads' +); +set local role authenticated; +select set_config('request.jwt.claims', '{"sub":"40000000-0000-0000-0000-000000000001","role":"authenticated"}', true); +select is((select count(*) from storage.objects where bucket_id = 'anatomical-sheet-assets'), 2::bigint, 'a platform admin reads both official SVGs'); +select set_config('request.jwt.claims', '{"sub":"40000000-0000-0000-0000-00000000000a","role":"authenticated"}', true); +select is((select count(*) from storage.objects where bucket_id = 'anatomical-sheet-assets'), 0::bigint, 'a plain user reads no official draft SVG'); + +select * from finish(); +rollback;