Database project
MVcH
Mountain View coMMunity Hospital
• We complete the database by applying the
system development cycle.
Now let’s view the E-R model
• And the Context Diagram
By Upgrading the E-R model We get the
following
Business Rules
• Patient may be assigned to one Bed.
• One or more Patient has been Diagnosed in one or more Diagnosis.
• Care center must cure one or more Patients.
• Employee is assigned to work in one or more Care center.
• Care center must assign on Employee.
• One or more Patient use one or more Items.
• One or more Patients may be admitted by one Physician.
• One or more Patient must refer to one Physician.
• One or more Physician must ask for Order for Treatment to one or more
Patient.
• One or more Physician must work
in one or more Diagnosis.
• Number of physicians in Hospital.
• if we know the number of physicians we can indicate the
number of patients who can be diagnosed in the same time
and afford more physicians in urgent conditions.
• Number of care center Rooms and Beds in every Room.
• if we know the number of Rooms and beds we can indicate
the number of patients that the care center can receive.
• The type of items if it medical or not.
• If it medical its allowed to one patient but if it isn’t medical
many patients can use it.
Business Rules
• Facility can contain one or more work units
• Work unit is a part of one facility
• A care center may contain one or more beds or no beds
• A bed is contained in only one care center
• RN directs the work of one or more of LPNs
• The LPNs work is directed by RNs
• A care center has one or more nurses
• Many nurses are assigned to only one care center
• Some nurses are floaters and not assigned to a specific care center
• Each care center has one “RN” assigned as nurse-in-charge
• Each technician is assigned to work in one or more diagnostic unit
• A diagnostic unit has one or more technician
Business Rules
• A person can be patient , physician ,employee or volunteer
• A person may be one or more of these
• A physician admit one or more patients or no patients
• Each patient has only one physician
• A patient must be resident patient or out patient
• A visit is only for out patient
• Each out patient is scheduled for zero or more visits
• An employee must be only nurse , technician or staff
• A nurse may be “RN” registered nurse or “LPN”
Now with the EER model
By merging Chapter II and III
• Relation model
Now let’s Get to the Fun Part
Query
• We Created several tables
• Person
• Volunteer
• Volunteer skills
• Physician
• Patient
• Room
• Bed
• Resident patient
• Visit
• Employee
• Facility
• Work unit
• Technician , technician skills
• Staff
• Nurse
• Care center
• Treatment
• Order
• Schedule
• Etc….
Screenshots;-

hospital database

  • 1.
  • 2.
    • We completethe database by applying the system development cycle.
  • 3.
    Now let’s viewthe E-R model
  • 5.
    • And theContext Diagram
  • 7.
    By Upgrading theE-R model We get the following
  • 9.
    Business Rules • Patientmay be assigned to one Bed. • One or more Patient has been Diagnosed in one or more Diagnosis. • Care center must cure one or more Patients. • Employee is assigned to work in one or more Care center. • Care center must assign on Employee. • One or more Patient use one or more Items. • One or more Patients may be admitted by one Physician. • One or more Patient must refer to one Physician. • One or more Physician must ask for Order for Treatment to one or more Patient. • One or more Physician must work in one or more Diagnosis.
  • 10.
    • Number ofphysicians in Hospital. • if we know the number of physicians we can indicate the number of patients who can be diagnosed in the same time and afford more physicians in urgent conditions. • Number of care center Rooms and Beds in every Room. • if we know the number of Rooms and beds we can indicate the number of patients that the care center can receive. • The type of items if it medical or not. • If it medical its allowed to one patient but if it isn’t medical many patients can use it.
  • 11.
    Business Rules • Facilitycan contain one or more work units • Work unit is a part of one facility • A care center may contain one or more beds or no beds • A bed is contained in only one care center • RN directs the work of one or more of LPNs • The LPNs work is directed by RNs • A care center has one or more nurses • Many nurses are assigned to only one care center • Some nurses are floaters and not assigned to a specific care center • Each care center has one “RN” assigned as nurse-in-charge • Each technician is assigned to work in one or more diagnostic unit • A diagnostic unit has one or more technician
  • 12.
    Business Rules • Aperson can be patient , physician ,employee or volunteer • A person may be one or more of these • A physician admit one or more patients or no patients • Each patient has only one physician • A patient must be resident patient or out patient • A visit is only for out patient • Each out patient is scheduled for zero or more visits • An employee must be only nurse , technician or staff • A nurse may be “RN” registered nurse or “LPN”
  • 13.
    Now with theEER model
  • 15.
  • 17.
  • 19.
    Now let’s Getto the Fun Part
  • 20.
    Query • We Createdseveral tables • Person • Volunteer • Volunteer skills • Physician • Patient • Room • Bed • Resident patient • Visit • Employee • Facility • Work unit • Technician , technician skills • Staff • Nurse • Care center • Treatment • Order • Schedule • Etc….
  • 21.