Cookies help us deliver our services. By using our services, you agree to our use of cookies.
Views

Difference between revisions of "MHero Installation and Configuration"

From IHRIS Wiki

Jump to: navigation, search
(This articles describes how Rapidpro,iHRIS and OpenInfoMan can be connected together to form an app called mHero)
 
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== mHero Installation and Configuration ==
 
== mHero Installation and Configuration ==
 +
 +
'''Note:''' Some of this page is in draft form and may not work correctly just yet. In particular the OpenHIM installation docs. This will be rectified in the coming months.
  
 
===Introduction and Overview===
 
===Introduction and Overview===
  
 
mHero is a free SMS mobile phone based communications system between MOH staff,Health Workers and Community Health Workers. This is achieved by the interoperability between Intrahealth's iHRIS (or any HRIS with CSD compliant) and UNICEF's Rapidpro and utilizing the OpenHIE architecture. The platform uses health workforce data to target specific communications based on cadre,location and other information. Communications, which can be triggered both centrally and locally, go far beyond traditional “message blasts” offered by many technology vendors. Real-time monitoring, complex multi-path surveys, monitoring and detailed analysis can be conducted with ease. This tutorial will use iHRIS as a HRIS.
 
mHero is a free SMS mobile phone based communications system between MOH staff,Health Workers and Community Health Workers. This is achieved by the interoperability between Intrahealth's iHRIS (or any HRIS with CSD compliant) and UNICEF's Rapidpro and utilizing the OpenHIE architecture. The platform uses health workforce data to target specific communications based on cadre,location and other information. Communications, which can be triggered both centrally and locally, go far beyond traditional “message blasts” offered by many technology vendors. Real-time monitoring, complex multi-path surveys, monitoring and detailed analysis can be conducted with ease. This tutorial will use iHRIS as a HRIS.
[[File:mHero-Overview.jpg]]
+
[[File:Mhero-diagram.png]]
  
 
===mHero Components===
 
===mHero Components===
Line 10: Line 12:
 
# Rapidpro-is a free and open source framework designed to send and receive data using basic mobile phones, manage complex workflows, automate analysis and present data in real-time.
 
# Rapidpro-is a free and open source framework designed to send and receive data using basic mobile phones, manage complex workflows, automate analysis and present data in real-time.
 
# Health Worker Registry- It is an OpenHIE component used to bring health workforce information together from variety of sources and represent that information in a common format against a common standard in order to facilitate the use of health workforce information across the health information system. Health Worker Registry is implemented by Openinfoman,this tutorial will be using the two terminologies interchangeably.
 
# Health Worker Registry- It is an OpenHIE component used to bring health workforce information together from variety of sources and represent that information in a common format against a common standard in order to facilitate the use of health workforce information across the health information system. Health Worker Registry is implemented by Openinfoman,this tutorial will be using the two terminologies interchangeably.
 +
# OpenHIM - a component that provides security and access control mechanisms for mHero
 +
 +
===About the OpenHIM===
 +
OpenHIM stands for the Open Health Information Mediator. The OpenHIM is an interoperability layer: a software component that eases integration between disparate information systems by connecting client and infrastructure components together. Its role is to provide a facade to client systems - providing a single point-of-control for defining web service APIs and adapting and orchestrating requests between infrastructure services. While doing this the OpenHIM also provides extensive security and access control mechanisms that enables the user to protect personal information within an HIE. It also enables monitoring and alerting services to ensure that the HIE is always running optimally.
 +
 +
===OpenHIM security and privacy===
 +
Privacy and security are vital components of a coherently designed HIE. The OpenHIM is a cornerstone on which HIEs are built and it specialises in managing the interfaces on which systems interact with the HIE and on which components of the HIE communicate with each other. Therefore, the OpenHIM employs a number of mechanisms to ensure that traffic to and from an HIE is kept private and secure.
 +
 +
The OpenHIM provides the following features to ensure that personal information is protected:
 +
 +
# It makes it easy to ensure that traffic coming to the HIE or within it is encrypted. It does this by providing a certificate management facilities.
 +
# It provides authentication mechanisms to ensure that only systems that are known and trusted can access the HIE services.
 +
# It provides access control mechanisms to ensure that only systems that actually need access to certain services are allowed to access them.
 +
 +
===How the OpenHIM fits into the mHero architecture===
 +
