Professional Documents
Culture Documents
MedVault_doc_FINAL_REPORT_(1)[1]
MedVault_doc_FINAL_REPORT_(1)[1]
Submitted by
ABISHAKE D AC20UCS003
AJITHKUMAR P AC20UCS009
BHUANESH KUMAR T AC20UCS018
BACHELOR OF ENGINEERING
IN
Submitted by
ABISHAKE D AC20UCS003
AJITHKUMAR P AC20UCS009
BHUANESH KUMAR T AC20UCS018
BACHELOR OF ENGINEERING
IN
BONAFIDE CERTIFICATE
Certified that this mini project report “MEDVAULT: PERSONAL HEALTH RECORDS
SIGNATURE SIGNATURE
It is one of the most efficient tasks in life to choose the appropriate words to express one’s
gratitude to the beneficiaries. We are very much grateful to God who helped us all the way
through the project and how molded us into what we are today.
We acknowledge our heartful gratitude to Dr. G. FATHIMA, M.E., Ph.D., Professor and
Head of the Department, Department of Computer Science and Engineering, Adhiyamaan
College of Engineering (Autonomous), Hosur, for her guidance and valuable suggestions
and encouragement throughout this project and made us to complete this project
successfully.
We also extend our thanks to the project Coordinator and all Staff Members for their
support in completing this project successfully.
Finally, we would like to thank our parents, without their motivation and support would not
have been possible for us to complete this project successfully.
ABSTRACT
MedVault is a pioneering system for managing personal health records (PHRs) using
blockchain technology. In an era where healthcare data security and accessibility are
paramount, MedVault provides a reliable and efficient solution. The platform leverages the
decentralized nature of blockchain to ensure the privacy and integrity of health records
while enabling seamless access for authorized users.
MedVault allows individuals to securely store and manage their medical history, test
results, prescriptions, and other health-related information in a distributed ledger. With
end-to-end encryption and user-controlled access permissions, patients have complete
control over who can view and modify their records. Healthcare providers, on the other
hand, can access patients' PHRs with consent, facilitating more accurate diagnoses and
timely treatment.
The utilization of blockchain technology in MedVault eliminates the risk of data tampering
and unauthorized access, enhancing trust among patients and healthcare providers.
Furthermore, the system streamlines data exchange, reducing administrative burdens and
improving overall healthcare efficiency. MedVault represents a significant step forward in
the digitization of personal health records, ensuring data security, privacy, and accessibility
for all.
i
TABLE OF CONTENTS
PAGE
CHAPTER TITLE
NO.
NO.
ABSTRACT i
LIST OF ABBREVIATION iv
LIST OF FIGURES v
1 INTRODUCTION
1.1 OVERVIEW 1
1.2 OBJECTIVES 3
2 LITERATURE SURVEY 4
3 SYSTEM ANALYSIS
3.1 EXISTING SYSTEM 6
3.2 PROPOSED SYSTEM 7
3.3 PROPOSED SOLUTION 8
3.4 IDEATION & BRAINSTORMING 9
3.5 ARCHITECTURE DESIGN 10
3.6 DESCRIPTION OF MODULES 13
3.6.1 USER REGISTER 13
3.6.2 USER LOGIN 14
3.6.3 USER VERIFICATION 16
3.6.4 USER PERSONAL DETAILS 17
3.6.5 HOME SCREEN 19
4 SYSTEM REQUIREMENT
4.1 HARDWARE REQUIREMENT 22
4.2 SOFTWARE REQUIREMENT 22
ii
5 IMPLEMENTATION
5.1 FRONTEND DEVELOPMENT 23
5.1.1 USER REGISTRATION 23
5.1.2 USER LOGIN 24
5.1.3 USER VERIFICATION 26
5.1.4 USER PERSONAL DETAILS 27
5.1.5 HOME SCREEN 28
5.2 CODE IMPLEMENTATION 30
5.2.1 USER REGISTRATION IMPLEMENTATION 30
5.2.2 USER LOGIN IMPLEMENTATION 31
5.2.3 USER VERIFICATION IMPLEMENTATION 32
5.2.4 USER PERSONAL DETAILS
34
IMPLEMENTATION
5.2.5 HOME SCREEN IMPLEMENTATION 36
5.3 BACKEND DEVELOPMENT 38
5.4 RESULT 40
6 CONCLUSION 41
APPENDICES 42
SOURCE CODE 42
OUTPUT 67
REFERENCES 69
iii
LIST OF ABBREVIATIONS
ACRONYM ABBREVIATIONS
BC - BlockChain
MH - Medical History
DS - Data Security
DN - Decentralized Network
DT - Data Tampering
DL - Distributed Ledger
EC - EnCryption
iv
LIST OF FIGURES
FIGURE PAGE
TITLE
NO. NO.
v
CHAPTER 1
INTRODUCTION
1.1 OVERVIEW
In an era where data plays a pivotal role in shaping our lives and making
informed decisions, the healthcare industry is no exception. The need for efficient,
secure, and accessible personal health records has never been more crucial. Amidst
this evolving landscape, MedVault emerges as a groundbreaking solution that
leverages Blockchain technology to revolutionize the way we manage and access our
personal health records.
The traditional approach to personal health records has been fraught with
inefficiencies. Paper records are easily lost or damaged, and electronic health records
are often siloed in different healthcare providers' systems, making it cumbersome for
patients to access their complete medical history. Moreover, concerns about data
security and privacy breaches have loomed large over these centralized systems.
MedVault resolves these issues by harnessing the power of Blockchain technology.
1
Blockchain, the underlying technology of cryptocurrencies like Bitcoin, has
gained immense popularity for its ability to provide a transparent, secure, and
immutable ledger of transactions. MedVault employs this technology to create an
unalterable record of an individual's health history. Each piece of medical data, from
lab results to treatment plans, is securely stored in a decentralized network of nodes.
This ensures that patients can trust the authenticity and integrity of their health
records, eliminating concerns about tampering or unauthorized access.
2
1.2 OBJECTIVES
• Data Security and Privacy: Ensure the highest level of data security and
privacy for personal health records. Utilize Blockchain's cryptographic
techniques to protect sensitive medical information from unauthorized
access.
3
CHAPTER 2
LITERATURE SURVEY
Electronic Health Records(EHR) are gaining a lot of popularity all over the
world. The current EHR systems however have their fair share of problems related to
privacy and security. We have proposed a mechanism which provides a solution to
most of these problems. Using a permissioned Ethereum blockchain allows the
hospitals and patients across the world to be connected to each other. Our mechanism
uses a combination of symmetric and asymmetric key cryptography to ensure the
secure storage and selective access of records. It gives patients full control over their
health records and also allows them to grant or revoke a hospital's access to his/her
records. We have used IPFS(interplanetary file system) to store records which has
the advantage of being distributed and ensures immutability of records. The proposed
model also maintains the statistics of diseases without violating the privacy of any
patient.
Blockchain technology has been emerged in the last decade and has gained a
lot of interests from several sectors such as finance, government, energy, health, etc.
This paper gives a broad ranging survey of the application of blockchain in healthcare
domain. In fact, the ongoing research in this area is evolving rapidly. Therefore, we
have identified several use cases in the state of art applying the blockchain
technology, for instance for sharing electronic medical records, for remote patient
monitoring, for drug supply chain, etc. We have focused also on identifying
limitations of studied approaches and finally we have discussed some open research
issues and the areas of future researchMohd Ilyas and Ajit Chauhan[3] proposed a
system called Some Plant Disease Identification and Prevention using Machine
Learning, The proposed methodology in the proposed plant disease detection system
4
focuses on generating an advanced and efficient system which makes the process of
creating high yields of crops are much easier for farmers. The farmers will be able to
accurately detect the type of disease a particular plant is having using the image of
the plant.
The world is moving towards progress, to achieve the desired progress, the
world should have a healthy population and health records are the projections of an
individual's health over time. The centralised approach of maintaining the health
records lead to data breaches. According to 2017 Ponemon Cost of Data Breach
Study, the cost of the data breach for healthcare organizations estimated to be $380
per record. According to 2016 Breach Barometer Report, 27,314,647 patient records
were affected. So we moved towards institution-driven approach of record
maintenance, which didn't make much difference with the previously existing one.
Since the patient have no control over the data, the chances of data being misused is
high. This paper highlights on the patient-driven model of record maintenance using
Blockchain technology where smart contracts can be incorporated in future days
making it more potential in data exchange. Finding its huge scope, hoping that more
researches will be carried out and practically implemented.
5
CHAPTER 3
SYSTEM ANALYSIS
Existing Personal Health Record (PHR) systems face several challenges that
hinder efficient healthcare record management. One of the primary issues is
centralized storage. Many PHRs are stored on centralized servers or databases,
controlled by healthcare providers or third-party companies. This setup limits
individuals' control over their own health data. Patients may struggle to access, update,
or share their records without going through complex administrative processes,
potentially delaying critical healthcare decisions.
Security risks are another significant concern. Centralized storage makes PHRs
vulnerable to data breaches, hacking, and unauthorized access. A breach can expose
sensitive medical information, leading to identity theft, fraud, and other privacy
violations. It erodes trust in the system, deterring individuals from fully engaging with
their PHRs.
7
3.3 PROPOSED SOLUTION
Blockchain also ensures data integrity. Records are time-stamped and linked in
a chain, making it easy to trace any changes or access. This not only helps in
preventing data breaches but also in maintaining an accurate and unaltered medical
history, crucial for informed healthcare decisions.
8
3.4 IDEATION & BRAINSTORMING
1.) Security and Privacy: Start with the core concept of ensuring patients' control
over their health data. The blockchain should provide robust security and privacy
features. Consider implementing advanced encryption, biometric authentication, and
two-factor authentication for users to access their records.
5.) Patient Education: Develop educational resources and tools for patients to
understand the benefits and usage of Blockchain-based PHRs. Increased patient
awareness can drive adoption.
9
3.5 ARCHITECTURE DESIGN
The user interacts with the system through a user-friendly interface, which can
be a web application or a mobile app. Users can access and manage their health
records, control access, and view transaction history.
10
3.) Smart Contracts:
The consensus mechanism (e.g., Proof of Work, Proof of Stake) ensures that
transactions are verified and added to the blockchain securely. In healthcare,
consensus mechanisms should be energy-efficient and scalable.
8.) Interoperability:
11
Standards for data interoperability, like HL7 FHIR, should be considered to
enable easy data exchange between healthcare providers and systems.
An audit trail logs all transactions related to health records. This allows for
transparency and accountability, important in healthcare for compliance and security.
Integration with external systems and data sources, such as hospitals, labs, and
wearable devices, is essential to provide a comprehensive view of a patient's health.
The system can send notifications and alerts to users for actions like record
access, updates, or appointment reminders.
12
3.6 DESCRIPTION OF MODULES
13
the establishment of a digital wallet. This wallet is designed for managing tokens or
cryptocurrency that may be utilized within the system, such as for paying for services
or incentivizing data sharing.
14
4.) Private Key Management:
In blockchain technology, a user's private key is crucial for accessing and
controlling their PHR data. The user login module may include a secure way for users
to manage their private keys, such as providing options for password recovery or
securely storing and retrieving their private keys.
5.) Access Control:
After successful authentication, the system verifies the user's blockchain
address to ensure they have the appropriate permissions to access the stored health
records. Permissions may vary, allowing different levels of access to view, edit, or share
records.
6.) Audit Trails:
The system may also track and record all login and access activities in an
audit trail. This helps in monitoring any unauthorized access attempts and provides a
history of who accessed the PHR and when.
7.) Password Management:
Users should have the ability to change their passwords periodically for
security reasons. The system should facilitate this process, with password policies in
place to ensure strong and secure passwords.
8.) Logout Functionality:
Users must be able to log out of their accounts securely to prevent
unauthorized access, especially on shared or public devices.
9.) Account Recovery:
In case a user forgets their login credentials or loses access to their private
key, a secure account recovery process should be in place. This could involve identity
verification and multifactor authentication to ensure that only the rightful owner regains
access.
15
10.) Continuous Monitoring and Security Updates:
The user login module should be regularly monitored for potential
vulnerabilities and security updates to protect user accounts and their health data.
17
3.6.4 USER PERSONAL DETAILS:
Users' contact details, including phone numbers, email addresses, and physical
addresses, are stored in this module. This information is essential for healthcare
providers to communicate with the user, send appointment reminders, or share critical
health updates.
Users can specify their consent preferences regarding the sharing of their health
data. These preferences can include who can access their records, for what purposes,
and for how long. The "Personal Details" module serves as a repository for these consent
18
settings, ensuring that user privacy and data-sharing preferences are respected.
The module also manages user authentication and security measures. This
includes storing cryptographic keys or other authentication methods that users need to
access their PHR. By keeping these details secure, the blockchain-based system ensures
that only authorized users can view and modify their records.
Any updates or changes to the personal details are recorded in the blockchain,
providing an immutable history of modifications. This transparency and data integrity
are key features of blockchain technology, enhancing trust and security.
19
1.) User Authentication:
The Home Screen begins with a secure user authentication process. Users log
in using their unique credentials, such as a username and password, or more advanced
authentication methods like biometrics, to ensure that only authorized individuals can
access the system.
Once logged in, users can view and edit their profile information, including
contact details, emergency contacts, insurance information, and any other relevant
personal data. This provides a holistic view of their health-related information.
The Home Screen displays a summarized version of the user's health records.
This might include an overview of recent medical encounters, upcoming appointments,
or important health metrics like blood pressure, weight, and allergies. It gives users a
quick snapshot of their health status.
Users can access and manage their full health records through the Home
Screen. They can view details of past medical visits, laboratory results, prescriptions,
and any other health-related information. Users can also upload new records, making it
a centralized repository for all their health data.
20
6.) Sharing and Permissions:
The Home Screen may include a section where users can manage the sharing
of their records with healthcare providers, family members, or other authorized
individuals. They can set permissions and access levels to control who can view or edit
their records.
The module can also feature a notification system that alerts users about
upcoming appointments, medication schedules, or any updates to their shared records.
Users can typically access help resources, FAQs, or customer support options
directly from the Home Screen in case they encounter any issues or have questions.
21
CHAPTER 4
SYSTEM REQUIREMENTS
Hard disk 20 GB
• Pinata(IPFS Gateway)
• VS Code Editor
22
CHAPTER 5
IMPLEMENTATION
(x) Security:
Ensure that all data transmitted between the frontend and backend is
encrypted and secure. Additionally, implement mechanisms to prevent SQL injection
and other common security vulnerabilities.
24
(ii) User Authentication:
Develop an authentication system that allows users to log in using their
registered credentials. Ensure secure password hashing and encryption for data
protection.
26
(vi) Biometric Verification:
Some PHR systems may include biometric verification, such as
fingerprint or facial recognition, for added security.
27
(v) Data Validation:
Implement validation checks to ensure data accuracy. Validate inputs
such as email addresses, phone numbers, and date of birth to maintain data integrity.
(ii) Dashboard:
After login, the user lands on a personalized dashboard. Display a
user's profile information, including name and a profile picture. Include options to
28
navigate to different sections, such as "My Health Records," "Sharing," and "Settings."
29
5.2. CODE IMPLEMENTATION:
30
FIGURE 5.1 User Registration Code Implementation
32
1.) Identity Verification:
The user verification module starts by verifying the identity of the individual
seeking access to their PHR. This process typically involves collecting various forms of
identification, such as government-issued IDs, biometric data (e.g., fingerprints or facial
recognition), or other personally identifiable information.
2.) Authentication:
Once the identity is verified, the system utilizes strong authentication
mechanisms to confirm that the person is who they claim to be. This can include multi-
factor authentication (MFA) methods, such as SMS codes, email verification, or
hardware tokens. By requiring multiple forms of authentication, the system adds an extra
layer of security.
3.) User Consent:
After identity and authentication checks, the user is asked to provide explicit
consent to access their PHR. This consent is critical, as it ensures that the individual is
aware of who is accessing their data and for what purpose. It also aligns with privacy
regulations and ethical considerations.
4.) Private Key Management:
In a blockchain system, each user has a private key that grants them access
to their encrypted health records. The user verification module oversees the secure
management of these private keys. It ensures that keys are generated and stored securely,
minimizing the risk of unauthorized access.
33
FIGURE 5.3 User Verification Code Implementation
34
2.) Contact Information:
Users' contact details, including phone numbers, email addresses, and physical
addresses, are stored in this module. This information is essential for healthcare
providers to communicate with the user, send appointment reminders, or share critical
health updates.
Users can specify their consent preferences regarding the sharing of their
health data. These preferences can include who can access their records, for what
purposes, and for how long. The "Personal Details" module serves as a repository for
these consent settings, ensuring that user privacy and data-sharing preferences are
respected.
The Home Screen begins with a secure user authentication process. Users log
in using their unique credentials, such as a username and password, or more advanced
authentication methods like biometrics, to ensure that only authorized individuals can
access the system.
Once logged in, users can view and edit their profile information, including
contact details, emergency contacts, insurance information, and any other relevant
personal data. This provides a holistic view of their health-related information.
The Home Screen displays a summarized version of the user's health records.
This might include an overview of recent medical encounters, upcoming appointments,
or important health metrics like blood pressure, weight, and allergies. It gives users a
quick snapshot of their health status.
36
and shared records. This makes it easy for users to find the specific information
37
5.3 BACKEND DEVELOPMENT:
38
Data Encryption:
Implement robust encryption protocols to secure data both at rest and during
transmission. Encryption keys should be stored securely and only accessible to authorized
users.
Access Control:
Develop access control mechanisms to determine who can view, modify, or share a
patient's records. This should align with patient consent and privacy preferences.
Data Storage Integration:
Connect the blockchain with a secure and scalable data storage solution (e.g., IPFS
or a cloud-based storage service) to store large files like medical images or reports.
API Development:
Create APIs to allow external applications, such as electronic health records (EHR)
systems or mobile apps, to interact with the blockchain. Ensure proper authentication and
authorization.
Testing and Quality Assurance:
Thoroughly test the backend to identify and rectify any vulnerabilities, bugs, or
performance issues. Security testing is of utmost importance to protect patient data.
Compliance Check:
Verify that the backend complies with relevant healthcare regulations and data
protection laws. Conduct third-party audits if necessary.
Scalability and Performance Optimization:
Ensure that the system can handle a growing volume of PHR transactions and maintain
optimal performance.
Monitoring and Maintenance:
Implement continuous monitoring and regular maintenance to address security
updates, blockchain protocol upgrades, and emerging threats.
39
User Training and Support:
Educate users, including healthcare providers and patients, on how to use the system
effectively. Offer robust customer support for issue resolution and guidance.
5.4 RESULT
Personal health records (PHRs) using blockchain technology offer a promising
solution for securely storing and managing individuals' medical information. Unlike
traditional paper-based or centralized electronic health records (EHRs), blockchain-based
PHRs provide a decentralized and tamper-resistant platform for patients to maintain control
over their health data. Blockchain's key advantage lies in its ability to ensure data integrity
and security. Patient records are stored in a distributed ledger, with each block containing a
time-stamped and encrypted set of transactions. This design makes it extremely difficult for
unauthorized access, fraud, or data breaches, as any alteration would require consensus from
the entire network, ensuring the utmost privacy and trust.
Patients can grant access to their PHRs to healthcare providers, improving care
coordination and reducing duplication of tests and procedures. Furthermore, blockchain-
based PHRs empower individuals to selectively disclose their health data to researchers,
insurers, or any relevant party, promoting data ownership and consent-driven sharing.
Moreover, the interoperability of blockchain allows for seamless integration of PHRs across
different healthcare systems and providers, overcoming the fragmentation and data silos
prevalent in the current healthcare landscape.
40
CHAPTER 6
CONCLUSION
41
APPENDICES
SOURCE CODE:
“””MEDVAULT: PERSONAL HEALTH RECORDS USING BLOCKCHAIN @author:
ABISHAKE – AJITHKUMAR – BHUANESH KUMAR “””
import 'package:bhuanesh_s_application6/core/app_export.dart';
import 'package:bhuanesh_s_application6/widgets/custom_outlined_button.dart';
import 'package:flutter/material.dart';
@override
Widget build(BuildContext context) {
mediaQueryData = MediaQuery.of(context);
return SafeArea(
child: Scaffold(
body: SingleChildScrollView(
child: Container(
width: mediaQueryData.size.width,
height: mediaQueryData.size.height,
decoration: BoxDecoration(
border: Border.all(
color:
theme.colorScheme.onPrimaryContainer.withOpacity(1),
42
width: 1.h,
strokeAlign: strokeAlignOutside),
gradient: LinearGradient(
begin: Alignment(0.5, 1),
end: Alignment(0.5, 0),
colors: [
theme.colorScheme.secondaryContainer,
theme.colorScheme.secondaryContainer.withOpacity(0)
])),
child: Container(
width: double.maxFinite,
padding: EdgeInsets.symmetric(vertical: 25.v),
child: Column(mainAxisSize: MainAxisSize.min, children: [
Container(
width: double.maxFinite,
padding: EdgeInsets.symmetric(
horizontal: 26.h, vertical: 11.v),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(ImageConstant.imgGroup59),
fit: BoxFit.cover)),
child: Column(children: [
SizedBox(
height: 236.v,
width: 332.h,
child: Stack(
43
alignment: Alignment.center,
children: [
Align(
alignment: Alignment.bottomCenter,
child: Padding(
padding:
EdgeInsets.only(bottom: 6.v),
child: SizedBox(
width: 332.h,
child: Divider()))),
Align(
alignment: Alignment.center,
child: SizedBox(
height: 236.v,
width: 124.h,
child: Stack(
alignment: Alignment.center,
children: [
CustomImageView(
imagePath: ImageConstant
.imgElectronicmedi,
height: 212.v,
width: 98.h,
radius: BorderRadius
.circular(10.h),
alignment:
44
Alignment.center),
CustomImageView(
imagePath: ImageConstant
.imgKisspngapplei,
height: 236.v,
width: 124.h,
radius: BorderRadius
.circular(37.h),
alignment:
Alignment.center)
])))
])),
Container(
width: 243.h,
margin:
EdgeInsets.fromLTRB(48.h, 31.v, 49.h, 25.v),
child: RichText(
text: TextSpan(children: [
TextSpan(
text: "Hello\n",
style: CustomTextStyles
.displayMediumInknutAntiquaOnPrimaryContainer_1),
TextSpan(
text: "Welcome to MedVault.",
style: theme.textTheme.bodyLarge)
]),
45
textAlign: TextAlign.center))
])),
SizedBox(height: 36.v),
CustomOutlinedButton(
width: 100.h,
text: "Login",
buttonStyle:
CustomButtonStyles.outlineOnPrimaryContainer,
onTap: () {
onTapLogin(context);
}),
SizedBox(height: 38.v),
CustomOutlinedButton(
width: 100.h,
text: "Register",
rightIcon: Container(
margin: EdgeInsets.only(),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.h)),
),
onTap: () {
onTapRegister(context);
}),
SizedBox(height: 5.v)
]))))));
}
46
/// Navigates to the loginScreen when the action is triggered.
///
/// The [BuildContext] parameter is used to build the navigation stack.
/// When the action is triggered, this function uses the [Navigator] widget
/// to push the named route for the loginScreen.
onTapLogin(BuildContext context) {
Navigator.pushNamed(context, '/login_screen');
}
import 'package:bhuanesh_s_application6/core/app_export.dart';
import 'package:bhuanesh_s_application6/widgets/custom_outlined_button.dart';
import 'package:flutter/material.dart';
47
@override
Widget build(BuildContext context) {
mediaQueryData = MediaQuery.of(context);
return SafeArea(
child: Scaffold(
extendBody: true,
extendBodyBehindAppBar: true,
body: Container(
width: mediaQueryData.size.width,
height: mediaQueryData.size.height,
decoration: BoxDecoration(
color: appTheme.whiteA700,
border: Border.all(
color:
theme.colorScheme.onPrimaryContainer.withOpacity(1),
width: 1.h),
image: DecorationImage(
image: AssetImage(ImageConstant.imgRegister),
fit: BoxFit.cover)),
child: Container(
width: 394.h,
padding: EdgeInsets.symmetric(vertical: 4.v),
child: Column(mainAxisSize: MainAxisSize.min, children: [
SizedBox(height: 5.v),
SizedBox(
48
height: 659.v,
width: 387.h,
child: Stack(
alignment: Alignment.bottomCenter,
children: [
Align(
alignment: Alignment.topCenter,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 95.h, vertical: 96.v),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(
ImageConstant.imgGroup12),
fit: BoxFit.cover)),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
SizedBox(height: 28.v),
Text("REGISTER",
style: theme
.textTheme.displayMedium)
]))),
Align(
49
alignment: Alignment.bottomCenter,
child: Container(
margin: EdgeInsets.symmetric(
horizontal: 35.h),
padding: EdgeInsets.symmetric(
horizontal: 16.h, vertical: 20.v),
decoration: AppDecoration
.outlineOnPrimaryContainer1
.copyWith(
borderRadius: BorderRadiusStyle
.roundedBorder20),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
"Please store the account phrase safely:",
style: theme
.textTheme.titleSmall),
Padding(
padding: EdgeInsets.only(
left: 12.h, top: 18.v),
child: Text("1.strike",
style: theme.textTheme
.bodySmall)),
50
Padding(
padding: EdgeInsets.only(
left: 12.h, top: 13.v),
child: Text("2.basket",
style: theme.textTheme
.bodySmall)),
Padding(
padding: EdgeInsets.only(
left: 13.h, top: 10.v),
child: Text("3.scheme",
style: theme.textTheme
.bodySmall)),
Padding(
padding: EdgeInsets.only(
left: 13.h, top: 9.v),
child: Text("4.fall",
style: theme.textTheme
.bodySmall)),
Padding(
padding: EdgeInsets.only(
left: 13.h, top: 10.v),
child: Text("5.enroll",
style: theme.textTheme
.bodySmall)),
Padding(
padding: EdgeInsets.only(
51
left: 12.h, top: 12.v),
child: Text("6.expire",
style: theme.textTheme
.bodySmall)),
Padding(
padding: EdgeInsets.only(
left: 13.h, top: 11.v),
child: Text("7.april",
style: theme.textTheme
.bodySmall)),
Padding(
padding: EdgeInsets.only(
left: 13.h, top: 10.v),
child: Text("8.humor",
style: theme.textTheme
.bodySmall)),
Padding(
padding: EdgeInsets.only(
left: 12.h, top: 14.v),
child: Text("9.pudding",
style: theme.textTheme
.bodySmall)),
Padding(
padding: EdgeInsets.only(
left: 13.h, top: 10.v),
child: Text("10.lucky",
52
style: theme.textTheme
.bodySmall)),
Padding(
padding: EdgeInsets.only(
left: 13.h, top: 12.v),
child: Text("11.expect",
style: theme.textTheme
.bodySmall)),
Padding(
padding: EdgeInsets.only(
left: 12.h, top: 12.v),
child: Text("12.expose",
style: theme.textTheme
.bodySmall)),
SizedBox(height: 24.v),
CustomOutlinedButton(
width: 192.h,
text: "copy to clipboard",
leftIcon: Container(
margin: EdgeInsets.only(
right: 6.h),
child: CustomImageView(
height: 30.v,
width: 30.h)),
buttonStyle:
CustomButtonStyles.none,
53
onTap: () {
onTapCopyto(context);
},
alignment: Alignment.center),
SizedBox(height: 40.v)
])))
]))
])))));
}
import 'package:bhuanesh_s_application6/core/app_export.dart';
import 'package:bhuanesh_s_application6/widgets/custom_outlined_button.dart';
import 'package:bhuanesh_s_application6/widgets/custom_text_form_field.dart';
import 'package:flutter/material.dart';
54
// ignore_for_file: must_be_immutable
class PersonalDetailsScreen extends StatelessWidget {
PersonalDetailsScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
mediaQueryData = MediaQuery.of(context);
return SafeArea(
child: Scaffold(
resizeToAvoidBottomInset: false,
body: SizedBox(
width: double.maxFinite,
child: Column(mainAxisSize: MainAxisSize.min, children: [
SizedBox(height: 3.v),
SizedBox(
55
height: 849.v,
width: 391.h,
child: Stack(alignment: Alignment.topCenter, children: [
CustomImageView(
imagePath: ImageConstant.imgDesktopwallpap849x3911,
height: 849.v,
width: 391.h,
radius: BorderRadius.circular(10.h),
alignment: Alignment.center),
Align(
alignment: Alignment.topCenter,
child: Padding(
padding: EdgeInsets.only(
left: 3.h, top: 45.v, right: 6.h),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text("PERSONAL DETAILS",
textAlign: TextAlign.center,
style: theme.textTheme.displayMedium),
Container(
margin: EdgeInsets.only(
left: 32.h,
top: 29.v,
right: 32.h),
padding: EdgeInsets.symmetric(
56
horizontal: 16.h, vertical: 27.v),
decoration: AppDecoration
.outlineOnPrimaryContainer2
.copyWith(
borderRadius:
BorderRadiusStyle
.roundedBorder20),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(
left: 12.h),
child: Text("FIRST NAME",
style: theme.textTheme
.bodySmall)),
CustomTextFormField(
controller:
firstNameController,
margin: EdgeInsets.only(
left: 8.h, top: 4.v)),
Padding(
padding: EdgeInsets.only(
left: 12.h, top: 31.v),
57
child: Text("LAST NAME",
style: theme.textTheme
.bodySmall)),
CustomTextFormField(
controller:
lastNameController,
margin: EdgeInsets.only(
left: 8.h, top: 5.v)),
Padding(
padding: EdgeInsets.only(
left: 12.h, top: 32.v),
child: Text("EMAIL",
style: theme.textTheme
.bodySmall)),
CustomTextFormField(
controller: emailController,
margin: EdgeInsets.only(
left: 8.h, top: 4.v)),
Padding(
padding: EdgeInsets.only(
left: 12.h, top: 27.v),
child: Text("DATE OF BIRTH",
style: theme.textTheme
.bodySmall)),
CustomTextFormField(
controller:
58
dateOfBirthController,
margin: EdgeInsets.only(
left: 8.h, top: 4.v)),
Padding(
padding: EdgeInsets.only(
left: 12.h, top: 30.v),
child: Text("PHONE NUMBER",
style: theme.textTheme
.bodySmall)),
CustomTextFormField(
controller:
phoneNumberController,
margin: EdgeInsets.only(
left: 8.h, top: 6.v),
textInputAction:
TextInputAction.done),
CustomOutlinedButton(
width: 80.h,
text: "Next",
margin: EdgeInsets.only(
left: 82.h,
top: 46.v,
bottom: 35.v),
rightIcon: Container(
margin: EdgeInsets
.only(),
59
decoration: BoxDecoration(
borderRadius:
BorderRadius
.circular(10
.h)),
child: CustomImageView(
svgPath: ImageConstant
.imgRectangle)),
buttonStyle: CustomButtonStyles
.outlineOnPrimaryContainerTL10,
onTap: () {
onTapNext(context);
})
]))
])))
]))
]))));
}
60
}
}
#___________________BACKEND IMPLEMENTATION_____________________
pragma solidity >=0.7.0 <0.9.0;
contract Upload {
struct Access{
address user;
bool access; //true or false
}
mapping(address=>string[]) value;
mapping(address=>mapping(address=>bool)) ownership;
mapping(address=>Access[]) accessList;
mapping(address=>mapping(address=>bool)) previousData;
61
}else{
accessList[msg.sender].push(Access(user,true));
previousData[msg.sender][user]=true;
}
}
function disallow(address user) public{
ownership[msg.sender][user]=false;
for(uint i=0;i<accessList[msg.sender].length;i++){
if(accessList[msg.sender][i].user==user){
accessList[msg.sender][i].access=false;
}
}
}
import 'dart:convert';
62
import 'package:flutter/material.dart';
import 'package:http_parser/http_parser.dart';
import 'package:http/http.dart' as http;
import 'package:file_picker/file_picker.dart';
@override
_HomeScreenState createState() => _HomeScreenState();
}
63
for (var file in files) {
var request = http.MultipartRequest('POST', Uri.parse(endpoint));
request.headers.addAll({
'pinata_api_key': apiKey,
'pinata_secret_api_key': apiSecret,
});
if (file.bytes != null) {
var multipartFile = http.MultipartFile.fromBytes(
'file',
file.bytes!,
filename: file.name,
);
request.files.add(multipartFile);
// Now you can proceed with using 'multipartFile' in the request.
} else {
// Handle the case where 'file.bytes' is null, for example, by showing an error message.
}
64
}
setState(() {
uploadStatus = 'Upload complete!';
});
} catch (e) {
setState(() {
uploadStatus = 'Error: $e';
});
}
}
65
if (result != null) {
uploadToIPFS(result.files);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('IPFS File Upload'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
TextButton(
onPressed: pickFiles,
child: Text('Pick Files'),
),
Text(uploadStatus),
TextButton(
onPressed: retrieveFromIPFS,
child: Text('Retrieve from IPFS'),
),
}
}
66
OUTPUT
67
FIGURE 6.3 Upload page and User Account Details
68
REFERENCES
[1] Rifi, Nabil, Elie Rachkidi, Nazim Agoulmine, and Nada Chendeb Taher.
”Towards using blockchain technology for eHealth data access man- agement.” In 2017
Fourth International Conference on Advances in Biomedical Engineering (ICABME),
pp. 1-4. IEEE, 2017.
[2] Pramod P, Pratyush Kumar Tripathy, Harshit Bajpai, Manjunath R Kounte, ”Role
of Natural Language Processing and Deep Learning in Intelligent Machines”, IEEE
International Conference on Electrical, Communication, Electronics, Instrumentation
and Computing (ICECEIC), Kanchipuram,
India, 30-31 Jan 2019
[3] Kotsiuba, Igor, Artem Velvkzhanin, Yury Yanovich, Iuna Skarga Ban- durova,
Yuriy Dyachenko, and Viacheslav Zhygulin. ”Decentralized e- Health Architecture for
Boosting Healthcare Analytics.” In 2018 Second World Conference on Smart Trends in
Systems, Security and Sustainabil- ity (WorldS4), pp. 113-118. IEEE, 2018.
[4] Mikula, Tomas, and Rune Hylsberg Jacobsen. ”Identity and Access
Management with Blockchain in Electronic Healthcare Records.” In 2018 21st
Euromicro Conference on Digital System Design (DSD), pp. 699- 706. IEEE, 2018.
[5] Soumyalatha Naveen, Manjunath R Kounte, Machine Learning based Fog
Computing as an Enabler of IoT, International Conference on New Trends in
Engineering and Technology (ICNTET), Tiruvalur, Tamil Nadu, India, 7-8 Sep 2018
[6] Kamau, Gabriel, Caroline Boore, Elizaphan Maina, and Stephen Njenga.
”Blockchain Technology: Is this the Solution to EMR Interoperability and Security
Issues in Developing Countries?.” In 2018 IST-Africa Week Conference (IST-Africa),
pp. Page-1. IEEE, 2018.
[7] Alhadhrami, Zainab, Salma Alghfeli, Mariam Alghfeli, Juhar Ahmed Abedlla,
and Khaled Shuaib. ”Introducing blockchains for healthcare.” In 2017 International
Conference on Electrical and Computing Technologies and Applications (ICECTA),
pp. 1-4. IEEE, 2017
69
[8] Zhang, Xiaoshuai, and Stefan Poslad. ”Blockchain Support for Flexible Queries
with Granular Access Control to Electronic Medical Records (EMR).” In 2018 IEEE
International Conference on Communications (ICC), pp. 1-6. IEEE, 2018.
[9] Chintarlapallireddy Yaswanth Simha, Harshini V M, L V S Raghuvamsi,
Manjunath R Kounte, ”Enabling Technologies for Internet of Things Its Security
issues”, Second International Conference on Intelligent Com- puting and Control
Systems (ICICCS 2018), Madurai, India, 14-15 June 2018, pp 1849-1852
[10] Wehbe, Youssef, Mohamed Al Zaabi, and Davor Svetinovic. ”Blockchain AI
Framework for Healthcare Records Management: Constrained Goal Model.” In 2018
26th Telecommunications Forum (TELFOR), pp. 420-425. IEEE, 2018.
[11] Novikov, Sergey P., Oleg D. Kazakov, Natalya A. Kulagina, and Natalya Yu
Azarenko. ”Blockchain and Smart Contracts in a Decentralized Health Infrastructure.”
In 2018 IEEE International Conference” Quality Management, Transport and
Information Security, Information Technolo- gies”(ITQMIS), pp. 697-703. IEEE,
2018.
[12] Jiang, Shan, Jiannong Cao, Hanqing Wu, Yanni Yang, Mingyu Ma, and
Jianfei He. ”Blochie: a blockchain-based platform for healthcare information
exchange.” In 2018 IEEE International Conference on Smart Computing
(SMARTCOMP), pp. 49-56. IEEE, 2018.
[13] Azaria, Asaph, Ariel Ekblaw, Thiago Vieira, and Andrew Lippman. ”Medrec:
Using blockchain for medical data access and permission management.” In 2016 2nd
International Conference on Open and Big Data (OBD), pp. 25-30. IEEE, 2016.
[14] Kaushik, Akanksha, Archana Choudhary, Chinmay Ektare, Deepti Thomas,
and Syed Akram. ”BlockchainLiterature survey.” In 2017 2nd IEEE International
Conference on Recent Trends in Electronics, Infor- mation Communication
Technology (RTEICT), pp. 2145-2148. IEEE, 2017.
70