Pharmacy

TOOLSFINANCIALUTILITY

Exposed Methods

addMedication adds a medication to the pharmacy

parameter nametypedetails
_priceuintprice of the med
_namestringname of the med
_prescriptionbooltracks if a medication is on prescription or not

addPharmacist adds an address of a pharmacist

parameter nametypedetails
_pharmaddressaddress of the pharmacist

prescriptionConfirmed the pharmacist verifies the prescription and allows the customer to buy a specific med

parameter nametypedetails
_pharmaddressaddress of the pharmacist
_mednamestringname of the med

buyMed function for the customer to buy a medication

parameter nametypedetails
_mednamestringname of the med

checkStock returns the current stock of a med

parameter nametypedetails
_mednamestringname of the med

restock function for the pharmacist to modify the stock when a restock happens

parameter nametypedetails
_mednamestringname of the med
_unitsuintnumber of units resupplied

checkPrice returns the price of a medication

parameter nametypedetails
_mednamestringname of the med

withdraw withdraw function for the owner

Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract