You are on page 1of 10

Hospital Management System Use Case Diagram Example For the Hospital Management System, a general example is shown

below. This module can be massive and many more sub modules can be added as per requirement. The Actors and their use cases are identified as: Receptionist--Interact with Visitors, Give appointments to Medical Representatives, Revert to Phone Queries, Handles Patient Registration. Doctors--Give prescription to Patient, Do Operation, Review Patients health. Nurse--Give Medicine to Patient, Coordinate with Doctors in Operation, Report to doctors, Monitors Patients health. Staff--Do Cleaning, Dispose Wastes, Maintain Beds and Rooms. Patient--Interact with Doctor, Follow Doctor Instructions, Pay Bills. Billing Section--Patient Billing, Discharge Billing, Give salaries to Nurse,Staff and Doctors, Maintain Tax Records Here for the Billing Section we have considered Patient Billing and Discharge billing as separate, as the Patient might not be admitted and is charged for only counseling. But if the patient was admitted then the discharge billing is also added to its usecase, that's why we have an <<extend>> relationship their. The use case diagram for hospital management system is shown below:-

1 Brief Description This use case describes how the Bank Customer uses the ATM to withdraw money to his/her bank account. 2 Actors 2.1 Bank Customer 2.2 Bank 3 Preconditions

There is an active network connection to the Bank. The ATM has cash available. 4 Basic Flow of Events 1. The use case begins when Bank Customer inserts their Bank Card. 2. Use Case: Validate User is performed. 3. The ATM displays the different alternatives that are available on this unit. [See Supporting Requirement SR-xxx for list of alternatives]. In this case the Bank Customer always selects "Withdraw Cash". 4. The ATM prompts for an account. See Supporting Requirement SR-yyy for account types that shall be supported. 5. The Bank Customer selects an account. 6. The ATM prompts for an amount. 7. The Bank Customer enters an amount. 8. Card ID, PIN, amount and account is sent to Bank as a transaction. The Bank Consortium replies with a go/no go reply telling if the transaction is ok. 9. Then money is dispensed. 10. The Bank Card is returned. 11. The receipt is printed. 12. The use case ends successfully. 5 Alternative Flows 5.1 Invalid User If in step 2 of the basic flow Bank Customer the use case: Validate User does not complete successfully, then 1. The use case ends with a failure condition 5.2 Wrong account If in step 8 of the basic flow the account selected by the Bank Customer is not associated with this bank card, then 1. The ATM shall display the message "Invalid Account please try again". 2. The use case resumes at step 4. 5.3 Wrong amount If in step 7 in the basic flow, the Bank Customer enters an amount that can't be 'created' with the kind of in the ATM (See Special Requirement WC-1 for valid amounts), then 1. The ATM shall display a the message indicating that the amount must be a multiple of the bills on hand, and ask the Bank Customer to reenter the amount. 2. The use case resumes at step 7. 5.4 Amount Exceeds Withdrawal Limit If in step 7 in the basic flow, the Bank Customer enters an amount that exceeds the withdrawal limit (See Special Requirement WC-2 for maximum amount), then 1. the ATM shall display a warning message, and ask the Bank Customer to reenter the amount 2. The use case resumes at step 7 5.5 Amount Exceeds Daily Withdrawal Limit If in step 8 in the basic flow, the Bank response indicates the daily withdrawal limit has been exceeded (this is determined by the Bank and depends upon the specific account), then 1. The ATM shall display a warning message, and ask the Bank Customer to reenter the amount. 2. The use case resumes at step 7. 5.6 Insufficient Cash If in step 7 in the basic flow, the Bank Customer enters an amount that exceeds the amount of cash available in the ATM, then 1. The ATM will display a warning message, and ask the Bank Customer to reenter the amount. 2. The use case resumes at step 7.

5.7 No Response from Bank If in step 8 of the basic there is no response from the Bank within 3 seconds, then 1. The ATM will re-try, up to three times. 2. If there is still no response from the Bank, the ATM shall display the message "Network unavailable try again later". 3. The ATM shall return the card. 4. The ATM shall indicate that it is "Closed". 5. The use case ends with a failure condition. 5.8 Money Not Removed If in step 9 of the basic flow the money is not removed from the machine within 15 seconds, then 1. the ATM shall issue a warning sound and display the message "Please remove cash". 2. If there is still no response from the Bank Customer within 15 seconds the ATM will re-tract the money and note the failure in the log. 3. the use case end with a failure condition. 5.9 Quit If at point prior to step 8 in the basic flow the Bank Customer selects Quit, then 1. The ATM shall print a receipt indicating the transaction was cancelled. 2. The ATM shall return the card. 3. The use case ends. 6 Key Scenarios 6.1 No Response from Bank 7 Post-conditions 7.1 Successful Completion The user has received their cash and the internal logs have been updated. 7.2 Failure Condition The logs have been updated accordingly. 8 Special Requirements [SpReq:WC-1] The ATM shall dispense cash in multiples of $20. [SpReq2:WC-2] The maximum individual withdrawal is $500. [SpReq:WC-1] The ATM shall keep a log, including date and time, of all complete and incomplete transactions with the Bank.

