🔗

Managing Treatment Episodes

Group related visits into treatment episodes to track chronic conditions and long-term care

3 min read

Overview

Treatment Episodes in SehaFile group related visits into logical clinical episodes, enabling longitudinal tracking of conditions. An episode might represent a chronic disease management plan (like diabetes management over months), an acute illness course, a surgical episode from pre-op through recovery, or a pregnancy follow-up. Episodes provide context when reviewing a patient's history, showing which visits relate to which condition.

Episodes page showing active episodes with title, type badge, start date, treating doctor, linked visits count, and status indicators

Creating a Treatment Episode

  1. Navigate to Episodes — Click Episodes in the sidebar or go to /episodes.
  2. Click “+ New Episode” — The creation form opens.
  3. Select the patient — Search for the patient this episode belongs to using the patient_id selector.
  4. Enter the episode title — Provide a descriptive title in Arabic (title_ar, required) and optionally in English (title_en). Example: “متابعة سكري النوع الثاني”.
  5. Choose the episode type — Select from:
    • Chronic — Ongoing disease management (diabetes, hypertension)
    • Acute — Short-term illness (pneumonia, fracture healing)
    • Surgical — Pre-op through post-op recovery
    • Dental — Dental treatment plan
    • Pregnancy — Prenatal care through delivery
    • Rehabilitation — Physical therapy course
  6. Set the start date — When the episode began (may predate the first linked visit).
  7. Assign the treating doctor — Select the primary treating doctor (treating_doctor_id).
  8. Enter primary diagnosis — The main condition this episode tracks.
  9. Add notes — Any contextual information about the treatment plan.
  10. Save — The episode is created with status “active”.

Linking Visits to an Episode

  1. Open the episode — Navigate to the episode detail page.
  2. Click “Link Visit” — This calls POST /episodes/:id/visits with a visit_id.
  3. Select the visit — Choose from the patient's visits that are not already linked to this episode.
  4. Add notes (optional) — Explain why this visit relates to the episode.
When viewing a visit, you can see its episode context via the “Episode Context” section (GET /visits/:id/episode-context). This shows previous orders and diagnoses from all visits in the same episode, giving you complete longitudinal context.
An episode should be marked “completed” when the treatment goal is achieved or the condition resolves. Open episodes without activity for over 90 days may be flagged for review.

FAQ

Can a visit belong to multiple episodes?

Yes. A single visit can be linked to multiple episodes if it addresses more than one condition (e.g., a visit that handles both diabetes and hypertension follow-up).

How do I close an episode?

Update the episode status to “completed” and set the end_date. You can also put it “on_hold” if temporarily pausing treatment.

Who can create episodes?

Doctors, admins, and receptionists can create episodes. However, the treating_doctor_id should always be set to the responsible physician.

Was this article helpful?