About API

API allows us to get various hospital information like mortality rates, average payments for operations, addresses, phone numbers and much more!
Use it and get data from more than 4500 hospitals in the USA!
API's author: Karol Kaczmarek

API's functions:

getByCity

Function allows to search hospitals by location.

Parameters:
city - City from which hospitals will be listed - required
state- State from which hospitals will be listed - 2 letter code e.g. TX for Texas - details in "State abbreviations" section below, optional
acc - Should the hospital have accreditation? - yes/no, optional
es - Should the hospital have emergency service? - yes/no, optional
inname - Text which must be contained in hospital's name, optional

Output:
XML document with hospitals fulfilling criterions.

Example:
www.hospitals.ocom.pl/getByCity.php?city=Dallas&state=TX&acc=yes&es=yes&inname=Hosp



getByMortality

Function allows to search hospitals by disease treatment.

Parameters:
cond - condition - Heart Attack/Heart Failure/Pneumonia, required
sort - asc - if you want to get best hospitals, desc - if you want to get worst hospitals, required
num - number of hospitals which will be returned (1-100), optional

Output:
XML document with hospitals fulfilling criterions.

Example:
www.hospitals.ocom.pl/getByMortality.php?cond=Heart Failure&sort=asc&num=5





getByName

Function allows to search hospitals by text contained in their names.

Parameters:
inname - text which must contain hospital in it's name, required
num - number of hospitals which will be returned (1-100), optional

Output:
XML document with hospitals fulfilling criterions.

Example:
www.hospitals.ocom.pl/getByName.php?inname=Hosp&num=5



getByPayment

Function allows to search hospitals by average payment for medical operations.

Parameters:
groupid - ID of the type of the operation (look "Group IDs" section)- e.g. 303 for kidney and bladder operations for cancer, required
sort - asc - if you want to get cheapest hospitals, desc - if you want to get the most expensive hospitals, required
num - number of hospitals which will be returned (1-100), optional

Output:
XML document with hospitals fulfilling criterions.

Example:
www.hospitals.ocom.pl/getByPayment.php?groupid=303&sort=asc&num=5


Group IDs:

549 Heart Bypass Surgery with Complications or Preexisting Conditions
105 Heart Valve Operations
550 Heart Bypass Surgery
536 Insertion of Heart Defibrillator with Examination of Heart through a Catheter
558 Angioplasty Procedures and Insertion of Drug Coated Stent into Heart Artery
520 Neck Fusion to Join Neck Bones
515 Insertion of Heart Defibrillator
519 Neck Fusion to Join Bones with Complications or Preexisting Conditions
471 Two or More Hip, Knee or Ankle Operations
498 Back Fusion to Join Spine Bones, not Neck
497 Back Fusion to Join Spine Bones, not Neck, with Complications or Preexisting Conditions
499 Back & Neck Operations Except Back or Neck Fusion with Complications or Preexisting Conditions
304 Kidney and Bladder Operations with Complications or Preexisting Conditions
500 Back & Neck Operations Except Back or Neck Fusion
534 Head and Neck Blood Vessel Operations
216 Sample of Bone Removed for Evaluation of Cancer, Infections or Other Bone Disorders
303 Kidney and Bladder Operations for Cancer
110 Major Heart and Blood Vessel Procedures with Complications or Preexisting Conditions
233 Other Bone, Joint & Organ Operations with Complications or Preexisting Conditions
337 Removal of Prostate Via Urethra
567 Stomach and Esophagus Operations in Adults with Complications or Preexisting Conditions with Major Gastrointestinal Condition
160 Hernia Operations in Adults
315 Other Kidney & Urinary Tract Operations
336 Removal of Prostate Via Urethra with Complications or Preexisting Conditions
568 Stomach and Esophagus Operations in Adults with Complications or Preexisting Conditions without Major Gastrointestinal Condition
223 Major Arm & Shoulder Operations with Complications or Preexisting Conditions
552 Pacemaker Implant
356 Female Reproductive System Reconstructive Operations
545 Repair of Previous Hip or Knee Replacement
310 Other Bladder Operations Via the Urethra with Complications or Preexisting Conditions
159 Hernia Operations in Adults with Complications or Preexisting Conditions
359 Uterus & Ovary Operations
149 Major Small & Large Intestine Operations
197 Gallbladder Removal Except By (non) Laparoscope with Complications or Preexisting Conditions
494 Gallbladder Removal By Laparoscope
570 Major Small and Large Intestine Operations with Complications or Preexisting Conditions without Major Gastrointestinal Condition
121 Heart Attack with Major Complications
493 Gallbladder Removal by Laparoscope with Complications or Preexisting Conditions
544 Replacement of Hip, Knee or Ankle or Reattachment of Thigh, Foot or Ankle
569 Major Small and Large Intestine Operations with Complications or Preexisting Conditions with Major Gastrointestinal Condition
143 Chest Pain
122 Heart Attack without Complications
88 Chronic Lung Disease
294 Diabetes in Adults
127 Heart Failure
89 Pneumonia and Pleurisy in Adults With Complications or Preexisting Conditions


State abbreviations

Alabama AL
Alaska AK
Arizona AZ
Arkansas AR
California CA
Colorado CO
Connecticut CT
Delaware DE
District of Columbia DC
Florida FL
Georgia GA
Hawaii HI
Idaho ID
Illinois IL
Indiana IN
Iowa IA
Kansas KS
Kentucky KY
Louisiana LA
Maine ME
Maryland MD
Massachusetts MA
Michigan MI
Minnesota MN
Mississippi MS
Missouri MO
Montana MT
Nebraska NE
Nevada NV
New Hampshire NH
New Jersey NJ
New Mexico NM
New York NY
North Carolina NC
North Dakota ND
Ohio OH
Oklahoma OK
Oregon OR
Pennsylvania PA
Rhode Island RI
South Carolina SC
South Dakota SD
Tennessee TN
Texas TX
Utah UT
Vermont VT
Virginia VA
Washington WA
West Virginia WV
Wisconsin WI
Wyoming WY