Skip to content

thaokvu/Clinical-Data-Capture-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clincial Data Capture System

Overview

A web-based application for managing patient information in clinical trials. This system allows users to add, view, edit, and delete patient records while ensuring a user-friendly interface and robust backend functionality. Built using Flask, SQLAlchemy, and Jinja2, the project seamlessly integrates front-end design and back-end logic for managing clinical data efficiently.

Features

  • Add Patients - Input patient details such as name, age, medical condition, and trial status
  • Edit Existing Patient Data - Modify existing patient details dynamically
  • Delete Patient - Remove patient data with a confirmation prompt to prevent accidental deletion
  • View Patient List - Display all patient records in a table format
  • Responsive Design - User-friendly interface with a clean and modern design

Technologies Used

Backend

  • Python - Core programming language for backend logic
  • Flask - Framework for routing, handling HTTP requests, and managing server-side logic
  • SQLite - Lightweight database for storing and managing patient data
  • SQLAlchemy - Object-Relational Mapping (ORM) library for interacting with SQLite database

Frontend

  • HTML - Structuring the web pages for displaying patient information and forms
  • CSS - Styling the interface to make it visually appealing and user-friendly
  • JavaScript - Adding interactivity, such as the confirmation dialog for deleting a patient
  • Jinja2 - Template engine for dynamically rendering HTML content based on backend data

Prerequisites

  • Python 3.10+
  • Flask
  • Flask-SQLAlchemy

Installation

  1. Clone the Repository
   git clone https://github.com/thaokvu/clinical-data-capture.git
   cd clinical-data-capture
  1. Install Dependencies
   pip install -r requirements.txt

   # If you don't have a requirements.txt, manually install the dependencies
   pip install flask flask-sqlalchemy
  1. Set up the Database
from main import db, app
with app.app_context():
db.create_all()

# You can manually create the database tables by ensuring the db.create_all() function is executed in the app.py file
  1. Start the Application
   python main.py
  1. Access the Application Open a web browser and go to the following URL - http://127.0.0.1:5000/

Project Structure

This project follows a simple and organized structure to make the codebase easy to understand and maintain.

Layout

image

Folder and File Description

  • static/style.css - Contains custom CSS to style the web pages and improve the user interface
  • templates/ - Holds all the HTML templates for the web application
    • add_patient.html - Displays the form for adding a new patient
    • index_html - The main page that lists all patients in the database
    • edit_patient.html - Displays the form for editing patient details
  • clinical_data.db - The SQLite database file where patient information is stored; it is auto-generated when the application is run for the first time
  • main.py - The main Flask application file that contains the app routes and logic
  • requirements.txt - Lists all the Python dependencies required to run the project
  • README.md - Project documentation that explains how to set up and use the application

Usage

  1. Add a Patient
  • Fill in the patient's name, age, medical condition, and trial status
  • Click the "Add Patient" button on the homepage to submit the form to add the patient to the database.
  1. Edit Patient Data
  • Click the "Edit" button in the patient's row on the homepage
  • Update the details in the form and save changes
  1. Delete a Patient
  • Click the "Delete" button in the patient's row on the homepage
  1. View All Patient
  • The homepage displays a list of all patients in a table format, including their details and actions

Screenshots

Homepage - List of Patients

http://127.0.0.1:5000/

  • The table should display patient details (name, age, condition, trial status) with action buttons for "Edit" and "Delete".
Clinical Data Capture System - Homepage (index html) Clinical Data Capture System - Homepage with Added Patient

Add Patient Page

http://127.0.0.1:5000/add_patient

  • Users can input details for a new patient.
Clinical Data Capture System - Add Patient (add_patient html) Clinical Data Capture System - Add Patient (John Doe)

Edit Patient Page

http://127.0.0.1:5000/edit_patient/1

  • Users can update patient information. The form is pre-filled with existing patient details for easy editing.
Clinical Data Capture System - Edit Patient (edit_patient html)

Delete Patient Confirmation Dialog

  • Confirmation dialog that appears when the "Delete" button is pressed. The dialog helps prevent accidental deletions by asking the user for confirmation before proceeding.
Clinical Data Capture System - Delete Patient Confirmation

Clinical Data Capture System Demo

Clinical.Data.Capture.System.Demo.mp4

About

A Flask-powered web application for managing clinical trial patient data. Features include adding, editing, viewing, and deleting patient information. This project focuses on user-friendly interaction and clean design, with data stored in an SQLite database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors