You’ll need to show proof of ongoing treatment when extending your stay in Thailand with immigration. This is however not seriously checked, for now, when crossing the border again. Keep in mind that this is subject to change (or not), and no one can guarantee it will remain the same for the entire length of your visa.