The supply chain involves:
- Manufacturer
The manufacturer manufactures the medicine in units, or batches, identified by a batchID. The manufacture now owns the batch. The manufacturer can send this batch to a distributor. - Distributor
The distributor now has the option to either accept or reject the batch. If rejected, ownership doesn't change; the batch remains under the manufacture. If the batch is accepted, ownership is transferred to the distributor. The distributor can send this batch to a pharmacy. - Pharmacy
The pharmacy has the option to accept or reject the batch; this is similar to the distributor. - Admin
The admin can add manufacturers, distributors and pharmacies.
- Navigate into the folder in the terminal.
Bring up the docker containers using the command:
$ [sudo] docker-compose up
This starts the client, processor, network, validator, dev-mode consensus engine. - Open a new terminal to enter into the pharma-client docker container.
$ [sudo] docker exec -it pharma-client bash
- Install flask.
# pip3 install Flask
- The four players - admin, manufacturers, distributors and pharmacies - each have their own webpages, hosted on different ports.
Open 4 new terminals, one for each:# python3 admin.py
# python3 manufacturer.py
# python3 distributor.py
# python3 pharmacies.py
- Open the webpages in a browser:
0.0.0.0/5000
- for the admin0.0.0.0/5010
- for the manufacturer0.0.0.0/5020
- for the distributor0.0.0.0/5030
- for the pharmacy