0% found this document useful (0 votes)
66 views18 pages

Uml Diagrams Usecase Diagram:-: Registration

The document contains UML diagrams used in hospital management system including use case diagram, collaboration diagram, class diagram, deployment diagram, component diagram, statechart diagram, activity diagram, and sequence diagram. The use case diagram shows the different use cases like registration, reception, visiting doctor, taking medicine etc. The class diagram shows the classes like person, patient, staff, doctor, receptionist etc. The deployment diagram shows the desktop client and different servers. The sequence diagram shows the sequence of operations performed by different entities like doctor, registration, reception etc.

Uploaded by

CHINNAA R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views18 pages

Uml Diagrams Usecase Diagram:-: Registration

The document contains UML diagrams used in hospital management system including use case diagram, collaboration diagram, class diagram, deployment diagram, component diagram, statechart diagram, activity diagram, and sequence diagram. The use case diagram shows the different use cases like registration, reception, visiting doctor, taking medicine etc. The class diagram shows the classes like person, patient, staff, doctor, receptionist etc. The deployment diagram shows the desktop client and different servers. The sequence diagram shows the sequence of operations performed by different entities like doctor, registration, reception etc.

Uploaded by

CHINNAA R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

UML DIAGRAMS

Usecase diagram:-

Registration

Reception

Goto doctor

Take recept

doctor patient

pharmacist

laboratorist

Discharge summary

Collaboration diagram:-

1:Takes Appointment
10:Takes Appointment from doctor

P1 : Patient R1 : Receptionist

4:confirms appointment
9:Ask for payment

7:Take medicins

3:Doctor available
5:Consult doctor

8:paitent ok

2:takes Appointment from doctor

D1 : Doctor N1 : Nurse

6:Assist doctor
Class diagram:-

Person

+name_string
Hospital
+age_number
+date of birth_number +name_string
+address_string +* +1
+address_string
+phone num_number +phon_number
+gender_string
+available time()
+date of join() +states()
+date of discharge()
+1

+*
Patient

+gender_string Staff
+prescription_string
-allergies_string +joined: date
+qulification_string
+in_time() +certification_string
+out_time() +languages_string

+work dutes()
+hoil days()

Administrative staff Technical staff


Operations staff
+name of emp_string +name_string
+names_string #details_string
+deprt_string +location_string
-time period_number
+join time() +join time()
+open_list()
+close_list()

Doctor Receptionist Technician Laboratorist


Nurse
+name_string +patient_details +name_string +name_string
+addresss_string +name_string +test_details
+address_string +problem_string +address_string
+phone_number +age_string +counter_number +time_number
+speciality_string +phone_number
+in_time() +opr_name() +room-num()
+joined_date() +join_date() +opr_time()
+ot_time() +total_opr()
+dute_time()

surgen

+opr_type
+free_number
+block_string

+opr_time()
+week period()

Deployment diagram:-

desktop Client
Printer

Hospital Local Server

Database Server
Component diagram:-

Statechart Diagram:

Enter Hospital

Takes Appointment

Undergo Diagnosis

not cured
Takes Treatment

undergo labtests and buy medicines

gets cured
Activity diagram:-
Sequence diagram:-

Doctor Registration Reception Patient Laboratory Pharmacy ischarge summary

1 : login()

2 : view appointment()

3 : registration()

4 : send request()

5 : done any surgeries()

6 : go to laboratory()

7 : take medicins()

8 : paitent ok()

9 : send discharge summmary()

10 : discharge paitent()
OUTPUT

HOME PAGE:

Form1- Coding:-

using System.Windows.Forms;
using System.Data.SqlClient;

namespace hospital
{
publicpartialclassForm1 : Form
{
public Form1()
{
InitializeComponent();
}

privatevoid button1_Click(object sender, EventArgs e)


{
if (textBox1.Text == "admin"&& textBox2.Text == "admin")
{
Form2 frm2 = newForm2();
frm2.Show();
}
else
{
MessageBox.Show("invalid username or password");
}
}

}
}
PATIENT& EMPLOYEE PAGE:

Form2-Coding:-

using System.Windows.Forms;
using System.Data.SqlClient;

