Skip to main content

Overview

When a student is enrolled in a camp, MyMeddical automatically identifies their guardian and sends a targeted in-app notification requesting that a health plan be created or reviewed for the camp’s duration. The notification adapts its call-to-action based on whether an active plan already exists for the student over the camp dates.

How it works

1

Student added to a camp

An administrator adds a student to a camp in the school portal.
2

Notification sent to guardian

The system looks up the student’s guardian, generates a secure token scoped to that guardian and student, and creates a Health Plan Request notification.
3

Guardian opens the notification

The notification expands in the Messages screen of the mobile app. The system checks whether an active health plan already covers the camp dates.
4

Guardian acts

One or two action buttons appear depending on the plan detection result. The guardian taps their choice and is taken directly into the relevant flow.

Guardian experience

The expanded notification renders different CTAs depending on whether a qualifying plan is found.

Scenario A — Existing plan found

An active, upcoming, or in-progress plan already overlaps the camp dates.Buttons shown:
  • Update existing plan — opens the existing plan for editing
  • Create Plan — opens a new plan pre-filled with camp context

Scenario B — No plan found

No active, upcoming, or in-progress plan covers the camp date range.Button shown:
  • Create Plan — opens a new plan pre-filled with camp context
When a guardian taps Create Plan, the plan name is automatically pre-filled as [Camp Name] - [Child's first name] (e.g. Alice Springs Camp - Henry) and the start/end dates are set to match the camp.

Plan detection rules

The system fetches all plans for the student and applies the following rules.

Plans that qualify as “existing”

  • Computed status is upcoming — starts in the future, not cancelled or completed
  • Computed status is in_progress — currently active (start date has passed, end date has not)
  • The plan date range overlaps the camp dates — plan start is on or before camp end, and plan end is on or after camp start
A plan does not need to span the entire camp to qualify. A plan that starts before the camp and ends mid-camp, or starts mid-camp and extends past it, still counts as an existing plan.

Plans that are excluded

  • pending_approval — created by a guardian, waiting for school admin to approve. Not yet a live plan.
  • completed — plan has ended or was manually closed
  • canceled — plan was explicitly cancelled

Plan status reference

Computed statusStored statusDescriptionCounts as existing?
upcoming0Future start date, not cancelled or pending
in_progress0Start date has passed, end date has not
pending_approval3Guardian-created, awaiting school admin approval
completed1Plan has ended or was closed
canceled2Plan was explicitly cancelled

Plan approval on creation

The approval workflow depends on who creates the plan.
Creator rolePlan status on creationAppears in approval queue?
Guardian / Parentpending_approval (status 3)Yes — school admin must approve
School admin / Super adminupcoming (status 0)No — goes live immediately
If a guardian submits a plan that is awaiting approval, the next notification they receive will still show only Create Plan. Once a school admin approves the plan (moving it to upcoming), subsequent notifications will detect it and show Update existing plan.

Security

The camp plan prompt endpoint is authenticated and ownership-validated on every request.
  • Requires a valid guardian JWT — the endpoint is not publicly accessible
  • Each token is scoped to a single guardian–student–camp combination
  • On every request the server verifies that the authenticated guardian’s ID matches the token owner — a mismatch returns 403 Forbidden
  • Sending a second notification upserts the token rather than creating a duplicate