Module Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad If CompareEq Call AttributeLoad NameLoad attr Str body Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad NameLoad orelse Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Print NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call NameLoad NameLoad BinOpMod Str NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword BinOpAdd BinOpAdd BinOpAdd Str Str Str Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad Str Str Str Str Assign NameStore Str If CompareLtE SubscriptLoad AttributeLoad NameLoad attr Slice Num TupleLoad Num Num Num body Assign NameStore Str If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Str If AttributeLoad NameLoad attr body Print Str AttributeLoad NameLoad attr If BoolOpAnd UnaryOpNot AttributeLoad NameLoad attr UnaryOpNot BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Str Print Str For NameStore NameLoad body Expr Call NameLoad BinOpAdd BinOpAdd Str NameLoad Str keyword NameLoad If BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body For NameStore NameLoad body If AttributeLoad NameLoad attr body Expr Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str AttributeLoad NameLoad attr Str Expr Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str Str Str Str keyword NameLoad If AttributeLoad NameLoad attr body Print Str Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad Str Call AttributeLoad Str attr ListComp Call NameLoad NameLoad comprehension NameStore Call NameLoad Num Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad Str Str If CompareEq NameLoad Str body Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad Str Str Expr Call NameLoad Str Expr Call NameLoad BinOpAdd Str Str Expr Call NameLoad BinOpAdd Str Str Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call NameLoad Str Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call NameLoad Str Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str Call AttributeLoad Str attr ListComp Call NameLoad NameLoad comprehension NameStore Call NameLoad Num Expr Call NameLoad Str Str Call AttributeLoad Str attr ListComp Call NameLoad NameLoad comprehension NameStore Call NameLoad Num Expr Call NameLoad Str Str Call AttributeLoad Str attr ListComp Call NameLoad NameLoad comprehension NameStore Call NameLoad Num Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str Str If CompareEq NameLoad Str body Print Str Expr Call NameLoad Str Str Str Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad orelse Print Str Expr Call NameLoad Str Str Str Expr Call NameLoad Str Str Str Expr Call NameLoad Str Str Str If BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str Str Str Str Str keyword NameLoad If AttributeLoad NameLoad attr body Expr Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str Str Str Str Str keyword NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Print Str NameLoad Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad keyword NameLoad Expr Call NameLoad Str Print Str If AttributeLoad NameLoad attr body Print Str Print Str Print Str Expr Call NameLoad BinOpAdd BinOpAdd Str Str Str keyword NameLoad Print Str Print Str Print Str Expr Call NameLoad BinOpAdd BinOpAdd Str Str Str keyword NameLoad If AttributeLoad NameLoad attr body Expr Call NameLoad BinOpAdd BinOpAdd BinOpAdd Str Str Str Str keyword NameLoad If AttributeLoad NameLoad attr body Print Str Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad Str Str Expr Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str Str Str NameLoad Str NameLoad Str NameLoad Str NameLoad Str keyword NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Print Str NameLoad Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad keyword NameLoad Print Str Assign NameStore Call NameLoad NameLoad Print Str NameLoad Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad keyword NameLoad Expr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Assign NameStore BoolOpOr BoolOpAnd CompareEq AttributeLoad NameLoad attr Str Num BoolOpAnd CompareEq AttributeLoad NameLoad attr Str Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Print NameLoad Assign NameStore Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert BoolOpOr NameLoad CompareEq Call AttributeLoad NameLoad attr NameLoad Num Str orelse TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr body If UnaryOpNot NameLoad body Assert NameLoad Str Return NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A sys N/A os N/A platform N/A re N/A imp N/A subprocess N/A logging N/A argparse N/A string N/A urlparse N/A django random choice N/A N/A N/A logging basicConfig level N/A logging INFO format %(asctime)s %(levelname)s %(message)s N/A cwd N/A N/A os getcwd N/A PASSWORD_LETTERBANK N/A N/A string letters N/A string digits N/A PASSWORD_LETTERBANK N/A N/A PASSWORD_LETTERBANK replace O get_input N/A N/A p d N/A N/A N/A v N/A raw_input N/A 
%s [%s]:  N/A p d N/A v N/A N/A v N/A d N/A do_sed N/A N/A t n v N/A N/A N/A v N/A N/A re sub / \/ v N/A N/A N/A N/A platform system Darwin N/A N/A c N/A sed -i '' -e's/%s/%s/' %s N/A n v t N/A N/A c N/A sed -i -e's/%s/%s/' %s N/A n v t N/A o N/A call_command c N/A o N/A o N/A fill_field N/A N/A t n v N/A N/A N/A N/A do_sed t N/A {{%s}} n v N/A main N/A N/A N/A N/A N/A parser N/A N/A argparse ArgumentParser description SMART Server Management Tool N/A N/A N/A parser add_argument -a --all-steps dest all_steps action store_true default False help N/A N/A N/A All steps: clone, generate settings,  kill running servers, generate sample data,  run app server, reset api server,  load sample data, run api servers N/A N/A N/A parser add_argument -b --branch dest using_branch default False help Use a specific branch for checkouts and updates N/A N/A N/A parser add_argument -d --development-branch dest branch_dev action store_true default False help Use development branch for checkous and updates N/A N/A N/A parser add_argument -g --clone-git-repositories dest clone_git action store_true default False help Clone git repositories N/A N/A N/A parser add_argument -u --update-git-repositories dest update_git action store_true default False help Update git repositories N/A N/A N/A parser add_argument -s --generate-settings-files dest generate_settings action store_true default False help Generate settings files N/A N/A N/A parser add_argument -k --kill-servers dest kill_servers action store_true default False help Kill all currently-running django development servers N/A N/A N/A parser add_argument -p --generate-sample-data dest generate_sample_data action store_true default False help Generate sample patient data N/A N/A N/A parser add_argument -v --run-app-server dest run_app_server action store_true default False help Run app server (first kills all running SMART servers). Can be used in conjunction with -w N/A N/A N/A parser add_argument -r --reset-api-server dest reset_servers action store_true default False help Reset API server N/A N/A N/A parser add_argument -l --load-sample-data dest load_sample_data action store_true default False help Load sample data into DB N/A N/A N/A parser add_argument -c --create-user dest create_user action store_true default False help Create a user account for web login N/A N/A N/A parser add_argument -w --run-api-servers dest run_api_servers action store_true default False help Run api server (first kills all running SMART servers). Can be used conjunction with -v N/A args N/A N/A parser parse_args N/A repos N/A smart_server smart_ui_server smart_sample_patients smart_sample_apps N/A reloadflag N/A N/A N/A N/A django VERSION N/A 3 N/A 1 3 0 N/A N/A reloadflag  --noreload  N/A N/A args branch_dev N/A N/A N/A args using_branch dev N/A N/A args using_branch N/A N/A USING BRANCH N/A args using_branch N/A N/A N/A N/A args all_steps N/A N/A N/A args clone_git N/A args update_git N/A args generate_settings N/A args generate_sample_data N/A args load_sample_data N/A args create_user N/A args kill_servers N/A args reset_servers N/A args run_app_server N/A args run_api_servers N/A N/A N/A N/A parser print_help N/A N/A N/A sys exit 1 N/A N/A args all_steps N/A N/A N/A args clone_git True N/A N/A args generate_settings True N/A N/A args generate_sample_data True N/A N/A args load_sample_data True N/A N/A args create_user True N/A N/A args kill_servers True N/A N/A args run_app_server True N/A N/A args reset_servers True N/A N/A args run_api_servers True N/A N/A args clone_git N/A N/A N/A N/A args using_branch N/A N/A N/A args using_branch master N/A Cloning (4) SMART git repositories... N/A r repos N/A N/A N/A call_command N/A N/A git clone --recursive --recurse-submodules https://github.com/smart-platforms/ r .git print_output True N/A N/A N/A args update_git N/A args clone_git N/A N/A r repos N/A N/A N/A args using_branch N/A N/A N/A call_command N/A N/A N/A N/A cd  r  && git checkout  N/A args using_branch  && cd .. N/A N/A call_command N/A N/A N/A N/A N/A cd  r  &&  git pull &&  git submodule update --init --recursive &&  cd ..  print_output True N/A N/A args generate_settings N/A N/A Configuring SMART server settings... N/A api_server_base_url N/A get_input SMART API Server http://localhost:7000 N/A chrome_consumer N/A get_input Chrome App Consumer ID chrome N/A chrome_secret N/A get_input Chrome App Consumer secret N/A N/A join N/A N/A choice PASSWORD_LETTERBANK N/A i N/A range 8 N/A db_password N/A get_input Database User Password smart N/A ui_server_base_url N/A get_input SMART UI server http://localhost:7001 N/A app_server_base_url N/A get_input SMART App server http://localhost:8001 N/A standalone_mode N/A get_input Run server in standalone mode (patient data stored in local db)?  
            If you choose 'no', the server will be configured in proxy mode, 
            with patient data hosted at a REST URL you provide. yes N/A N/A standalone_mode no N/A N/A proxy_base N/A get_input Proxy server to use for medical record data none N/A proxy_user N/A get_input User to associate with proxied requests proxy_user@smartplatforms.org N/A N/A call_command cp smart_server/settings.py.default smart_server/settings.py N/A N/A call_command N/A cp smart_server/bootstrap_helpers/application_list.json.default  smart_server/bootstrap_helpers/application_list.json  N/A N/A call_command N/A cp smart_server/bootstrap_helpers/bootstrap_applications.py.default  smart_server/bootstrap_helpers/bootstrap_applications.py  N/A N/A fill_field smart_server/bootstrap_helpers/application_list.json app_server_base_url app_server_base_url N/A N/A fill_field smart_server/bootstrap_helpers/bootstrap_applications.py app_server_base_url app_server_base_url N/A N/A fill_field smart_server/bootstrap_helpers/bootstrap_applications.py ui_server_base_url ui_server_base_url N/A N/A call_command cp smart_ui_server/settings.py.default smart_ui_server/settings.py N/A N/A call_command cp smart_sample_apps/settings.py.default smart_sample_apps/settings.py N/A N/A fill_field smart_server/settings.py path_to_smart_server N/A N/A N/A os path join cwd smart_server N/A N/A fill_field smart_ui_server/settings.py path_to_smart_ui_server N/A N/A N/A os path join cwd smart_ui_server N/A N/A fill_field smart_sample_apps/settings.py path_to_smart_sample_apps N/A N/A N/A os path join cwd smart_sample_apps N/A N/A fill_field smart_server/settings.py api_server_base_url api_server_base_url N/A N/A fill_field smart_ui_server/settings.py api_server_base_url api_server_base_url N/A N/A fill_field smart_sample_apps/settings.py app_server_base_url app_server_base_url N/A N/A fill_field smart_sample_apps/settings.py api_server_base_url api_server_base_url N/A N/A fill_field smart_server/settings.py chrome_consumer chrome_consumer N/A N/A fill_field smart_server/settings.py chrome_secret chrome_secret N/A N/A fill_field smart_server/settings.py db_password db_password N/A N/A fill_field smart_ui_server/settings.py chrome_consumer chrome_consumer N/A N/A fill_field smart_ui_server/settings.py chrome_secret chrome_secret N/A N/A fill_field smart_ui_server/settings.py db_password db_password N/A N/A fill_field smart_sample_apps/settings.py db_password db_password N/A N/A fill_field smart_server/settings.py django_secret_key N/A N/A join N/A N/A choice PASSWORD_LETTERBANK N/A i N/A range 8 N/A N/A fill_field smart_ui_server/settings.py django_secret_key N/A N/A join N/A N/A choice PASSWORD_LETTERBANK N/A i N/A range 8 N/A N/A fill_field smart_sample_apps/settings.py django_secret_key N/A N/A join N/A N/A choice PASSWORD_LETTERBANK N/A i N/A range 8 N/A N/A fill_field smart_server/settings.py ui_server_base_url ui_server_base_url N/A N/A fill_field smart_ui_server/settings.py pretty_name_value Reference EMR N/A N/A standalone_mode no N/A N/A nostandalone N/A N/A fill_field smart_server/settings.py use_proxy True N/A N/A fill_field smart_server/settings.py proxy_user_email proxy_user N/A N/A fill_field smart_server/settings.py proxy_base proxy_base N/A N/A yes standalone N/A N/A fill_field smart_server/settings.py use_proxy False N/A N/A fill_field smart_server/settings.py triplestore_engine sesame N/A N/A fill_field smart_server/settings.py triplestore_endpoint http://localhost:8080/openrdf-sesame/repositories/record_rdf N/A N/A N/A args run_app_server N/A args run_api_servers N/A N/A N/A args kill_servers True N/A server_settings N/A N/A imp load_source settings smart_server/settings.py N/A app_settings N/A N/A imp load_source settings smart_sample_apps/settings.py N/A app_server N/A app_settings SMART_APP_SERVER_BASE N/A api_server N/A server_settings SITE_URL_PREFIX N/A ui_server N/A server_settings SMART_UI_SERVER_LOCATION N/A N/A args kill_servers N/A N/A N/A call_command N/A N/A N/A N/A ps ax |  grep -i 'python' |  grep -i 'manage.py' |  egrep  -o '^[ 0-9]+' |  xargs -t  kill failure_okay True N/A N/A args generate_sample_data N/A N/A N/A call_command N/A N/A N/A N/A cd smart_sample_patients/bin &&  rm -rf ../generated-data/*.xml &&  python generate.py --write ../generated-data && python generate-vitals-patient.py ../generated-data/99912345.xml && cd ../.. print_output True N/A N/A args run_app_server N/A N/A port N/A get_port app_server N/A port: port N/A N/A call_command N/A cd smart_sample_apps && python manage.py runconcurrentserver %s 0.0.0.0:%s & N/A reloadflag port print_output True N/A N/A call_command sleep 2 N/A App Server running. N/A N/A args reset_servers N/A N/A Resetting the SMART server... N/A Note: Enter the SMART databse password when prompted (2 times). N/A       It is 'smart' by default. N/A N/A call_command N/A N/A cd smart_server &&  sh ./reset.sh &&  cd ../.. print_output True N/A Resetting the SMART UI server... N/A Note: Enter the SMART databse password when prompted (2 times). N/A       It is 'smart' by default. N/A N/A call_command N/A N/A cd smart_ui_server &&  sh ./reset.sh && cd ../.. print_output True N/A N/A args load_sample_data N/A N/A N/A call_command N/A N/A N/A cd smart_server &&  PYTHONPATH=.:.. DJANGO_SETTINGS_MODULE=settings  python load_tools/load_one_patient.py   ../smart_sample_patients/generated-data/* ../smart_sample_patients/deidentified-patients/*  && cd .. print_output True N/A N/A args create_user N/A N/A Configuring a user ... N/A given_name N/A get_input Given Name Demo N/A family_name N/A get_input Family Name User N/A email N/A get_input Email demouser@smartplatforms.org N/A password N/A get_input Password password N/A N/A call_command N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A cd smart_server &&  PYTHONPATH=.:.. DJANGO_SETTINGS_MODULE=settings  python load_tools/create_user.py   given_name family_name email password  && cd .. print_output True N/A N/A args run_api_servers N/A N/A port N/A get_port api_server N/A port: port N/A N/A call_command N/A cd smart_server && python manage.py runconcurrentserver %s 0.0.0.0:%s & N/A reloadflag port print_output True N/A API Servers running. N/A port N/A get_port ui_server N/A port: port N/A N/A call_command N/A cd smart_ui_server && python manage.py runconcurrentserver %s 0.0.0.0:%s & N/A reloadflag port print_output True N/A N/A call_command sleep 2 N/A get_port N/A N/A url N/A N/A N/A server N/A N/A urlparse urlparse url N/A port N/A server port N/A N/A port N/A N/A port N/A N/A N/A N/A server scheme http 80 N/A N/A N/A server scheme https 443 N/A port N/A call_command N/A N/A command print_output failure_okay N/A False False N/A N/A command N/A ret N/A print_output N/A N/A ret N/A N/A os system command N/A N/A failure_okay N/A N/A N/A os WEXITSTATUS ret 0 Subcommand failed. Aborting. N/A N/A N/A N/A ret N/A N/A subprocess check_output command shell True stderr N/A subprocess STDOUT N/A N/A N/A N/A subprocess CalledProcessError N/A N/A N/A failure_okay N/A N/A False Subcommand failed.  Aborting. N/A ret N/A N/A N/A __name__ __main__ N/A N/A N/A main