A comprehensive Clarity smart contract for managing telemedicine services on the Stacks blockchain. This contract implements a fungible token system with built-in appointment booking, escrow payments, and reputation management for healthcare providers.
The Telemedicine Token contract enables secure, decentralized telemedicine consultations by providing:
- Token-based payment system for medical consultations
- User registration for patients and doctors
- Appointment booking with automatic escrow
- Reputation system for healthcare providers
- Secure payment release upon service completion
- Name: Telemedicine Token
- Symbol: TMT
- Decimals: 6
- Total Supply: 1,000,000 TMT
- Standard: SIP-010 Fungible Token
- Registration: Separate registration for patients and doctors
- Verification: Admin verification system for healthcare providers
- Reputation Tracking: Automatic reputation scoring based on patient ratings
- Booking: Patients can book appointments with registered doctors
- Escrow: Automatic token escrow during appointment booking
- Completion: Doctors can mark appointments as completed to release payment
- Rating: Patients can rate completed appointments (1-5 stars)
- Escrow Protection: Funds held in contract until service completion
- Emergency Withdrawal: Admin can refund patients in dispute cases
- Automatic Release: Payments automatically released to doctors upon completion
(get-name) → Returns token name
(get-symbol) → Returns token symbol
(get-decimals) → Returns token decimals
(get-total-supply) → Returns total token supply
(get-balance account) → Returns account balance
(get-user-profile user) → Returns user profile data
(get-appointment appointment-id) → Returns appointment details
(get-doctor-rate doctor) → Returns doctor's consultation rate