Added write_to_dr_database in the write_dr class