help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
healthcare-assistant-bot
/
templates
RSK World
healthcare-assistant-bot
Healthcare Assistant Bot - Python + Flask + SQLite + PHP Dashboard + NLP + Medical Features
templates
  • admin.html2.1 KB
  • index.html1.1 KB
  • login.html1.3 KB
  • register.html1.5 KB
start.batdatabase.pyadvanced-features.jslogin.html
database.py
Raw Download
Find: Go to:
#
# Project: Healthcare Assistant Bot
# Author: Molla Samser
# Author's Email: info@rskworld.com
# Author's Phone: +91 93305 39277
# Author's Website: https://rskworld.in
# Year: 2026
#

import sqlite3

def init_db():
    conn = sqlite3.connect('healthcare.db')
    c = conn.cursor()
    
    # Create appointments table
    c.execute('''
        CREATE TABLE IF NOT EXISTS appointments (
            id INTEGER PRIMARY KEY AUTOINCREMENT,
            date TEXT NOT NULL,
            time TEXT NOT NULL,
            description TEXT
        )
    ''')
    
    # Create reminders table
    c.execute('''
        CREATE TABLE IF NOT EXISTS reminders (
            id INTEGER PRIMARY KEY AUTOINCREMENT,
            medication TEXT NOT NULL,
            time TEXT NOT NULL
        )
    ''')
    
    # Create users table
    c.execute('''
        CREATE TABLE IF NOT EXISTS users (
            id INTEGER PRIMARY KEY AUTOINCREMENT,
            username TEXT NOT NULL UNIQUE,
            email TEXT NOT NULL UNIQUE,
            password TEXT NOT NULL,
            role TEXT DEFAULT 'user'
        )
    ''')
    
    conn.commit()
    conn.close()

def add_appointment(date, time, description):
    conn = sqlite3.connect('healthcare.db')
    c = conn.cursor()
    c.execute("INSERT INTO appointments (date, time, description) VALUES (?, ?, ?)", (date, time, description))
    conn.commit()
    conn.close()

def get_all_appointments():
    conn = sqlite3.connect('healthcare.db')
    c = conn.cursor()
    c.execute("SELECT * FROM appointments")
    appointments = c.fetchall()
    conn.close()
    return appointments

def add_reminder(medication, time):
    conn = sqlite3.connect('healthcare.db')
    c = conn.cursor()
    c.execute("INSERT INTO reminders (medication, time) VALUES (?, ?)", (medication, time))
    conn.commit()
    conn.close()

def get_all_reminders():
    conn = sqlite3.connect('healthcare.db')
    c = conn.cursor()
    c.execute("SELECT * FROM reminders")
    reminders = c.fetchall()
    conn.close()
    return reminders

def add_user(username, email, password, role='user'):
    conn = sqlite3.connect('healthcare.db')
    c = conn.cursor()
    c.execute("INSERT INTO users (username, email, password, role) VALUES (?, ?, ?, ?)", (username, email, password, role))
    conn.commit()
    conn.close()

def get_user_by_username(username):
    conn = sqlite3.connect('healthcare.db')
    c = conn.cursor()
    c.execute("SELECT * FROM users WHERE username = ?", (username,))
    user = c.fetchone()
    conn.close()
    return user


95 lines•2.5 KB
python
templates/login.html
Raw Download
Find: Go to:
<!--
    Project: Healthcare Assistant Bot
    Author: Molla Samser
    Author's Email: info@rskworld.com
    Author's Phone: +91 93305 39277
    Author's Website: https://rskworld.in
    Year: 2026
-->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login - Healthcare Assistant Bot</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <div class="auth-container">
        <div class="auth-header">
            <h2>Login</h2>
        </div>
        <div class="auth-form">
            <form action="/login" method="POST">
                <div class="form-group">
                    <label for="username">Username:</label>
                    <input type="text" id="username" name="username" required>
                </div>
                <div class="form-group">
                    <label for="password">Password:</label>
                    <input type="password" id="password" name="password" required>
                </div>
                <div class="form-group">
                    <button type="submit">Login</button>
                </div>
            </form>
            <p>Don't have an account? <a href="/register">Register here</a></p>
        </div>
    </div>
</body>
</html>
42 lines•1.3 KB
markup
🚀 Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work ❤️

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer