IPEHR-stat
This repository contains a service for pushing statistical data available in the IPEHR system to public space using Chainlink network.
The service implements an open API with specified metrics.
The data is collected and processed by accessing to IPEHR-blockchain-indexes smart contracts.
Medical statistics can be collected by the service through:
For demonstration purposes, the following metrics are implemented:
- number of patients registered in the system over all time;
- number of patients logged in the system for a specified period;
- number of EHR documents registered in the system;
- number of EHR documents registered in the system for a given period;
API Documentation
Local deployment
Go
Please follow installation instructions provided here.
Clone this repo
git clone https://github.com/bsn-si/IPEHR-stat
Build IPEHR-gateway
cd ./IPEHR-stat
go build -o ./bin/ipehr-stat cmd/main.go
Change config parameters
Write your settings in config.json
. It can be based on config.json.example
.
The actual addresses of deployed contracts can be found here.
Run IPEHR-stat
./bin/ipehr-stat -config=./config.json
Usage examples
Direct consumer delivery:
Scheduled delivery: