Some notes on Viaticum, receiving the Eucharist at the time of death:
39. Communion received as viaticum should be considered as a special sign of sharing in the mystery celebrated in the Mass, the mystery of the death of the Lord and his return to the Father. Viaticum seals the faithful in their passage from life with the pledge of the resurrection as they are strengthened by Christ’s body.
Believers are “bound” to receive the sacrament, preferably when they are still conscious and capable of understanding what is happening:
Therefore, the faithful who are in danger of death from any cause whatever are bound by precept to receive communion; [See Codex Iuris Canonici (Rome, 1918) can. 864, 1.] pastors must guard against delay in the administration of this sacrament and see to it rather that the faithful receive it while still in full possession of their faculties. [See ibid. can. 865.]
A logical pastoral judgment:
Even if the faithful have already communicated on the same day, and then the danger of death arises, it is strongly recommended that they receive communion again.