Hallo Stroke

Frontend Reminders

The reminder (pengingat) system — the core clinical-support feature.

The reminder system is the most clinically relevant feature. AddReminder.js and Reminders.js implement a structured reminder engine with four types, each with a distinct form and API payload.

Reminder types

Type (tipe)EndpointTracks
obat (medicine)POST /api/pengingat/obatnama_obat, frekuensi (1–3x daily), jadwal[] (time + dose + unit), aturan (before/after/with meals)
makan (meal)POST /api/pengingat/nutrition per slot: karbohidrat, protein, lemak, vitamin, serat
terapi (therapy)POST /api/pengingat/jenis_terapi, tempat_terapi, weekly day + time schedule
kontrol (doctor follow-up)POST /api/pengingat/nama_dokter, spesialisasi, jenis_faskes, nama_faskes, datetime, frekuensi_kontrol, reminder offsets [{offset:"1h"}, {offset:"1d"}]

Medicine reminders

Medicine reminders use a dedicated endpoint (POST /api/pengingat/obat) and create a single reminder row holding all daily dose times in details.jadwal:

{
  "judul": "Aspirin",
  "timezone": "Asia/Makassar",
  "details": {
    "nama_obat": "Aspirin",
    "frekuensi": 2,
    "jadwal": [
      { "jam": "08:00", "jumlah": 1, "satuan": "tablet" },
      { "jam": "20:00", "jumlah": 1, "satuan": "tablet" }
    ],
    "aturan": "setelah makan"
  }
}

Medicine grouping (Reminders.js)

groupMedicineReminders merges multiple reminder records that share the same nama_obat + frekuensi into one card displaying all schedules:

  • is_done requires all grouped instances to be done.
  • Delete and toggle operate on all grouped IDs in parallel.
  • Other types (makan/terapi/kontrol) are listed individually.

Timezone handling

All times are stored as UTC; the user's timezone is sent with every reminder. src/utils/timezoneHelper.js:

  • getUserTimezone() — reads Intl timezone, default fallback Asia/Makassar (WITA), suggesting the pilot serves eastern Indonesia.
  • convertLocalTimeToUTC — converts local input time before sending.
  • formatTimeInUserTimezone / formatDateInUserTimezone — for display.

Consultation reminder offsets

kontrol reminders fire notifications at offsets 1h and 1d before the appointment — i.e. a reminder 1 hour and 1 day before the doctor visit.

See the Backend Reminders page for the scheduler that dispatches these.

On this page