- get comma separated users by job title
local testPath = dir_emr() + numtoascii(92) + "New Folder" + numtoascii(92)+ "cps_io.exe"
local argStr = "/i 1|case manager"
local caseManager = RunTextProcess(testPath, argStr)
returns john m. doe [jdoe], alice r. smith [asmith]
pip install pyodbc
pip install sql
pip install pyinstaller
pip install flake8 #tab vs space - ignore Error W191 in setting.json & increase the max-line-length
pip install pylint
doctest, sys, datetime, logging, pathlib, unittest, os #should be installed by default
rename config_sample.py to config.py servername: centricity database server name db: centricity database name username: user account with read only access to centricity database pwd: password for user
- .\cps_io\app\logging --> change
loglevel = logging.WARNING
tologlevel = logging.DEBUG
Run from ".\cps_io\app" as base in powershell
#verbose
python -m log.cps_logging -v
python -m sql.sql_connection -v
python -m sql.sql_result_to_string -v
python -m sql.sql_query -v
python -m cps.parse_input -v
python -m cps_io -v #change comment in __main__
#quick test -- no result is good
python -m log.cps_logging
python -m sql.sql_connection
python -m sql.sql_result_to_string
python -m sql.sql_query
python -m cps.parse_input
python -m cps_io
change comment in __main__
#Using context.py file to import main project folder cps_io (parent of test folder) into python path
#Run from .\cps_io\app
python ..\test\test_app.py -v
#Not ready
python ..\test\test_io.py -v
#Run from .\cps_io\app
#Using context.py file to import modules
python cps_io.py "/o" ".\\log\\test.log" "/i" "1|case manager"
# comma separated case managers show up in .\cps_io\log\test.log
#Run from .\cps_io\app
pyinstaller --onedir --onefile --windowed cps_io.py
* --onedir --> one folder bundle
* --onefile --> one file bundled executable
* --windowed / --noconsole --> do not show console
* --add-data 'config/config.json;config' --> add extra file "src;dst"
--> could not get json config it to work
--> json file does not get included during pyinstaller
--> even with --add-data
--> simple solution was to convert config.json to config.py
.\dist\cps_io.exe "/o" ".\\log\\test.log" "/i" "1|case manager"
#Copy exe file --> create log\test.log --> run
.\cps_io.exe "/o" ".\\log\\test.log" "/i" "1|case manager"
dir_emr() --> default c:\program file x86\Centricity Practive Solution\Client
Create a new Folder --> copy exe file in there