An overly simplified toy model of a Hospital registration system
- Name: Zeyad Hesham Mostafa
- ID: 2020/11163
A terminal interface that allows login to access the hospital's data, allowing viewing and editing of some of it.
Available operations include:
- Logging in as a staff member or a guest
- Registering a new user (Admin users only)
- Checking empty rooms (Allowed for Guests)
- Updating Patient Status
- Transferring Patients to different rooms
- Discharging Patients
- Show menu title during repeated requests such as login
- Separate different operations to avoid confusion
- Use patient ID as the main way of referencing patients
- Display necessary data when searching through arrays
- Show decision confirmation messages when necessary
- Allow change of decision for common mistakes
- Show confirmation messages for operation success
- Have basic input sanitization (not advanced but not none)
- Avoid long stretches of code (use functions for separation)
- Have code sections representing related functions
- Create generic functions for scalability
- Balance scalability and performance as required
- Use Constants and Enums to reduce "hard coded" values
- Balance code readability with line count
- Keep The main function as small as possible
- Use library functions when appropriate
- Write a basic version of a desired operation
- Write a test in main to confirm functionality
- Include helper libraries to simplify code
- Simplify some sections into sub-functions
- Redefine necessary constants outside the function
- Redefine global variables outside of the function
- Add extra functionality to the operation
- Reorder functions to fit into clean sections
- Refactor code for efficiency when possible
- Comment and refactor code for readability
- Remove the user "a" to text root funcitonality.
- With this many operations, the interface should be refactored.