Within the context of mHero, the OpenHIM performs a few vital functions.
 +
 +
# It triggers the synchronization between iHRIS, OpenInfoMan and Rapidpro.
 +
# It provides visibility into the messages being exchanged. This allows the user to ensure that the data exchange is occurring correctly.
 +
# It ensures that the communication between components occurs securely and it logs the transactions for historical and audit purposes.
 +
# It provides authentication and authorisation mechanisms to control access to the OpenInfoMan documents
 +
 +
The OpenHIM provides polling channels to trigger the synchronization between iHRIS and the OpenInfoMan. These polling channels execute periodically and trigger an mHero mediator which in turn pulls data out of the OpenInfoMan and pushes it into RapidPro. To learn more about polling channels please see the OpenHIM docs here.
 +
 +
The OpenHIM provides a web console that enables the user to view these synchronization message. This enables any problems to be debugged effectively and provides confidence that the synchronization is working effectively.
 +
 +
The OpenHIM was designed to protect an HIE by providing mechanisms to secure transactions  between various components of the HIE. It can ensure that requests that access certain OpenInfoMan documents come from known and authorised sources.
 +
 +
Within mHero, the OpenInfoMan contains a number of documents which contain health worker and facility information. The OpenHIM prevents unauthorised access to these documents by implementing a role-based access control mechanism. This allows documents with sensitive information to be secured and documents with non-sensitive information to be as open and accessible as necessary.
 +
 +
===Configuring the OpenHIM for mHero===
 +
Configuring the OpenHIM to work with mHero is fairly straightforward. A debian package has been created that will automatically configure the OpenHIM for the mHero context. This takes care of most of the configuration that is require. You can find this package here: https://github.com/jembi/openhim-config-mhero.
 +
 +
To install it simply execute the following on server to host the OpenHIM:
 +
 +
<source lang="bash">
 +
sudo add-apt-repository -y ppa:openhie/release
 +
sudo apt-get update
 +
sudo apt-get install openhim-console openhim-core-js openhim-mediator-mhero
 +
</source>
 +
 +
After that the OpenHIM console will be accessible on http://localhost. For more information about how to use the OpenHIM console and edit the base configuration, see http://openhim.readthedocs.org/en/latest/user-guide/index.html.
  
 
===Individual Components Installation===
 
===Individual Components Installation===
iHRIS can be installed by referring to its installation page which  is http://wiki.ihris.org/wiki/Installing_iHRIS_4.2  while the Health Worker Registry (HWR) can be installed by referring to OpenInfoMan installation page which is https://github.com/openhie/openinfoman and Rapidpro can be installed by referring to the Rapidpro installation page http://rapidpro.github.io/rapidpro/docs/development/.
+
iHRIS can be installed by referring to its installation page which  is http://wiki.ihris.org/wiki/Installing_iHRIS_4.2  while OpenInfoman can be installed by referring to OpenInfoMan installation page which is https://github.com/openhie/openinfoman and Rapidpro can be installed by referring to the Rapidpro installation page http://rapidpro.github.io/rapidpro/docs/development/.
  
===Linking iHRIS,Rapidpro and HWR.===
+
===Linking iHRIS,Rapidpro and OpenInfoman.===
To setup mHero, iHRIS,Rapidpro and HWR needs to be connected together. There are two connections in here:
+
To setup mHero, iHRIS,Rapidpro and OpenInfoman needs to be connected together. There are two connections in here:
# Connecting iHRIS and HWR
+
# Connecting iHRIS and OpenInfoman
# Connecting HWR and Rapidpro
+
# Connecting OpenInfoman and Rapidpro
 
#* Push all Health workers to Rapidpro.
 
#* Push all Health workers to Rapidpro.
#* Pull all created Rapidpro contacts back to HWR.
+
#* Pull all created Rapidpro contacts back to OpenInfoman.
 +
 
 +
===Connecting iHRIS and OpenInfoman.===
 +
The OpenInfoman is built on an international standard called Care Services Discovery (CSD). So to connect iHRIS and OpenInfoman,it will need to make iHRIS data to conform to CSD and then this data can be loaded to OpenInfoman. This video tutorial - https://www.youtube.com/watch?v=oxmRhW4Q2T4 shows how CSD documents can be generated and published in iHRIS. Generated CSD documents can then be pulled by the OpenInfoman and this video tutorial - https://www.youtube.com/watch?v=ev-my7-ZQ0I explains how to configure OpenInfoman to pull iHRIS published CSD documents. The simplest way of saying this is,iHRIS publishes health worker data in CSD format  and OpenInfoman subscribes to the iHRIS CSD data.
  
