devsofttech_hms_ci4/app/Database/Migrations/2026-05-19-000210_AddComplaintSnomedJsonToOpdPrescription.php
DevSoftTech Server a56e8a5776 feat: SNOMED background coding pipeline + ABDM Coding Panel
- Add opd_coding_queue + opd_snomed_suggestions migrations
- Add ProcessSnomedCoding spark command (cron: snomed:process-coding)
  Extracts clinical phrases, matches local SNOMED FULLTEXT, saves suggestions
- Add AbdmCodingPanel controller: index/review/confirm/reject/correct/mark_fhir_ready/tip_check
- Add coding_panel + coding_panel_review views (Bootstrap 5, AJAX actions)
- Inject queue trigger in opd_prescription_save (fail-open, ON DUPLICATE KEY)
- Add consult form tip badge: polls tip_check 4s after save, shows review link
- Add AbdmCodingPanel routes behind abdm permission filter
- Various ABDM gateway, FHIR, ABHA, SNOMED library updates
2026-05-19 20:40:27 +05:30

32 lines
868 B
PHP

<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class AddComplaintSnomedJsonToOpdPrescription extends Migration
{
public function up(): void
{
$fields = $this->db->getFieldNames('opd_prescription') ?? [];
if (! in_array('complaint_snomed_json', $fields, true)) {
$this->forge->addColumn('opd_prescription', [
'complaint_snomed_json' => [
'type' => 'TEXT',
'null' => true,
'default' => null,
],
]);
}
}
public function down(): void
{
$fields = $this->db->getFieldNames('opd_prescription') ?? [];
if (in_array('complaint_snomed_json', $fields, true)) {
$this->forge->dropColumn('opd_prescription', 'complaint_snomed_json');
}
}
}