Wellington explained the position in a General Order of 21 Sept 1809: according to the existing regulations, the pay of a soldier who went into hospital had a stoppage of 9d per day which was paid to the regimental surgeon 'or other person in charge of the hospital'. 'This stoppage is intended to enable the Surgeon to subsist the soldier in regimental hospital, as well as to provide him with those comforts which his situation will require...' Where there was no market in the vicinity, the hospital was supplied by the commissary who received 'such proportion of 6d as that they will receive will bear to the whole ration of the soldier'. The other 3d was presumably retained by the surgeon for 'comforts'. (General Orders, 1809 p 177)
Remember that fit soldiers had 6d per day deducted from their pay for their rations, so that the principle was not very different.
Officers were left to fend for themselves, so there was no deduction from their pay.