Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 41

WOLKITE UNIVERSITY

COLLAGE OF COMPUTING AND INFORMATICS


DEPARTMENT OF SOFTWARE ENGINERRING
COURSE: SOFTWARE ENGINEERING TOOLS AND
PRACTICE
PROJECT TITTLE: WOLKITE UNIVERSITY MEDICAL
CENTRE MANAGEMENT SYSTEM

GROUP MEMBERS ID
1. Semere Kidanu CIR/268/09
2. Solomon Kassahun CIR/281/09
3. Seid Hansar CIR/265/09

Wolkite University, Wolkite, Ethiopia

30/12/2019
Contents
CHAPTER ONE.......................................................................................................................................3
1.1 Requirement Analysis......................................................................................................................3
1.2Functional requirements...................................................................................................................3
1.3 System model..................................................................................................................................4
1.3.1Use case diagram......................................................................................................................4
1.4Description for each use cases..........................................................................................................6
1.4.1Use case Description of Login use case.................................................................................6
1.4.2Use case Description of Register patient use case.................................................................8
1.4.3Use case Description of View patient Record use case.........................................................8
1.4.4Use case Description of Search patient Record use case.......................................................9
1.4.5Use case Description of Logout use case.............................................................................11
CHAPTER TWO................................................................................................................................12
2. High level design............................................................................................................................12
2.1. Sequence Diagram...................................................................................................................12
CHAPTER THREE.............................................................................................................................16
3. Low level design..............................................................................................................................16
3.1. Class Diagram..............................................................................................................................16
CHAPTER FOUR...............................................................................................................................18
4. IMPLEMENTATION.....................................................................................................................18
4.1. Export class diagram to code: code generation...................................................................18
CHAPTER FIVE................................................................................................................................23
5. VERSION CONTROL USING GIT........................................................................................................23
5.1Creating Local Repositories.......................................................................................................23
5.2Reverting Changes.....................................................................................................................27
5.21Revert via Compare..............................................................................................................27
5.2.3 Creating Branches..................................................................................................................27
5.3Merge.........................................................................................................................................28
5.4History View..............................................................................................................................29
CHAPTER SIX...................................................................................................................................31
6. UNIT TEST WITH JUNIT.............................................................................................................31

1|Page
6.1. Project preparation...................................................................................................................31
6.2. Create a Java class....................................................................................................................32
CHAPTER SEVEN.............................................................................................................................34
7. AUTOMATING BUILD PROCESS WITH ANT..........................................................................34
7.1 Creating a project builder Ant build file....................................................................................34

2|Page
CHAPTER ONE

1.1 Requirement Analysis

CLINIC Management System is a system that can help the hospital to manage their daily
activity. This system help reduce the problems occur when using the manual system. This
system enables doctors and clinic assistant to manage patient records (students in this case),
and produce reports.

The system is developed due to the problems that exist when using the manual system. Data
duplication, Data mix with other data and problem regarding reporting is the main problem
that the user (students) is facing. Due to that, this system is developed to overcome the
problems. By using these kinds of system all the patient information will be save into
database in systematic and efficiently. This also can reduce the lost data problem because all
the information will be kept in the database.

1.2Functional requirements

Receptionist

 The system allows Receptionist to login


 The system allows Receptionist to logout
 The system allows Receptionist to Register a patient
 The system allows Receptionist to view a list registered patient
 The system allows Receptionist to manage patients record
 The system allows Receptionist to search for a specific patient
 The system allows Receptionist to save patient record as document

Doctor
 The system allows Doctor to login

3|Page
 The system allows Doctor to logout
 The system allows Doctor to view a list of registered patient
 The system allows Doctor to search for a specific patient
 The system allows Doctor upload patient diagnose summary

Pharmacist
 The system allows Doctor to login
 The system allows Doctor to logout
 The system allows pharmacist to view a list of registered patient
 The system allows pharmacist to search for a specific patient
 The system allows pharmacist save payment information

1.3 System model

1.3.1Use case diagram


How to use tools

1. open visual paradigm from desktop


2. select Diagram then click New

4|Page
3. Click on Blank Diagram

4. Select Components from left and drop

5|Page
Use case diagram

6|Page
Figure 1 use case diagram

1.4Description for each use cases


1.4.1Use case Description of Login use case

Name Login

7|Page
Identifier UC-001

Description The user enters username and password in order to access the system.

Actor Receptionist, Doctor, Pharmacist