===Connecting iHRIS and HWR.===
+
The process above of publishing iHRIS data into CSD standard and openInfoman fetching iHRIS published CSD data has been automated within openHIM by the use of a mediator called openhim-mediator-mhero which is a nodejs service that is connected to openHIM to automate the whole process
The HWR is built on an international standard called Care Services Discovery (CSD). So to connect iHRIS and HWR,it will need to make iHRIS data to conform to CSD and then this data can be loaded to the HWR. This video tutorial - https://www.youtube.com/watch?v=oxmRhW4Q2T4 shows how CSD documents can be generated and published in iHRIS. Generated CSD documents can then be pulled by the HWR and this video tutorial - https://www.youtube.com/watch?v=ev-my7-ZQ0I explains how to configure the HWR to pull iHRIS published CSD documents. The simplest way of saying this is,iHRIS publishes health worker data in CSD format  and HWR subscribes to the iHRIS CSD data.
 
  
===Connecting HWR and Rapidpro.===
+
===Connecting OpenInfoman and Rapidpro.===
This connection requires that each health worker that has a valid phone number in HWR to be created in Rapidpro as a contact. Once these contacts are created in Rapidpro,they will then need to be pulled and converted to CSD and then pushed to the HWR with they corresponding Rapidpro ID,this is done in order that the HWR knows which Health worker has an associated contact in Rapidpro. This connection can be achieved by two PHP scripts which all comes with the openinfoman-rapidpro library - https://github.com/openhie/openinfoman-rapidpro and can both be found under resources/tools.
+
This connection requires that each health worker that has a valid phone number in OpenInfoman to be created in Rapidpro as a contact. Once these contacts are created in Rapidpro,they will then need to be pulled and converted to CSD and then pushed to OpenInfoman with they corresponding Rapidpro ID,this is done in order that OpenInfoman knows which Health worker has an associated contact in Rapidpro. This connection can be achieved by two PHP scripts which all comes with the openinfoman-rapidpro library - https://github.com/openhie/openinfoman-rapidpro and can both be found under resources/tools.
 
<ol>
 
<ol>
<li>https://github.com/openhie/openinfoman-rapidpro/blob/master/resources/tools/synchronize.php. This script is used to create contacts in Rapidpro of all health workers in the HWR that have phone numbers. The following are the explanations of some variables that needs to be set in the synchronize.php script:
+
<li>https://github.com/openhie/openinfoman-rapidpro/blob/master/resources/tools/synchronize.php. This script is used to create contacts in Rapidpro of all health workers in OpenInfoman that have phone numbers. The following are the explanations of some variables that needs to be set in the synchronize.php script:
<source lang="xml">
+
<source lang="bash">
 
$openinfoman = array(
 
$openinfoman = array(
                      url'=>'http://localhost:8984/CSD/csr/CSD-Providers-Connectathon0150120/careServicesRequest/urn:openhie.org:openinfoman-rapidpro:get_json_for_import/adapter/rapidpro/get'  
+
  url'=>'http://localhost:8984/CSD/csr/CSD-Providers-Connectathon0150120/careServicesRequest/urn:openhie.org:openinfoman-rapidpro:get_json_for_import/adapter/rapidpro/get'  
 
);
 
);
 
</source>
 
</source>
Replace localhost and port number with an appropriate openinfoman server address and port number. Replace CSD-Providers-Connectathon0150120 with an appropriate CSD documents in Openinfoman that created during iHRIS and HWR connection.
+
Replace localhost and port number with an appropriate openinfoman server address and port number. Replace CSD-Providers-Connectathon0150120 with an appropriate Openinfoman CSD document that was created during iHRIS and OpenInfoman connection.
<source lang="xml">
+
<source lang="bash">
 
