Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Jira board: https://openimis.atlassian.net/jira/software/projects/OE0/boards/35

Objectives

The goal of this project is to improve the open-source Insurance Management Information System (openIMIS) interoperability layer for easier and more efficient integration with other health-related systems within OpenHIE (Open Health Information Exchange) architecture, and to allow an efficient installation procedure through enhanced packaging and documentation, and thus, to align the solution with the Instant OpenHIE project and initiative. 

This page is dedicated to the Digital Square Notice E0 project and will be used to specify the developments and the realizations from this project.

From the initial proposal, only two Work Packages were awarded within this project:

Table of Contents

Roadmap

...

FHIR REST API Login endpoint

The /login endpoint has been added to the FHIR R4 module to allow the generation of the JWT token through the FHIR R4 module’s REST API.

Code Block
languagetext
POST /api_fhir_r4/login 

Request body: 
  {
    "username": [username],
    "password": [password]
  }

HTTP 200 Response body: 
  {
    "token": [token]
    "exp": [expire_date]
  }

HTTP 401 Response if credentials are not valid  

FHIR REST API Authorization header

All other FHIR R4 requests should contain the Authorization header with the Bearer token.

Code Block
languagetext
Authorization: Bearer [token]

HTTP 200 Response when token validated (the actual resource payload is returned)

HTTP 401 Response when:
  if Authorization header is missing 
  if Bearer prefix is missing
  if error on decoding Authorization header  
  if token is expired

FHIR Authorisation

In openIMIS, authorisation is based on User’s role and location. A role is a group of authorities or permissions which are well defined and constant (see openIMIS Authorities for an up-to-date list of authorities). During the migrations, some of authorities were not added in the new created modules. Moreover, the query set used to obtain the data related to a resource was fetching all the objects from the DB.

Based on the openIMIS Authorities, used in the legacy openIMIS, we have added the missing permission to the modular openIMIS. Also, we have updated the query sets and retrieved them from the business module (e.g. Claim module) which limits the access based on the Users The following modules have been updated:

1.4 openIMIS FHIR Quality Assurance

To come

1.5 openIMIS FHIR module documentation

To come.

2 Packaging and Installation

2.1 Docker package improvement

Enhancement of openIMIS dockerization

For better distribution, docker can be used to facilitate the installation of openIMIS. The repository https://github.com/openimis/openimis-dist_dkr/tree/develop was updated to let users provide their own configuration using local files. For this, the user has to provide the openimis.json file locally using the appropriate environmental variable. Two files can be provided for the backend and frontend configuration (from the https://github.com/openimis/openimis-dist_dkr/blob/develop/README.md):

Code Block
BE_CONF_PATH=<the path to your config file, has to be local>
FE_CONF_PATH=<the path to your config file, has to be local>

Additionally if the user wants to provide development settings, there is a variable for the path where this configuration file would be located:

DEV_PATH=<the path to your developer config, optional>

For even easier installation, the different repositories will be built on the fly directly from GitHub (repository previously provided). The user can change the branch using the variables:

Code Block
 BE_BRANCH=<branch of the backend repository to be used>
 FE_BRANCH=<branch of the frontend repository to be used>
 DB_BRANCH=<branch of the database repository to be used>
 GW_BRANCH=<branch of the gateway repository to be used>

openIMIS integrated with Instant OpenHIE

