Second Samuel 12:15b through 14:33 describes God's punishing judgment on David.
In 12:15b-23 we are told of the death of the child born to David of Uriah's wife.
Jehovah struck the child whom Uriah's wife bore to David, and the child was very sick (v. 15b).
David besought God for the child with fasting, spending all the night lying on the ground (v. 16).
On the seventh day the child died and David was released (vv. 17-23). When David realized that the child had died, he rose up from the ground, washed and anointed himself, changed his clothes, and went into the house of Jehovah and worshipped.