Congenital anomalies are anomalies that are acquired before birth. Infants with certain congenital anomalies of the heart can survive only as long as the ductus remains open: in such cases the closure of the ductus can be delayed by the administration of prostaglandins to permit sufficient time for the surgical correction of the anomalies. Conversely, in cases of patent ductus arteriosus, where the ductus does not properly close, drugs that inhibit prostaglandin synthesis can be used to encourage its closure, so that surgery can be avoided.