according to HOTA act, the person's organs will be extracted out and donate to other people when you die. unless you want to opt out of this scheme. according to Ajahn Bramh, there are no pain to the person dying. rebirth will take place almost immediately after death. I know Mahayana views are not the same.