Project Appendix b

Embed Size (px)

Citation preview

  • 8/17/2019 Project Appendix b

    1/11

    Project appendix b

    Appendix B------------------------------------------------------------------------------------------------------------

    The Riverbend Hospital Case

    The Riverbend Hospital of Alton, Illinois is a regional, acute care facility. The hospitalmaintains a moderate si ed information systems !I"# department that includes $% to $&

    employees. The I" department manager, 'r. (ohn Blas), directly supervises the senioremployees in the department. The department has a senior database administrator, a seniornet*or+ administrator, t*o senior operating systems administrators !one for I and one for/indo*s#, and t*o pro0ect managers. The I" staff also includes several senior

    programmer1analysts, and approximately 2% 0unior programmer1analysts.3ou *ere recently hired as a 0unior programmer1analyst based on your collegiate training in useof "45. Recently, you met *ith 's. (uanita Benite , the senior programmer1analyst in charge of the pro0ect team to *hich you are assigned. 's. Benite has assigned you responsibility fordeveloping "45 6ueries to support a portion of the firm7s database. "he has directed you tostudy the entity-relationship diagram and database schema for the portion of the database thatyou *ill access.

    Entity Relationship Diagrams and Table Definitions

    8igure B.2 depicts the entity-relationship diagram. The Riverbend Hospital database is large.'any of the hospital7s applications re6uire access to data about patients. The central entity is the9atient. 9atient data is stored in the patient table described in Table B.2 belo*. :ach patient isidentified by a patient_number value that is assigned to the patient by the hospital. Additionally,each patient is assigned an account number that is referenced by the hospital7s billing system.8igure B.2

  • 8/17/2019 Project Appendix b

    2/11

    Table B.2TABLE NAME patient;olumn ame ssn ;HAR ? "ocial security number, uni6ue value. pat>last>name @AR;HAR$ &% 5ast name. pat>first>name @AR;HAR$ &% 8irst name. pat>middle>name @AR;HAR$ &% 'iddle name. pat>street>address @AR;HAR$ &% "treet address. pat>city @AR;HAR$ &% ;ity. pat>state ;HAR $ "tate abbreviation. pat> ip ;HAR ? ip code. pat>date>of>birth number ;HAR 2% Telephone number.bed_number 'B:R #oreign "ey lin+ to the bed table.date>last>updated

  • 8/17/2019 Project Appendix b

    3/11

    storage of an unlimited number of comments for a patient. The relationship bet*een patient and patient_note is one-to-many as sho*n in 8igure B.2. Table B.$ describes the patient_note table.Table B.$TABLE NAME patient!note;olumn ame comment @AR;HAR$ %%% ote on patient treatment or conditionC physician

    commentC nurse comment.date>last>updated availability ;HAR 2 ;ode indicating if the bed is available or occupiedC Enot occupiedC 3Eis occupied.

    date>last>updated

  • 8/17/2019 Project Appendix b

    4/11

    The hospital categori es all personnel as staff members. "taff members include physicians,registered nurses, licensed practicing nurses, various medical technicians, administrative*or+ers, and other personnel. All staff members are assigned to either a medical *ard or to ahospital department. 8or example, a registered nurse may be assigned to Feneral-'edical"urgical /ard G2 *hile a physician may be assigned to the ;ardiology department. A staff

    member is assigned to one and only one *ard1department *hile a *ard1department may havemany staff members assigned to it. Thus, the relationship bet*een the ward_dept and staff tablesis one-to-many. Tables B.= and B. describe the staff and ward_dept tables.Table B.=TABLE NAME %ard!dept;olumn ame dept>name @AR;HAR$ &% /ard or department name.office>location @AR;HAR$ $& ffice location for the *ard or department.telephone>number ;HAR 2% ffice primary telephone number.

    date>last>updated location @AR;HAR$ 2% ffice location.date>hired last>updated

  • 8/17/2019 Project Appendix b

    5/11

    decomposes the many-to-many relationship into t*o one-to-many relationships named Has-Specialty and Assigned-Spec as sho*n in 8igure B.2. The staff_medspec table has a composite

    primary +ey consisting of the primary +ey from staff and the primary +ey frommedical_specialty . These tables are described in Tables B.K and B.?.Table B.K

    TABLE NAME medical!specialty;olumn ame title @AR;HAR$ &% Title of the specialty.ho*>a*arded @AR;HAR$ 2%% Ho* the specialty is a*arded, e.g., by completion

    of medical board examination.date>last>updated description @AR;HAR$ &% charge 'B:R !?,$# "tandard fee for a serviceC may be modified by

    the individual administering the service asre6uired by the medical situation.

    service>comments @AR;HAR$ $%%% ;omments regarding the service including ho* itshould be administered, contraindications, etc.

    service_cat_id ;HAR D #oreign "ey lin+ to service_cat tableC "ervicecategory identifier.

    date>last>updated

  • 8/17/2019 Project Appendix b

    6/11

    ser&ice!cat!id ;HAR D Primary 'ey( "ervice category identifier.service>cat>desc @AR;HAR$ &% "ervice category description.date>last>updated charge 'B:R !?,$# Actual charge for the service provided.treatment>comments @AR;HAR$ $%%% Additional comments regarding the treatment

    such as diagnosis information.

    date>last>updated

  • 8/17/2019 Project Appendix b

    7/11

    6uantity>stoc+ 'B:R & 4uantity stoc+edunit>measure @AR;HAR$ $% nit of measure, e.g., liters, grams, tablet,

    capsules.date>last>updated room 9RI'AR3 L:3,room>description @AR;HAR$!$,

    date>last>updated description @AR;HAR$!&%#,

    date>last>updated bed>room

  • 8/17/2019 Project Appendix b

    8/11

    R:8:R: ;:" room!room>id#, bed>type>id ;HAR!$# ; "TRAI T nn>bed>type>id T 55 ; "TRAI T f+>bed>bedtype R:8:R: ;:" bed>type!bed>type>id#, bed>availability ;HAR!2#, date>last>updated ssn ;HAR!?# ; "TRAI T nn>pat>ssn T 55, pat>last>name @AR;HAR$!&%# ; "TRAI T nn>pat>last>name T 55,

    pat>first>name @AR;HAR$!&%# ; "TRAI T nn>pat>first>name T 55, pat>middle>name @AR;HAR$!&%#,

    pat>street>address @AR;HAR$!&%#, pat>city @AR;HAR$!&%#, pat>state ;HAR!$#,

    pat> ip ;HAR!?#, pat>date>of>birth telephone>number ;HAR!2%#, bed>number 'B:R! # ; "TRAI T f+>pat>bed

    R:8:R: ;:" bed!bed>number#, date>last>updated id, note>date# #C

    R:' Table *ard>dept;R:AT: TAB5: *ard>dept !

    *ard>id ;HAR! ; "TRAI T p+>*ard>dept 9RI'AR3 L:3,*ard>dept>name @AR;HAR$!&%# ; "TRAI T nn>*ard>dept>name T 55,

    office>location @AR;HAR$!$ ; "TRAI T nn>*ard>dept>location T 55, telephone>number ;HAR!2%#, date>last>updated ssn ;HAR!?# ; "TRAI T nn>staff>ssn T 55,staff>last>name @AR;HAR$!&%# ; "TRAI T nn>staff>last>name T 55,

  • 8/17/2019 Project Appendix b

    9/11

    staff>first>name @AR;HAR$!&%# ; "TRAI T nn>staff>first>name T 55, staff>middle>name @AR;HAR$!&%#,

    *ard>dept>assigned ;HAR! ; "TRAI T f+>staff>*ard>dept R:8:R: ;:" *ard>dept!*ard>id#, office>location @AR;HAR$!&%#,

    date>hired medical>specialty 9RI'AR3 L:3,spec>title @AR;HAR$!&%# ; "TRAI T nn>medical>spec>title T 55, ho*>a*arded @AR;HAR$!2%%#, date>last>updated id, specialty>code# #C

    R:' Table service>cat;R:AT: TAB5: service>cat !

    service>cat>id ;HAR!D# ; "TRAI T p+>service>cat 9RI'AR3 L:3,service>cat>desc @AR;HAR$!&%# ; "TRAI T nn>service>cat>desc T 55,

    date>last>updated description @AR;HAR$!&%# ; "TRAI T nn>service>description T 55,

    service>charge 'B:R!?,$# ; "TRAI T c+>service>charge;H:;L !service>charge ME %#,

    service>comments @AR;HAR$!$%%%#, service>cat>id ;HAR!D# ; "TRAI T f+>service>service>cat

  • 8/17/2019 Project Appendix b

    10/11

    R:8:R: ;:" service>cat!service>cat>id#, date>last>updated date id ;HAR!=# ; "TRAI T nn>treatment>pat>id T 55, staff>id ;HAR! ; "TRAI T nn>treatment>staff>id T 55, service>id ;HAR! ; "TRAI T nn>treatment>service>id T 55, actual>charge 'B:R!?,$# ; "TRAI T c+>treatment>actual>charge

    ;H:;L !actual>charge ME %#, treatment>comments @AR;HAR$!$%%%#, date>last>updated medicine 9RI'AR3 L:3,med>name>sci @AR;HAR$!&%# ; "TRAI T nn>medicine>name>sci T 55,

    med>name>common @AR;HAR$!&%# ; "TRAI T nn>medicine>name>common T 55, normal>dosage @AR;HAR$!D%%# ; "TRAI T nn>medicine>dosage T 55, medicine>comments @AR;HAR$!&%%#, 6uantity>stoc+ 'B:R!2$# ; "TRAI T c+>medicine>6ty>stoc+

    ;H:;L !6uantity>stoc+ ME %#, unit>measure @AR;HAR$!$%#, date>last>updated prescription>medicine>code T 55, pat>id ;HAR!=# ; "TRAI T nn>prescription>pat>id T 55,

    staff>id ;HAR! ; "TRAI T nn>prescription>staff>id T 55, dosage>prescribed @AR;HAR$!&%#

    ; "TRAI T nn>prescription>dosage>presc T 55, dosage>directions @AR;HAR$!&%%#, date>last>updated

  • 8/17/2019 Project Appendix b

    11/11

    ; "TRAI T f+>prescription>staff 8 R:IF L:3 !staff>id# R:8:R: ;:" staff #C