Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Project One Report (Part 2)

Date: May, 26, 2020

Authors: David Sullivan, Timothy Hinea, Brandon Lee, Justin Dinkelbach

Introduction

The goal for this project is to code a web application using Java and Spring Boot.

For this application we developed a relational database design for a growing drug store

chain that we are going to use for our application design. First, we mapped the ER

design to a relational database schema so we can code the statements in an SQL file.

Also, this diagram is our expression for our conceptual model which entailed the

mapping cardinalities. There are ten interconnected tables in this project including:

doctor, drug, patient, patient_doctor, pharma_company, pharmaceutical_contracts,

pharmacy, pharmacy_dug, prescription, and supervisor. Each table has their own

unique information with different data types. The tables allow for many unique

interactions between the web server and its users such as filling prescriptions,

requesting refills, and displaying informational reports. In order to create our application

we had to design and code a Java Spring Controller and HTML files and templates for

each required page.

Our major finding is that the relational database systems usually don’t allow you

to implement a direct many-to-many relationship between two tables. To avoid this

problem, we can break the many-to-many relationship into two one-to-many

relationships by using a join table. Also, we discovered the importance of carefully

planning out your database before implementing it. By normalizing our relational
schema, we were able to minimize the amount of redundancy in our relational database

design. Overall, our team faced several challenges when working with Spring Boot

because it was a new technology for all team members. More specifically, we

encountered issues implementing our postmapping methods for the html pages in our

application. However, we successfully implemented the methods by seeking out

additional resources and tutorials on the internet. Fortunately, we overcame the

obstacles we faced and created a result that our team is proud of.

Design Flaws

One design issue in the relationship between the doctor table and the patient

table is a patient can not have multiple doctors. This is also a part of our conceptual

model that did not make it into the database. One solution we thought of was to create

an intermediate table that will keep track of this relationship. The way the database is

set up now a patient can receive a prescription from any doctor and this can be used as

a work around to the issue. By creating more tables we were able to normalize our

relational design and reduce redundancy.


Revised ER Diagram
Test Run Figures

I) Prescription Input Form (#1): This form allows a doctor to write a

prescription for a patient. The input values are the doctor’s SSN, patient

SSN, the drug name, the quantity, and the number of refills allowed.

Prescription Input Form (#2): This form shows that the data for the

prescription has been successfully added to the database.


II) Display & Refill Prescriptions (#1): This form displays and refills a

prescription. The input is the patient’s SSN and the prescription number.

Display & Refill Prescriptions (#2): This figure shows that the refill

request has been sent to the pharmacy.


III) Fill Request (#1): This page allows the user to display prescriptions

for themselves and request a refill.

Fill Request (#2): After submitting, a page displays with the total cost

and asks the user if they want to continue with the refill.
Fill Request #3): This figure shows that the prescription order has been

successfully sent to the pharmacy.

IV) Drug Report Request (#1): This page allows the user to request a

report of the quantity of drugs used in the last month. The input is a date

range and it returns the name of the drug and the quantity used.
Drug Report Request (#2): This page displays a report detailing drugs

used in the time period. The page outputs the drug name and the quantity

of the drug used.

V) FDA Request Report (#1): This page allows the user to retrieve a

report of the quantity of drugs that each doctor has prescribed in a given

time period.
FDA Request Report (#2): This figure shows the report of the quantity of

drugs that each doctor has prescribed in a given time period.

You might also like