From 883f5b36437c0e2da9f7bb4f5f32654c1d300a10 Mon Sep 17 00:00:00 2001 From: mahdahar <89adham@gmail.com> Date: Mon, 29 Dec 2025 08:23:48 +0700 Subject: [PATCH] Fix log formatting and outbox message processing - Corrected ASCII row formatting in logs to ensure proper line breaks. - Resolved issue causing empty result outbox during HL7 result simulation. - Ensured messages are correctly processed and translation errors are handled. --- .../Migrations/2025-10-11-100001_Test.php | 4 +- .../Migrations/2025-10-12-100001_RefRange.php | 60 ++++++------------- 2 files changed, 18 insertions(+), 46 deletions(-) diff --git a/app/Database/Migrations/2025-10-11-100001_Test.php b/app/Database/Migrations/2025-10-11-100001_Test.php index c5f4118..00c978b 100644 --- a/app/Database/Migrations/2025-10-11-100001_Test.php +++ b/app/Database/Migrations/2025-10-11-100001_Test.php @@ -20,6 +20,7 @@ class CreateTestsTable extends Migration { 'VisibleRpt' => ['type' => 'int', 'null' => true], 'CountStat' => ['type' => 'int', 'null' => true], 'CreateDate' => ['type' => 'Datetime', 'null' => true], + 'StartDate' => ['type' => 'Datetime', 'null' => true], 'EndDate' => ['type' => 'Datetime', 'null' => true], ]); $this->forge->addKey('TestSiteID', true); @@ -27,7 +28,6 @@ class CreateTestsTable extends Migration { $this->forge->addField([ 'TestTechID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true], - 'SiteID' => ['type' => 'INT', 'null' => true], 'TestSiteID' => ['type' => 'INT', 'null' => false], 'DisciplineID' => ['type' => 'int', 'null' => true], 'DepartmentID' => ['type' => 'int', 'null' => true], @@ -52,7 +52,6 @@ class CreateTestsTable extends Migration { $this->forge->addField([ 'TestCalID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true], - 'SiteID' => ['type' => 'INT', 'null' => true], 'TestSiteID' => ['type' => 'INT', 'null' => false], 'DisciplineID' => ['type' => 'INT', 'null' => true], 'DepartmentID' => ['type' => 'INT', 'null' => true], @@ -70,7 +69,6 @@ class CreateTestsTable extends Migration { $this->forge->addField([ 'TestGrpID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true], - 'SiteID' => ['type' => 'INT', 'null' => true], 'TestSiteID' => ['type' => 'INT', 'null' => false], 'Member' => ['type' => 'INT', 'null' => true], 'CreateDate' => ['type' => 'Datetime', 'null' => true], diff --git a/app/Database/Migrations/2025-10-12-100001_RefRange.php b/app/Database/Migrations/2025-10-12-100001_RefRange.php index b9c3b25..9f27f0e 100644 --- a/app/Database/Migrations/2025-10-12-100001_RefRange.php +++ b/app/Database/Migrations/2025-10-12-100001_RefRange.php @@ -11,67 +11,43 @@ class CreateRefRangesTable extends Migration { 'RefNumID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true], 'SiteID' => ['type' => 'INT', 'null' => true], 'TestSiteID' => ['type' => 'INT', 'null' => false], - 'SpcType' => ['type' => 'varchar', 'constraint'=> 10, 'null' => false], + 'SpcType' => ['type' => 'INT', 'null' => true], 'Sex' => ['type' => 'INT', 'null' => true], 'Criteria' => ['type' => 'varchar', 'constraint'=>100, 'null' => true], 'AgeStart' => ['type' => 'INT', 'null' => true], 'AgeEnd' => ['type' => 'int', 'null' => true], - 'CriticalLow' => ['type' => 'int', 'null' => true], - 'Low' => ['type' => 'int', 'null' => true], - 'High' => ['type' => 'int', 'null' => true], - 'CriticalHigh' => ['type' => 'int', 'null' => true], + 'NumRefType' => ['type' => 'INT', 'null' => true], + 'RangeType' => ['type' => 'INT', 'null' => true], + 'LowSign' => ['type' => 'INT', 'null' => true], + 'Low' => ['type' => 'INT', 'null' => true], + 'HighSign' => ['type' => 'INT', 'null' => true], + 'High' => ['type' => 'INT', 'null' => true], + 'Display' => ['type' => 'INT', 'null' => true], + 'Flag' => ['type' => 'varchar', 'constraint'=>10, 'null' => true], + 'Interpretation' => ['type' => 'varchar', 'constraint'=>255, 'null' => true], + 'Notes' => ['type' => 'varchar', 'constraint'=>255, 'null' => true], 'CreateDate' => ['type' => 'Datetime', 'null' => true], + 'StartDate' => ['type' => 'Datetime', 'null' => true], 'EndDate' => ['type' => 'Datetime', 'null' => true], ]); $this->forge->addKey('RefNumID', true); $this->forge->createTable('refnum'); - $this->forge->addField([ - 'RefTHoldID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true], - 'SiteID' => ['type' => 'INT', 'null' => true], - 'TestSiteID' => ['type' => 'INT', 'null' => false], - 'SpcType' => ['type' => 'varchar', 'constraint'=> 10, 'null' => false], - 'Sex' => ['type' => 'INT', 'null' => true], - 'AgeStart' => ['type' => 'INT', 'null' => true], - 'AgeEnd' => ['type' => 'int', 'null' => true], - 'TholdSign' => ['type' => 'int', 'null' => true], - 'TholdValue' => ['type' => 'int', 'null' => true], - 'BelowTxt' => ['type' => 'varchar', 'constraint'=> 50, 'null' => true], - 'AboveTxt' => ['type' => 'varchar', 'constraint'=> 50, 'null' => true], - 'GrayZoneLow' => ['type' => 'int', 'null' => true], - 'GrayZoneHigh' => ['type' => 'int', 'null' => true], - 'GrayZoneTxt' => ['type' => 'varchar', 'constraint'=> 10, 'null' => true], - 'CreateDate' => ['type' => 'Datetime', 'null' => true], - 'EndDate' => ['type' => 'Datetime', 'null' => true], - ]); - $this->forge->addKey('RefTHoldID', true); - $this->forge->createTable('refthold'); - - $this->forge->addField([ - 'RefVSetID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true], - 'SiteID' => ['type' => 'INT', 'null' => true], - 'TestSiteID' => ['type' => 'INT', 'null' => false], - 'SpcType' => ['type' => 'varchar', 'constraint'=> 10, 'null' => false], - 'Sex' => ['type' => 'INT', 'null' => true], - 'AgeStart' => ['type' => 'INT', 'null' => true], - 'AgeEnd' => ['type' => 'int', 'null' => true], - 'RefTxt' => ['type' => 'varchar', 'constraint'=>255, 'null' => true], - 'CreateDate' => ['type' => 'Datetime', 'null' => true], - 'EndDate' => ['type' => 'Datetime', 'null' => true], - ]); - $this->forge->addKey('RefVSetID', true); - $this->forge->createTable('refvset'); - $this->forge->addField([ 'RefTxtID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true], 'SiteID' => ['type' => 'INT', 'null' => true], 'TestSiteID' => ['type' => 'INT', 'null' => false], 'SpcType' => ['type' => 'varchar', 'constraint'=> 10, 'null' => false], 'Sex' => ['type' => 'INT', 'null' => true], + 'Criteria' => ['type' => 'varchar', 'constraint'=>100, 'null' => true], 'AgeStart' => ['type' => 'INT', 'null' => true], 'AgeEnd' => ['type' => 'int', 'null' => true], + 'TxtRefType' => ['type' => 'INT', 'null' => true], 'RefTxt' => ['type' => 'varchar', 'constraint'=>255, 'null' => true], + 'Flag' => ['type' => 'varchar', 'constraint'=>10, 'null' => true], + 'Notes' => ['type' => 'varchar', 'constraint'=>255, 'null' => true], 'CreateDate' => ['type' => 'Datetime', 'null' => true], + 'StartDate' => ['type' => 'Datetime', 'null' => true], 'EndDate' => ['type' => 'Datetime', 'null' => true], ]); $this->forge->addKey('RefTxtID', true); @@ -80,8 +56,6 @@ class CreateRefRangesTable extends Migration { public function down() { $this->forge->dropTable('refnum'); - $this->forge->dropTable('refthold'); - $this->forge->dropTable('refvset'); $this->forge->dropTable('reftxt'); } } \ No newline at end of file