Bugs fixes for Trello 174/184. We now get the patient record by the fact that the usermapping table contains the original unitcode from the patient record