ABDM OPD Queue (today): - New EAtriaBridgeConnector: opdQueueFetch/opdTokenCreate/opdTokenUpdateStatus + patch() helper - New AbdmOpdQueue controller: index/list/fetchQueue/createToken/updateTokenStatus/processScannedToken - fetchQueue syncs gateway tokens into abdm_opd_tokens (local DB) and enriches with HMS patient data - processScannedToken auto-finds/creates patient_master record from ABHA scan data, marks token CALLED - New migration: abdm_opd_tokens table (gateway_token_id, source, status, patient_id, opd_id, processed_at) - New view: abdm/opd_queue.php - reception screen with auto-refresh 30s, HMS Patient column (green row when OPD registered) - Sidebar: ABDM OPD Queue nav link added - Routes: AbdmOpdQueue with abdmPermFilter ABHA Register tab (earlier this session): - New Abha controller: initiate/verifyOtp/communication/verifyCommOtp/validateAbha/card + autoCreateOrFindPatient - New views: abha/card.php, partials/abha_create_panel.php, partials/abha_otp_modal.php - Patient_V.php: ABHA Register tab with 4-method wizard (ABHA number, QR scan, facility QR, mobile OTP) Patient ABHA search fix: - Patient::search() now detects ABHA column (abha_id/abha_no/abha/abha_address) and searches by it ABDM Bridge infrastructure: - EAtriaBridgeConnector: new connector for e-atria.in ABDM bridge gateway - AbdmConnectorFactory/Interface updated - AbdmGatewaySettings controller + view - SNOMED/CSNOTK terminology service skeleton - Finance payout OPD consult views - Migration: AddAbdmPushFieldsToOpdAndPatient, CreateSnomedCoreTables - Docs: abdm/ API specs, architecture, gateway guides
9.5 KiB
Session Summary: ABDM Sandbox Integration Setup Complete
Date: May 12, 2026
Status: ✅ Configuration Phase Complete
Next Phase: Testing & Validation
🎯 Objectives Achieved This Session
✅ 1. ABDM Sandbox Credentials Configuration
- Client ID:
SBXID_033661 - Client Secret: Securely configured in
.env - Approval Status: Confirmed sandbox approved
- Integration Mode: DreamSoft Middleware Gateway
✅ 2. Application Configuration
- Updated
.envwith full ABDM sandbox block - Verified
app/Config/AbdmConnector.phpready (no changes needed) - Confirmed ABDM controller structure exists (
AbdmGateway.php,AbdmTaskBoard.php) - Verified FHIR builder available (
FhirR4Builder.php)
✅ 3. Documentation Created
-
docs/ABDM_SANDBOX_SETUP.md— Complete integration guide- 13 sections covering credentials, API endpoints, workflow, troubleshooting
- Database schema requirements
- Middleware gateway details
- Testing instructions
-
docs/ABDM_SANDBOX_CHECKLIST.md— Implementation checklist- Configuration status tracking
- Phased implementation plan
- Security notes
- Success metrics
-
docs/ABDM_QUICK_START.md— Fast-track guide- 7-step immediate sequence
- 7 progressive tests (2 min → 10 min each)
- Common issues & fixes
- Quick reference
-
Repository Memory:
abdm-sandbox-setup.md- Persistent configuration notes
- Credentials reference
- Next steps checklist
✅ 4. Prerequisite Features Verified
All OPD enhancements already implemented:
- ✅ ABHA input field with validation
- ✅ SNOMED CT complaint/diagnosis auto-resolution
- ✅ Vitals numeric normalization
- ✅ Medicine master SNOMED/ATC coding
- ✅ Recent patient entries chips (OPD productivity feature)
- ✅ FHIR R4 bundle generation (OPD + Prescription records)
📦 What's Configured & Ready
.env File
abdm.connector = dreamsoft
abdm.directClientId = SBXID_033661
abdm.directClientSecret = 656f79f1-ef99-495f-9f37-713219ecbbcf
abdm.directBaseUrl = https://dev.abdm.gov.in/api/v3
BRIDGE_SYNC_URL = https://csnotk.e-atria.in/api/bridge
BRIDGE_SOURCE_CODE = SBXID_033661
snomed.csnotk.baseUrl = https://csnotk.e-atria.in/csnoserv
snomed.csnotk.enabled = true
ABDM API Endpoints Available
| Operation | Endpoint | Status |
|---|---|---|
| ABHA Validation | /AbdmGateway/abha_validate |
✅ Ready |
| Consent Request | /AbdmGateway/consent_request |
✅ Ready |
| Consent Callback | /AbdmGateway/consent_callback |
✅ Ready |
| Push OPD Bundle | /AbdmGateway/share_prescription_bundle |
✅ Ready |
| Push Lab Bundle | /AbdmGateway/share_diagnosis_report_bundle |
✅ Ready |
| Push Discharge | /AbdmGateway/share_ipd_discharge_bundle |
✅ Ready |
⏳ Immediate Action Items (USER RESPONSIBLE)
Step 1️⃣ Get Bearer Token (BLOCKING)
Contact middleware provider (CSNOtk/DreamSoft):
- Request bearer token for source code:
SBXID_033661 - Once received, add to
.env:BRIDGE_SYNC_TOKEN = <token-from-provider>
Step 2️⃣ Register in ABDM Sandbox
- Visit: https://sandbox.abdm.gov.in
- Register organization with Client ID:
SBXID_033661 - Obtain:
- HFR ID (Health Facility Registry ID)
- NPI (National Practitioner Identifier)
- Add to
.env:ABDM_HFR_ID = your-hfr-id ABDM_NPI_ID = your-npi-id
Step 3️⃣ Get Test Data
- Obtain 2-3 test ABHA numbers from sandbox portal
- Example:
14-0061-0000-0001
🧪 Testing Sequence (After Steps 1-3)
Once you have the bearer token and test ABHAs, follow this sequence:
-
Test 1: Middleware Connectivity (2 min)
- Verify
https://csnotk.e-atria.in/api/bridgeis reachable
- Verify
-
Test 2: ABHA Validation (5 min)
- Link test ABHA to HMS patient
-
Test 3: SNOMED Search (3 min)
- Test diagnosis code lookup via CSNOtk
-
Test 4: OPD Creation (10 min)
- Create full OPD consult with FHIR bundle generation
-
Test 5: Consent Request (5 min)
- Initiate consent in HMS
-
Test 6: Accept Consent (2 min)
- Manually accept in ABDM sandbox portal
-
Test 7: Bundle Push (3 min)
- Push OPD record to ABDM sandbox
🔄 Project Timeline
Phase 1: Testing & Validation (This Week)
- Get bearer token & test credentials
- Run 7-step test sequence
- Validate all 7 tests pass
Phase 2: Database Schema (Week 2)
- Add ABDM fields to
opd_prescriptiontable - Add ABHA fields to
patient_mastertable - Create
abdm_consenttracking table - Run migrations
Phase 3: UI/UX Enhancements (Week 3)
- Add ABHA link UI in patient registration
- Add ABDM actions panel to OPD form
- Create consent request dialog
- Add bundle push progress indicator
Phase 4: Additional HI Types (Week 4+)
- Implement Lab Report (DiagnosticReportRecord) bundle
- Implement Discharge Summary (DischargeSummaryRecord)
- Add Wellness record support
- Add Immunization support
Phase 5: Production Hardening (Month 2)
- Error logging & alerting
- Retry/reconciliation service
- Audit trail & compliance logging
- Rate limiting & performance optimization
📁 Key Files Created/Modified
Created
- ✅
docs/ABDM_SANDBOX_SETUP.md— Full integration guide - ✅
docs/ABDM_SANDBOX_CHECKLIST.md— Implementation checklist - ✅
docs/ABDM_QUICK_START.md— Fast-track testing guide - ✅
/memories/repo/abdm-sandbox-setup.md— Persistent notes
Modified
- ✅
.env— Added ABDM sandbox configuration block
Already Available
- ✅
app/Controllers/AbdmGateway.php— ABDM operations - ✅
app/Controllers/AbdmTaskBoard.php— ABDM dashboard - ✅
app/Config/AbdmConnector.php— Configuration loader - ✅
app/Libraries/FhirR4Builder.php— FHIR bundle generation
🎓 How to Continue
To Run Tests:
- Read:
docs/ABDM_QUICK_START.md - Complete immediate steps 1-3
- Follow 7-step test sequence
- Report results
To Access Configuration:
.env— All credentials & URLs configured- Quick reference:
docs/ABDM_QUICK_START.md(end of document)
To Debug Issues:
- Troubleshooting:
docs/ABDM_SANDBOX_SETUP.md(Section 11) - Logs:
writable/logs/log-*.log - Test connectivity:
docs/ABDM_QUICK_START.md(Test 1)
For Implementation Details:
- Complete guide:
docs/ABDM_SANDBOX_SETUP.md - Database schema:
docs/ABDM_SANDBOX_SETUP.md(Section 6) - API endpoints:
docs/ABDM_SANDBOX_SETUP.md(Section 4)
💡 Key Configuration Points
Connector Mode
abdm.connector = dreamsoft // Routes via middleware gateway
// Alternative: direct_abdm // For future direct ABDM API calls
Middleware Gateway
- Provider: CSNOtk (e-atria.in)
- Purpose: ABHA validation proxy, consent relay, bundle routing
- Required: Bearer token (to be obtained)
SNOMED Terminology
- Service: CSNOtk v9.0 at https://csnotk.e-atria.in/csnoserv
- Endpoint: GET /search/suggest?term=
- Usage: Diagnosis/complaint auto-complete
Direct ABDM API (Future)
- Fallback mode for direct NHA connectivity
- Credentials ready (client ID & secret in .env)
- URL: https://dev.abdm.gov.in/api/v3
- Status: Configured but not active (using dreamsoft mode)
🔐 Security Reminders
- ❌ Never commit
.envto git — sensitive data exposed - ❌ Never log credentials — redact in production logs
- ✅ Use environment variables for CI/CD deployment
- ✅ Rotate secrets periodically (production)
- ✅ Audit ABDM operations for compliance
✨ Features Integrated (For Context)
These features were implemented in previous sessions as ABDM compliance foundation:
-
OPD ABDM Validation
- Strict ABDM readiness checks before consult save
- Mandatory ABHA for certain patient types
- SNOMED-coded diagnosis/complaints
- Structured vital signs
-
Medicine Coding
- Optional SNOMED codes for medicines
- Optional ATC codes for medicines
- FHIR medication request enrichment
- Coding gap filters
-
FHIR R4 Bundle Generation
- OPConsultRecord (main complaint + vitals)
- PrescriptionRecord (medicines prescribed)
- Expanded resources: Encounter, Practitioner, Observation, Condition, AllergyIntolerance, ServiceRequest
- Composition with multiple sections
-
Clinical Data Quality
- Recent patient entries chips (fast reuse)
- SNOMED auto-resolution during data entry
- Vitals numeric normalization
- Route terminology consistency ("Where" → "Route")
🎯 Success Criteria
After Phase 1 (Testing), success looks like:
- ✅ Test 1: Middleware responds with 200 status
- ✅ Test 2: ABHA validates and links (≤2 sec)
- ✅ Test 3: SNOMED search returns results (≤3 sec)
- ✅ Test 4: OPD saves with fhir_bundle_id populated
- ✅ Test 5: Consent request created in database
- ✅ Test 6: Consent status changes to "GRANTED"
- ✅ Test 7: Bundle pushed with status = "pushed"
📞 Next Check-In
Recommended: After you complete immediate steps 1-3
At that point, we can:
- Run full 7-step test sequence
- Debug any connectivity issues
- Proceed to Phase 2 (database schema)
- Begin production data migration
Status: 🟢 Ready for Sandbox Testing
Configuration: Complete
Documentation: Complete
Waiting For: Bearer token & facility registration details
Questions? Reference the detailed documentation:
- Quick answers:
docs/ABDM_QUICK_START.md - Deep dive:
docs/ABDM_SANDBOX_SETUP.md - Checklist:
docs/ABDM_SANDBOX_CHECKLIST.md