Skip to content

Commit

Permalink
Add usage sample and known issues/roadmap to ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
lasley committed Apr 23, 2016
1 parent cb50390 commit fb5bdb9
Showing 1 changed file with 62 additions and 3 deletions.
65 changes: 62 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,71 @@ Python CarePoint Library

This library will allow you to interact with CarePoint using Python.

For the most part, it just provides some convenience wrappers to encapsulate
all of the tables within one object/session for easy use.

Most of the methods return SQLAlchemy ResultProxies.

Installation
-----
------------

To install this module, you need to:

* Install dependencies `pip install -r requirements.txt`
* Install library `pip install .`
* Setup UnixODBC - http://help.interfaceware.com/kb/904
* Install UnixODBC development headers - `apt-get install unixodbc-dev`
* Install dependencies - `pip install -r requirements.txt`
* Install library - `pip install .`


Usage
-----

### Connect to Database server

cp = Carepoint(
server='127.0.0.1',
user='test_db_user',
passwd='db_pass',
)

### Perform a search for a patient with the last name Smith

res = cp.search(
cp['Patient'],
{'lname': 'Smith'},
)
for row in res:
print row.fname

### Perform a patient search, but only return the `mname` column

res = cp.search(
cp['Patient'],
{'lname': 'Smith'},
['mname'],
)
for row in res:
print row.mname

### Get patients modified in 2015

res = cp.search(
cp['Patient'],
{
'chg_date': {
'<=': '2015-12-31',
'>=': '2015-01-01',
}
},
)
for row in res:
print row.fname

Known Issues / Road Map
-----------------------

* More usage samples
* Test coverage is showing less than what it actually is (carepoint and db modules)

Contributors
------------
Expand All @@ -24,6 +81,8 @@ Contributors
Maintainer
----------

[![LasLabs Inc.](https://laslabs.com/logo.png "LasLabs Inc.")](https://laslabs.com)

This module is maintained by [LasLabs Inc.](https://laslabs.com)

* https://repo.laslabs.com/projects/CP/repos/python-carepoint/

0 comments on commit fb5bdb9

Please sign in to comment.