Skip to content

feat: add patient consent screen and backend enforcement#207

Merged
dev-fatima-24 merged 2 commits into
dev-fatima-24:mainfrom
princessoladele:feat/patient-consent-118
Apr 29, 2026
Merged

feat: add patient consent screen and backend enforcement#207
dev-fatima-24 merged 2 commits into
dev-fatima-24:mainfrom
princessoladele:feat/patient-consent-118

Conversation

@princessoladele
Copy link
Copy Markdown
Contributor

  • Add patient_consent table to SQLite schema (wallet, consented_at)
  • Add GET /v1/patient/consent/:wallet and POST /v1/patient/consent endpoints
  • Enforce consent before minting: vaccination/issue returns 403 if patient has not consented (waivable via REQUIRE_PATIENT_CONSENT=false env var)
  • Add ConsentScreen modal component explaining on-chain data visibility
  • Add useConsent hook for checking and recording consent
  • Show ConsentScreen to first-time patients in PatientDashboard
  • Add REQUIRE_PATIENT_CONSENT to .env.example

Closes #118

Description

Please include a summary of the changes and related context.

Closes #(issue number)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Changes Made

Testing

Please describe the tests you ran and how to reproduce them:

  • Unit tests pass
  • Integration tests pass
  • Manual testing completed

Test Coverage:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests passed locally with my changes
  • Any dependent changes have been merged and published

Screenshots (if applicable)

If your changes include UI modifications, please add screenshots here.

Additional Notes

Any additional information that reviewers should know.

- Add patient_consent table to SQLite schema (wallet, consented_at)
- Add GET /v1/patient/consent/:wallet and POST /v1/patient/consent endpoints
- Enforce consent before minting: vaccination/issue returns 403 if patient
  has not consented (waivable via REQUIRE_PATIENT_CONSENT=false env var)
- Add ConsentScreen modal component explaining on-chain data visibility
- Add useConsent hook for checking and recording consent
- Show ConsentScreen to first-time patients in PatientDashboard
- Add REQUIRE_PATIENT_CONSENT to .env.example

Closes dev-fatima-24#118
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 29, 2026

@princessoladele Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@dev-fatima-24 dev-fatima-24 merged commit 41658ac into dev-fatima-24:main Apr 29, 2026
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement patient consent and data acknowledgment flow

2 participants