Often times when a patient receives services at a hospital for less that 24 hours, they are not really admitted to the hospital as an "inpatient." Instead, they are placed in a special status know as "Observation." Even if a patient is placed in a bed overnight, the hospital cannot admit the patient to the hospital unless certain treatments are provided.
Individuals who have chest pain are very often placed in Observation if they are not really having a heart attack, since no treatment is given in these cases. The multitude of tests that these patients get (EKG, blood tests, stress tests, etc.) are not considered to be treatment, since they are not aimed at improving one's condition. On the other hand, if someone is admitted for Pneumonia and needs IV antibiotics over a few days, then the patient is typically admitted, given the need for treatment.
Medicare publishes a good summary of inpatient vs. observation. This documents technically applies only to Medicare recipients, but most other insurance companies consider inpatient vs. observation in the same manner.