Skip to content

Latest commit

 

History

History
91 lines (75 loc) · 4.17 KB

README.md

File metadata and controls

91 lines (75 loc) · 4.17 KB

Appoint

Appoint is a system of IoT devices to make it easy to arrange medical appointments.

Batteries Included

  • next-dashboard/ Next.js-powered dashboard and backend
  • nfc-backend/ NFC reader backend code on the RPI with python, connects with PN532 via i2c
  • flutter-app/ Flutter-powered mobile app to create appointments and emit NFC signals
  • schedule-stream/ A simple express server that serves a Socket.IO endpoint to be used to notify subscribers of schedule change
  • time-faker/ A simple express server that acts as a time provider that can be offsetted for testing

Dashboard Screenshots

Flow

  • Patients registers an account through the flutter app
  • Creates a new appointment
  • Pick an empty schedule
  • Patient physically arrive at the appointed location a few minutes before the scheduled time
  • Patient scans their phone on an NFC reader provided in the physical location
  • Patient waits until the doctor starts the appointment
  • Patient gets into a room with the doctor

The Architecture

Here's an overview of the components used (excluding time-faker)

graph LR
    A(Patient Phone) <-- API Calls --> B(Backend Server)
    B -- HTTP Requests --> C(Schedule Stream)
    D(NFC Reader) -- HTTP POST Request --> B
    E(User Frontend) -- HTTP Requests --> B
    A -- NFC --> D
    C -- Websocket (Socket.IO) --> A
    C -- Websocket (Socket.IO) --> E
Loading

Here's how each components interact with each other (excluding time-faker)

sequenceDiagram
    participant Patient
    participant Backend
    participant ScheduleStream
    participant NFCReader
    participant Dashboard
    Patient->>Backend: Register and Login (API Call)
    Backend->>Patient: Provide Token
    Patient->>ScheduleStream: Connect and login with token
    Patient->>Backend: Create Appointment (API Call)
    Backend->>ScheduleStream: Update New Appointment (HTTP Request)
    ScheduleStream->>Dashboard: Realtime Update on New Appointment
    ScheduleStream->>Patient: Realtime Update on New Appointment
    Patient->>Backend: Request Check-In ID (15 mins before appointment)
    Backend->>Patient: Provide Check-In ID
    Patient->>Patient: Tell user to tap on the NFC reader
    Patient->>NFCReader: Taps NFC and sends Check-In ID
    NFCReader->>Backend: Notify Check-In (HTTP POST)
    Backend->>ScheduleStream: Update Check-In Status (HTTP Request)
    ScheduleStream->>Dashboard: Realtime Update on Check-In
    ScheduleStream->>Patient: Realtime Update on Check-In
    Patient->>Patient: Tell user that check-in is successful
    Dashboard->>Backend: Update Appointment to "In-progress" (API Call)
    Backend->>ScheduleStream: Update Appointment Status (HTTP Request)
    ScheduleStream->>Dashboard: Realtime Update on Appointment Status
    ScheduleStream->>Patient: Realtime Update on Appointment Status
    Patient->>Patient: Tell user to enter the room
    Dashboard->>Backend: Update Appointment to "Finished" (API Call)
    Backend->>ScheduleStream: Update Appointment Status (HTTP Request)
    ScheduleStream->>Dashboard: Realtime Update on Appointment Status
    ScheduleStream->>Patient: Realtime Update on Appointment Status
    Patient->>Patient: Show finished page
Loading

Competition

This project is supposed to be a submission for a competition named "TURNAMEN ROBOTIK INDONESIA KETUA MPR RI 2024" in the category of creative innovations.