def detect_table()

in Python/length_of_stay_utils.py [0:0]


def detect_table(table_name, connection_string):
    detect_sql = RxSqlServerData(sql_query="IF EXISTS (select 1 from information_schema.tables where table_name = '{}') SELECT 1 ELSE SELECT 0".format(table_name),
                                 connection_string=connection_string)
    does_exist = rx_import(detect_sql)
    if does_exist.iloc[0,0] == 1: return True
    else: return False