- 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.
61 lines
2.7 KiB
PHP
61 lines
2.7 KiB
PHP
<?php
|
|
|
|
namespace App\Database\Migrations;
|
|
|
|
use CodeIgniter\Database\Migration;
|
|
|
|
class CreateRefRangesTable extends Migration {
|
|
public function up() {
|
|
|
|
$this->forge->addField([
|
|
'RefNumID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true],
|
|
'SiteID' => ['type' => 'INT', 'null' => true],
|
|
'TestSiteID' => ['type' => 'INT', '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],
|
|
'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([
|
|
'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);
|
|
$this->forge->createTable('reftxt');
|
|
}
|
|
|
|
public function down() {
|
|
$this->forge->dropTable('refnum');
|
|
$this->forge->dropTable('reftxt');
|
|
}
|
|
} |