devsofttech_hms_ci4/app/Database/Migrations
DevSoftTech Server 55bcaa7d09 Fix ABDM M3 HIU multi-facility consent session grouping and document display
- Fix groupWorkflowRowsIntoSessions() to correlate workflow rows by stable
  request_id/abdm_consent_request_id instead of chronological proximity to
  the newest CONSENT_REQUEST row. Background polling reconciles all
  historical sessions in one batch, so older sessions' rows previously got
  silently merged into the newest session, causing 'Show Data' to display
  an unrelated older session's single facility instead of all consented
  facilities.
- Skip synthetic orphan sessions (stray rows with no owning CONSENT_REQUEST)
  in getAbdmConsentRequestsList()/getAbdmConsentArtifactDetail() so they
  don't show as phantom history rows or get picked as 'most recent'.
- Fix abdm_documents() consent_request_id filter to match all known sibling
  artifact IDs for a session (via abdm_hiu_consent_artifacts), not just an
  exact single artifact id, so all facilities under one consent request
  appear together.
- Fix CreateAbdmHiuConsentArtifacts migration: reduce VARCHAR(180) to
  VARCHAR(100) on consent_request_id/artifact_id to satisfy MySQL's
  1000-byte composite key length limit (was silently failing to migrate).
- Add fetchAllArtifactsAfterGrant() cascade in M3HiuWorkflowService to fetch
  every known artifact under a granted consent, used by both the cron poll
  and a new abdm_check_live_status() endpoint/button.
- getLatestAbdmSyncSnapshot() session-scoping fix to avoid an older granted
  session masking a newer in-progress one.
