This is a forked repo from ProjectEKA/hip-service and includes all the ABDM features build on top of it.
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.
Sample implementation of HIP which can be referred for future implementation of health information provider service.
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
To run
dotnet run --environment="dev" --project src/In.ProjectEKA.HipService/In.ProjectEKA.HipService.csproj
To run the tests
dotnet test test/In.ProjectEKA.HipServiceTest/In.ProjectEKA.HipServiceTest.csproj
- Discovery of a patient account
- Linking of a patient with Consent Manager
- Consent artefact's acceptance
- Data transfer
Once ran the application, navigate to
{HOST}/swagger/index.html
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:
- make sure that the docker stack is running - in case needed, (re)build docker stack (docker-compose -f docker-compose.yml up --build -d)
- open postman and import the collection
- if you don't have, create an environment in postman (https://learning.postman.com/docs/sending-requests/managing-environments/)
- run the Post Token request from the imported collection
- run the Happy Case request from the imported collection -> you should get a 202 response
- if you go go to the logs for the gateway stub container, you will see the response posted to gateway
docker run --name seq -d --restart unless-stopped -e ACCEPT_EULA=Y \
-p 7000:80 \
-p 5341:5341 \
datalust/seq:latest