- 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
33 lines
766 B
PHP
33 lines
766 B
PHP
<?php
|
|
|
|
namespace App\Database\Migrations;
|
|
|
|
use CodeIgniter\Database\Migration;
|
|
|
|
class AddDiagnosisJsonToOpdPrescription extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
$fields = [
|
|
'diagnosis_json' => [
|
|
'type' => 'TEXT',
|
|
'null' => true,
|
|
'after' => 'diagnosis',
|
|
],
|
|
];
|
|
|
|
if ($this->db->fieldExists('diagnosis_json', 'opd_prescription')) {
|
|
return;
|
|
}
|
|
|
|
$this->forge->addColumn('opd_prescription', $fields);
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
if ($this->db->fieldExists('diagnosis_json', 'opd_prescription')) {
|
|
$this->forge->dropColumn('opd_prescription', 'diagnosis_json');
|
|
}
|
|
}
|
|
}
|