seetadev / ZKMedical-Billing

zk Diagnostics on Scroll, Polygon, Ethereum blockchain using Avail and zksbts with Bandada, Sindri and Aztec
MIT License
1 stars 3 forks source link

[DMP 2024]: Extend ZK Medical Billing Platform Web3 components and enable a Decentralized NFT-based voting system frame on ERC-20 blockchain, Farcaster #1

Open seetadev opened 7 months ago

seetadev commented 7 months ago

Ticket Contents

Description

ZK Medical Billing enables:

■Secure medical billing data storage, transparent data movement, authenticity;

■Improving Data Transparency

■Enabling healthcare community by empowering medicare providers in universities to do medical counseling securely, transparently.

A greater and more seamless flow of information within a digital health care infrastructure, created by ZK Medical Billing Platform, encompasses and leverages digital progress and can transform the way medicine and healthcare is delivered and compensated.

We also wish to share the key motivation behind our attempt to learn and use Avail light clients:

Improve Throughput and performance in ZK Medical Billing: Avail light clients required significantly fewer resources (storage and processing power) to operate, making them more accessible to operate in a Mohalla clinic setting.

Strengthen Decentralization in ZK Medical Billing: Avail light clients contribute to a more decentralized and trust-minimized blockchain ecosystem, which is very significant in developing countries.

Improve Security in ZK Medical Billing: Avail light clients enabled us to provide security comparable to full nodes through random data sampling and verification, reducing reliance on other solutions.

Goals & Mid-Point Milestone

Goals

Setup/Installation

Android version at https://github.com/seetadev/ZKMedical-Billing/tree/main/zk-medical-billing-tracker (please download tablet.apk).

Run Locally

Clone the project

Go to the project directory: https://github.com/seetadev/ZKMedical-Billing/tree/main/zk-medical-billing-tracker

cd zk-medical-billing-tracker

Install dependencies

npm i -g @ionic/cli

npm i

Start the server

For Browser

ionic serve

Build App

For Android

ionic capacitor add android

ionic capacitor sync android

ionic capacitor open android

For IOS ionic capacitor add ios

ionic capacitor sync ios

ionic capacitor open ios

Expected Outcome

  1. Complete all the 6 goals listed above to enable pilot of ZK Medical Invoicing solution in 11 Delhi universities supported by D.T.T.E. starting with NSUT.

  2. Make key enhancements on the Python backend for ZK Medical Billing platform to enable DIY approach for billing in government setups.

  3. Launch the blockchain token on Uniswap, Sushiswap and PankCakeSwap for ZK Medical Billing platform portal offerings. Complete the integration of ZK Medical Invoice Manager and Government Invoice dapp with integrations to Optimism, Polygon, zksync, Near, Arbitrum, Filecoin, Solana, Cardano, Tron's BTTC blockchain, Algorand, XDC and StarkNet.

Acceptance Criteria

  1. Launch the ZK Medical Billing blockchain token on CEX-1 and CEX-2 along with Uniswap, Sushiswap and PankCakeSwap for the ZK Medical Billing platform offerings. Complete the integration of Invoice Manager and Government Invoice dapp with integrations to Optimism, Near, Arbitrum, Filecoin, Polygon, zksync, Solana, Cardano, Tron's BTTC blockchain, Algorand, XDC and StarkNet.

  2. Complete all the 6 goals listed above to enable pilot of invoicing solution in 11 Delhi universities supported by D.T.T.E. starting with NSUT.

  3. Make key enhancements on the Python backend for ZK Medical Billing platform to enable DIY approach for billing in government setups.

  4. Save to multi-cloud feature: We would consider a pilot execution with a database of 100+ invoices provided. Please find the screenshots attached for a workflow which is documented for dropbox on ionic angular. You could use supabase, firebase or AWS S3 and Google Database with ionic react if you wish. Please visit https://drive.google.com/drive/u/2/folders/1ORr1D9dQifuX-fkRux49ZDnu1_u7oAJE .

Implementation Details

We are developing the ZK Medical Billing Tracker app using ionic react. Wish to share the learning resources for bootstrapping the learning effort:

Getting Started: https://ionicframework.com/react

https://www.youtube.com/watch?v=xn-qpnT2n3Q

https://www.youtube.com/watch?v=WugT638KS3Q&list=PLYxzS__5yYQlhvyLXSKhv4oAvl06MInSE

