An optimal online feedback treatment strategy is developed for the parturient paresis of cows, based on nonlinear optimal control theory. A limitation in the development of an existing mathematical model for calcium homeostasis is addressed and the model is extended to incorporate control inputs. An optimal feedback controller is synthesized for the nonlinear system using neural networks. Though the main aim of this paper is to solve the biomedical control problem, the methodology presented in this paper is a general computational tool, which can be applied to solve a fairly general class nonlinear optimal control problems