A package to include not only openIMIS, but also services that could be required by an user, e.g. a mediator (OpenHIM) or a FHIR server (Hapi), was developed. For this purpose, we extend the work of the OpenHIE, so called Instant OpenHIE (https://github.com/openhie/instant) to include openIMIS as a service (https://github.com/openimis/openimis-dist_instant_openhie/tree/develop).

To satisfy the Instant OpenHIE requirements, some alterations were necessary to the openIMIS docker package. The manual steps for the installation of the database were eliminated, so that the only command the user requires is:

./deploy.sh init core openimis-db_dkr openimis-dist_dkr -c="./openimis-db_dkr" -c="./openimis-dist_dkr"

To clean up the project you'd use destroy instead of init. The commands up and down known from docker-compose are also allowed.
Alternatively, you can achieve the same by cloning the https://github.com/openhie/instant repository, and running it with yarn. Having the repository locally, would replace the need of the deploy.sh.
Given that the service is in a directory that follows Instant OpenHIE structure, this implementation is extendable with any service the user may want by adding the package ID to the previous command with the corresponding path.
The variables for both services are now in the docker/compose.sh files of each service as opposed of the .env file in the previous repository.

...

Roadmap Planner
maplinks
timelinetrue
source%7B%22title%22%3A%22Roadmap%20Planner%22%2C%22timeline%22%3A%7B%22startDate%22%3A%222021-04-01%2000%3A00%3A00%22%2C%22endDate%22%3A%222021-12-01%2000%3A00%3A00%22%2C%22displayOption%22%3A%22MONTH%22%7D%2C%22lanes%22%3A%5B%7B%22title%22%3A%22openIMIS%20FHIR%20Module%22%2C%22color%22%3A%7B%22lane%22%3A%22%23f6c342%22%2C%22bar%22%3A%22%23fadb8e%22%2C%22text%22%3A%22%23594300%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22title%22%3A%221.1%20FHIR%20release%20four%20(R4)%20integration%22%2C%22description%22%3A%22%22%2C%22startDate%22%3A%222021-06-30%2016%3A52%3A16%22%2C%22duration%22%3A3%2C%22rowIndex%22%3A0%2C%22id%22%3A%227db2c4c87db2c4c8-deb7-4bdf-a9e2-b406d06d3ea7%22%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22title%22%3A%221.2%20FHIR%20R4%20extensions%20development%22%2C%22description%22%3A%22%22%2C%22startDate%22%3A%222021-07-01%2000%3A00%3A00%22%2C%22duration%22%3A2.9900990096450615%2C%22rowIndex%22%3A1%2C%22id%22%3A%22d5e1f590b406d06d3ea7~~~~~d5e1f590-bedc-4bd9-8a36-2a36153ae5c9%22%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A2%2C%22startDate%22%3A%222021-04-07%2019%3A57%3A37%22%2C%22id%22%3A%224322b6ab2a36153ae5c9~~~~~4322b6ab-3017-4322-b96b-08ec032f2849%22%2C%22title%22%3A%221.3%20FHIR%20Authentication%20and%20Authorisation%22%2C%22description%22%3A%22%22%2C%22duration%22%3A2.772277227623457%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A3%2C%22startDate%22%3A%222021-06-30%2016%3A52%3A16%22%2C%22id%22%3A%22083ccf6d08ec032f2849~~~~~083ccf6d-4036-4932-9332-6742cd0f9c21%22%2C%22title%22%3A%221.4%20openIMIS%20FHIR%20Quality%20Assurance%22%2C%22description%22%3A%22%22%2C%22duration%22%3A3.009900989969136%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A4%2C%22startDate%22%3A%222021-09-30%2016%3A52%3A16%22%2C%22id%22%3A%2200eff981-7c84-4f06-a55e-ce2e9f81bb56%22%2C%22title%22%3A%221.5%20openIMIS%20FHIR%20module%20documentation%22%2C%22description%22%3A%22%22%2C%22duration%22%3A2.9986559138167066%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%2C%7B%22title%22%3A%22Packaging%20and%20Installation%22%2C%22color%22%3A%7B%22lane%22%3A%22%233b7fc4%22%2C%22bar%22%3A%22%236c9fd3%22%2C%22text%22%3A%22%23ffffff%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22title%22%3A%222.1%20Docker%20package%20improvement%22%2C%22description%22%3A%22%22%2C%22startDate%22%3A%222021-04-07%2023%3A31%3A29%22%2C%22duration%22%3A2.7597359733796294%2C%22rowIndex%22%3A0%2C%22id%22%3A%2232a752046742cd0f9c21~~~~~32a75204-684b-4924-be5f-cebe98b59b94%22%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A1%2C%22startDate%22%3A%222021-09-30%2016%3A52%3A16%22%2C%22id%22%3A%2225280273cebe98b59b94~~~~~25280273-7e1a-4186-b0a2-234241546d29%22%2C%22title%22%3A%222.2%20Developer%20initialisation%20script%22%2C%22description%22%3A%22%22%2C%22duration%22%3A2.9986559138167066%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%5D%2C%22markers%22%3A%5B%5D%7Dpagelinks
titleRoadmap%20Planner
hashe22fdc69e51ac3d648876928acf14901

The following sections will specify the changes and enhancements brought by this project to the two components from each WP.

1 openIMIS FHIR Module

1.1 FHIR release four (R4) integration

Expand
titleopenIMIS Policies mobile app: Enrol Family payload
Code Block
languagejson
{
    "family": [{
        "FamilyId": "1",
        "InsureeId": "1",
        "LocationId": "61",
        "HOFCHFID": "131",
        "Poverty": "0",
        "FamilyType": "H",
        "FamilyAddress": "PermAdress1",
        "Ethnicity": "0",
        "ConfirmationNo": "Confirm1",
        "ConfirmationType": "C",
        "isOffline": "1",
        "FamilySMS": {
            "FamilyID": "1",
            "ApprovalOfSMS": true,
            "LanguageOfSMS": "fr"
        },
        "insurees": [{
            "InsureeId": "1",
            "FamilyId": "1",
            "CHFID": "131",
            "LastName": "NewTestInsureeLast",
            "OtherNames": "NewTestInsureeOther",
            "DOB": "2021-06-09",
            "Gender": "F",
            "Marital": "M",
            "isHead": "1",
            "IdentificationNumber": "NationaID1",
            "Phone": "123123123",
            "PhotoPath": "131_E00002_20210609124332_0_0.jpg",
            "CardIssued": "1",
            "Relationship": "0",
            "Profession": "1",
            "Education": "4",
            "Email": "insuree@mail.com",
            "TypeOfId": "N",
            "HFID": "4",
            "CurrentAddress": "CurrentInsureeAdress",
            "GeoLocation": "",
            "CurVillage": "62",
            "isOffline": "1"
        }],
        "policies": [{
            "PolicyId": "1",
            "FamilyId": "1",
            "EnrollDate": "2021-06-09",
            "StartDate": "2021-11-01",
            "EffectiveDate": "2021-11-01",
            "ExpiryDate": "2022-10-31",
            "PolicyStatus": "2",
            "PolicyValue": "6000",
            "ProdId": "10",
            "OfficerId": "6",
            "PolicyStage": "N",
            "isOffline": "1",
            "premium": {
                "PremiumId": "1",
                "PolicyId": "1",
                "PayerId": "0",
                "Amount": "6000",
                "Receipt": "REC0001",
                "PayDate": "2021-06-09",
                "PayType": "B",
                "isPhotoFee": "false",
                "isOffline": "1"
            }
        }],
        "insureePolicy": [{
            "InsureeId": "1",
            "PolicyId": "1",
            "EffectiveDate": "2021-11-01"
        }]
    }]
}

Expand
titleopenIMIS Policies mobile app: Modify Family payload
Code Block
languagejson
{
    "family": [{
        "FamilyId": "-31",
        "InsureeId": "-145",
        "LocationId": "60",
        "HOFCHFID": "121",
        "Poverty": "0",
        "FamilyType": "P",
        "FamilyAddress": "PermAdress1234",
        "Ethnicity": "0",
        "ConfirmationNo": "CONF002",
        "ConfirmationType": "C",
        "isOffline": 0,
        "FamilySMS": {
            "FamilyID": "-31",
            "ApprovalOfSMS": false,
            "LanguageOfSMS": "fr"
        },
        "insurees": [{
            "InsureeId": "-145",
            "FamilyId": "-31",
            "CHFID": "121",
            "LastName": "Test1@",
            "OtherNames": "Test1@",
            "DOB": "2021-06-09",
            "Gender": "M",
            "Marital": "D",
            "isHead": "true",
            "IdentificationNumber": "",
            "Phone": "",
            "PhotoPath": "121_E00002_20210609121931_0_0.jpg",
            "CardIssued": "true",
            "Relationship": "0",
            "Profession": "0",
            "Education": "0",
            "Email": "",
            "TypeOfId": "",
            "HFID": "0",
            "CurrentAddress": "",
            "GeoLocation": "",
            "CurVillage": "45",
            "isOffline": "0",
            "picture": {
                "ImageName": "",
                "ImageContent": ""
            }
        }, {
            "InsureeId": "-147",
            "FamilyId": "-31",
            "CHFID": "1221",
            "LastName": "TestR1",
            "OtherNames": "TestR1",
            "DOB": "2021-06-09",
            "Gender": "M",
            "Marital": "N",
            "isHead": "false",
            "IdentificationNumber": "",
            "Phone": "",
            "PhotoPath": "1221_E00002_20210609122012_0_0.jpg",
            "CardIssued": "false",
            "Relationship": "1",
            "Profession": "0",
            "Education": "0",
            "Email": "",
            "TypeOfId": "",
            "HFID": "0",
            "CurrentAddress": "",
            "GeoLocation": "",
            "CurVillage": "0",
            "isOffline": "0",
            "picture": {
                "ImageName": "",
                "ImageContent": ""
            }
        }, {
            "InsureeId": "-148",
            "FamilyId": "-31",
            "CHFID": "12221",
            "LastName": "AddedToExistingLast",
            "OtherNames": "AddedToExistingOther",
            "DOB": "2021-06-09",
            "Gender": "F",
            "Marital": "D",
            "isHead": "0",
            "IdentificationNumber": "PassportID",
            "Phone": "9018231022",
            "PhotoPath": "12221_E00002_20210609124855_0_0.jpg",
            "CardIssued": "1",
            "Relationship": "0",
            "Profession": "2",
            "Education": "5",
            "Email": "newinsureemail@mail.com",
            "TypeOfId": "P",
            "HFID": "1",
            "CurrentAddress": "CurrentAdresss011",
            "GeoLocation": "",
            "CurVillage": "62",
            "isOffline": "1"
        }],
        "policies": [{
            "PolicyId": "1",
            "FamilyId": "-31",
            "EnrollDate": "2021-06-09",
            "StartDate": "2021-06-09",
            "EffectiveDate": "2021-06-09",
            "ExpiryDate": "2022-06-08",
            "PolicyStatus": "2",
            "PolicyValue": "10000",
            "ProdId": "4",
            "OfficerId": "6",
            "PolicyStage": "N",
            "isOffline": "1",
            "premium": {
                "PremiumId": "1",
                "PolicyId": "1",
                "PayerId": "0",
                "Amount": "10000",
                "Receipt": "REC0002",
                "PayDate": "2021-06-09",
                "PayType": "C",
                "isPhotoFee": "false",
                "isOffline": "1"
            }
        }],
        "insureePolicy": [{
            "InsureeId": "-147",
            "PolicyId": "1",
            "EffectiveDate": "2021-06-09"
        }, {
            "InsureeId": "-145",
            "PolicyId": "1",
            "EffectiveDate": "2021-06-09"
        }, {
            "InsureeId": "148",
            "PolicyId": "1",
            "EffectiveDate": "2021-06-09"
        }]
    }]
}

1.2 FHIR R4 extensions development

1.3 FHIR Authentication and Authorisation

FHIR Authentication

The objective is to manage User authentication directly from the FHIR module. The JWT authentication mechanism is used. FHIR module is using the authentication services so the token can be used in both FHIR REST API and GraphQL queries.

...

234241546d29
timelinetrue
source%7B%22title%22%3A%22Roadmap%20Planner%22%2C%22timeline%22%3A%7B%22startDate%22%3A%222021-04-01%2000%3A00%3A00%22%2C%22endDate%22%3A%222021-12-01%2000%3A00%3A00%22%2C%22displayOption%22%3A%22MONTH%22%7D%2C%22lanes%22%3A%5B%7B%22title%22%3A%22openIMIS%20FHIR%20Module%22%2C%22color%22%3A%7B%22lane%22%3A%22%23f6c342%22%2C%22bar%22%3A%22%23fadb8e%22%2C%22text%22%3A%22%23594300%22%7D%2C%22bars%22%3A%5B%7B%22id%22%3A%227db2c4c8-deb7-4bdf-a9e2-b406d06d3ea7%22%2C%22title%22%3A%221.1%20FHIR%20release%20four%20(R4)%20integration%22%2C%22description%22%3A%22%22%2C%22startDate%22%3A%222021-06-30%2002%3A36%3A49%22%2C%22duration%22%3A3.00990099009901%2C%22rowIndex%22%3A0%2C%22pageLink%22%3A%7B%22id%22%3A%222922545269%22%2C%22spaceKey%22%3A%22OP%22%2C%22title%22%3A%221.1%20FHIR%20release%20four%20(R4)%20integration%22%2C%22type%22%3A%22page%22%2C%22wikiLink%22%3A%22%5B1.1%20FHIR%20release%20four%20(R4)%20integration%5D%22%7D%7D%2C%7B%22id%22%3A%22d5e1f590-bedc-4bd9-8a36-2a36153ae5c9%22%2C%22title%22%3A%221.2%20FHIR%20R4%20extensions%20development%22%2C%22description%22%3A%22%22%2C%22startDate%22%3A%222021-06-30%2002%3A36%3A49%22%2C%22duration%22%3A3.00990099009901%2C%22rowIndex%22%3A1%2C%22pageLink%22%3A%7B%22id%22%3A%222923462669%22%2C%22spaceKey%22%3A%22OP%22%2C%22title%22%3A%221.2%20FHIR%20R4%20extensions%20development%22%2C%22type%22%3A%22page%22%2C%22wikiLink%22%3A%22%5B1.2%20FHIR%20R4%20extensions%20development%5D%22%7D%7D%2C%7B%22id%22%3A%224322b6ab-3017-4322-b96b-08ec032f2849%22%2C%22title%22%3A%221.3%20FHIR%20Authentication%20and%20Authorisation%22%2C%22description%22%3A%22%22%2C%22startDate%22%3A%222021-04-07%2019%3A57%3A37%22%2C%22duration%22%3A2.7524752475247523%2C%22rowIndex%22%3A2%2C%22pageLink%22%3A%7B%22id%22%3A%222922545205%22%2C%22spaceKey%22%3A%22OP%22%2C%22title%22%3A%221.3%20FHIR%20Authentication%20and%20Authorisation%22%2C%22type%22%3A%22page%22%2C%22wikiLink%22%3A%22%5B1.3%20FHIR%20Authentication%20and%20Authorisation%5D%22%7D%7D%2C%7B%22id%22%3A%22083ccf6d-4036-4932-9332-6742cd0f9c21%22%2C%22title%22%3A%221.4%20openIMIS%20FHIR%20Quality%20Assurance%22%2C%22description%22%3A%22%22%2C%22startDate%22%3A%222021-06-30%2016%3A52%3A16%22%2C%22duration%22%3A3.009900989969136%2C%22rowIndex%22%3A3%2C%22pageLink%22%3A%7B%22id%22%3A%222922545307%22%2C%22spaceKey%22%3A%22OP%22%2C%22title%22%3A%221.4%20openIMIS%20FHIR%20Quality%20Assurance%22%2C%22type%22%3A%22page%22%2C%22wikiLink%22%3A%22%5B1.4%20openIMIS%20FHIR%20Quality%20Assurance%5D%22%7D%7D%2C%7B%22id%22%3A%2200eff981-7c84-4f06-a55e-ce2e9f81bb56%22%2C%22title%22%3A%221.5%20openIMIS%20FHIR%20module%20documentation%22%2C%22description%22%3A%22%22%2C%22startDate%22%3A%222021-09-30%2016%3A52%3A16%22%2C%22duration%22%3A2.9986559138167066%2C%22rowIndex%22%3A4%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%2C%7B%22title%22%3A%22Packaging%20and%20Installation%22%2C%22color%22%3A%7B%22lane%22%3A%22%233b7fc4%22%2C%22bar%22%3A%22%236c9fd3%22%2C%22text%22%3A%22%23ffffff%22%7D%2C%22bars%22%3A%5B%7B%22id%22%3A%2232a75204-684b-4924-be5f-cebe98b59b94%22%2C%22title%22%3A%222.1%20Docker%20package%20improvement%22%2C%22description%22%3A%22%22%2C%22startDate%22%3A%222021-04-07%2023%3A31%3A29%22%2C%22duration%22%3A2.7597359733796294%2C%22rowIndex%22%3A0%2C%22pageLink%22%3A%7B%22id%22%3A%222922545340%22%2C%22spaceKey%22%3A%22OP%22%2C%22title%22%3A%222.1%20Docker%20package%20improvement%22%2C%22type%22%3A%22page%22%2C%22wikiLink%22%3A%22%5B2.1%20Docker%20package%20improvement%5D%22%7D%7D%2C%7B%22id%22%3A%2225280273-7e1a-4186-b0a2-234241546d29%22%2C%22title%22%3A%222.2%20Developer%20initialisation%20script%22%2C%22description%22%3A%22%22%2C%22startDate%22%3A%222021-09-30%2016%3A52%3A16%22%2C%22duration%22%3A2.9986559138167066%2C%22rowIndex%22%3A1%2C%22pageLink%22%3A%7B%22id%22%3A%222922545384%22%2C%22spaceKey%22%3A%22OP%22%2C%22title%22%3A%222.2%20Developer%20initialisation%20script%22%2C%22type%22%3A%22page%22%2C%22wikiLink%22%3A%22%5B2.2%20Developer%20initialisation%20script%5D%22%7D%7D%5D%7D%5D%2C%22markers%22%3A%5B%7B%22markerDate%22%3A%222021-06-30%2009%3A44%3A33%22%2C%22title%22%3A%22First%20deliverables%22%7D%2C%7B%22markerDate%22%3A%222021-10-01%2000%3A00%3A00%22%2C%22title%22%3A%22Second%20deliverables%22%7D%2C%7B%22markerDate%22%3A%222021-12-31%2016%3A38%3A01%22%2C%22title%22%3A%22Third%20deliverables%22%7D%5D%7D
pagelinks1.1 FHIR release four (R4) integration~~~~~1.2 FHIR R4 extensions development~~~~~1.3 FHIR Authentication and Authorisation~~~~~1.4 openIMIS FHIR Quality Assurance~~~~~2.1 Docker package improvement~~~~~2.2 Developer initialisation script
titleRoadmap%20Planner
hasha2407b78bbfcf69eccb1e1cd2ceba350

In July 2022, Dragos Dobre from SwissTPH held a webinar where he gave a detailed overview of the project with a focus on the FHIR module. You can watch the whole presentation here:

Widget Connector
overlayyoutube
_templatecom/atlassian/confluence/extra/widgetconnector/templates/youtube.vm
width400px
urlhttps://www.youtube.com/watch?v=xIg8iErO2s4
height300px

https://www.youtube.com/watch?v=xIg8iErO2s4

The following sections will specify the changes and enhancements brought by this project to the two components from each WP.

Child pages (Children Display)