MedicalEmergencyTracker

UTILITYTOOLS

Exposed Methods

addAmbulance function to add an ambulance to the array

parameter nametypedetails
_ambnumberuintnumber of the ambulance
_driveraddressethereum address designated ofr the driver

addCrew adds a crew member to the ambulance

parameter nametypedetails
_ambnumberuintnumber of the ambulance
_nameuintname of the crew member
_idcodeuintbadge id of the crew member

emergency function for the person that has an emergency to call the ambulance

parameter nametypedetails
_locationstringperson's location where the emergency happened

respondToEmergency function for the ambulance crew to respond to an emergency

parameter nametypedetails
_ambnumberuintnumber of the ambulance
_timeofarrivalstringtime calculated by the dapp until the ambulance arrives at location
_locationstringperson's location where the emergency happened

emergencyResolved function called by the ambulance crew when the emergency was answered and resolved

parameter nametypedetails
_ambnumberuintnumber of the ambulance
_locationstringperson's location where the emergency happened

returnedToGarage function called when an ambulance shift is over

parameter nametypedetails
_ambnumberuintnumber of the ambulance

ready function that makes the ambulance available again to respond to emergencies

parameter nametypedetails
_ambnumberuintnumber of the ambulance

getAmbulanceStatus returns the status of an ambulance

parameter nametypedetails
_ambnumberuintnumber of the ambulance

getCrew returns the information of a crew member at a certain index

parameter nametypedetails
_ambnumberuintnumber of the ambulance
_indexuintindex associated to a crew member

getCrewLength returns the length of the crew array used by the dapp

parameter nametypedetails
_ambnumberuintnumber of the ambulance

getAmbulanceNumber returns the number of the ambulance at a certain index

parameter nametypedetails
_indexuintindex associated to an ambulance

getAmbulanceArrayLength return the array length of the ambulance

removeCrew removes a member of the ambulance's crew

parameter nametypedetails
_ambnumberuintnumber of the ambulance
_badgeiduintbadge id of a crew member

Events

EmergencyRegistered tracks the location of an emergency to be used in dapp

EmergencyETA registers the time of arrival

EmergencySolved tracks the location of an emergency that was solved

Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract