A Sydney father-of-two who had gone into hospital for a routine knee reconstruction died after being given high doses of opioids meant for another patient because a doctor "failed to exercise proper care, diligence and caution".

Paul Lau, 54, was pronounced dead hours after his uneventful day surgery at Macquarie University Hospital in June 2015, an inquest at Glebe Coroner's Court has heard.

Acting State Coroner Teresa O'Sullivan on Thursday found his death was caused by a prescribing error, with anaesthetist Orison Kim entering drugs meant for another patient into his electronic record.

The doctor had to override 22 alerts to enter the high-risk drugs into Mr Lau's chart but didn't notice his mistake.