query: SELECT DISTINCT ?item ?ac ?status ?pt
  WHERE 
  { ?item wdt:P31/wdt:P279* wd:Q16917; wdt:P17 wd:Q45
  OPTIONAL { ?item (wdt:P730 \u007C wdt:P576 \u007C wdt:P3999 \u007C wdt:P582 ) ?dummy . 
  BIND("Former hospitals" as ?status1) } BIND(COALESCE(?status1,"Current hospitals") as ?status)
  OPTIONAL { ?item rdfs:label ?pt . FILTER(lang(?pt)="pt") }
  OPTIONAL { ?item wdt:P131/wdt:P131* ?ac . ?ac wdt:P31 wd:Q41806065 }
  }