Get well soon.
Presumably you can use your iPad but can't connect to the hospital's (insecure) public wifi whilst you are able to do so on your phone.
It is worth trying rebooting/restarting the iPad and then trying to connect to the public wifi.
If that fails then it is of course worth trying what Apple has to say on this topic:
https://support.apple.com/en-gb/HT204497
---
Use captive Wi-Fi networks on your iPhone, iPad, or iPod touch
Learn how to use captive Wi-Fi networks, which are public networks that you subscribe to or pay for.
Captive networks are also called "subscription"or "Wi-Fi Hotspot" networks. You can find these networks in coffee shops, Internet cafes, hotels, airports, and other public locations. In some countries and regions, wireless carriers sponsor and maintain captive networks.
Join a captive Wi-Fi network
To join a captive Wi-Fi network:
- Tap Settings > Wi-Fi.
- Tap the name of the network, then wait for a login screen to appear. Or tap
next to the network's name, then tap Join Network. - If prompted, enter a user name and password, enter an email address, or acknowledge terms and conditions.
After you log in, you should be able to access the Internet. Fees and other charges might apply when you use captive Wi-Fi networks. Contact the network provider for more information.
---
If that doesn't work then try Mac Observer's tip below (try visiting captive.apple.com when connected to the Wifi but not yet logged in and surfing/connected normally)
iOS: What To Do When Your Public Wi-Fi Won't Connect All the Way - The Mac Observer
Public Wi-Fi hotspots that require you to log in will restrict your access to secure websites until you authenticate somehow or acknowledge that you agree to their terms and conditions. From the iPhone’s point of view, it just doesn’t have access to the internet, because most web pages you might try to visit are secure. That’s why all you see is the notification that you aren’t connected to the internet.
Force the Public Hotspot to Log You In
To force the hotspot to log you in, you need to attempt to visit a non-secure website. Apple has just the thing, and it’s actually what the login screens are supposed to launch in. When the screen doesn’t appear for you, just open Safari and type captive.apple.com into the address bar. That web site will always deliver a non-secure page, because it’s used to connect to the public hotspot’s login portal.