Git Product home page Git Product logo

iexhub-xdsb's Introduction

IExHub XDS.b API

The IExHub XDS.b (iexhub-xdsb) Spring Boot project provides RESTful endpoints to allow applications to interoperate with standards-based Health Information Exchange (HIE) organizations. In particular, two endpoints are provided for sharing clinical records facilitating Cross-Enterprise Document Sharing (XDS.b) operations: (1) to get a patient's health data from the HIE, which in turn uses ITI-18 Registry Stored Query and ITI-43 Retrieve Document Set transactions and (2) to publish a patient's clinical record using ITI-41 Provide and Register Document transactions.

Build

Prerequisites

Commands

This is a Maven project and requires Apache Maven 3.3.3 or greater to build it. It is recommended to use the Maven Wrapper scripts provided with this project. Maven Wrapper requires an internet connection to download Maven and project dependencies for the very first build.

To build the project, navigate to the folder that contains pom.xml file using the terminal/command line.

  • To build a JAR:
    • For Windows, run mvnw.cmd clean install
    • For *nix systems, run mvnw clean install
  • To build a Docker Image (this will create an image with bhitsdev/iexhub-xdsb:latest tag):
    • For Windows, run mvnw.cmd clean package docker:build
    • For *nix systems, run mvnw clean package docker:build

Run

Commands

This is a Spring Boot project and serves the API via an embedded Tomcat instance. Therefore, there is no need for a separate application server to run this service.

  • Run as a JAR file: java -jar iexhub-xdsb-x.x.x-SNAPSHOT.jar <additional program arguments>
  • Run as a Docker Container: docker run -d bhitsdev/iexhub-xdsb:latest <additional program arguments>

NOTE: In order for this project to fully function as a microservice in the Consent2Share application, it is required to setup the dependency microservices and the support level infrastructure. Please refer to the Consent2Share Deployment Guide in the corresponding Consent2Share release (see Consent2Share Releases Page) for instructions to setup the Consent2Share infrastructure.

Configure

This API utilizes Configuration Server which is based on Spring Cloud Config to manage externalized configuration, which is stored in a Configuration Data Git Repository. We provide a Default Configuration Data Git Repository.

This API can run with the default configuration, which is targeted for a local development environment. Default configuration data is from three places: bootstrap.yml, application.yml, and the data which Configuration Server reads from Configuration Data Git Repository. Both bootstrap.yml and application.yml files are located in the resources folder of this source code.

We recommend overriding the configuration as needed in the Configuration Data Git Repository, which is used by the Configuration Server.

Also, please refer to Spring Cloud Config Documentation to see how the config server works, Spring Boot Externalized Configuration documentation to see how Spring Boot applies the order to load the properties, and Spring Boot Common Properties documentation to see the common properties used by Spring Boot.

Other Ways to Override Configuration

Override a Configuration Using Program Arguments While Running as a JAR:

  • java -jar iexhub-xdsb-x.x.x-SNAPSHOT.jar --server.port=80

Override a Configuration Using Program Arguments While Running as a Docker Container:

  • docker run -d bhitsdev/iexhub-xdsb:latest --server.port=80

  • In a docker-compose.yml, this can be provided as:

version: '2'
services:
...
  iexhub-xdsb.c2s.com:
    image: "bhitsdev/iexhub-xdsb:latest"
    command: ["--server.port=80"]
...

NOTE: Please note that these additional arguments will be appended to the default ENTRYPOINT specified in the Dockerfile unless the ENTRYPOINT is overridden.

Enable SSL

For simplicity in development and testing environments, SSL is NOT enabled by default configuration. SSL can be easily enabled by following the examples below:

Enable SSL While Running as a JAR

  • java -jar iexhub-xdsb-x.x.x-SNAPSHOT.jar --spring.profiles.active=ssl --server.ssl.key-store=/path/to/ssl_keystore.keystore --server.ssl.key-store-password=strongkeystorepassword

Enable SSL While Running as a Docker Container

  • docker run -d -v "/path/on/dockerhost/ssl_keystore.keystore:/path/to/ssl_keystore.keystore" bhitsdev/iexhub-xdsb:latest --spring.profiles.active=ssl --server.ssl.key-store=/path/to/ssl_keystore.keystore --server.ssl.key-store-password=strongkeystorepassword
  • In a docker-compose.yml, this can be provided as:
version: '2'
services:
...
  iexhub-xdsb.c2s.com:
    image: "bhitsdev/iexhub-xdsb:latest"
    command: ["--spring.profiles.active=ssl","--server.ssl.key-store=/path/to/ssl_keystore.keystore", "--server.ssl.key-store-password=strongkeystorepassword"]
    volumes:
      - /path/on/dockerhost/ssl_keystore.keystore:/path/to/ssl_keystore.keystore
...

NOTE: As seen in the examples above, /path/to/ssl_keystore.keystore is made available to the container via a volume mounted from the Docker host running this container.

Override Java CA Certificates Store In Docker Environment

Java has a default CA Certificates Store that allows it to trust well-known certificate authorities. For development and testing purposes, one might want to trust additional self-signed certificates. In order to override the default Java CA Certificates Store in a Docker container, one can mount a custom cacerts file over the default one in the Docker image as follows docker run -d -v "/path/on/dockerhost/to/custom/cacerts:/etc/ssl/certs/java/cacerts" bhitsdev/iexhub-xdsb:latest

NOTE: The cacerts references given in the volume mapping above are files, not directories.

Issues with HAPI FHIR Converter

IExHub XDS.b is using hapi fhir converter to converte CCDA document to FHIR bundle. Here is list of issues found in hapi fhir converter.

  • Not support multiple "languageCommunication" under the "patient" section
  • Not support “negationInd” attribute under “observation”
  • Not support “xsi:type= PQ" in “value” attribute in "Alcoholic drinks per day" under "Social history observation"
  • Using wrong template id for "TobaccoUse"

Contact

If you have any questions, comments, or concerns please see Consent2Share project site.

Report Issues

Please use GitHub Issues page to report issues.

iexhub-xdsb's People

Contributors

burcakulug avatar cindylifei avatar michael-fei avatar sadhch avatar shruti-rao avatar tomsonngassa avatar utishrajk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.