Skip to content

Zaederx/PatientHealthRewrite

Repository files navigation

Patient's Health WebApp

Based off of something I started for a university project in my final year that was not fully completed.

It's an app to allow patient's to view prescriptions and book request appointments online as well as allow admin and doctors to manage patient information and appointments.

What's different in the Render.com Build Branch

See render-build branch It is configured slightly differently to be compatible with render.com's hosting service. For example SSL & TLS are not used (commented out of application.properties).

Also h2 is not file based in this version of the project, it is memory based (which is better anyway for this kind of personal project).

Besides this h2 console is also configure for use from any address in this version (allows for remote use, not just from localhost).

The port is also set to 10000 (10,000) instead of 8090, to match render.com's default configurations.

See site at link at render.com (used to host it on heroku when it was free.) Note its on free tier so it may take a while for render to spin up a build (5 to 8 mins on average), but it does work/get there eventually.

Also be sure to see:

YOUTUBE WALKTHROUGH - few things have been fixed since then

Tables of Contents

Background

My project was to create a system that would allow patients with chronic illness to book appointments online and view prescriptions.

Images

Technologies

  • Java

  • Gradle

  • Spring Framework

  • Mockito

  • Hibernate

  • H2 Database (The original project used MYSQL Server)

  • Thymeleaf Templating Engine

  • Javascript

  • TypeScript

  • jQuery

  • HTML

  • CSS

  • SASS

  • Bootstrap

    Explanation of Each Technology's Role

    Java

    Is used to write/create the server side of the application. This includes main data structures for manipulating database information as POJO objects on ther server side.

    Gradle

    A build tool technology (i.e. like Maven) used to provide easily portable/shareable dependency management.

    Spring Framework

    Spring is a framework for developing Java Applications. In particular I used the Spring MVC, Spring Security by way of Spring Boot in order to build the backend in a secure MVC type architecture. Spring Framework also provides a good means of creating and working with REST in order to create APIs for any AJAX related calls. Spring's Web depndency also provides and embedded Apache Tomcat Server for running the project.

    Mockito

    A testing framework which I used for mock testing the rest and view controller methods (i.e. backend web API).

    Hibernate

    Hibernate is the implementation of JPA (Java Persistence API) that is being used to model the database and carryout SQL queries directly through POJO's instead of through MySQL statements.

    H2 Database

    The database used to persist application information. Using H2 for portability (can be embedded in the application) and because it's free to use.

    Thymleaf Templating Engine

    An alternative to using JSP pages, Thymeleaf allows you to create regular HTML pages that can be rendered by the browser, but with some additional syntax that allows Thymleaf to insert java objects and values from the server side into the HTML DOM elements. This is great for design without runnings the entire server instance.

    JavaScript

    It's the main language used on the client side for crreating dynamic and interactive content.

    TypeScript

    The javascript is actually written in typescript and compiled to javascript by Node.js.

    jQuery

    A javascript library good for working with AJAX among many other useful things see website.

    HTML

    The mark up langauge of the web.

    CSS

    The styling language of the web.

    SASS

    The CSS of the project is compiled from SASS, which adds addtional language features like variables for example.

    Bootstrap

    HTML,CSS and Javascript library for creating dynamic web contentsee website.

Requirements to run the project

You will need to have java 11 or higher installed and on your classpath in order to run the project.

Optionally you can use a local installation of gradle to build and run this, but there is a gradle wrapper (gradlew) which can be used instead.

Setup

Now

Once downloaded no further setup is required. (though you should wait for a moment after running before interacting with the application - to make sure server has run all it's processes.)

Originally

Originalled, in order to run the project, you needed to configure it (in the application.properties) to work with a MySQL database instance, which could be either a local instance or remote instance using ssh tunnelling.

In my case it was configured to run with a University MySQL server instance, sometimes a local MySQL database instance, and later on a raspberry pi instance of MariaDB.

Running the Project

From the terminal, cd the project directory. Once inside the directory:

On Mac and Linux

./gradlew bootRun

On Windows

./gradlew.bat bootRun

Once the boot process is complete, you can then view the website from https://localhost:8090/ (if you are using default configurations).

You can login to the application using these credentials:

usertype username password
ADMIN a1 password
ADMIN a2 password
ADMIN a3 password
DOCTOR d1 password
DOCTOR d2 password
DOCTOR d3 password
PATIENT p1 password
PATIENT p2 password
PATIENT p3 password
PATIENT p4 password
PATIENT p5 password
PATIENT p6 password
PATIENT p7 password
PATIENT p8 password
PATIENT p9 password
PATIENT p10 password

To access the H2 console to view the database go to https://localhost:8090/h2-console/ and enter:

Saved Settings: Generic H2 (Embedded)

Settings Name: Generic H2 (Embedded)

Driver Class: org.h2.Driver

JDBC URL: jdbc:h2:mem:testdb

User Name: admin

Password: admin

Project Shortcomings

There could be a lot more testing. I've done some to demonstrate some skill in testing, but with it being just myself working on the project and it being just for portfolio purposes, I've not done a lot of it for the sake of time, but enough to demonstrate the principle.

Modifications

I would like to extend it with a messaging system in the future. I would also like to add a some way for patients to set up orders for prescriptions but I'd need to give some thought to how it might be implemented in a way that really enhaces the project, rather than just being sent to a dummy Pharmacy API, (as prescriptions are handled by the pharmacy, not the GP, which is was this Patient Health App is desgined for - Surgery patient,doctor and admin use).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors