pragma solidity ^0.4.2;
contract Patient {
string public name;
string public dateOfBirth;
string public gender;
// Event that is fired when patient is changed
event PatientChanged(string what);
// FAMILY^GIVEN^MIDDLE
function SetName(string _name) {
name = _name;
PatientChanged("name"); // fire the event
}
// YYYYMMDD
function SetDateOfBirth(string _dateOfBirth) {
dateOfBirth = _dateOfBirth;
PatientChanged("dateOfBirth"); // fire the event
}
// M,F,U,O
function SetGender(string _gender) {
gender = _gender;
PatientChanged("gender"); // fire the event
}
}
pragma solidity ^0.4.2;
contract PatientAllergies {
// the address of the owner (the patient)
address public owner;
// address of physician that can add allergies
address public physician;
// name of the patient LAST^FIRST
string public name;
// array of allergies this patient has
string[] public allergies;
// constructor that sets the owner to the address creating
// this smart contract
function PatientAllergies() {
owner = msg.sender;
}
// allows owner to change the patient name
function SetName(string _name) {
// only allow the owner to change the patient name
if(msg.sender != owner) {
throw;
}
name = _name;
}
// allows physician to add an allergy
function AddAllergy(string _allergie) {
if(msg.sender != physician) {
throw;
}
allergies.push(_allergie);
}
// allows owner to set the physician that can add allergies
function SetPhysician(address _physician) {
if(msg.sender != owner) {
throw;
}
physician = _physician;
}
}
What does this example mean to healthcare?
For patients, it means they can manage their medical record online and control who can make changes to them. In this case, the patient is the only person who can change the patient name. The physician that the patient chooses is the only person who can add to the allergy list.
For physicians, it means they can obtain access to the patients list of allergies by interacting directly with the patient. The patient just needs to give the physician the address of the smart contract and the physician can see the allergies. The physician does not have to wait until his EMR is integrated with some other EMR, the hospital is connected to an HIE or IT has the right VPN in place. Trust and access is managed directly between the patient and the physician.
Please keep in mind that this example is overly simplified to illustrate how access control can be implemented with blockchain. A real application would be much more complex allowing multiple physicians to manipulate the allergy list, the ability to revoke physicians from the access control list and provisions of changing the owner in case the owners private key is compromised.
Next up is how to protect private keys with wallets
thank you for a great post.
ReplyDeleteSnippets
Draglet is among the leaders in developing tailor-made blockchain applications for financial and business purposes.
ReplyDelete
ReplyDeleteHeyy, Awesome Post .. Keep It Up!
Want to invest in Crypto Currency, Invest in STECH coin Now, one of the best cryptocurrency to invest. Our reliable and robust social network allows the seamless transfer of cryptocoins within no time! Easy to use, purchase and trade. Grow your investment upto 200%. To check click or visit: https://www.stechcoin.com/
Stech coin contact | Cryptocurrency Exchange | Stech coin Distribution | Digital Cash Cryptocurrency
Hi Chris,
ReplyDeleteFirst of all congratulation on your blog, I is amazing and the first real useful clear understandable source of information regarding Blockchain and its possible usage in Healthcare.
I’m an HI System integrator since many years and trying to understand possible usages benefits in implementing this technology. One of the major problems when integrating different medical systems is the lack of agreed standards that can be used to,exchange the informations. Standards like DICOM and HL7 help us, however I be never found any reference to any of these systems when looking into Blockchain systems advertised as Healthcare options. Do I miss something, or even if you would use Blockchain to store/share medical records I should still have a standard to reference the passed informations (e.g. a DICOM public dictionary telling me how my patient Module looks like, or what my allergy section can/cannot contain?). Thank you for your input and please continue explaining more about Blockchain in Healthcare as it is very informational!
thanks for sharing the link, i read many blogs on blockchain during my research but no one put such deep thought on blockchain in healthcare sector. in past i came across similar kind of blog so you can refer that for ur future references. https://bit.ly/2MWnva7
ReplyDeleteDiscover expert guides, news, and articles on Blockchain wallets and cryptocurrency, offering valuable insights and step-by-step tutorials. Why can't Withdraw Fund from Blockchain Wallet, How to Transfer Money from Blockchain to Binance? visit us
ReplyDeleteDiscover expert guides, news, and articles on Blockchain wallets and cryptocurrency. How to Withdraw Funds from Strike App?, How to Transfer Money from Strike to Cash App Visit us
ReplyDeletemoney getting stuck in DeFi Wallet often occurs due to network congestion, insufficient gas fees, or incorrect transaction details. Double-check the recipient address, ensure adequate gas fees are set, and verify network status. Use blockchain explorers to track pending transactions. If unresolved, consult your wallet’s support team or community forums for assistance to recover your funds efficiently.
ReplyDelete