There's probably a couple easier ways to solve this... for instance. If the user hasn't saved the record you could pop an error message when they try to start entering lab data for a patient that doesn't exist.
Also, I don't know that i'd trust users to just be allowed to enter data into the...