Major updates to order system: - Add specimen and test data to order responses (index, show, create, update, status update) - Implement getOrderSpecimens() and getOrderTests() private methods in OrderTestController - Support 'include=details' query parameter for expanded order data - Update OrderTestModel with enhanced query capabilities and transaction handling API documentation: - Update OpenAPI specs for orders, patient-visits, and tests - Add new schemas for order specimens and tests - Regenerate bundled API documentation Database: - Add Requestable field to TestDefSite migration - Create OrderSeeder and ClearOrderDataSeeder for test data - Update DBSeeder to include order seeding Patient visits: - Add filtering by PatientID, PatientName, and date ranges - Include LastLocation in visit queries Testing: - Add OrderCreateTest with comprehensive test coverage Documentation: - Update AGENTS.md with improved controller structure examples
29 lines
641 B
PHP
29 lines
641 B
PHP
<?php
|
|
|
|
namespace App\Database\Migrations;
|
|
|
|
use CodeIgniter\Database\Migration;
|
|
|
|
class AddRequestableToTestDefSite extends Migration
|
|
{
|
|
public function up()
|
|
{
|
|
$fields = [
|
|
'Requestable' => [
|
|
'type' => 'TINYINT',
|
|
'constraint' => 1,
|
|
'null' => true,
|
|
'default' => 1,
|
|
'comment' => 'Flag indicating if test can be requested (1=yes, 0=no)'
|
|
]
|
|
];
|
|
|
|
$this->forge->addColumn('testdefsite', $fields);
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$this->forge->dropColumn('testdefsite', 'Requestable');
|
|
}
|
|
}
|