namespace hospital
{
publicpartialclassForm2 : Form
{
public Form2()
{
InitializeComponent();
}

privatevoid Form2_Load(object sender, EventArgs e)


{

privatevoid button1_Click(object sender, EventArgs e)


{
Form3 frm3 = newForm3();
frm3.Show();
}

privatevoid button4_Click(object sender, EventArgs e)


{
Form4 frm4 = newForm4();
frm4.Show();
}

privatevoid button2_Click(object sender, EventArgs e)


{
Form5 frm5 = newForm5();
frm5.Show();
}

privatevoid button5_Click(object sender, EventArgs e)


{
Form6 frm6 = newForm6();
frm6.Show();
}

privatevoid button3_Click(object sender, EventArgs e)


{
Form7 frm7 = newForm7();
frm7.Show();
}

privatevoid button6_Click(object sender, EventArgs e)


{
Form8 frm8 = newForm8();
frm8.Show();
}
}}

PATIENT REGISTRATION :

Form3-Coding:-

using System.Windows.Forms;
using System.Data.SqlClient;

namespace hospital
{
publicpartialclassForm3 : Form
{
public Form3()
{
InitializeComponent();
}

SqlConnection con = newSqlConnection(@"Data


Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\welcome\Documents\Raj.mdf;Integra
ted Security=True;Connect Timeout=30;User Instance=True");
SqlCommand cmd;
privatevoid button1_Click(object sender, EventArgs e)
{
cmd=newSqlCommand("insert into patientregister
values('"+textBox1.Text+"','"+textBox2.Text+"','"+textBox3.Text+"','"+comboBox1.Selected
Item.ToString()+"','"+textBox4.Text+"','"+textBox5.Text+"','"+textBox6.Text+"','"+textBox7
.Text+"')",con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("INSERTED");

privatevoid button2_Click(object sender, EventArgs e)


{
cmd = newSqlCommand("update patientregister set ADDRESS='" + textBox6.Text +
"',MOBILENO='" + textBox7.Text + "' where PATIENTID='" + textBox1.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("UPDATED");

privatevoid button3_Click(object sender, EventArgs e)


{
cmd = newSqlCommand("delete patientregister where PATIENTID='" +
textBox1.Text + "'", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("DELETED");
}

}
}
EMPLOYEE REGISTRATION:

Form4-Coding:-

using System.Windows.Forms;
using System.Data.SqlClient;

namespace hospital
{
publicpartialclassForm4 : Form
{
public Form4()
{
InitializeComponent();
}

SqlConnection con = newSqlConnection(@"Data


Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\welcome\Documents\Raj.mdf;Integra
ted Security=True;Connect Timeout=30;User Instance=True");
SqlCommand cmd;
privatevoid button1_Click(object sender, EventArgs e)
{
cmd = newSqlCommand("insert into employeedetail values('" +textBox1.Text +
"','"+textBox2.Text+ "','"+ comboBox1.SelectedItem.ToString()+
"','"+comboBox2.SelectedItem.ToString()+"','"+textBox3.Text+"','"+textBox4.Text+"','"+text
Box5.Text+"','"+textBox6.Text+"')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("Added");
}

privatevoid button2_Click(object sender, EventArgs e)


{
cmd = newSqlCommand("update employeedetail set SALARY='" + textBox6.Text +
"',MOBILENO='" + textBox5.Text + "' where EMPID='" + textBox1.Text + "'", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("updated");

privatevoid button3_Click(object sender, EventArgs e)


{
cmd = newSqlCommand("delete from employeedetail where EMPID='" +
textBox1.Text + "'", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("Deleted");
}
}
}

PATIENT DETAILS:

Form5-Coding:-

using System.Windows.Forms;
using System.Data.SqlClient;

namespace hospital
{
publicpartialclassForm5 : Form
{
public Form5()
{
InitializeComponent();
}

privatevoid Form5_Load(object sender, EventArgs e)


{

}
SqlConnection con = newSqlConnection(@"Data
Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\welcome\Documents\Raj.mdf;Integra
ted Security=True;Connect Timeout=30;User Instance=True");
SqlCommand cmd;
privatevoid button1_Click(object sender, EventArgs e)
{
cmd = newSqlCommand("select *from patientregister where PATIENTID='" +
textBox1.Text + "'", con);
con.Open();
SqlDataAdapter da = newSqlDataAdapter(cmd);
DataSet ds = newDataSet();
da.Fill(ds);
dataGridView1.DataSource = ds.Tables[0].DefaultView;
con.Close();
}
}
}

EMPLOYEE DETAILS:

Form6-Coding:-

using System.Windows.Forms;
using System.Data.SqlClient;
namespace hospital
{
publicpartialclassForm6 : Form
{
public Form6()
{
InitializeComponent();
}
SqlConnection con = newSqlConnection(@"Data
Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\welcome\Documents\Raj.mdf;Integra
ted Security=True;Connect Timeout=30;User Instance=True");
SqlCommand cmd;
privatevoid button1_Click(object sender, EventArgs e)
{
cmd = newSqlCommand("select *from employeedetail where EMPID='" +
textBox1.Text + "'", con);
con.Open();
SqlDataAdapter da = newSqlDataAdapter(cmd);
DataSet ds = newDataSet();
da.Fill(ds);
dataGridView1.DataSource = ds.Tables[0].DefaultView;
con.Close();
}

privatevoid Form6_Load(object sender, EventArgs e)


{

}
}
}

ACCOUNT DETAILS:

Form7-Coding:-

using System.Windows.Forms;
using System.Data.SqlClient;
namespace hospital
{
publicpartialclassForm7 : Form
{
public Form7()
{
InitializeComponent();
}
SqlConnection con = newSqlConnection(@"Data
Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\welcome\Documents\Raj.mdf;Integra
ted Security=True;Connect Timeout=30;User Instance=True");
SqlCommand cmd;
privatevoid button1_Click(object sender, EventArgs e)
{
cmd = newSqlCommand("insert into accountdetail values('" + textBox1.Text + "','" +
textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','" +
textBox6.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("inserted");
}

privatevoid button2_Click(object sender, EventArgs e)


{
cmd = newSqlCommand("update accountdetail set PATIENTNAME='" +
textBox2.Text + "',MEDICINE='" + textBox6.Text + "' where PATIENTID='" +
textBox1.Text + "'", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("updated");
}

privatevoid button3_Click(object sender, EventArgs e)


{
cmd = newSqlCommand("delete accountdetail where PATIENTID='" +
textBox1.Text + "'", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("deleted");
}

privatevoid button4_Click(object sender, EventArgs e)


{
cmd = newSqlCommand("select *from accountdetail where PATIENTID='" +
textBox1.Text + "'", con);
con.Open();
SqlDataAdapter da = newSqlDataAdapter(cmd);
DataSet ds = newDataSet();
da.Fill(ds);
dataGridView1.DataSource = ds.Tables[0].DefaultView;
con.Close();
}

privatevoid Form7_Load(object sender, EventArgs e)


{

}
}
}

PHARMACY:

Form8-Coding:-

using System.Windows.Forms;
using System.Data.SqlClient;

namespace hospital
{
publicpartialclassForm8 : Form
{
public Form8()
{
InitializeComponent();
}

SqlConnection con = newSqlConnection(@"Data


Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\welcome\Documents\Raj.mdf;Integra
ted Security=True;Connect Timeout=30;User Instance=True");
SqlCommand cmd;
privatevoid button1_Click(object sender, EventArgs e)
{
cmd = newSqlCommand("insert into pharmacy values('" + textBox1.Text + "','" +
textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("inserted");
}

privatevoid button2_Click(object sender, EventArgs e)


{
cmd=newSqlCommand("update pharmacy
MEDICINENAME='"+textBox2.Text+"',PRICE='"+textBox4.Text+"' where
MEDICINEID='"+textBox1.Text+"'",con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("updated");

privatevoid button3_Click(object sender, EventArgs e)


{
cmd = newSqlCommand("delete pharmacy where MEDICINEID='" + textBox1.Text
+ "'", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("deleted");

privatevoid button4_Click(object sender, EventArgs e)


{
cmd = newSqlCommand("select *from pharmacy where MEDICINEID='" +
textBox1.Text + "'", con);
con.Open();
SqlDataAdapter da = newSqlDataAdapter(cmd);
DataSet ds = newDataSet();
da.Fill(ds);
dataGridView1.DataSource = ds.Tables[0].DefaultView;
con.Close();
}

}
}
TABLE DETAILS:-

Account details:-

Employee details:-

Patient registration:-
Pharmacy:-

You might also like