Image of initial look of interface in browser

EMS?

This is an EMS (emergency medical services) application that allows users to store patient information in a database and interact with it using the interface made for it.

The database was created using MySQL and allows users to track information regarding patients that have suffered from disasters. Some of the information that can tracked include patient names, disaster types, patient condition, age, and more.

To view the database information, an interface was created using C# ASP.NET. Users are able to apply CRUD functions and create custom queries to search for specific items.

Let's Take a Look at the Database

Image of initial look of database in MySQL

In the above image you can see the layout of the database in MySQL. Fake generated patients were used to fill up the database with information.

As you can see, the database columns include idpatient, first name, middle name, last name, age, sex, name of the state, disaster type, casualty type, and the date.

Deletion Query in MySQL

Image of database with deletion query applied

In the above image you can see the results of the database after the following deletion query is ran.

  • DELETE FROM disasterdb.patient WHERE idpatient=7;

The query wants to delete a patient with an id of 7 from the database called disasterdb. After it is ran, you can see that the 7th patient in the image has been removed, along with all of their information.

Retrieve Query in MySQL

Image of database with retrieve query applied

In the above image you can see the results of the database after the following retrieve query is ran.

  • SELECT * FROM disasterdb.patient WHERE CasualtyType="Missing" OR CasualtyType="Fatal";

The query wants to select patients with a casualty type of "missing" or "fatal" from the database called disasterdb. After it is ran, you can see that 2 rows are retrieved that fit the criteria which are patient 2 and 4, along with all of their information.

Update Query in MySQL

Image of database with update query applied

In the above image you can see the results of the database after the following update query is ran.

  • UPDATE disasterdb.patient SET CasualtyType="Deceased" WHERE idpatient=6;

The query selects the patient with an id of 6 and sets their casualty type to "deceased" from "missing" in the database called disasterdb. After it is ran, you can see that patient 6's casualty type has changed.

Now Let's Take a Look at the Interface

Image of initial look of interface in browser

In the above image you can see the layout of the interface that was created using C# ASP.NET.

This interface shows the first few patients from the database and presents the same information. There are buttons that allow the user to add, remove, or update patient information. Below, there is a input box that allows users to apply custom queries.

Add patient in the interface

Image of interface add person screen

In the above image you can see the add patient screen when a user clicks the add person button.

The user is displayed multiple labels,input boxes, and drop down menus, which allow them to enter all of the information for a patient.

Image of interface with the new patient addition

After the user clicks the submit button, they are sent back to the previous screen which shows the new addition of patient 8.

Custom Query to Retrieve Information in the Interface

Image of interface with custom retrieve query applied

In the above image you can see the interface change after a custom query is submitted (the same query shown in the database section).

Conclusion

The main challenge encountered was trying to use multiple webpages, which increased the complexity significantly. Trying to pass information and queries between separate pages introduced several bugs. To overcome this challenge, I switched to having everything on one page with the sections divided into separate forms that could be hidden or made visible with a button click. Another challenge is database security, having the ability to enter SQL statements directly introduces several attack vectors, but considering the scope and requirements of the project, these vulnerabilities weren’t addressed.

Thanks for reading!