{"id":31646453,"url":"https://github.com/hq969/healthcare-data-migration-api","last_synced_at":"2026-04-28T21:34:57.999Z","repository":{"id":312409689,"uuid":"1047406309","full_name":"hq969/Healthcare-Data-Migration-API","owner":"hq969","description":"As part of solving data modernization challenges in healthcare, I designed and implemented a complete migration \u0026 API system that brings legacy patient data into the cloud with AWS services while enabling hospital operations through a robust API layer.","archived":false,"fork":false,"pushed_at":"2025-08-30T11:51:55.000Z","size":65,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-27T00:30:03.963Z","etag":null,"topics":["aws-dynamodb","dms","dynamodb","java-17","mysql","openapi","postgresql","spring-boot-3","swagger-ui"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hq969.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-30T10:54:15.000Z","updated_at":"2025-08-30T12:12:29.000Z","dependencies_parsed_at":"2025-08-30T13:08:40.975Z","dependency_job_id":"8b470dd2-f6b6-498d-9782-93e8ea155966","html_url":"https://github.com/hq969/Healthcare-Data-Migration-API","commit_stats":null,"previous_names":["hq969/healthcare-data-migration-api"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/hq969/Healthcare-Data-Migration-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hq969%2FHealthcare-Data-Migration-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hq969%2FHealthcare-Data-Migration-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hq969%2FHealthcare-Data-Migration-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hq969%2FHealthcare-Data-Migration-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hq969","download_url":"https://codeload.github.com/hq969/Healthcare-Data-Migration-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hq969%2FHealthcare-Data-Migration-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278728043,"owners_count":26035411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-dynamodb","dms","dynamodb","java-17","mysql","openapi","postgresql","spring-boot-3","swagger-ui"],"created_at":"2025-10-07T05:50:26.690Z","updated_at":"2025-10-07T05:50:29.095Z","avatar_url":"https://github.com/hq969.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏥 Healthcare Data Migration \u0026 API\n\nThis project demonstrates **healthcare data migration** from a legacy **SQL Server** database to **AWS RDS (PostgreSQL)** and **DynamoDB** using **AWS DMS**, along with a **Spring Boot REST API** for managing hospital operations.\n\nIt provides:\n- **Data Migration** templates (`aws-dms/`) for SQL Server ➝ AWS RDS \u0026 DynamoDB.\n- **RESTful APIs** for **Patient Registration**, **Appointments**, and **Billing**.\n- **Audit Logging** in DynamoDB for migration and API activity.\n- **Database setup** with schema + seed data.\n\n---\n\n## 🚀 Features\n- **Spring Boot 3 + Java 17** backend\n- **JPA + Hibernate** with PostgreSQL/MySQL support\n- **AWS SDK v2** (DynamoDB Enhanced Client)\n- **Data Migration via AWS DMS** (full load + CDC)\n- **Swagger/OpenAPI** documentation\n- Pre-seeded DB data (`schema.sql`, `data.sql`)\n\n---\n\n## 📂 Project Structure\n```\n\nhealthcare-data-migration-api/\n│── src/main/java/com/healthcare/\n│ ├── Application.java # Main Spring Boot entrypoint\n│ ├── domain/ # Entities: Patient, Appointment, Billing\n│ ├── dto/ # DTO classes for requests/responses\n│ ├── repository/ # Spring Data JPA repositories\n│ ├── service/ # Business services + DynamoDB Audit service\n│ ├── controller/ # REST controllers\n│ ├── config/ # AWS DynamoDB config\n│ ├── dynamodb/ # DynamoDB models (AuditLog)\n│ ├── exception/ # Exception handling\n│ └── mapper/ # DTO ↔ Entity mappers\n│\n│── src/main/resources/\n│ ├── application.yml # Spring Boot configuration\n│ ├── schema.sql # (Optional) Schema definitions\n│ └── data.sql # Seed data\n│\n│── aws-dms/\n│ ├── dms-endpoints.json # Example source/target endpoint config\n│ ├── dms-task-settings.json # Example migration task (Full load + CDC)\n│ └── aws-cli-example.md # CLI usage examples\n│\n│── pom.xml # Maven dependencies\n│── README.md # Project documentation\n\n````\n\n---\n\n## 🛠️ Tech Stack\n- **Java 17**, **Spring Boot 3**\n- **Spring Data JPA**\n- **PostgreSQL / MySQL** (RDS target DB)\n- **AWS DynamoDB** (Audit logs)\n- **AWS DMS** (Data Migration Service)\n- **Swagger UI (OpenAPI)**\n\n---\n\n## ⚙️ Setup Instructions\n\n### 1️⃣ Clone Repo\n```bash\ngit clone https://github.com/hq969/healthcare-data-migration-api.git\ncd healthcare-data-migration-api\n````\n\n### 2️⃣ Run Database (Postgres via Docker)\n\n```bash\ndocker run --name healthcare-db -e POSTGRES_USER=healthcare -e POSTGRES_PASSWORD=healthcare -e POSTGRES_DB=healthcare -p 5432:5432 -d postgres:15\n```\n\nFor MySQL instead:\n\n```bash\ndocker run --name healthcare-mysql -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=healthcare -e MYSQL_USER=healthcare -e MYSQL_PASSWORD=healthcare -p 3306:3306 -d mysql:8\n```\n\n### 3️⃣ Configure Application\n\nEdit `src/main/resources/application.yml` to set DB credentials and AWS region/table.\n\nSwitch DB profiles:\n\n```bash\n# Default (Postgres)\nSPRING_PROFILES_ACTIVE=dev\n\n# MySQL\nSPRING_PROFILES_ACTIVE=mysql\n```\n\n### 4️⃣ Build \u0026 Run\n\n```bash\n./mvnw clean package\n./mvnw spring-boot:run\n```\n\n---\n\n## 📖 API Endpoints\n\nSwagger UI available at:\n👉 [http://localhost:8080/swagger-ui/index.html](http://localhost:8080/swagger-ui/index.html)\n\n| Method | Endpoint            | Description              |\n| ------ | ------------------- | ------------------------ |\n| GET    | `/api/patients`     | Get all patients         |\n| POST   | `/api/patients`     | Create new patient       |\n| GET    | `/api/appointments` | Get all appointments     |\n| POST   | `/api/appointments` | Schedule appointment     |\n| GET    | `/api/billings`     | Get billing records      |\n| POST   | `/api/billings`     | Create new billing entry |\n\n---\n\n## ☁️ AWS DMS Setup\n\n1. **Create replication instance** in AWS DMS.\n2. **Configure endpoints**:\n\n   * `aws-dms/dms-endpoints.json`\n   * Update hostnames, ports, usernames, and passwords.\n3. **Create replication task** using:\n\n   * `aws-dms/dms-task-settings.json`\n4. **Run with CLI**:\n\n```bash\naws dms create-endpoint --cli-input-json file://aws-dms/dms-endpoints.json\naws dms create-replication-task --cli-input-json file://aws-dms/dms-task-settings.json\naws dms start-replication-task --replication-task-arn \u003cTASK_ARN\u003e --start-replication-task-type start-replication\n```\n\nDetailed commands are in `aws-dms/aws-cli-example.md`.\n\n---\n\n## 🔎 Verification\n\n* Connect to **RDS PostgreSQL** and check `patients`, `appointments`, `billings` tables.\n* Check **DynamoDB audit logs** for migration activity.\n* Test REST APIs with **Swagger UI**.\n\n---\n\n## 🧪 Example DB Seed\n\nAfter startup, DB is preloaded with:\n\n* Patient: `Asha Verma` (`MRN1001`)\n* Appointment: Cardiology with `Dr. Smith`\n* Billing: `₹1200.50` pending\n\n---\n\n## 📌 Next Steps\n\n* Add **authentication \u0026 JWT security**\n* Extend modules: pharmacy, lab results\n* Set up **CI/CD pipeline** for AWS deployment\n\n---\n\n## 👨‍💻 Author\n\n**Harsh Sonkar**\nAWS Engineer | Data Engineer | Full-Stack Developer\n\n---\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhq969%2Fhealthcare-data-migration-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhq969%2Fhealthcare-data-migration-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhq969%2Fhealthcare-data-migration-api/lists"}