Hi Jane,
U.S. debit and credit cards work all over Costa Rica. One option is to withdraw money from the ATM, of course you’re limited to a certain daily amount. So that could be a lot of trips. Another option is to go into the bank and speak with one of the folks at the counter to arrange an advance. They swipe your card and can give you a couple of thousand dollars at a time, withdrawn from your account back home for a small fee. Again, each bank has a certain limit and check with your bank in the U.S. to make sure they allow this.
You should also check with your bank in the U.S. to see if they have any other options available.
But keep in mind that most medical offices in Costa Rica do take credit and debit cards. And again your card from the U.S> will work just fine. So you may not need to pay in cash at all. It’s probably safer that way, rather than carrying around large amounts of cash.