def METHOD_NAME(filename):
    if not os.path.exists(filename):
        raise RuntimeError("No SQLite file at: {}".format(filename))
    connection = sqlite3.connect(filename)
    # Trade crash-safety for insert speed
    connection.execute("PRAGMA synchronous=OFF")
    dates = [date for (date,) in connection.execute("SELECT date FROM date")]
    prescriptions = get_prescriptions_for_dates(dates)
    write_prescribing(connection, prescriptions)
    connection.commit()
    connection.close()