Madhumathi Prakash
Disha Amin
December 6, 2014


Hospital Records is a web application which has a listing of patients and doctors as well as hospitals. It allows patients to view doctors and hospital bill information. It also allows them to search up doctors or search based on diagnostic. The project uses both mySQL, which is connected to Racket, and HTML, which is also connected to Racket.


Concepts Demonstrated

  • Structures are used to insert data from Racket to mySQL
  • Lambda is used to select and view items in mySQL to check how they will show up on the website.
  • Lists are used in Racket to verify if the inserted data is same as the one that shows up on table.

External Technology and Libraries

Libraries used for Database:

  • Database library -allows connection with database-mySQL

Libraries used for Webpage:

  • Web Insta -allows html to be used with Racket
  • RackUnit Library -Allows to verify inserted and selected data to be the same or different.

External technology used for Database:

  • mySQL- for storage of tables for hospital records
  • XAMPP- used to run mySQL as well as connect the HTML and database part together.
  • HTML- used to create webpage
  • PHP- used to create forms for the webpage

Favorite Lines of Code

  • Madhumathi Prakash:
#lang racket
(require db)
(require rackunit)
(mysql-connect #:server "localhost"
                 #:port 3306
                 #:database "opldata"
                 #:user "opl_data")

(define c
  (mysql-connect #:server "localhost"
                 #:port 3306
                 #:database "opldata"
                 #:user "opl_data"))

The mysql-connect part is what says Racket to connect with mySQL and not another database. These have to be my favorite lines of code because it is the main part to connect and allow Racket to really speak to mySQL. There is so much more to the code than what can be seen. I had to really look into the backend of mySQL and what each part means and how it will connect to Racket. Also found out how each database has a different way to connect to Racket and I really got to play around with different kinds of connections.

  • Disha Amin
#lang web-server/insta

; start: request -> response
(define (start request)
  (phase-1 request))

; phase-1: request -> response
(define (phase-1 request)
  (local [(define (response-generator embed/url)
             `(html (head (title "Hospital Records")
                          (link ((rel "stylesheet")
                                 (href "/style.css")
                                 (type "text/css"))))  

This is my favorite line of code because I have figured out how to run embedded html code in racket, using web insta library. I was able to do a page with html tags such as headers and paragraphs. Also, I used the database records to generate a webpage.

Technology Used Block Diagram

Additional Remarks

Disha Amin: I enjoyed this project. It helped me to learn how to do a complete project from beginning to end. I feel more comfortable researching projects to work on outside of school now because I am able to figure out how to find libraries to achieve an objective, and how to get it to work. It was a learning process.