fhir-migration

Migrate demographic data storage to a hybrid HAPI FHIR, PostgreSQL, and Keycloak architecture.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/btall/core-africare-identity --skill fhir-migration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fhir-migration
Source: https://github.com/btall/core-africare-identity/tree/main/.claude/skills/fhir-migration
Command: npx skills add https://github.com/btall/core-africare-identity --skill fhir-migration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides the migration of demographic data storage to a hybrid architecture where HAPI FHIR becomes the source of truth for Patient and Practitioner data, while PostgreSQL stores GDPR metadata and Keycloak handles authentication and RBAC.

Core Features & Use Cases

  • FHIR integration & mappings: Implement Pydantic ↔ FHIR mappers for Patient and Practitioner to enable bidirectional sync with HAPI FHIR.
  • GDPR metadata layer: Introduce GDPR metadata tables in PostgreSQL to track verification, anonymization, soft deletes, and correlation hashes.
  • Orchestration pattern: A service-layer workflow that creates/updates FHIR resources, persists GDPR metadata, and publishes events.
  • Use case: Modernize a platform by consolidating identity data in HAPI FHIR while preserving GDPR controls in PostgreSQL and keeping authentication in Keycloak.

Quick Start

  1. Install required dependencies (e.g., fhir.resources, httpx) and set up environment for HAPI FHIR.
  2. Implement the FHIR mappers as described (PatientMapper, ProfessionalMapper) and wire them to the service layer.
  3. Create GDPR metadata models and a migration script, then run the migration to move existing data and enable sync with FHIR.