def _enable_phenotips_for_project(project): """Creates 2 users in PhenoTips for this project (one that will be view-only and one that'll have edit permissions for patients in the project). """ project.is_phenotips_enabled = True project.phenotips_user_id = _slugify(project.name) # view-only user username, password = _get_phenotips_uname_and_pwd_for_project(project.phenotips_user_id, read_only=True) create_phenotips_user(username, password) # user with edit permissions username, password = _get_phenotips_uname_and_pwd_for_project(project.phenotips_user_id, read_only=False) create_phenotips_user(username, password) project.save()
def _enable_phenotips_for_project(project): """Creates 2 users in PhenoTips for this project (one that will be view-only and one that'll have edit permissions for patients in the project). """ project.is_phenotips_enabled = True project.phenotips_user_id = _slugify(project.name) # view-only user username, password = _get_phenotips_uname_and_pwd_for_project( project.phenotips_user_id, read_only=True) create_phenotips_user(username, password) # user with edit permissions username, password = _get_phenotips_uname_and_pwd_for_project( project.phenotips_user_id, read_only=False) create_phenotips_user(username, password) project.save()