def join_tests():
    '\n    Merge tests to previous merged (assessments, vaccine), filter out subjects has test records within 10days after vaccine\n    '
    with sess.Session() as s:
        src = s.open_dataset(ADATA, 'r', 'asmt')
        tests_src = src['tests']
        dst = s.open_dataset(DSTDATA, 'r+', 'dst')
        vacc = dst['asmt_v']
        tests_m = dst.create_dataframe('tests_m')
        dataframe.merge(vacc, tests_src, tests_m, 'patient_id_l', 'patient_id', how='inner')
        test_filter = (tests_m['date_taken_specific_l'] < tests_m['date_taken_specific_r'])
        test_filter &= (tests_m['date_taken_specific_l'] > (tests_m['date_taken_specific_r'] - ((3600 * 24) * 10)))
        tests_m.apply_filter(test_filter)
Merge tests to previous merged (assessments, vaccine), filter out subjects has test records within 10days after vaccine
def join_tests():
    '\n    \n    '
    with sess.Session() as s:
        src = s.open_dataset(ADATA, 'r', 'asmt')
        tests_src = src['tests']
        dst = s.open_dataset(DSTDATA, 'r+', 'dst')
        vacc = dst['asmt_v']
        tests_m = dst.create_dataframe('tests_m')
        dataframe.merge(vacc, tests_src, tests_m, 'patient_id_l', 'patient_id', how='inner')
        test_filter = (tests_m['date_taken_specific_l'] < tests_m['date_taken_specific_r'])
        test_filter &= (tests_m['date_taken_specific_l'] > (tests_m['date_taken_specific_r'] - ((3600 * 24) * 10)))
        tests_m.apply_filter(test_filter)