-
Notifications
You must be signed in to change notification settings - Fork 11
Install Instructions
These are the install instruction for the development versions of the OpenInfoMan.
Current version is 7.8.2 at the time of this writing.
If you wish to make use of stored updating xquery expressions you will need at least version 8.0. You will need the snapshot version if you want updating functions.
cd ~/
wget http://files.basex.org/releases/7.8.2/BaseX782.zip
unzip BaseX782.zip
touch ~/basex/.basexhome
Download the snapshot from http://basex.org/products/download/all-downloads/ and unzip as above
cd /usr/local/bin
sudo ln -s ~/basex/bin/basex
sudo apt-get install default-jre openjdk-7-jre
cd ~/
git clone https://github.com/openhie/openinfoman
To Install OpenInfoMan:
basex -Vc "REPO INSTALL http://files.basex.org/modules/expath/functx-1.0.xar"
cd ~/openinfoman/repo
basex -Vc "repo install csd_base_library.xqm"
basex -Vc "repo install csd_base_library_updating.xqm"
basex -Vc "repo install csd_base_stored_queries.xqm"
basex -Vc "repo install csd_webapp_config.xqm"
basex -Vc "repo install csd_webapp_ui.xqm"
basex -Vc "repo install csd_document_manager.xqm"
basex -Vc "repo install csd_load_sample_directories.xqm"
basex -Vc "repo install csd_query_updated_services.xqm"
basex -Vc "repo install csd_poll_service_directories.xqm"
basex -Vc "repo install csd_local_services_cache.xqm"
basex -Vc "repo install csd_merge_cached_services.xqm"
basex -Vc "repo install csr_processor.xqm"
basex -Vc "repo install svs_load_shared_value_sets.xqm"
The default xml database name is 'provider_directory' and can be created by:
basex -Vc "CREATE DATABASE provider_directory"The name of this database can be set in the file openinfoman/repo/csd_webapp_config.xqm
Warning: this has no user authorization at the moment and not is intended for production purposes.
cd ~/basex/webapp
ln -sf ~/openinfoman/webapp/*xqm .
mkdir -p ~/basex/webapp/static
cd ~/basex/webapp/static
ln -sf ~/openinfoman/webapp/static/* .
By default, recent versions of Jetty do not allow following of symbolic links under the webapp/static directory. See here for more information. To change this, edit the file ~/basex/webapp/WEB-INF/web.xml and add
<init-param>
<param-name>aliases</param-name>
<param-value>true</param-value>
</init-param>
<servlet>
<servlet-name>default</servlet-name>
cd ~/basex/bin && nohup ./basexhttp &
There are resources such as stored queries, shared values sets, sample service directories and test queries that can be loaded.
mkdir -p ~/basex/resources/stored_query_definitions
mkdir -p ~/basex/resources/stored_updating_query_definitions
mkdir -p ~/basex/resources/scripts
cd ~/basex/resources/stored_query_definitions
ln -sf ~/openinfoman/resources/stored_query_definitions/* .
cd ~/basex/resources/stored_updating_query_definitions
ln -sf ~/openinfoman/resources/stored_updating_query_definitions/* .
mkdir -p ~/basex/resources/shared_value_sets
cd ~/basex/resources/shared_value_sets
ln -sf ~/openinfoman/resources/shared_value_sets/* .
mkdir -p ~/basex/resources/service_directories
cd ~/basex/resources/service_directories
ln -sf ~/openinfoman/resources/service_directories/* .
mkdir -p ~/basex/resources/test_docs #likely to be deprecated
cd ~/basex/resources/test_docs #likely to be deprecated
ln -sf ~/openinfoman/resources/test_docs/* .
cd ~/basex/resources/scripts
ln -sf ~/openinfoman/resources/scripts/* .
cd ~/basex
addgroup --quiet --system oi
useradd oi -g oi -m -s /bin/bash
chown -R oi:oi ./
basex -Vc "RUN resources/scripts/init_db.xq"
sudo -u oi php resources/scripts/install_stored_function.php resources/stored_updating_query_definitions/*.xml
sudo -u oi php resources/scripts/install_stored_function.php resources/stored_query_definitions/*.xml
Note: We should figure out how to better package these files as modules!
There are few other resources such as the CSD.xsd, SVS.xsd and an XSL to automatically produce API documentation for the stored queries:
cd ~/basex/resources/
ln -sf ~/openinfoman/resources/SVS.xsd
ln -sf ~/openinfoman/resources/CSD.xsd
ln -sf ~/openinfoman/resources/doc_careServiceFunctions.xsl
You may also want to install some of the OpenInfoMan packages:
- Health Worker Registry Library
- CSV Output Adapter
- LDIF (for LDAP) Output Adapter
- R Stats Adapter
- DHIS Adapter
- FHIR Adapter
Simply browse to http://localhost:8984/CSD
Edit the file openinfoman/repo/csd_webapp_config.xqm and set the value of $csd_webconf:baseurl to be the explict url used by a remote client to access the CSD web interface
Care service documents can be registered for querying. There are three categories of registered documents:
- Sample Directories from an xml file in the resources/service_directories directory
- A cache of a remote Services Directory
- The merged result of the caches of the remote Service Directories
- Click on the "Server Management" Tab
- Click on "Load and Register Sample Service Directories"
- Click "Initialize" under the sample directory that you wish to load and register
- Click on the "Server Management" Tab
- Click on "Register and Poll Remote Service Directories"
- Enter in the access details for the remote directory or select one of the existing default ones.
- Click on the "Server Management" Tab
- Click on "Register and Poll Remote Service Directories"
- Click on "Merge Registered Documents". At this point the merge document is registered, but empty.
- To perform the merge, you will then need to click on "Merge services"
By default the stored queries on disk are not made available to execute against registered documents. To make them available:
- Click "Server Management" Tab
- Click "Manage Stored Queries"
- Click "Reload stored functions from disk"
The OpenInfoManager also can server a Sharing Value Sets repository. The OpenHIE Health Worker Registry Management Application makes use of this functionality. You will want to click on the SVS tab and initialize each of the value sets.
The OpenHIE HWR Management Application provides a web-interface to manage the data in a InfoMan actor that implements the HWR CRUD library above.
This is application based on the I2CE/iHRIS Framework. You should first install the supporting software for iHRIS. You should also install the following supporting software:
sudo apt-get install php5-xsl xsltproc php5-curl
Download the the I2CE/iHRIS Framework as follows:
mkdir -p ~/iHRIS
cd ~/iHRIS
bzr branch lp:~intrahealth+informatics/i2ce/4.2-dev I2CE
bzr branch lp:~intrahealth+informatics/ihris-common/4.2-dev ihris-common
bzr branch lp:openhie-pr
In mysql:
CREATE DATABASE csd_hwr;
GRANT ALL PRIVILEGES ON csd_hwr.* TO ihris@localhost identified by 'manage';
SET GLOBAL log_bin_trust_function_creators = 1;
Copy the existing config value to one that is not in version control:
mkdir -p ~/iHRIS/openhie-pr/sites/basex/pages/local
cp ~/iHRIS/openhie-pr/sites/basex/pages/config.values.php ~/iHRIS/openhie-pr/sites/basex/pages/local
$i2ce_site_i2ce_path = "/home/ubuntu/iHRIS/I2CE";
$i2ce_site_dsn = 'mysql://ihris:[email protected]/csd_hwr' ;
$i2ce_site_module_config = "/home/ubuntu/iHRIS/openhie-pr/sites/basex/CSD-ProviderRegistry.xml";
cd /var/www
sudo ln -sf ~/iHRIS/openhie-pr/sites/basex/pages openhie-hwr
Now your site should be available at
http://localhost/openhie-hwr
The administrator username is 'i2ce_admin' and the password is same as in the MysSQL DSN
Click "Actions" -> "Configure Remote Directories" to point the OpenHIE HWR Management Application to InfoManagers that implement the HWR CRUD Library. By default it will look at localhost (relative to the server running the OpenHIE HWR UI) and use the connect-a-thon sample service directories.
If you get a "java.lang.OutOfMemoryError: Java heap space" error such as:
https://gist.github.com/litlfred/b26e2722bb2ae23849a9
then edit the ~/basex/bin/basexhttp file and change
#VM=Xmx512m
to
VM="-Xms2g -Xmx2g"
- Site is at lp:~ihris-nigeria/openhie-hwr-nigeria/trunk/
- Configure pages/local/config.values.php as usual
- Make sure you configure the remote services directories to point to Nigeria Data
git clone https://github.com/openhie/openinfoman-hwr-nigeria
cd ~/basex/repo
basex -Vc "REPO INSTALL ~/openinfoman-hwr-nigeria/repo/csd_national_health_worker_registry_nigiera.xqm"
cd ~/basex/resources/stored_query_definitions
ln -sf ~/openinfoman-hwr-nigeria/resources/stored_query_definitions/* .
cd ~/basex/resources/stored_updating_query_definitions/
ln -sf ~/openinfoman-hwr-nigeria/resources/stored_updating_query_definitions/* .
cd ~/basex/resources/shared_value_sets/
ln -sf ~/openinfoman-hwr-nigeria/resources/shared_value_sets/* .
sudo apt-get install