In this project, I developed a REST API designed to manage patient data, with a primary focus on implementing the essential CRUD (Create, Read, Update, Delete) operations. This API ensures secure and efficient handling of sensitive patient information while adhering to RESTful principles. The project was designed to demonstrate my backend development skills and to be an integral part of my GitHub portfolio.
Develop a REST API to manage patient records securely. Demonstrate the implementation of CRUD operations within a RESTful framework. Showcase the use of modern development tools for efficient API testing and deployment.
- Azure Virtual Machine: To isolate the operation from my physical system
- Node.js: A JavaScript runtime for server-side development.
- Express.js: A web framework for Node.js, simplifying routing and middleware management.
- body-parser: Middleware for parsing JSON request bodies.
- Visual Studio Code: An integrated development environment (IDE) used for coding and debugging, run with administrator privileges to handle necessary system operations.
- Postman: A platform for API testing, used to validate and verify the functionality of the REST API.
VS Code to Node.js/Express: VS Code is where I write and debug my Node.js and Express.js code.
Node.js/Express to Postman: Node.js runs the server I built with Express.js, and Postman is used to send requests to this server to test the API’s functionality.
- Develop the API in VS Code using Node.js and Express.js.
- Run the API on Node.js, using Express.js to manage routing and middleware.
- Test the API with Postman to ensure it works as expected.
-
Development Environment The project was developed using Visual Studio Code, running as an administrator to ensure full access to system resources.
This setup allowed for efficient coding, debugging, and testing within a controlled environment.

-
Database Setup Patient data and medical records were stored in simple JavaScript objects, simulating a basic database for the purpose of this project.
Patients Object: Stores patient information such as SSN, first name, last name, and phone number.
Records Object: Stores the patient's medical status. -
CRUD Operations
Create (POST): Adds a new patient to the database.
Endpoint: /
Headers Required: SSN, FirstName, LastName, Phone
Action: Adds the patient data to the patients object.
Read (GET): Retrieves a patient's medical record.
Endpoint: /records
Headers Required: SSN, FirstName, LastName
Body Parameter: reasonforvisit set to "medicalrecords"
Action: Validates patient details and returns the corresponding record from the records object.
Update (PUT): Updates a patient's phone number.
Endpoint: /
Headers Required: SSN, FirstName, LastName
Body Parameter: Phone
Action: Updates the patient’s phone number if the SSN, first name, and last name match.
Delete (DELETE): Removes a patient’s data from the database.
Endpoint: /
Headers Required: SSN, FirstName, LastName
Action: Deletes both the patient’s personal information and medical records from the patients and records objects.
- API Testing with Postman: Postman was utilized to test the API's functionality, ensuring that each CRUD operation behaved as expected. Tests included creating new patients, retrieving medical records, updating phone numbers, and deleting patient data. Postman allowed for easy manipulation of request headers and body content, providing a comprehensive testing environment.
- Security Measures SSN Validation: Ensures that the SSN corresponds to the correct patient data before any operation is performed. Error Handling: Implemented robust error handling with appropriate HTTP status codes, ensuring the API's reliability and security.
This project deepened my understanding of RESTful API design and the practical application of CRUD operations. The use of Visual Studio Code and Postman provided a streamlined workflow for development and testing, demonstrating the importance of a solid development environment.
Scalability: The current in-memory database can be scaled to a more robust system like MongoDB or SQL without significant changes to the API logic. Security: Emphasized the importance of data validation and secure handling of sensitive information, particularly in healthcare-related applications.
This REST API project successfully implements CRUD operations, showcasing my ability to design and develop secure and efficient backend services. Utilizing Visual Studio Code for development and Postman for testing ensured a professional and effective workflow. The project is a key addition to my GitHub portfolio, highlighting my skills in backend development and RESTful API design. Future enhancements could include integrating a more advanced database and adding authentication for greater security and functionality.