- Relabel Dr. Joshi Clinic documents (previously mislabeled 'Test Hospital'
  from the HIP's own FHIR bundle Organization name).
2026-07-30 05:08:44 +05:30
..
.gitkeep Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
2026-02-06-000001_CreatePatientDuplicateLog.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
2026-02-08-000001_CreateDocIpdFeeType.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
2026-02-08-000002_AddGstAgreementToInsurance.php Make GST insurance migration idempotent for existing columns 2026-03-21 15:57:15 +05:30
2026-02-14-000002_CreateCheckItemRequestFunction.php Fix item request SQL function migration for binlog-safe settings 2026-03-21 15:59:22 +05:30
2026-02-17-000001_BackfillMedicalInvoiceCodes.php Harden medical invoice backfill migration for zero-date strict mode 2026-03-21 16:00:41 +05:30
2026-02-18-000001_CreateMedicalBankTables.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
2026-02-18-000002_AddPharmacyStockReportIndexes.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
2026-02-18-000003_CreateMedicalProductCategoryTable.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
2026-02-18-000004_AlignMedicalProductCategoryTableSchema.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
2026-02-21-000001_CreateClinicalAuditTrailTable.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
2026-02-21-000002_CreateOpdFhirDocumentTable.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
2026-02-21-000003_CreateComplaintsMasterTable.php Make complaints master migration idempotent for existing codes 2026-03-21 16:03:12 +05:30
2026-02-21-000004_CreateBridgeSyncQueueTable.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
2026-02-21-000005_CreateLabAiExtractionTables.php feat: migrate OPD template flow to DB and apply related updates 2026-03-20 18:11:17 +05:30
2026-02-24-000001_AddDoctorRegistrationNoToDoctorMaster.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
2026-02-24-000002_CreateOpdMedicineUserPreferenceTables.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
2026-02-24-000003_AddDosageRestrictionToOpdMedMaster.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
2026-02-24-000004_AddAiScanColumnsToFileUploadData.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
2026-03-01-000001_AddOpdPerformanceIndexes.php Add OPD performance indexes for appointment dashboard and list queries 2026-03-01 01:57:39 +05:30
2026-03-05-000003_CreateIpdNursingEntriesTable.php Add nursing scan-to-structured workflow and discharge UI polish 2026-03-09 00:12:04 +05:30
2026-03-06-000001_CreateNursingBedsideItemsInsuranceTable.php Add nursing scan-to-structured workflow and discharge UI polish 2026-03-09 00:12:04 +05:30
2026-03-07-000010_CreateIpdDischargeTemplatesTable.php Add page settings and header footer support to discharge templates 2026-06-05 06:22:13 +05:30
2026-03-10-000011_CreateFinancePhase1Tables.php Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
2026-03-10-000012_AddFinanceInvoiceMatchColumns.php Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
2026-03-10-000013_CreateFinanceCashTables.php Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
2026-03-10-000014_CreateFinanceDoctorPayoutTables.php Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
2026-03-10-000015_CreateFinanceDepositAndPolicyTables.php Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
2026-03-13-000016_AddDiagnosisHeadPrintSettings.php feat(diagnosis): add print templates with image upload and optimize PDF rendering 2026-03-15 06:50:44 +05:30
2026-03-14-000017_AddDiagnosisHeadMpdfBlocks.php feat(diagnosis): add print templates with image upload and optimize PDF rendering 2026-03-15 06:50:44 +05:30
2026-03-14-000018_AddDiagnosisPatientInfoHtml.php feat(diagnosis): add print templates with image upload and optimize PDF rendering 2026-03-15 06:50:44 +05:30
2026-03-14-000019_CreateDiagnosisPrintTemplates.php feat(diagnosis): add print templates with image upload and optimize PDF rendering 2026-03-15 06:50:44 +05:30
2026-03-15-000020_AddDiagnosisTemplateMarginsCm.php Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
2026-03-15-000021_CreateDoctorDocumentTables.php Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
2026-03-15-000022_AddDefaultPrintTypeToDocFormatMaster.php Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
2026-03-15-000023_AddPrintMarginsToDocFormatMaster.php Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
2026-03-15-000024_CreateDoctorDocumentPrintTemplates.php Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
2026-03-17-000025_AddFinancePoDocumentColumns.php Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
2026-03-17-000026_CreateFinancePoDocumentsTable.php Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
2026-03-17-000027_CreateFinancePharmacyBillsTable.php Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
2026-03-25-000029_CreateAyushmanPackageMasterTable.php Add Ayushman package import, billing claim sheet, and reporting dashboards 2026-03-26 15:42:40 +05:30
2026-04-01-000030_CreateInvoiceItemUpdateTable.php Fix billing invoice balance/payment flow and deduction UI 2026-04-01 07:23:29 +05:30
2026-04-01-000031_AddInvestigationMasterFields.php Investigation Master: CRUD, favourites, specialization filter 2026-04-01 18:26:33 +05:30
2026-04-01-000032_CreateInvestigationProfileTables.php Investigation Profile Master: CRUD and consult integration 2026-04-01 18:44:52 +05:30
2026-04-02-000033_EnsureEchoChargeGroup.php Add Echo modality to diagnosis navigation and charge group setup 2026-04-02 05:12:08 +05:30
2026-04-02-000034_CreateHospitalStockModule.php feat(stock): add modular hospital stock management with dashboard, masters, indents, purchase and reports 2026-04-02 10:28:38 +05:30
2026-04-02-000035_EnhanceHospitalStockItems.php feat(stock): add modular hospital stock management with dashboard, masters, indents, purchase and reports 2026-04-02 10:28:38 +05:30
2026-04-04-000036_AddAbdmIdentityFields.php Implement ABDM identity storage and align OPD consult/medicine dose masters 2026-04-04 17:26:40 +05:30
2026-04-04-000037_SyncOpdDoseShedMaster.php Implement ABDM identity storage and align OPD consult/medicine dose masters 2026-04-04 17:26:40 +05:30
2026-04-04-000038_SyncOpdDoseWhenMaster.php Implement ABDM identity storage and align OPD consult/medicine dose masters 2026-04-04 17:26:40 +05:30
2026-04-05-000039_CreateAbdmCoreTables.php feat: Add ABDM Task Board module with ABHA workflow 2026-04-05 23:42:24 +05:30
2026-04-05-000040_AddAbdmWorkTasksTable.php feat: Add ABDM Task Board module with ABHA workflow 2026-04-05 23:42:24 +05:30
2026-04-08-000041_AddMedicineSearchIndexes.php Add medicine search DB indexes and prefix query optimization 2026-04-08 19:49:51 +05:30
2026-04-10-000042_AddOpdContPaperPrintToDoctorMaster.php db: Add opd_cont_paper_print column to doctor_master table 2026-04-10 13:28:03 +05:30
2026-04-18-000043_AddSortOrderToIpdItemType.php feat(ipd-charges): group delete, sort order, Up/Down buttons, foldable billing panels 2026-04-18 06:56:38 +05:30
2026-04-21-000044_AddCashSubmissionPeriodFields.php finance/storestock: implement cash submission audits, bank settlements, and opd payout tracking 2026-04-22 10:53:20 +05:30
2026-04-21-000045_CreateCashSubmissionItemsTable.php finance/storestock: implement cash submission audits, bank settlements, and opd payout tracking 2026-04-22 10:53:20 +05:30
2026-04-21-000046_AddCashSubmissionFieldsToPaymentHistory.php finance/storestock: implement cash submission audits, bank settlements, and opd payout tracking 2026-04-22 10:53:20 +05:30
2026-04-21-000047_CreateBankAuditTables.php finance/storestock: implement cash submission audits, bank settlements, and opd payout tracking 2026-04-22 10:53:20 +05:30
2026-04-21-000048_CreateBankReconciliationAuditTable.php finance/storestock: implement cash submission audits, bank settlements, and opd payout tracking 2026-04-22 10:53:20 +05:30
2026-04-21-000049_CreateBankSettlementEntriesTable.php finance/storestock: implement cash submission audits, bank settlements, and opd payout tracking 2026-04-22 10:53:20 +05:30
2026-04-21-000050_AddBankSettlementStatementMatchFields.php fix: use db->getFieldNames() instead of hasField() in migration for reliable column existence check 2026-04-25 09:11:15 +05:30
2026-04-22-000051_AddOpdPayoutTrackingFields.php finance/storestock: implement cash submission audits, bank settlements, and opd payout tracking 2026-04-22 10:53:20 +05:30
2026-04-27-000101_AddHealthplixDoctorIdentifierToDoctorMaster.php feat: add HealthPlix OPD sync flow with settings, diagnostics, and sync ID persistence 2026-04-27 08:32:51 +05:30
2026-04-27-000102_AddHealthplixSyncIdFields.php feat: add HealthPlix OPD sync flow with settings, diagnostics, and sync ID persistence 2026-04-27 08:32:51 +05:30
2026-04-28-000103_ChangeOpdAppointmentDateToDATETIME.php Add OPD appointment time capture and storage with date+time display 2026-04-28 07:59:47 +05:30
2026-04-28-000104_CreateUserSettingsTable.php Add user-based sidebar auto-hide setting, movable from hospital default 2026-04-28 13:47:46 +05:30
2026-04-30-000105_CreateFinanceMedicalPayoutWorkflowTables.php Implement medical store credit payout workflow and optimize payout pool DataTable grouping 2026-04-30 01:42:03 +05:30
2026-05-01-000201_AddInvoiceItemPayoutTrackingFields.php Finance: separate OPD Consult and Doctor Charges payout screens; compact dashboard cards; add IPD payout tracking migration 2026-05-01 21:02:57 +05:30
2026-05-12-000202_CreateSnomedCoreTables.php feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
2026-05-15-000203_AddAbdmPushFieldsToOpdAndPatient.php feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
2026-05-16-000204_CreateAbdmOpdTokensTable.php feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
2026-05-17-000205_CreateHealthRecordsAndAuditTables.php feat: SNOMED background coding pipeline + ABDM Coding Panel 2026-05-19 20:40:27 +05:30
2026-05-19-000001_AddSnomedFulltextIndex.php feat: SNOMED background coding pipeline + ABDM Coding Panel 2026-05-19 20:40:27 +05:30
2026-05-19-000002_CreateOpdCodingTables.php feat: SNOMED background coding pipeline + ABDM Coding Panel 2026-05-19 20:40:27 +05:30
2026-05-19-000210_AddComplaintSnomedJsonToOpdPrescription.php feat: SNOMED background coding pipeline + ABDM Coding Panel 2026-05-19 20:40:27 +05:30
2026-05-19-000300_AddDiagnosisJsonToOpdPrescription.php feat: SNOMED background coding pipeline + ABDM Coding Panel 2026-05-19 20:40:27 +05:30
2026-05-20-000001_AddSnomedColumnsToClinicalMasters.php feat: Clinical Master workspace — Complaints + Diagnosis edit with SNOMED CT search 2026-05-20 01:25:01 +05:30
2026-05-20-000401_AddSnomedToInvestigation.php feat: SNOMED background coding pipeline + ABDM Coding Panel 2026-05-19 20:40:27 +05:30
2026-05-20-000501_AddBridgeRecordIdToHealthRecords.php feat(abdm): proper FHIR bundles for lab reports and IPD discharge 2026-05-23 04:41:59 +05:30
2026-05-25-000602_AddAbdmDrugTerminologyFieldsToMedProductMaster.php Pharmacy: add ABDM drug terminology autocomplete + canonical mapping 2026-05-25 13:57:56 +05:30
2026-05-26-000603_CreateHmsGatewayCompanyMasterTable.php feat: commit all pending page and ABDM gateway updates 2026-05-26 06:04:34 +05:30
2026-05-26-000604_CreateMedShortFormulationTable.php feat: commit all pending page and ABDM gateway updates 2026-05-26 06:04:34 +05:30
2026-05-27-000605_AddConsentIdsToAbdmConsentRecords.php Checkpoint: pathology panel modal workflow, gateway component search, and ABDM-style component/print editors 2026-05-30 06:32:30 +05:30
2026-05-28-000606_AddLoincToPathologyTables.php Checkpoint: pathology panel modal workflow, gateway component search, and ABDM-style component/print editors 2026-05-30 06:32:30 +05:30
2026-06-02-000607_AddPatientAbhaAddressField.php Store ABHA ID and ABHA address separately 2026-06-02 06:00:35 +05:30
2026-06-02-000608_AddRecordDataToHealthRecords.php Store ABDM bundles in health records 2026-06-03 11:05:40 +05:30
2026-06-18-000609_AddAbhaProfileMetaToPatientMaster.php chore: checkpoint before discharge history panel refactor 2026-06-22 02:05:24 +05:30
2026-06-24-000610_CreateAbdmLocationMasters.php ABDM: finalize ABHA verify persistence, M2 routes/workflows, and location masters seeding 2026-06-24 03:15:22 +05:30
2026-06-24-000611_DropAbdmStateMaster.php ABDM: finalize ABHA verify persistence, M2 routes/workflows, and location masters seeding 2026-06-24 03:15:22 +05:30
2026-06-24-000612_CreateM2HmsAbdmTables.php feat(abdm): implement M2 gateway contract endpoints and live test tooling 2026-06-24 04:50:03 +05:30
2026-06-27-000613_CreateAbdmPushSyncTables.php Fix ABDM M3 HIU ID mapping, polling guards, and migration compatibility 2026-07-02 00:55:05 +05:30
2026-07-01-000701_CreateAbdmM3HiuWorkflows.php Add ABDM M3 HIU workflows, routes, UI, and runbook docs 2026-07-01 17:37:53 +05:30
2026-07-01-000702_AddConsentMappingColumnsToAbdmHiuWorkflows.php Fix ABDM M3 HIU ID mapping, polling guards, and migration compatibility 2026-07-02 00:55:05 +05:30
2026-07-09-000714_AdjustAbdmHiuWorkflowRequestOperationIndex.php ABDM HIU callback hardening, OPD ABHA optional confirm, and AJAX memory cleanup 2026-07-10 00:09:35 +05:30
2026-07-16-000715_CreateAbdmHiuDocuments.php Add ABDM documents and patient profile sync UI 2026-07-16 18:23:40 +05:30
2026-07-18-000001_CreateImmunizationModuleTables.php Add patient immunization module 2026-07-19 00:41:12 +05:30
2026-07-19-000002_AddBridgeMetadataToImmunizationMaster.php Add E-Atria immunization master sync 2026-07-19 01:00:43 +05:30
2026-07-28-002500_CreateAbdmHiuConsentArtifacts.php Fix ABDM M3 HIU multi-facility consent session grouping and document display 2026-07-30 05:08:44 +05:30