I'd expect medical devices like this to have a last line of defence safety check against bugs. Basically checking all common sense edge cases like: is this dose lethal to humans, is this dose significantly more/less than historical doses, is this dose below a level in which most humans would get no benefit. These are all easily testable both in terms of software testing and regulatory testing.