https://www.youtube.com/watch?v=K7ghUiXLef8

https://www.youtube.com/watch?v=-aHBhvkrFlY

https://github.com/ionic-team/ionic-react-conference-app

https://stackblitz.com/edit/ionic-react-demo?file=index.js

We are using SocialCalc under the hood for developing the zk medical billing app developed by Dan Bricklin, inventor of the first spreadsheet, VisiCalc.

We have extended and adapted the web based spreadsheet to be mobile, tablet, desktop and iot devices using the ionic framework.

To learn more about SocialCalc: please refer to the following documentation

https://aosabook.org/en/v1/socialcalc.html

https://aosabook.org/en/posa/from-socialcalc-to-ethercalc.html

https://aosabook.org/en/500L/web-spreadsheet.html

Platform Tools needed: Computer with Linux, Windows or Mac OS. In case windows, please install git-bash.

Testing Device: Smartphone with Android or ios

Backend: Conda, tornado app server, nginx web server (https://aosabook.org/en/v2/nginx.html), passlib and torando.auth

References on SocialCalc:

SocialCalc for Public Health and Education: Please visit

Guide for using Charting tools by Harvard University's Digital Literacy Project - http://vimeo.com/11886029

Guide for using Charting Tools - http://wiki.laptop.org/go/User:Ndoiron/SocialCalc

SocialCalc for improving social access to data and calculation at Federal Communication Commission (FCC): https://www.purplemotes.net/2009/09/13/universal-social-access-to-data-and-calculation/

Community Publications on SocialCalc

"Collaborating Towards Learning, Using Social Spreadsheets for Health Education and Community Awareness", Aastha Chhabra, Manu Sheel Gupta, Sixth International Conference of MIT’s Learning International Networks Consortium (LINC), MIT, Cambridge, Massachusetts, USA · Jun 16, 2013

"Spreadsheet on Cloud - Framework for Learning and Health Management System", K.S. Preeti, Vijit Singh, Sushant Bhatia, Ekansh Preet Singh, Manu Sheel Gupta, Proceedings of the EuSpRIG Conference 2011 "Spreadsheet Governance - Policy and Practice" ISBN : 978-0-9566256-9-4

"Constructionist Learning using Spreadsheet Based Models on Tablets", Mithil Gupta, Manu Sheel Gupta, Sixth International Conference of MIT’s Learning International Networks Consortium (LINC), MIT, Cambridge, Massachusetts, USA · Jun 16, 2013

"A Synchronized Spreadsheet Framework as an IT solution and its Data Management Issues" Rohit Jain, KS Preeti, Vijit Singh, Shubham Shukla, Sushant Bhatia, Yatharth Bansal, Manu Sheel Gupta, International Conference on Information Technology, Systems and Management, Indian Institute of Management, Kozhikode, India · Dec 17, 2011

"SocialCalc: A Spreadsheet Activity for Computer Supported Collaborative Learning", Manu Sheel Gupta, K.S. Preeti, Vijit Singh, Proceedings of the 2010 Conference on Frontiers in Education: Computer Science and Computer Engineering, FECS 2010, Las Vegas, Nevada, U.S.A., CSREA Press 2010, ISBN 1-60132-143-0, pp. 304-309 URL - http://www.informatik.uni-trier.de/~ley/db/conf/fecs/fecs2010.html

"Implementation of Private Cloud Computing using Integration of JavaScript and Python", K.S. Preeti, Vijit Singh, Manu Sheel Gupta, The Python Papers Monograph, The PyCon Asia Pacific 2010, Singapore Management University Download URL - http://ojs.pythonpapers.org/index.php/tppm/article/view/149/161

SocialCalc project has also been covered in important sections of the following conference papers -

"A March Towards Constructionism based on Storytelling, Gaming and Collaboration", Manu Sheel Gupta, Vijit Singh, Manjot Pahwa, The Fifth International Conference of Learning International Networks Consortium (LINC) 2010, Massachusetts Institute of Technology, Cambridge, Massachusetts, U.S.A.

"Collaborating Towards Learning: Using Web 2.0 for Educational Idea Development", Krittika Adhikary, Manu Sheel Gupta, Ekansh Preet Singh, Swarandeep Singh, The Fifth International Conference of Learning International Networks Consortium (LINC) 2010, Massachusetts Institute of Technology, Cambridge, Massachusetts, U.S.A.

Recent research contribution in SocialCalc: Co-author of the article, "Opinion of students on online education during the Covid 19 pandemic", please visit the paper at https://onlinelibrary.wiley.com/doi/epdf/10.1002/hbe2.240

Mockups/Wireframes

Please visit the 4.5 minute demo to understand the ZK Medical Billing Platform at https://drive.google.com/drive/u/1/folders/1zadM3Ac_KCEi5_x29seu-b6bBK6BkAus

Screenshots for each of the Web3 components bootstrapped in ZK Medical Billing Platform: https://drive.google.com/drive/u/1/folders/1MS_uLsmDUNcdgugJZqOCQFUC7GMqFdOt

ZK Medical Invoice Tracker (MVP): https://invoice-suite.vercel.app/

Demo Video for anonymization and encryption of medical data and dapp on decentralized medical counseling (dapp, security): https://www.youtube.com/watch?v=rJRRlaVQSMY

Demo Video for bulk query, retrieve of medical data & dapp using OP, Eth, Embark, IPFS (dapp, portal): https://www.youtube.com/watch?v=BUiVvhuUdrE

Product Name

ZK Medical Billing Platform for Government Universities

Organisation Name

NSUT in collaboration with C4GT, SEETA, AIC

Domain

⁠Healthcare

Tech Skills Needed

AWS, Chart.js, CI/CD, DevOps, Express.js, Flask, HTML, Ionic, JavaScript, Node.js, Python, React, RESTful APIs, Selenium, Solidity, SQL, TypeScript

Mentor(s)

@seetadev @aspiringsecurity @aspiringdevapps

Manu Sheel Gupta;

Dr. MPS Bhatia;

Deepti Gupta (SAP Appgyer guidance and SAP BTP integrations) for utility government organizations in India.

Category

Beginner Friendly, CI/CD, Database, Delpoyment, Localization, Mobile, Security

smitjiwani commented 7 months ago

Hey @seetadev, I would like to work on this project as part of dmp 2024

supreme0408 commented 7 months ago

Hey @seetadev , I would love to work on this project as part of Code4GovTech 2024. As I am first time contributing in Code4GovTech, please support me, as I am having plenty of questions. Firstly I will need to submit the proposal for this project on unstop, right?

Tanya-ruby commented 7 months ago

@seetadev @aspiringsecurity @aspiringdevapps I am familiar with the web3 frameworks that is required for the project,whom do i contact for further discussions ?

AbhimanyuSamagra commented 7 months ago

Do not ask process related questions about how to apply and who to contact in the above ticket. The only questions allowed are about technical aspects of the project itself. If you want help with the process, you can refer instructions listed on Unstop and any further queries can be taken up on our Discord channel titled DMP queries. Here's a Video Tutorial on how to submit a proposal for a project.

MukulKolpe commented 5 months ago

Weekly Learnings and Updates

Week 1

ERC20 MediToken Contract:

Deployment Script:

Test Suite:

Makefile Configuration:

README Documentation:

Static Audit Review:

Tokenomics Study:

Links to Issues and PRs:


seetadev commented 5 months ago

Weekly Goals

Week 1

Week 2

Week 3

Week 4

Week 5

Week 6

Week 7

Week 8

MukulKolpe commented 5 months ago

Weekly Learnings and Updates

Week 1

ERC20 MediToken Contract:

Deployment Script:

Test Suite:

Makefile Configuration:

README Documentation:

Static Audit Review:

Tokenomics Study:

Links to Issues and PRs:


Week 2

Implemented and deployed a decentralized healthcare system DApp utilizing MediToken for token-gated access control.

Token-Gated Access Control:

Deployment Script:

ConnectKit Integration:

Lighthouse Storage Integration:

Frontend Deployment:

Documentation:

Deployed Contract Addresses:

Links to Issues and PRs:


Week 3

Integrated Lit Protocol's encryption and decryption functionalities into the MedETH platform. The aim was to enhance the security of user documents by encrypting them during the registration process and ensuring they are decrypted only after wallet signing on the display end.

Integrated Web3 wallet connectivity into the Medical Billing Platform using ConnectKit.

Lit Protocol SDK Integration:

Encryption on User Registration:

Decryption for Document Display:

ConnectKit Integration:

Chain Configuration:

UI Enhancements:

Documentation:

Links to Issues and PRs:


Week 4

Deployed the web version of the Medical Billing Platform integrated with ConnectKit for web3 wallet connectivity to Vercel.
Here's the link: web3-medical-invoice.
Implemented wallet connectivity feature utilizing the Metamask SDK within the Ionic React-based mobile application for the Web3 medical invoice platform.

Deployed Web version of Medical Billing Platform with ConnectKit integrated:

Implemented Connect and Disconnect Logic:

Connect Wallet Button and Popover:

Persistent Wallet State:

Setup Instructions Documentation:

Links to Issues and PRs:


Week 5

Created a token-gated utility smart contract for platform-independent medical invoice projects. The smart contract ensures users hold a MediToken to save and view medical invoice files. The contract allows users to save file content and retrieve saved files, provided they meet the token holding requirements, enabling token-gated access control for Email, Print, and Save operations.

Token-Gated Utility Smart Contract:

Deployment Script:

Makefile Configuration:

README Documentation:

Contract Deployment:

Optimization Strategies:

Links to Issues and PRs:


Week 6

Enhanced the Connect Wallet functionality in the Ionic React Mobile App by implementing the wallet_addEthereumChain and wallet_switchEthereumChain methods as specified in EIP-3085 and EIP-3326. The wallet_addEthereumChain method prompts the user to add a specified network to MetaMask, while the wallet_switchEthereumChain method prompts the user to switch to the specified network. These enhancements aim to improve user experience by ensuring the correct network is added and selected when connecting their wallet.
Integrated token-gated functionality for the save, print, and email operations in the Ionic medical invoice application. It integrates ethers.js to check the token balance of the connected wallets state, ensuring that these actions are only accessible when the wallet meets the required token threshold. This enhancement provides a controlled access mechanism based on token ownership.

Implemented wallet_addEthereumChain and wallet_switchEthereumChain:

Set up the default network:

Added network to the device:

Checked the connected chainId:

Integrated ethers.js:

Implemented functionality to read token balance:

Developed token-gated logic:

Updated setup documentation:

Links to Issues and PRs:


Week 7

Deployed the MediToken, MedETH (DoctorSide, UserSide), and Web3-tools-contracts across multiple testnets, including Polygon zkEVM, Scroll Sepolia, and Filecoin Calibration. Updates were made to the project's Makefiles, ENV example files, and READMEs to ensure compatibility with these new configurations. Additionally, a presentation and screencast were prepared for the midpoint evaluation.

Prepared Presentation and Screencast for Midpoint Evaluation:

Configured and Deployed Smart Contracts on Polygon zkEVM, Scroll Sepolia, and Filecoin Calibration Testnets:

Deployed Contracts:

Links to Issues and PRs:


Week 8

Enhanced the MediToken project's documentation by adding a comprehensive getting-started guide. This guide includes an overview of MediToken, a migration guide from Web2 to Web3, integration instructions for Solidity smart contracts, and a procedure for deploying custom tokens. Additionally, studied different stablecoins, and their tokenomics, and evaluated various methods for building and sustaining a stablecoin-based ecosystem.

Enhanced Documentation with Getting Started Guide for MediToken:

Studied Stablecoins and their Tokenomics:

Links to Issues and PRs:


Week 9

Updated the default network configuration across relevant directories to Polygon zkEVM Cardano Testnet. This change ensures consistent network settings in both ConnectKit setups and custom connect wallet implementations. Also, set the default network to Polygon zkEVM Cardano Testnet on the Vercel deployments.

Set Polygon zkEVM Cardano Testnet as Default Network:

Links to Issues and PRs:


Week 10

Deployed the MediToken contract, DoctorSide, and UserSide smart contracts from the MedETH project, along with the Web3-tools-contracts on NEAR's Aurora Testnet. Updates were made to the README files to ensure they reflected the newly deployed contract addresses.

Configured and Deployed Smart Contracts on NEAR's Aurora Testnet:

Deployed Contract Addresses in NEAR's Aurora Testnet:

Links to Issues and PRs:


Week 11

Fixed a bug in the wallet_addEthereumChain method (EIP-3085) related to network addition in custom connectors. This issue was affecting both web3-medical-invoice-ionic-metamask-connector and medical-invoice-ionic-tokengated, causing performance issues. The fix included adding the blockExplorerUrls array to the parameters and validating network addition across different scenarios.

Fixed Bug in wallet_addEthereumChain Method (EIP-3085):

Links to Issues and PRs: