Project One Part Two
Project One Part Two
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:
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
Our major finding is that the relational database systems usually don’t allow you
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
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
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. The input is the patient’s SSN and the prescription number.
Display & Refill Prescriptions (#2): This figure shows that the 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
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
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