Git Product home page Git Product logo

yenugukeerthana / hip-service Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bahmniindiadistro/hip-service

0.0 0.0 0.0 17.7 MB

“Health Information Provider” refers to clinical establishments which generate or store customer data in digital form. These include hospitals, primary or secondary health care centres, nursing homes, diagnostic centres, clinics, medical device companies and other such entities as may be identified by regulatory authorities from time to time

License: MIT License

Shell 0.05% C# 97.45% Dockerfile 0.15% EJS 2.35%

hip-service's Introduction

This is a forked repo from ProjectEKA/hip-service and includes all the ABDM features build on top of it.

🏥 Health Information Provider

Clinical establishments which generate or store customer data in digital form. These include hospitals, primary or secondary health care centres, nursing homes, diagnostic centres, clinics, medical device companies and other such entities as may be identified by regulatory authorities from time to time.

💪 Motivation

Sample implementation of HIP which can be referred for future implementation of health information provider service.

Build Status

Build

👍 Code Style

C# Naming Conventions

🎉 Language/Frameworks

🏁 Requirements

🐳 Running From The Docker Image

Create docker image

docker build -t hip-service hip-service/.

To run the image

docker run -d -p 8000:80 hip-service

To use docker compose locally

docker-compose up -d

To use docker compose to run pre-existing image from docker-hub

export {ENVIRONMENT_VARIABLE}={ENVIRONMENT_VALUE}
docker-compose -f docker-compose.yml -f docker-compose.{environment}.yml up -d

Example:
export IMAGE_TAG=13f9004
docker-compose -f docker-compose.yml -f docker-compose.development.yml up -d

🚀 Running From Source

To run

dotnet run --environment="dev" --project src/In.ProjectEKA.HipService/In.ProjectEKA.HipService.csproj

Running The Tests

To run the tests

dotnet test test/In.ProjectEKA.HipServiceTest/In.ProjectEKA.HipServiceTest.csproj

Features

  1. Discovery of a patient account
  2. Linking of a patient with Consent Manager
  3. Consent artefact's acceptance
  4. Data transfer

API Contract

Once ran the application, navigate to

{HOST}/swagger/index.html

Gateway and authentication stubs

In the docker compose file there are two additional containers for development purposes. 'gateway' is for simulating the Gateway service. It logs incoming requests to its console. Hence you can use it to get insight into the requests sent from HIP service to the Gateway service. 'oidc-server-mock' is used to simulate the OpenID Connect authentication provided by the Gateway service. To make them work, you first need to get a authentication token from the oidc-server-mock by providing the configured clientid, client secret, grant type and scope (see these settings in the client configuration file: /gatewayStubConfigurations/oicdConfigs/clients-config.json). Using this authentication token as an Oath 2.0 token, you can send a request to the HIP service that will be accepted by the authentication. Please note in the docker compose file the ports that these containers need to use to be able to run. You can use the described flow with any tooling, however, we included a sample Postman collection (/gatewayStubConfigurations/postmanCollections/HIPSamplePostmanCollections.json) that you can use for sending the requests, or for reference. Please follow the following steps with the Postman collection:

  1. make sure that the docker stack is running - in case needed, (re)build docker stack (docker-compose -f docker-compose.yml up --build -d)
  2. open postman and import the collection
  3. if you don't have, create an environment in postman (https://learning.postman.com/docs/sending-requests/managing-environments/)
  4. run the Post Token request from the imported collection
  5. run the Happy Case request from the imported collection -> you should get a 202 response
  6. if you go go to the logs for the gateway stub container, you will see the response posted to gateway

To view structured (json) logs

docker run --name seq -d --restart unless-stopped -e ACCEPT_EULA=Y \
  -p 7000:80 \
  -p 5341:5341 \
  datalust/seq:latest

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.