Hospital Sort Example 2

Finding affordable options in a state

User input is in bold.

$ python3 sort-hospital.py

To help consumers make informed decisions about health care,
the Centers for Medicare & Medicaid Services collects data
about the cost and quality of care at over 4,000 Medicare
qualified hospitals.

This program allows you to explore this data.

1. Search by city and state
2. Search by hospital name
3. Rank hospitals by city and state
4. Find the ten most affordable treatment options by state
5. Quit
Choice: 4

Enter state: PA
1. Heart procedure
2. Pneumonia treatment
3. Hip/knee replacement
Choice: 1

            HOSPITAL NAME         CITY ST RATING HEART($) PNEUM($) HIPKN($)
------------------------- ------------ -- ------ -------- -------- --------
  Good Samaritan Hospital      Lebanon PA      3    20241    18053    22218
      Doylestown Hospital   Doylestown PA      5    21026    16688    18934
 Geisinger Medical Center     Danville PA      2    21182    17552    21131
Lehigh Valley Hospital -     Bethlehem PA      3    21277    16280    22617
St Luke's Hospital Bethle    Bethlehem PA      4    21343    17339    21536
Milton S Hershey Medical       Hershey PA      5    21592    18894    19789
Pinnacle Health Hospitals   Harrisburg PA      3    21774    19501    19894
  Berwick Hospital Center      Berwick PA      2    21880    17286    22515
 Main Line Hospital Paoli        Paoli PA      5    21983    18866    19418
Conemaugh Memorial Medica    Johnstown PA      1    22292    19070    20969

10 matches found
Average of reported ratings: 3.3 (-1 means not reported)

1. Search by city and state
2. Search by hospital name
3. Rank hospitals by city and state
4. Find the ten most affordable treatment options by state
5. Quit
Choice: 4

Enter state: PA
1. Heart procedure
2. Pneumonia treatment
3. Hip/knee replacement
Choice: 2

            HOSPITAL NAME         CITY ST RATING HEART($) PNEUM($) HIPKN($)
------------------------- ------------ -- ------ -------- -------- --------
       Highlands Hospital Connellsvill PA      3        0    13746        0
  Tyler Memorial Hospital  Tunkhannock PA      4        0    14556        0
Geisinger-bloomsburg Hosp   Bloomsburg PA      4        0    14648    20273
Ellwood City Medical Cent Ellwood City PA      4        0    14704    20337
Grove City Medical Center   Grove City PA      3        0    14866    20011
Geisinger Jersey Shore Ho Jersey Shore PA      4        0    14961        0
Fulton County Medical Cen Mcconnellsbu PA      4        0    15204        0
Conemaugh Nason Medical C Roaring Spri PA      4        0    15230    19769
  Troy Community Hospital         Troy PA      4        0    15324        0
St Luke's Hospital-gnaden    Lehighton PA      2    22755    15379    23748

10 matches found
Average of reported ratings: 3.6 (-1 means not reported)

1. Search by city and state
2. Search by hospital name
3. Rank hospitals by city and state
4. Find the ten most affordable treatment options by state
5. Quit
Choice: 4

Enter state: PA
1. Heart procedure
2. Pneumonia treatment
3. Hip/knee replacement
Choice: 3

            HOSPITAL NAME         CITY ST RATING HEART($) PNEUM($) HIPKN($)
------------------------- ------------ -- ------ -------- -------- --------
Rothman Orthopaedic Speci     Bensalem PA     -1        0        0    17523
Evangelical Community Hos    Lewisburg PA      4    24119    18415    18282
 Meadville Medical Center    Meadville PA      3    24763    17362    18400
Endless Mountains Health      Montrose PA      3        0    17567    18466
Thomas Jefferson Universi Philadelphia PA      1    23738    17427    18490
   St Mary Medical Center    Langhorne PA      3    23563    18491    18603
Allegheny General Hospita   Pittsburgh PA      1    25479    19793    18622
    Chambersburg Hospital Chambersburg PA      4    22917    17602    18771
    Penn Highlands Dubois       Dubois PA      3    23407    16401    18819
      Doylestown Hospital   Doylestown PA      5    21026    16688    18934

10 matches found
Average of reported ratings: 3.0 (-1 means not reported)

1. Search by city and state
2. Search by hospital name
3. Rank hospitals by city and state
4. Find the ten most affordable treatment options by state
5. Quit
Choice: 4

Enter state: PQ
1. Heart procedure
2. Pneumonia treatment
3. Hip/knee replacement
Choice: 1

Sorry, no matches were found.

1. Search by city and state
2. Search by hospital name
3. Rank hospitals by city and state
4. Find the ten most affordable treatment options by state
5. Quit
Choice: 5

Goodbye!