Pre-Condition Username and password.

Post Condition User is logged in

Extends none

Includes None

Basic Course of Action

1.The user want to login to the system

2.The user logs into the system using “UC-001: Login”

3. The system will display a ‘login’ form that accepts username and password from the user.

4. The user enters the username and password on the form.

5. The user clicks the login button.

6. The system searches the username from the database and matches it with the password.

7. If correct the system opens the authorized page.

9. End use case.

Alternative Course of Action:

8. If the username and password are incorrect go to step 2.

Table 1: Documentation- Login

8|Page
1.4.2Use case Description of Register patient use case

Name Register patient

Identifier UC-002

Description The receptionist registers a patient.

Actor Receptionist

Pre-Condition A patient to be registered.

Post Condition To save the patient data.

Extends none

Includes None

Basic Course of Action

1. The Receptionist wants to register a patient.

2. The Receptionist logs into the homepage and to Register patient page. using “UC-002: Register”

3. The system will display a register form that contain the following

First name, Last name, id, Sex, Age, Department

4. The customer files all the field required

5. The system checks all the form fields have filled correctly.

6. If the form filled correctly the system display successfully register message.

Alternative Course of Action:

8. If the form is not filled correctly go back to step 3.

Table 2: Documentation- Register patient

1.4.3Use case Description of View patient Record use case

Name View patient Record

9|Page
Identifier UC-003

Description The users will see the patient record.

Actor Receptionist, Doctor, pharmacist

Pre-Condition There should be a patient registered.

Post Condition Retrieving recorded data

Extends none

Includes None

Basic Course of Action

1. The user wants to view patient information.

2. The user opens the ‘view patients’ page.

2. The user is displayed a view patient page using “UC-003: patient information”

3. The system will display a page contains the list of patients.

4. The user selects a patient and reads its profile.

5. End use case.

Table 3: Documentation-View Patient Record

1.4.4Use case Description of Search patient Record use case

Name Search patient Record

Identifier UC-004

Description The users will search the patient using his hospital id.

Actor Receptionist, Doctor, pharmacist

Pre-Condition There should be a patient registered.

Post Condition Getting specific patient data

Extends none

10 | P a g e
Includes None

Basic Course of Action

1. The user wants to search patient Record.


2. The receptionist login to the system
3. The user opens the ‘Search patients’ page.

4. The system will display a form that accepts the patient idno to search using “UC-003: Search
Patient”

4. The receptionist enters the patient’s idno on the form.

5. The receptionist clicks the search button.

6. The system checks for the patient’s information on the database.

7. If the patient’s information that the user looking for is found the system displays the customer’s
information on the result box.

9. End use case.

Alternative Course of Action:

8. If the customer’s information is not found go back to steps 3, 4, 5 and 6 of the basic course of action.

Table 4: Documentation- Search Patient Record

1.4.5Use case Description of Logout use case

Name Logout

11 | P a g e
Identifier UC-010

Description The user leaves the system.

Actor Receptionist, Doctor ,pharmacist

Pre-Condition The user should login first.

Post Condition To leave the System.

Extends None

Includes None

Basic Course of Action

1. The user wants to logout.

2. The user clicks the logout button.

3. The system will display the login form for the user.

4.End use case

Table 5: Documentation- Logout

12 | P a g e
CHAPTER TWO

2. High level design


2.1. Sequence Diagram
How to use tools

1. open visual paradigm from desktop


2. select Diagram then click New then select sequence Diagram

3. Click on Blank Diagram

13 | P a g e
4. Select and drop components from left box

14 | P a g e
The following are sequence diagram for each use case:

Figure 2: Sequence Diagram- Login

15 | P a g e
Figure 3: Sequence Diagram- Register patient

Figure 4: Sequence Diagram- Search patient

16 | P a g e
Figure 5: Sequence Diagram- View Patient Record

CHAPTER THREE

3. Low level design

3.1. Class Diagram

How to use tools

1. open visual paradigm from desktop


2. select Diagram then click New then select Class Diagram

17 | P a g e
3. Click on Blank Diagram

4. Select and drop components from left box

18 | P a g e
Class Diagram

Figure 6: class Diagram

19 | P a g e
CHAPTER FOUR

4. IMPLEMENTATION

4.1. Export class diagram to code: code generation


1. First click on file on eclipse header

2. Click new then Project

3. Write project name and click finish

4. Right click on project and select open visual paradigm

