Modified the javascript methods for validating missing fields when prescribing drugs