{"openapi":"3.1.0","info":{"title":"ER Waits, Ranked API","version":"1.0.0","description":"Ranked monthly emergency department wait times for Ontario hospital ERs, scraped from Ontario Health and rebuilt as a clean time series. All wait times are monthly averages in hours."},"servers":[{"url":"/api/v1","description":"This deployment"}],"paths":{"/summary":{"get":{"summary":"Headline stats: latest month, hospital count, provincial averages.","responses":{"200":{"description":"Summary object"}}}},"/hospitals":{"get":{"summary":"Search hospital ERs by name, or fetch one by snum.","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Name search"},{"name":"snum","in":"query","schema":{"type":"string"},"description":"Site id"},{"name":"limit","in":"query","schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"Hospital list"}}}},"/hospital":{"get":{"summary":"One hospital: full monthly series for all 4 indicators plus 3 nearest ERs.","parameters":[{"name":"snum","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Hospital detail"}}}},"/ranking":{"get":{"summary":"Ranked hospitals for the latest month.","parameters":[{"name":"indicator","in":"query","schema":{"type":"string","enum":["PIA","L","NAH","A"],"default":"PIA"},"description":"PIA: time to first assessment by a doctor. L: length of stay, low-urgency, not admitted. NAH: length of stay, high-urgency, not admitted. A: length of stay, admitted."},{"name":"limit","in":"query","schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"Ranking rows"}}}},"/movers":{"get":{"summary":"Biggest wait-time improvements and declines vs 6 or 12 months ago.","parameters":[{"name":"vs","in":"query","schema":{"type":"string","enum":["6","12"],"default":"6"}}],"responses":{"200":{"description":"Movers"}}}},"/provincial":{"get":{"summary":"Provincial monthly series for one indicator.","parameters":[{"name":"indicator","in":"query","schema":{"type":"string","enum":["PIA","L","NAH","A"],"default":"PIA"}}],"responses":{"200":{"description":"Provincial series"}}}}}}