The system users are:-

The book shop management as the system administrators.

Book shop cashiers as the normal users. System administrators The administrator logs on to the system by inserting administrator user name and password.Administrator can do any transaction as well as editing all details inside the database such asadding, editing and deleting a new user or adding, editing and deleting items.

System users System users are the ones who at the cashier and do transactions with customers. The users haveto enter the user name and password and click on Login button. If user makes any mistake thesystem will ask for the correct username and password until he enters the correct one.When the user wants to do any transaction user has to click on the menu icon on the main menu.Then the transaction window will open. User has to enter the Book No and press enter. Then userhas to select the transaction type and the quantity. Then click on the update button. Then thesystem will automatically update the database according to the transaction type. HardwareInterfacesThe Book Shop System is having the following hardware:

Book shop main computer

Other pcsSoftware Interfaces

System will interact with the system database to record all transaction data

UseCaseID: Goal In Context: Scope: Pre-Condition: Success End Condition: Failed End Condition: Primary Actor: Trigger Event:

Make Reservation A customer wishes to make a reservation. Airline Reservation System (ARS) Actor has successfully generated a list of flights as documented in the "Search for Flights" use case. A reservation has been made. A reservation has NOT been made. Customer Selects the "Book This Flight" link from the list of flights presented.

Main Success Scenario Step 1 2 3 4 5 6 Actor Customer ARS Customer ARS Customer ARS Action Description Selects the "Book This Flight" link from the list of flights presented. Displays a screen with input fields for: a credit card number, cardholder name, and credit card expiration date. Enters a credit card number, the cardholder name and the credit card expiration date and clicks the "Submit" button. Displays the details of the reservation. Selects the "Complete Reservation" option. Displays the main options screen. The message "Reservation Successfully

Made" is also displayed.

Scenario Extensions Step 3.a 3.a.1 3.b 3.b.1 5.a 5.a.1 Actor Customer ARS Customer ARS Customer ARS Action Description Does not complete all the necessary fields. Redisplays the input fields from step 2 with the input data and a note stating that certain required data is missing or invalid. Selects the "Cancel" option. Displays the main options screen. Selects the "Cancel" option. Displays the main options screen.

Scenario Variations Step None Actor Action Description

UseCaseID: Goal In Context: Scope: Pre-Condition: Success End Condition:

Cancel Reservation A customer wishes to cancel a reservation. Airline Reservation System (ARS) A reservation has already been made. Actor has successfully navigated to the main options screen. The selected reservation has been cancelled.

Failed End Condition: The selected reservation has NOT been cancelled. Primary Actor: Trigger Event: Customer Selects the "Cancel Reservation" option.

Main Success Scenario Step 1 2 Actor Customer ARS Action Description Selects the "Cancel Reservation" option. Displays a screen with an input field for a reservation number.

3 4 5 6

Customer ARS Customer ARS

Enters a reservation number and clicks the "Submit" button. Displays the details of the reservation. Selects the "Process Cancellation" option. Displays the main options screen. The message "Reservation Successfully Cancelled" is also displayed.

Scenario Extensions Step 2.a 2.a.1 3.a 3.a.1 5.a 5.a.1 Actor Customer ARS Customer ARS Customer ARS Action Description Selects the "Cancel" option. Displays the main options screen. Selects the "Cancel" option. Displays the main options screen. Selects the "Abort" option. Displays the main options screen.

Scenario Variations Step None Actor Action Description

UseCaseID: Goal In Context: Scope: Pre-Condition:

Purchase Ticket A customer wishes to purchase the ticket for a reserved flight. Airline Reservation System (ARS) Actor has successfully made a reservation as documented in the "Make a Reservation" use case.

Success End Condition: A ticket has been purchased. Failed End Condition: Primary Actor: Trigger Event: A ticket has NOT been purchased. Customer Selects the "Purchase Ticket" link from the list of options.

Main Success Scenario Step 1 2 Actor Customer ARS Action Description Selects the "Purchase Ticket" link from the list of options. Displays a screen with an input field for a reservation number.

3 4 5 6 7 8

Customer ARS Customer ARS Customer ARS

Enters a reservation number and clicks the "Submit" button. Displays the details of the reservation. Selects the "Purchase Ticket" option. Displays a screen with input fields for: a credit card number, cardholder name, and credit card expiration date. Enters a credit card number, the cardholder name and the credit card expiration date and clicks the "Submit" button. Displays the main options screen. The message "Ticket Successfully Purchased" is also displayed.

Scenario Extensions Step 3.a 3.a.1 5.a 5.a.1 7.a 7.a.1 7.b Actor Customer ARS Customer ARS Customer ARS Customer Action Description Selects the "Cancel" option. Displays the main options screen. Selects the "Cancel" option. Displays the main options screen. Selects the "Cancel" option. Displays the main options screen. Selects the "Use Credit Card on Record" option; this is illegal and hence may have to go.

Scenario Variations Step None Actor Action Description

You might also like