$rapidpro= array(  
 
$rapidpro= array(  
 
    'url' =>'https://app.rapidpro.io/api/v1/contacts.json',  
 
    'url' =>'https://app.rapidpro.io/api/v1/contacts.json',  
Line 47: Line 93:
 
</ul>
 
</ul>
 
These can be set directly into the script but they can also be set through environmental variables I.e  
 
These can be set directly into the script but they can also be set through environmental variables I.e  
<source lang="xml">
+
<source lang="bash">
 
export RAPIDPRO_AUTH_TOKEN=XXXXXXX.
 
export RAPIDPRO_AUTH_TOKEN=XXXXXXX.
 
</source>
 
</source>
 
The synchronize.php script can be executed as follows from command line:
 
The synchronize.php script can be executed as follows from command line:
<source lang="xml">
+
<source lang="bash">
 
php synchronize.php
 
php synchronize.php
 
</source>
 
</source>
Line 57: Line 103:
 
<ul>
 
<ul>
 
<li>Go to service directories of Openinfoman
 
<li>Go to service directories of Openinfoman
<source lang="xml">
+
<source lang="bash">
 
cd /var/lib/openinfoman/resources/service_directories
 
cd /var/lib/openinfoman/resources/service_directories
 
</source>
 
</source>
 
</li>
 
</li>
 
<li>Run the below command to create an empty document.
 
<li>Run the below command to create an empty document.
<source lang="xml">
+
<source lang="bash">
 
sudo touch file_name.xml
 
sudo touch file_name.xml
 
</source>
 
</source>
Line 69: Line 115:
 
</ul>
 
</ul>
 
Once the file is created,run the script as follows:
 
Once the file is created,run the script as follows:
<source lang="xml">
+
<source lang="bash">
 
cd /var/lib/openinfoman/resources/tools;
 
cd /var/lib/openinfoman/resources/tools;
 
php  iti_74_query_for_updated_services.php > ../service_directories/file_name.xml
 
php  iti_74_query_for_updated_services.php > ../service_directories/file_name.xml
Line 105: Line 151:
 
<li>Host- This is the Rapidpro address.
 
<li>Host- This is the Rapidpro address.
 
<li>Organization Short Name – Is the slug which can be found under organization information of Account Details.
 
<li>Organization Short Name – Is the slug which can be found under organization information of Account Details.
<li>CSD Host-This is the HWR address in this format http://localhost:8984/CSD/csr/Rapidpro-Contacts/careServicesRequest where by Rapidpro-Contacts is the directory holding Contacts pulled from Rapidpro to the HWR.
+
<li>CSD Host-This is the OpenInfoman address in this format http://localhost:8984/CSD/csr/Rapidpro-Contacts/careServicesRequest where by Rapidpro-Contacts is the directory holding Contacts pulled from Rapidpro to OpenInfoman.
 
</ul>
 
</ul>
 
</li> Navigate to mHero_person_workflow Page Builders by clicking the following links:
 
</li> Navigate to mHero_person_workflow Page Builders by clicking the following links:
Line 113: Line 159:
 
<li>Repeat the procedures in step 3 above to configure mHero_person_workflow page.
 
<li>Repeat the procedures in step 3 above to configure mHero_person_workflow page.
 
</ol>
 
</ol>
===Starting a Work-flow===
+
See also [http://wiki.ihris.org/wiki/Using_mHero#Starting_A_Workflow_in_iHRIS Starting A Workflow Starting A Workflow in iHRIS]
Work-flows can be started by either using reports (Bulk Work-flows) or by accessing individual health worker profile page (View page).
+
 
<ol>
+
===Day-to-day operation of the HIE===
<li>Starting a Bulk Workflow
+
The OpenHIM is the central place that provides a view into how the HIE is performing. In day-to-day operation of mHero the OpenHIM web console should be monitored periodically to ensure that the synchronization of data is occurring successfully. It can also provide useful statistics about the performance of the OpenHIM for larger mHero implementations.
To start workflows using reports,visit the home page and click the mHero link. The report to be used should be selected and then display the list oh health workers by clicking the 'select participants' button. Both of the reports has many filters at the bottom which allows to start workflows to health workers based on specific criterion. Once done,the workflow to be used should now be selected. The workflow can be started to selected healthworkers by clicking the Start Flow button. The results of the workflow can be viewed by selecting the workflow and click on the View Results button.
+
 
<li>Starting a Workflow Through the Health Worker Profile.
+
It is useful to plan for this and assign a technical person that understand the exchange quite well to monitor this console periodically to ensure the smooth running of the HIE. This person will be instrumental in identifying problems early and ensuring that they get resolved correctly.
Workflows can be started in this way by searching the Health Worker through search reports and click the health worker name to open the health worker profile. Once the profile is opened,at the top right corner there is the mHero logo,once that link is clicked,the mHero page will open from which the workflow to be started to this health worker can be selected and started by clicking the start Workflow. The workflow activity can be seen by clicking the 'View Results' button.
+
 
</ol>
+
===Related Pages===
 +
[[Using mHero]]

Latest revision as of 22:35, 8 January 2018

mHero Installation and Configuration

Note: Some of this page is in draft form and may not work correctly just yet. In particular the OpenHIM installation docs. This will be rectified in the coming months.

Introduction and Overview

mHero is a free SMS mobile phone based communications system between MOH staff,Health Workers and Community Health Workers. This is achieved by the interoperability between Intrahealth's iHRIS (or any HRIS with CSD compliant) and UNICEF's Rapidpro and utilizing the OpenHIE architecture. The platform uses health workforce data to target specific communications based on cadre,location and other information. Communications, which can be triggered both centrally and locally, go far beyond traditional “message blasts” offered by many technology vendors. Real-time monitoring, complex multi-path surveys, monitoring and detailed analysis can be conducted with ease. This tutorial will use iHRIS as a HRIS. Mhero-diagram.png

mHero Components

  1. iHRIS-it is an integrated Human Resource Information System which is used to track and manage health workforce data.
  2. Rapidpro-is a free and open source framework designed to send and receive data using basic mobile phones, manage complex workflows, automate analysis and present data in real-time.
  3. Health Worker Registry- It is an OpenHIE component used to bring health workforce information together from variety of sources and represent that information in a common format against a common standard in order to facilitate the use of health workforce information across the health information system. Health Worker Registry is implemented by Openinfoman,this tutorial will be using the two terminologies interchangeably.
  4. OpenHIM - a component that provides security and access control mechanisms for mHero

About the OpenHIM

OpenHIM stands for the Open Health Information Mediator. The OpenHIM is an interoperability layer: a software component that eases integration between disparate information systems by connecting client and infrastructure components together. Its role is to provide a facade to client systems - providing a single point-of-control for defining web service APIs and adapting and orchestrating requests between infrastructure services. While doing this the OpenHIM also provides extensive security and access control mechanisms that enables the user to protect personal information within an HIE. It also enables monitoring and alerting services to ensure that the HIE is always running optimally.

OpenHIM security and privacy

Privacy and security are vital components of a coherently designed HIE. The OpenHIM is a cornerstone on which HIEs are built and it specialises in managing the interfaces on which systems interact with the HIE and on which components of the HIE communicate with each other. Therefore, the OpenHIM employs a number of mechanisms to ensure that traffic to and from an HIE is kept private and secure.

The OpenHIM provides the following features to ensure that personal information is protected:

  1. It makes it easy to ensure that traffic coming to the HIE or within it is encrypted. It does this by providing a certificate management facilities.
  2. It provides authentication mechanisms to ensure that only systems that are known and trusted can access the HIE services.
  3. It provides access control mechanisms to ensure that only systems that actually need access to certain services are allowed to access them.

How the OpenHIM fits into the mHero architecture

Within the context of mHero, the OpenHIM performs a few vital functions.

  1. It triggers the synchronization between iHRIS, OpenInfoMan and Rapidpro.
  2. It provides visibility into the messages being exchanged. This allows the user to ensure that the data exchange is occurring correctly.
  3. It ensures that the communication between components occurs securely and it logs the transactions for historical and audit purposes.
  4. It provides authentication and authorisation mechanisms to control access to the OpenInfoMan documents

The OpenHIM provides polling channels to trigger the synchronization between iHRIS and the OpenInfoMan. These polling channels execute periodically and trigger an mHero mediator which in turn pulls data out of the OpenInfoMan and pushes it into RapidPro. To learn more about polling channels please see the OpenHIM docs here.

The OpenHIM provides a web console that enables the user to view these synchronization message. This enables any problems to be debugged effectively and provides confidence that the synchronization is working effectively.

The OpenHIM was designed to protect an HIE by providing mechanisms to secure transactions between various components of the HIE. It can ensure that requests that access certain OpenInfoMan documents come from known and authorised sources.

Within mHero, the OpenInfoMan contains a number of documents which contain health worker and facility information. The OpenHIM prevents unauthorised access to these documents by implementing a role-based access control mechanism. This allows documents with sensitive information to be secured and documents with non-sensitive information to be as open and accessible as necessary.

Configuring the OpenHIM for mHero

Configuring the OpenHIM to work with mHero is fairly straightforward. A debian package has been created that will automatically configure the OpenHIM for the mHero context. This takes care of most of the configuration that is require. You can find this package here: https://github.com/jembi/openhim-config-mhero.

To install it simply execute the following on server to host the OpenHIM:

<source lang="bash"> sudo add-apt-repository -y ppa:openhie/release sudo apt-get update sudo apt-get install openhim-console openhim-core-js openhim-mediator-mhero </source>

After that the OpenHIM console will be accessible on http://localhost. For more information about how to use the OpenHIM console and edit the base configuration, see http://openhim.readthedocs.org/en/latest/user-guide/index.html.

Individual Components Installation

iHRIS can be installed by referring to its installation page which is http://wiki.ihris.org/wiki/Installing_iHRIS_4.2 while OpenInfoman can be installed by referring to OpenInfoMan installation page which is https://github.com/openhie/openinfoman and Rapidpro can be installed by referring to the Rapidpro installation page http://rapidpro.github.io/rapidpro/docs/development/.

Linking iHRIS,Rapidpro and OpenInfoman.

To setup mHero, iHRIS,Rapidpro and OpenInfoman needs to be connected together. There are two connections in here:

  1. Connecting iHRIS and OpenInfoman
  2. Connecting OpenInfoman and Rapidpro
    • Push all Health workers to Rapidpro.
    • Pull all created Rapidpro contacts back to OpenInfoman.

Connecting iHRIS and OpenInfoman.

The OpenInfoman is built on an international standard called Care Services Discovery (CSD). So to connect iHRIS and OpenInfoman,it will need to make iHRIS data to conform to CSD and then this data can be loaded to OpenInfoman. This video tutorial - https://www.youtube.com/watch?v=oxmRhW4Q2T4 shows how CSD documents can be generated and published in iHRIS. Generated CSD documents can then be pulled by the OpenInfoman and this video tutorial - https://www.youtube.com/watch?v=ev-my7-ZQ0I explains how to configure OpenInfoman to pull iHRIS published CSD documents. The simplest way of saying this is,iHRIS publishes health worker data in CSD format and OpenInfoman subscribes to the iHRIS CSD data.

The process above of publishing iHRIS data into CSD standard and openInfoman fetching iHRIS published CSD data has been automated within openHIM by the use of a mediator called openhim-mediator-mhero which is a nodejs service that is connected to openHIM to automate the whole process

Connecting OpenInfoman and Rapidpro.

This connection requires that each health worker that has a valid phone number in OpenInfoman to be created in Rapidpro as a contact. Once these contacts are created in Rapidpro,they will then need to be pulled and converted to CSD and then pushed to OpenInfoman with they corresponding Rapidpro ID,this is done in order that OpenInfoman knows which Health worker has an associated contact in Rapidpro. This connection can be achieved by two PHP scripts which all comes with the openinfoman-rapidpro library - https://github.com/openhie/openinfoman-rapidpro and can both be found under resources/tools.

  1. https://github.com/openhie/openinfoman-rapidpro/blob/master/resources/tools/synchronize.php. This script is used to create contacts in Rapidpro of all health workers in OpenInfoman that have phone numbers. The following are the explanations of some variables that needs to be set in the synchronize.php script: <source lang="bash"> $openinfoman = array( url'=>'http://localhost:8984/CSD/csr/CSD-Providers-Connectathon0150120/careServicesRequest/urn:openhie.org:openinfoman-rapidpro:get_json_for_import/adapter/rapidpro/get' ); </source> Replace localhost and port number with an appropriate openinfoman server address and port number. Replace CSD-Providers-Connectathon0150120 with an appropriate Openinfoman CSD document that was created during iHRIS and OpenInfoman connection. <source lang="bash"> $rapidpro= array( 'url' =>'https://app.rapidpro.io/api/v1/contacts.json', 'auth_token' => 'xxxxxxxsupersecretxxxxxxxx', 'group_name' => 'mHero Group' ) </source>
    • url-is the Rapidpro API for adding contacts,replace https://app.rapidpro.io with your appropriate Rapidpro address.
    • auth_token-This is the Rapidpro security token which can be found in webhook under Account Details.
    • group_name is the Rapidpro group name to which you want the contacts to be created,if this is left blank then no contact that will be created in any group.

    These can be set directly into the script but they can also be set through environmental variables I.e <source lang="bash"> export RAPIDPRO_AUTH_TOKEN=XXXXXXX. </source> The synchronize.php script can be executed as follows from command line: <source lang="bash"> php synchronize.php </source>

  2. https://github.com/openhie/openinfoman-rapidpro/blob/master/resources/tools/iti_74_query_for_updated_services.php. This script is used to pull all created contacts in Rapidpro. The variables for this script are similar to the one in synchronize.php with one more added variable which is the slug,this can be found in Rapidpro under organization information of Account Details. Before running the script for the first time,it will require to create an empty document in Openinfoman to be used for storing the output of the script of which are Rapidpro contacts converted in CSD format. To create the document,follow these 2 easy steps
    • Go to service directories of Openinfoman <source lang="bash"> cd /var/lib/openinfoman/resources/service_directories </source>
    • Run the below command to create an empty document. <source lang="bash"> sudo touch file_name.xml </source> replace file_name with the name of the file to be created.

    Once the file is created,run the script as follows: <source lang="bash"> cd /var/lib/openinfoman/resources/tools; php iti_74_query_for_updated_services.php > ../service_directories/file_name.xml </source> Make sure that you have root access in order to be able to write into the file_name.xml. After that,go to the front-end of Openinfoman and navigate to CSD Endpoints and then click the Load and Register Sample Service Directories link. If this is the first time running the script,the name of the file should be selected and then initialized by clicking the initialize link,but if this isn't the first time running the script,the file should just be reloaded by clicking on the reload link in order that it pulls any new contacts.

Enabling mHero Module in iHRIS

To enable mHero in iHRIS,mHero and IL-HWR modules will need to be enabled in-line with csd-data-address-type,csd-data-dow,csd-data-gender,csd-data-provider-status,csd-data-provider-data-model,csd-search and CSD-data modules in the site configuration. These modules can be enabled by just adding the below lines of codes between the <metadata></metadata> inside the site configuration file. <source lang="xml"> <enable name="csd-data-address-type" /> <enable name="csd-data-dow" /> <enable name="csd-data-gender" /> <enable name="csd-data-provider-status" /> <enable name="csd-data-provider-data-model" /> <enable name="IL-HWR" /> <enable name="mHero" /> <enable name="csd-search" /> <enable name="CSD-data" /> </source>

Configuring mHero module inside iHRIS

Various Rapidpro work-flows needs to be instantiated from iHRIS to individual health worker or to a group of health workers. For Rapidpro work-flows to be visible from iHRIS front-end,below configurations will need to be done.

  1. Login into iHRIS.
  2. Navigate to mHero Page Builders by clicking the following links: <source lang="xml"> Configure System → Page Builder → Scroll down to mHero and click on Edit Page link → Page and Primary Form Configurations. </source> MHero-Pagebuilder.png
  3. Then Rapidpro details should now be filled as follows:
    • Rapidpro Token is the security token which can be found under the Account Details on the top right corner of Rapidpro.
    • Host- This is the Rapidpro address.
    • Organization Short Name – Is the slug which can be found under organization information of Account Details.
    • CSD Host-This is the OpenInfoman address in this format http://localhost:8984/CSD/csr/Rapidpro-Contacts/careServicesRequest where by Rapidpro-Contacts is the directory holding Contacts pulled from Rapidpro to OpenInfoman.
  4. Navigate to mHero_person_workflow Page Builders by clicking the following links: <source lang="xml"> Configure System → Page Builder → Scroll down to mHero_person_workflow and click on Edit Page link → Page and Primary Form Configurations. </source>
  5. Repeat the procedures in step 3 above to configure mHero_person_workflow page.

See also Starting A Workflow Starting A Workflow in iHRIS

Day-to-day operation of the HIE

The OpenHIM is the central place that provides a view into how the HIE is performing. In day-to-day operation of mHero the OpenHIM web console should be monitored periodically to ensure that the synchronization of data is occurring successfully. It can also provide useful statistics about the performance of the OpenHIM for larger mHero implementations.

It is useful to plan for this and assign a technical person that understand the exchange quite well to monitor this console periodically to ensure the smooth running of the HIE. This person will be instrumental in identifying problems early and ensuring that they get resolved correctly.

Related Pages

Using mHero