Till when does a patient need to be given glucose?

Till when does a patient need to be given glucose?

During severe diahorrea, when the patient is not able to take food orally, then he/she is given a drip of glucose intravenously to prevent water loss and maintain electrolyte balance in the body.