Nothing has to be done immediately after a person’s death. Take the time you need. Some people want to stay in the room with the body; others prefer to leave. You might want to have someone make sure the body is lying flat before the joints become stiff and cannot be moved. This rigor mortis begins sometime during the first hours after death.
After the death, how long you can stay with the body may depend on where death happens. If it happens at home , there is no need to move the body right away. This is the time for any special religious, ethnic, or cultural customs that are performed soon after death.
If the death seems likely to happen in a facility, such as a hospital  or nursing home , discuss any important customs or rituals with the staff early on, if possible. That will allow them to plan so you can have the appropriate time with the body.
Some families want time to sit quietly with the body, console each other, and maybe share memories. You could ask a member of your religious community or a spiritual counselor to come. If you have a list of people to notify, this is the time to call those who might want to come and see the body before it is moved.
As soon as possible, the death must be officially pronounced by someone in authority like a doctor in a hospital or nursing facility or a hospice nurse. This person also fills out the forms certifying the cause, time, and place of death. These steps will make it possible for an official death certificate to be prepared. This legal form is necessary for many reasons, including life insurance and financial and property issues.
If hospice  is helping, a plan for what happens after death is already in place. If death happens at home without hospice, try to talk with the doctor, local medical examiner (coroner), your local health department, or a funeral home representative in advance about how to proceed.
Arrangements should be made to pick up the body as soon as the family is ready and according to local laws. Usually this is done by a funeral home. The hospital or nursing facility, if that is where the death took place, may call the funeral home for you. If at home, you will need to contact the funeral home directly or ask a friend or family member to do that for you.
The doctor may ask if you want an autopsy. This is a medical procedure conducted by a specially trained physician to learn more about what caused the death. For example, if the person who died was believed to have Alzheimer’s disease , a brain autopsy will allow for a definitive diagnosis. If your religion or culture objects to autopsies, talk to the doctor. Some people planning a funeral with a viewing worry about having an autopsy, but the physical signs of an autopsy are usually hidden by clothing.
Some resources to help you learn more about what to do when someone dies:
1-877-342-2277 (español/ línea gratis)
email@example.com  (email)
Federal Trade Commission
Social Security Administration