Queues with Time-Varying Arrivals and Inspections with Applications to Hospital Discharge Policies