The level four emergency was declared after a patient waiting in an ambulance outside A&E in Edinburgh for 12 hours