Hi and welcome to the Forum.
Not an easy question. The UK NHS didn't exist until 1948, so any activity on the site before then will probably not be public record. Plus, anybody who used the site in 1945 for any activity will now almost certainly have passed on, so the chances of finding any first-hand information will be slim to nil.
From what information I can find online, the hospital site began life as a fever hospital then later became a psychiatric hospital. It became the Knockbracken Healthcare Park on the creation of the NHS. If it had a maternity facility, then I suspect it was in support of the psychiatric hospital.
I hope this helps.
Cynic
°µÍø½ûÇø Team