06.11

Planiranje terapije

Sažetak

Plan terapije je verzionirana cjelina: opcije, faze, koraci s ovisnostima, sigurnosne provjere, cijene, prihvat pacijenta i zakazivanje. Sam plan je deterministički kod; AI daje samo nacrte opcija, a prihvat bilježi točnu verziju i cjenik.

Tehnička specifikacija vodi se na engleskom jeziku; naslovi i sažeci poglavlja prevedeni su na hrvatski.

Overview

  • ProductionProduce · Treatment Planning
    Hold the plan the patient actually agreed to — version, steps, fees and consent — and drive scheduling from it.

Pipeline

  1. A plan is created from the clinician’s choices, Copilot drafts or studio proposals.
  2. Steps are sequenced by dependency rules into phases; safety rules check each step against the patient’s confirmed facts.
  3. Fees are calculated from the clinic’s fee schedule; estimates are versioned with the plan.
  4. The patient accepts a specific version; the acceptance freezes plan and fees for documents and billing.
  5. Accepted steps link to appointments and to Clinical Documents.

Data owned

  • Plans, versions, options, phases, steps, dependencies
    Holds
    The plan aggregate
  • Step evidence and safety overrides
    Holds
    Why a step is there, and any clinician override of a safety rule
  • Acceptances
    Holds
    The exact version and fees a patient agreed to
  • Fee schedule and appointment–step links
    Holds
    Pricing and scheduling

Models and engines

  • Draft plan options
    Model or engine
    Gemini 3 Flash (pro tier)
    Notes
    Decision options are drafts; the plan aggregate itself is deterministic

Guardrails

  • Sequencing, fees and safety rules are code.
  • Safety overrides are explicit, attributed and audited.
  • Acceptance binds a version; a later edit creates a new version rather than changing what was accepted.

Rollout and status

  • ProductionPlan aggregate
    Enabled in the production configuration
  • ShadowPlan safety rules
    Evaluated and recorded; never blocks yet
  • PilotPlan options, consent, scheduling
    Per clinic; options gated on a clinician-authored evaluation set

Interfaces

  • Consumes
    What
    Confirmed facts
  • Consumes
    What
    Studio proposals and Copilot drafts
  • Consumes
    What
    Clinic fee schedule
  • Emits
    What
    Accepted plan versions
  • Emits
    What
    Appointment links
  • Emits
    What
    Plan sources for Clinical Documents
  • Emits
    What
    Billing inputs
SOURCE OF TRUTH
  • server/services/clinical/treatmentPlan/
  • server/routes/private/treatmentPlan*.ts
  • docs/treatment-planning-tier1-implementation-plan.md
Svaki broj u ovoj specifikaciji generira se iz repozitorija i provjerava u CI-ju.