The main Hartwood Hospital building block with central towers with side wings was designed and built from 1890 by the local architect J L Murray from Biggar as the Lanark District Asylum covering the Lanarkshire area. The hospital closed in 1999
Found this looking for Hartwood Hospital in Scotland.
Some history from Wikipedia
"The remains of Hartwood Hospital, a 19th-century psychiatric hospital with imposing twin clock towers, are the main feature of the village, even after its closure under the direction of the Lanarkshire Health...