if not password: password = getpass('Input your password (blank for admin): ') if not password: password = '******' bot = PhenoTipsBot(base_url, username, password) if study == None: studies = bot.list_studies() if len(studies): print('Available study forms:') print('* ' + '\n* '.join(studies)) study = input('Input the study form to use (blank for default): ') elif study == 'None': study = None #begin import if yes or input('You are about to import ' + str(len(patients)) + ' patients. Type y to continue: ')[0] == 'y': count = 0 start_time = time.time() for patient, clinvar_variants in patients: patient_id = bot.create(patient, study) for clinvar_variant in clinvar_variants: bot.create_object(patient_id, 'Main.ClinVarVariant', clinvar_variant) count += 1 stdout.write(str(count) + '\r') print() print('All done! Elapsed time ' + str(timedelta(seconds=time.time() - start_time)))