Giter VIP home page Giter VIP logo

centricity_io's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.