Hospital Search Example 2

Searching by hospital name

User input is in bold.

$ python3 search-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. Quit
Choice: 2

Enter hospital name (or prefix of name): Testing

Sorry, no matches were found.

1. Search by city and state
2. Search by hospital name
3. Quit
Choice: 2

Enter hospital name (or prefix of name): Mary

            HOSPITAL NAME         CITY ST RATING HEART($) PNEUM($) HIPKN($)
------------------------- ------------ -- ------ -------- -------- --------
  Mary Lanning Healthcare     Hastings NE      3    25650    17246    22855
      Mary Rutan Hospital Bellefontain OH      3        0    18807    24353
Mary Washington Hospital  Fredericksbu VA      3    24713    16595    20356
       Marymount Hospital Garfield Hei OH      5    25524    18873    21404
Mary Imogene Bassett Hosp  Cooperstown NY      1    23597    16521    21123
 Mary Immaculate Hospital Newport News VA      4    23114    18266    18636
     Mary Hurley Hospital     Coalgate OK      2        0    13912        0
Mary Hitchcock Memorial H      Lebanon NH      3    23350    19570    20043
Mary Greeley Medical Cent         Ames IA      4    22543    16406    20960
Mary Bridge Children's Ho       Tacoma WA     -1        0        0        0
Mary Breckinridge Arh Hos        Hyden KY     -1        0    15704        0
Mary Black Health System   Spartanburg SC      3    23556    17919    25448
Mary Black Health System       Gaffney SC      2        0    17874        0

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

1. Search by city and state
2. Search by hospital name
3. Quit
Choice: 2

Enter hospital name (or prefix of name): Mayo

            HOSPITAL NAME         CITY ST RATING HEART($) PNEUM($) HIPKN($)
------------------------- ------------ -- ------ -------- -------- --------
Mayo Clinic Health System   Albert Lea MN      5    23388    17644    19730
Mayo Clinic Health System     Fairmont MN      3        0    16577    21649
Mayo Clinic Health System    Lake City MN     -1        0        0        0
Mayo Clinic Health System      Mankato MN      4    24133    18299    22855
Mayo Clinic Health System     Red Wing MN      5        0    17811    19860
Mayo Clinic Health System     St James MN     -1        0        0        0
Mayo Clinic Health System   Eau Claire WI      5    24065    18648    20210
Mayo Clinic Health System Cannon Falls MN     -1        0        0        0
Mayo Clinic Health System      Bloomer WI      4        0    21768        0
Mayo Clinic Health System   New Prague MN      4        0    16308        0
Mayo Clinic Health System       Barron WI      4        0    18092        0
Mayo Clinic Health System        Osseo WI     -1        0    20194        0
Mayo Clinic Health System    Menomonie WI      4        0    14699    18850
Mayo Clinic Health System  Springfield MN     -1        0    15959        0
Mayo Clinic Health System       Waseca MN     -1        0        0        0
Mayo Clinic Hlth System      La Crosse WI      5    23738    16246    21527
Mayo Clinic Hlth Systm Fr       Sparta WI      3        0    16252        0
     Mayo Clinic Hospital      Phoenix AZ      5    20975    17148    19770
Mayo Clinic Hospital Roch    Rochester MN      5    23482    17571    19163
   Mayo Regional Hospital Dover Foxcro ME      3    24512    17788    24102
              Mayo Clinic Jacksonville FL      4    21597    18166    20560

21 matches found
Average of reported ratings: 4.2 (-1 means not reported)

1. Search by city and state
2. Search by hospital name
3. Quit
Choice: 2

Enter hospital name (or prefix of name): Abb

            HOSPITAL NAME         CITY ST RATING HEART($) PNEUM($) HIPKN($)
------------------------- ------------ -- ------ -------- -------- --------
Abbeville General Hospita    Abbeville LA      4        0    16666    23508
Abbott Northwestern Hospi  Minneapolis MN      4    21776    17981    19259
Abbeville Area Medical Ce    Abbeville SC      4        0    14548    24265

3 matches found
Average of reported ratings: 4.0 (-1 means not reported)

1. Search by city and state
2. Search by hospital name
3. Quit
Choice: 2

Enter hospital name (or prefix of name): Z

            HOSPITAL NAME         CITY ST RATING HEART($) PNEUM($) HIPKN($)
------------------------- ------------ -- ------ -------- -------- --------
Zuckerberg San Francisco  San Francisc CA      1    20738    15537    24723
Zuni Comprehensive Commun         Zuni NM     -1        0    14541        0

2 matches found

1. Search by city and state
2. Search by hospital name
3. Quit
Choice: 3

Goodbye!