Skip to content

ayushmaskey/centricity_io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

centricity_io

Usage

  1. 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]

Before running the program

Modules Requred

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

sql connection config file

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

logging levelname --> for debug

  1. .\cps_io\app\logging --> change loglevel = logging.WARNING to loglevel = logging.DEBUG

Test

DocTest individual files

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__

Unittest

#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

Complete app Testing

#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

Convert to .exe and test

create .exe from .py

#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

test .exe within environment

.\dist\cps_io.exe "/o" ".\\log\\test.log" "/i" "1|case manager"

test .exe outside environment --> powershell

#Copy exe file --> create log\test.log --> run
.\cps_io.exe "/o" ".\\log\\test.log" "/i" "1|case manager"

copy exe to all the the terminal servers / fat clients

dir_emr() --> default c:\program file x86\Centricity Practive Solution\Client
Create a new Folder --> copy exe file in there

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages