Student Patient

Student Patient

HEKLKLLO.

Purpose

The Student Patient doctype stores a student’s essential health profile for school nurses and authorized administrators. It centralizes allergies, relevant medical history, vaccination records, and a short, shareable note for teaching staff.


Overview

Module: Health Naming: PAT-{YYYY}-{####} One record per student: student is required and unique.

At a glance

This document mirrors the Student record for identity details (name, preferred name, photo) and adds medical‑specific fields and a vaccination child table.

Key fields (from JSON)
  • Identity & basics

    • student (Link → Student, reqd, unique)
    • student_name (Data, fetched, read‑only)
    • preferred_name (Data, fetched, read‑only)
    • student_age (Data, read‑only; computed in form UI)
    • photo (Attach Image, read‑only; synced from Student on validate)
    • student_info (HTML; compact info panel rendered by JS)
  • Vitals

    • blood_group (Select: A Positive, A Negative, AB Positive, AB Negative, B Positive, B Negative, O Positive, O Negative)
    • status (Select: Active, Disabled)
    • completion_state (Select: Completed, Missing Info)
  • Allergies & medical history

    • allergies (Check)
    • Details: food_allergies, insect_bites, medication_allergies, others
    • History (Small Text fields): asthma, seizures, bone_joints_scoliosis, blood_disorder_info, fainting_spells, g6pd, hearing_problems, recurrent_ear_infections, speech_problem, vision_problem, birth_defect, bladder__bowel_problems, diabetes, heart_problems, recurrent_nose_bleeding, dental_problems, headache_migraine
  • Other data

    • diet_requirements (Small Text)
    • medical_surgeries__hospitalizations (Text)
    • other_medical_information (Text Editor) — nurse notes
    • medical_info (Text Editor) — brief, shareable note for instructors (shown via red‑cross indicator on student cards)
  • Vaccinations

    • vaccinations (Table → Student Patient Vaccination)

      • Child fields: vaccine_name (Data), date (Date), vaccination_proof (Attach Image), additional_notes (Data)

How to create
  1. Go to Desk → Health → Student Patient → New.
  2. Select Student. The form fetches name/preferred name, shows Student Info, and computes Student Age.
  3. Set Blood Group and Status.
  4. If applicable, tick Any allergies and fill detail fields.
  5. Add medical history and Other Data as needed.
  6. Add Vaccinations rows (name + date; attach proof if available).
  7. (Optional) Add a concise Medical Info note for instructors.
  8. Save.
Quick actions on the form

Guardian Details shows guardians (name, relation, email, mobile).
Student Visit opens a new Student Patient Visit prefilled with student, this patient record, and arrival time.


Validation rules
  • On validate, photo is synced from Student.student_image so nurses always see the latest picture.
  • student must be set and is unique (one health record per student).
  • Allergy detail fields are relevant when allergies is checked.
Privacy & access

Teachers do not access full Student Patient records. Use Medical Info to surface only minimal, essential details to instructors.


Key features (Python & JS)
  • Controller (Python)

    • validate()sync_photo_from_student() copies Student.student_image to this doc’s photo.

    • Whitelisted:

      • get_student_basic_info(student) — returns basic student profile (enforces read permission on Student Patient).
      • get_guardian_details(student_name) — returns guardians (name, relation, email, mobile) from the linked Student.
  • Client script (JS)

    • On load/refresh: fetches basic info, renders the Student Info panel, computes and sets student_age (in years/months/days).
    • Adds Guardian Details dialog and Student Visit quick‑action.

Permissions (R / W / C / D)

Legend: 🟢 Allowed · ◻️ Not allowed

Role Read Write Create Delete
System Manager 🟢 🟢 🟢 🟢
Nurse 🟢 🟢 🟢 🟢
Admission Manager 🟢 🟢 🟢 🟢
Admission Officer 🟢 🟢 🟢 🟢
Academic Admin 🟢 ◻️ ◻️ ◻️
Academic Assistant 🟢 ◻️ ◻️ ◻️

> Keep scope tight: only nurses and necessary admins should have write access. For teaching staff, rely on the short Medical Info note.


Linked doctypes
  • Student (Link) — identity & demographics source
  • Student Patient Vaccination (Child Table) — vaccination entries
  • Student Patient Visit — logs of nurse‑office visits
  • Guardian (via Student.guardians) — surfaced by Guardian Details
Linking pattern in docs

Use root‑absolute slugs:
/docs/en/student-patient, /docs/en/student, /docs/en/student-patient-visit.

See also

  • student-patient-visit
  • student-log
  • student-group

Suggested screenshots
  • Header after selecting Student (shows Student Info and Age).
  • Allergies section toggled on with details.
  • Vaccinations table with a sample entry and proof image.
  • Guardian Details dialog.
  • Student Visit button in the form menu.

Enhancements (nice‑to‑have)
  • Auto‑set completion_state = Completed when core fields are filled.
  • A concise Health Summary print format (field‑trip friendly).
  • List‑view indicators for Missing Info and allergy presence.
  • Optional school‑level toggle limiting edit rights to Nurse only.