Skip to content
conorcaregraf edited this page Nov 2, 2012 · 7 revisions

The following shows what you have to do to install and run VDM - this installation was on Mac OS X but the same flow works on any platform that supports git and python.

Assumption Both git and Python 2.7 are installed on your system and if you want to run against a new or your own VistA it must have FMQL installed (see how)

First clone the VDM git ...

PROMPT $ git clone https://github.com/OSEHR/VOLDEMORT
Cloning into 'VOLDEMORT'...
remote: Counting objects: 214, done.
remote: Compressing objects: 100% (171/171), done.
remote: Total 214 (delta 113), reused 134 (delta 38)
Receiving objects: 100% (214/214), 17.73 MiB | 95 KiB/s, done.
Resolving deltas: 100% (113/113), done.

Next let's install VDM ...

PROMPT:testvdm user$ cd VOLDEMORT/
PROMPT:VOLDEMORT user$ ls
LICENSE		documents	reports		vdm
README.md	fmqlkids	setup.py
PROMPT:VOLDEMORT user$ python setup.py install
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/vdm
copying vdm/__init__.py -> build/lib/vdm
copying vdm/__main__.py -> build/lib/vdm
copying vdm/vdmU.py -> build/lib/vdm
copying vdm/vistaBuilds.py -> build/lib/vdm
copying vdm/vistaBuildsComparer.py -> build/lib/vdm
copying vdm/vistaMetaAuditer.py -> build/lib/vdm
copying vdm/vistaSchema.py -> build/lib/vdm
copying vdm/vistaSchemaComparer.py -> build/lib/vdm
creating build/lib/vdm/copies
copying vdm/copies/__init__.py -> build/lib/vdm/copies
copying vdm/copies/brokerRPC.py -> build/lib/vdm/copies
copying vdm/copies/fmqlCacher.py -> build/lib/vdm/copies
creating build/lib/vdm/resources
copying vdm/resources/GOLD.zip -> build/lib/vdm/resources
copying vdm/resources/Packages.csv -> build/lib/vdm/resources
running install_lib
creating /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm
copying build/lib/vdm/__init__.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm
copying build/lib/vdm/__main__.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm
creating /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/copies
copying build/lib/vdm/copies/__init__.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/copies
copying build/lib/vdm/copies/brokerRPC.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/copies
copying build/lib/vdm/copies/fmqlCacher.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/copies
creating /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/resources
copying build/lib/vdm/resources/GOLD.zip -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/resources
copying build/lib/vdm/resources/Packages.csv -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/resources
copying build/lib/vdm/vdmU.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm
copying build/lib/vdm/vistaBuilds.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm
copying build/lib/vdm/vistaBuildsComparer.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm
copying build/lib/vdm/vistaMetaAuditer.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm
copying build/lib/vdm/vistaSchema.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm
copying build/lib/vdm/vistaSchemaComparer.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm
byte-compiling /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/__init__.py to __init__.pyc
byte-compiling /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/__main__.py to __main__.pyc
byte-compiling /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/copies/__init__.py to __init__.pyc
byte-compiling /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/copies/brokerRPC.py to brokerRPC.pyc
byte-compiling /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/copies/fmqlCacher.py to fmqlCacher.pyc
byte-compiling /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/vdmU.py to vdmU.pyc
byte-compiling /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/vistaBuilds.py to vistaBuilds.pyc
byte-compiling /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/vistaBuildsComparer.py to vistaBuildsComparer.pyc
byte-compiling /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/vistaMetaAuditer.py to vistaMetaAuditer.pyc
byte-compiling /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/vistaSchema.py to vistaSchema.pyc
byte-compiling /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vdm/vistaSchemaComparer.py to vistaSchemaComparer.pyc
running install_egg_info
Removing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/VOLDEMORT-0.2-py2.7.egg-info
Writing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/VOLDEMORT-0.2-py2.7.egg-info

Now let's make a test directory, testenvir ...

PROMPT:testvdm user$ cd /tmp
PROMPT:testvdm user$ mkdir testenvir
PROMPT:testvdm user$ cd testenvir/

and run VDM for the first time, which will make it setup its environment and install GOLD ...

PROMPT:testenvir user$ python -m vdm
First time VDM is run - installing GOLD into /private/tmp/testenvir/Caches

Let's get some help ...

PROMPT:testenvir user$ python -m vdm -h

VOLDEMORT (VDM)

-h, --help: this help text
-v, --vista: name of VistA. Defaults to "CGVISTA", Caregraf's publicly hosted demo VistA
-f, --fmqlep: FMQL endpoint. For example, "http://vista.caregraf.org/fmqlEP". If set, then no need for --host, --port, --access, --verify
--host: host of VistA
--port: port of VistA
--access: access for FMQL RPC
--verify: verify for FMQL RPC
-r, --report: only 'schema' or 'builds' for now

Example using a full FMQL RESTful endpoint ...
$ python -m vdm -v CGVISTA -f http://vista.caregraf.org/fmqlEP -r schema
or to use the FMQL RPC directly ...
$ python -m vdm -v CGVISTA --host "xx.xx.xx" --port 9201 --access "XXX" --verify "YYY" -r schema

The first time VDM runs against a VistA, the majority of time taken is downloading meta data. Subsequent runs of VDM for that VistA will be much faster as they'll run off a cache. 

Any VistA being reported on must have FMQL installed. 

Note: you DO NOT have to install the full, RESTful FMQL endpoint. The RPC is enough.

Run a schema comparison for Caregraf's demo VistA which has FMQL installed behind a RESTful endpoint.

PROMPT:testenvir user$ python -m vdm -v CGVISTA -f "http://vista.caregraf.org/fmqlEP" -r schema
VDM - comparing a VistA's schema against GOLD. -h for help.
Defaulting to Caregraf's demo VistA, 'CGVISTA'
GOLD: Schema - building Schema Index ...
GOLD: ... building (with caching) took 0:00:02.268997
CGVISTA: Schema - building Schema Index ...
CGVISTA: ... building (with caching) took 0:02:27.414079
Schema Report written to /private/tmp/testvdm/testenvir/Reports/schemaGOLD_vs_CGVISTA.html

Note that the first time VDM runs against a VistA, it must cache a lot of meta data. In the run above caching and reporting took over 2 minutes. But when we run the same report again, it takes a little over two seconds. That's because subsequent report generation runs off the local cache built during the first run ...

PROMPT:testenvir user$ python -m vdm -v CGVISTA -f "http://vista.caregraf.org/fmqlEP" -r schema
VDM - comparing a VistA's schema against GOLD. -h for help.
Defaulting to Caregraf's demo VistA, 'CGVISTA'
GOLD: Schema - building Schema Index ...
GOLD: ... building (with caching) took 0:00:02.666920
CGVISTA: Schema - building Schema Index ...
CGVISTA: ... building (with caching) took 0:00:02.525245
Schema Report written to /private/tmp/testvdm/testenvir/Reports/schemaGOLD_vs_CGVISTA.html

Let's look at the report in our browser. From an OS X command line, you invoke a browser like this ...

PROMPT:testenvir user$ open /private/tmp/testvdm/testenvir/Reports/schemaGOLD_vs_CGVISTA.html

Troubleshoot

  1. I get "Import Error: No module named pkg_resources" when running VDM. How do I fix it? Try "curl http://python-distribute.org/distribute_setup.py | python".
Clone this wiki locally