A question about healthcare in Costa Rica

Before applying for residency (and being eligible for caja), or just visiting for an extended time, how would a healthcare emergency be handled and about how much would it cost?

For example, if (or my small child) fell and broke an arm and went to the emergency room, about how much would the visit cost out-of-pocket -- say to get an x-ray, set and cast? 

What is the best alternative for (cheapest) emergency-type coverage when visiting for 3-6 month periods?

Also, in such an emergency, would it be better to go to a state-run hospital or a private one?  if you were closer in the central valley where their state-run hospitals have a better reputation?

Thanks in advance for any information.

An acquaintance paid nearly $3000 when her young daughter broke her arm...and although she was covered by CAJA she still preferred to go to a private facility.
In response to the question, in an emergency 'where should you go', neither will accept you unless you have cash or a credit card, up front. In a true, life threatening emergency, some CAJA  may offer treatment, but you will be billed for it.
I would say in an true emergency, go to the closest facility, but if you call a Red Cross ambulance they will only transport you to a CAJA facility.

Once a legal resident, you can only use the CAJA facility in your immediate location where you live, except in a true life threatening emergency.

You must also be sure to have on hand, a paid, up-to-date receipt whenever you go the clinic or hospital, else you will not be provided 'free' treatment.

I should have mentioned that the young girls arm was a simple fracture, so had any further treatment that would have required surgery and/or pins, it would have been much more expensive. She was treated at a small private clinic,  so if she had been taken to one of the more popular, larger hospitals they may have charged a lot more.