added basic workflow support - create, start, finish surgery
fixed new surgery creation
refactored javascript code in surgery.gsp
fixed various NPE errors in the automatic scheduler system