healthcare-smartcontract

Guides writing HIPAA and GDPR compliant Solidity contracts for healthcare data, claims, and consent.

1|Updated Sep 4, 2025
One-click install
npx skills add https://github.com/FuzzysTodd/The-Nexus-Protocol-Token-DAO --skill healthcare-smartcontract-fuzzystodd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: healthcare-smartcontract
Source: https://github.com/FuzzysTodd/The-Nexus-Protocol-Token-DAO/tree/main/skills/healthcare-smartcontract
Command: npx skills add https://github.com/FuzzysTodd/The-Nexus-Protocol-Token-DAO --skill healthcare-smartcontract-fuzzystodd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers building healthcare applications on Ethereum risk violating HIPAA and GDPR by storing patient data on-chain, mishandling insurance claims logic, or missing access control requirements. This Skill enforces the correct on-chain/off-chain data boundary and provides production-grade contract patterns for healthcare use cases. ## Core Features & Use Cases - Regulatory Compliance Guardrails: Enforces HIPAA's 18 PHI identifier rules, GDPR right-to-erasure patterns (hash invalidation, key deletion), and minimum-necessary access scoping in every contract design. - Canonical Contract Patterns: Provides ready Solidity implementations for patient access control, insurance claims lifecycle state machines, prior authorization workflows, drug supply chain provenance, and consent registries. - FHIR-to-Solidity Mapping: Maps HL7 FHIR R4 resources (Patient, Claim, Coverage, Observation, MedicationRequest) to on-chain structs with bytes32 encoding for ICD-10, CPT, NDC, NPI, LOINC, and RxNorm codes. - Use Case: A developer building an on-chain insurance claims system gets a complete state machine (Submitted → UnderReview → Approved → Paid) with regulatory SLAs, denial reason codes, stablecoin settlement, and anti-pattern warnings. ## Quick Start Ask the AI to review or write a Solidity contract for a healthcare use case such as patient record access or insurance claims, and it will apply HIPAA/GDPR constraints and the correct design patterns automatically.

Frequently Asked Questions about healthcare-smartcontract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I store patient data in a Solidity smart contract?▼

Never store PHI on-chain. Store only a keccak256 hash of the off-chain FHIR data bundle plus an encrypted storage pointer (IPFS CID or FHIR server reference), the data controller address, and status flags. Actual patient data lives in encrypted off-chain storage.

How do I build an insurance claims smart contract?▼

Model claims as a state machine: Submitted → UnderReview → Approved/Denied → Paid/Appealed. Use role-based access so only insurers adjudicate, enforce review SLAs (72h urgent, 30 days standard), add a payment settlement delay, and pay providers in stablecoins like USDC rather than ETH.

Can blockchain smart contracts comply with GDPR right to erasure?▼

Yes, by storing only hashes on-chain and deleting the off-chain data, which renders the hash a dead pointer. Alternatively, encrypt personal data and delete the encryption key. Most EU regulators accept these approaches for blockchain systems.

What data types should I use for medical codes in Solidity?▼

Use bytes32 for all medical codes including ICD-10, CPT, NDC, NPI, LOINC, and RxNorm, never string. Encode them via keccak256 of the code string. For billing amounts, use integer cents, never floats, to avoid precision errors.

What are common mistakes in healthcare smart contracts?▼

Common anti-patterns include storing patient names or DOB on-chain (HIPAA violation), logging IP addresses in events, access grants without expiry, float arithmetic for billing, centralized oracles for claim data, and upgradeable proxies without timelocks.