In a message on Wednesday, Rouhani expressed deep regret at the “bitter and tragic” incident at the Sina Athar clinic in northern Tehran that killed at least 19 people and injured six others.
The president also ordered the organizations in charge to launch an immediate probe to ascertain the causes of the incident accurately and expertly.
He also emphasized the need for special care for the injured and the bereaved families of victims of the incident.
Offering his condolences to the families of the victims, he hoped that precautions and arrangements would prevent a recurrence of such tragic accidents in future.
Hamidreza Goudarzi, deputy Tehran governor, said that a leak from medical gas tanks in the building was the cause of the explosion and fire.
Authorities initially said 13 people were dead, but Tehran fire department spokesman Jalal Maleki later put the toll at 19.
He added the dead included 15 women and four men. Maleki said that firefighters had rescued 20 people.
Reports said there could be more explosions because there were a number of oxygen tanks remaining in the medical center.