5. Drag class and build class diagram

20 | P a g e
6. To generate code from UML class diagram, click on update code on the top of eclipse

The following code generated

21 | P a g e
Perform Coding

In this section, we are going to build an executable application with the Patient class.

1. To run our project, we add main class. The following are the main class of our project

2. It would be nice to add into the patient class a method to print out its name and phone number.
Add a public method printInfo() in the patient class.

22 | P a g e
3. Call printInfo() from the Main class to display the information of created users.

Running the Application

23 | P a g e
Updating the UML Model from Java Code

1. In the Eclipse toolbar, click on the Update UML Model button.

2. Open the class diagram. The printInfo() method is presented in the Patient class.

24 | P a g e
CHAPTER FIVE

5. VERSION CONTROL USING GIT

5.1Creating Local Repositories


One major advantage of Git compared to SVN or CVS is that you can easily create local repositories,
even before you share them with other people. In this way, you can version your work locally.

1. To do that first create a project in eclipse and add java class to your project
2. Write click on project created and press teamshare project

3. Select Git as the repository type and hit next.

25 | P a g e
26 | P a g e
27 | P a g e
 Before commit

 After commit

28 | P a g e
5.2Reverting Changes
If you want to revert any changes, there are two options.

5.21Revert via Compare


Right click the file you want to revert and select Compare With => HEAD Revision. This
will open a comparison with the HEAD Revision, highlighting any changes done.

5.2.3 Creating Branches


To create a new branch in your repository, right click a shared project and navigate to Team
=> Switch to => New Branch…

29 | P a g e
The new branch should appear in the branch selection window. If you would like to check
out the newly created branch, select it and click Checkout.

5.3Merge
To merge one branch into another, you will have to checkout the branch you want to merge
with. Right click the project node and navigate to Team => Merge… . Select any branch
(other than the checked out branch) and hit Merge.

30 | P a g e
The possible results are Already-up-to-date, Fast-forward, Merged, Conflicting, and Failed.

5.4History View
To show any shared file’s history, right click it and select Team => Show in History. This
will open the History View, giving an overview of the commits and allowing you to perform
several actions (compare, creating branches/tags, reset…).

31 | P a g e
32 | P a g e
CHAPTER SIX

6. UNIT TEST WITH JUNIT

6.1. Project preparation


Create a new project called test.

Create a new source folder test.

 For this right-click on your project, select Properties and choose Java Build Path.
 Select the Source tab.
 Press the Add folder button.
 Afterwards, press the Create new Folder button. Enter mytest as folder name.

33 | P a g e
6.2. Create a Java class
1. Create a JUnit test

Right-click on your new class in the Package Explorer view and select New JUnit Test
Case.

2. Create a test with the following code


34 | P a g e
3. Run your test in Eclipse

The test is failing, because our Subtraction class is currently not working correctly. It does an
addition instead of subtraction. Fix the bug and re-run the test to get a green bar.

35 | P a g e
CHAPTER SEVEN

7. AUTOMATING BUILD PROCESS WITH ANT

7.1 Creating a project builder Ant build file


We will create a simple project with a single source file and an Ant build file that jars up the
single class file.

1. Create a Java project named Myproject.

2. Create a Java source file named myproject with a main method.

3. Put a single System.out.println() statement in the main method, and make it print a
greeting of your choice.

4. Save changes.

5. Create a file named build.xml, open the Ant editor on it, enter the following content, and
save changes.

36 | P a g e
6. In one of the navigation views, select the myproject project and choose Properties from its
context menu.

7. In the project properties dialog, select Builders, then click New....

8. In the Choose configuration type dialog, select Ant build, and click OK.

37 | P a g e
9. The External Tools dialog appears. Set the name to Makejar. In the Main tab, click the
Buildfile Browse Workspace... and set the Location to be the build.xml buildfile created
above. Then click the Base Directory Browse Workspace... and set the Base Directory to be
the myproject project.

10. In the Refresh tab, we want to be sure that when our HelloWorld.jar is created, we see it
in Eclipse. By default, no refreshing is done when a project builder finishes running, so check
Refresh resource upon completion, then select the project containing the selected resource in
the list of scoped variables. Because refreshing can be expensive, you should, in general,
refresh the smallest entity that contains all resources that will be affected by your buildfile.

38 | P a g e
11.The following out output will be displayed

39 | P a g e
40 | P a g e

You might also like