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:
- transaction analysis of contracts IPEHR-blockchain-indexes
- periodic direct invocation of contract methods IPEHR-blockchain-indexes
- making AQL queries to IPEHR-gateway
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;
Please follow installation instructions provided here.
git clone https://github.com/bsn-si/IPEHR-stat
cd ./IPEHR-stat
go build -o ./bin/ipehr-stat cmd/main.go
Write your settings in config.json
. It can be based on config.json.example
.
The actual addresses of deployed contracts can be found here.
./bin/ipehr-stat -config=./config.json