refactor: standardize boolean field naming across API domains
Rename legacy boolean helpers to is* naming across test definitions, patient models, and infrastructure data to match rest of backend. Update controllers, models, migrations, seeders, tests, and OpenAPI docs/bundled spec so contracts and runtime align.
This commit is contained in:
parent
7600989bed
commit
76ea22d841
@ -23,7 +23,7 @@ class EquipmentListController extends BaseController {
|
|||||||
'InstrumentName' => $this->request->getVar('InstrumentName'),
|
'InstrumentName' => $this->request->getVar('InstrumentName'),
|
||||||
'DepartmentID' => $this->request->getVar('DepartmentID'),
|
'DepartmentID' => $this->request->getVar('DepartmentID'),
|
||||||
'WorkstationID' => $this->request->getVar('WorkstationID'),
|
'WorkstationID' => $this->request->getVar('WorkstationID'),
|
||||||
'Enable' => $this->request->getVar('Enable'),
|
'isEnable' => $this->request->getVar('isEnable'),
|
||||||
];
|
];
|
||||||
|
|
||||||
$rows = $this->model->getEquipmentLists($filter);
|
$rows = $this->model->getEquipmentLists($filter);
|
||||||
|
|||||||
@ -42,11 +42,11 @@ class TestsController extends BaseController
|
|||||||
{
|
{
|
||||||
$search = $this->request->getGet('search');
|
$search = $this->request->getGet('search');
|
||||||
|
|
||||||
$filters = [
|
$filters = [
|
||||||
'SiteID' => $this->request->getGet('SiteID'),
|
'SiteID' => $this->request->getGet('SiteID'),
|
||||||
'TestType' => $this->request->getGet('TestType'),
|
'TestType' => $this->request->getGet('TestType'),
|
||||||
'VisibleScr' => $this->request->getGet('VisibleScr'),
|
'isVisibleScr' => $this->request->getGet('isVisibleScr'),
|
||||||
'VisibleRpt' => $this->request->getGet('VisibleRpt'),
|
'isVisibleRpt' => $this->request->getGet('isVisibleRpt'),
|
||||||
'TestSiteName' => $this->request->getGet('TestSiteName'),
|
'TestSiteName' => $this->request->getGet('TestSiteName'),
|
||||||
'TestSiteCode' => $this->request->getGet('TestSiteCode'),
|
'TestSiteCode' => $this->request->getGet('TestSiteCode'),
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
@ -162,10 +162,10 @@ class TestsController extends BaseController
|
|||||||
'SeqScr' => $input['SeqScr'] ?? 0,
|
'SeqScr' => $input['SeqScr'] ?? 0,
|
||||||
'SeqRpt' => $input['SeqRpt'] ?? 0,
|
'SeqRpt' => $input['SeqRpt'] ?? 0,
|
||||||
'IndentLeft' => $input['IndentLeft'] ?? 0,
|
'IndentLeft' => $input['IndentLeft'] ?? 0,
|
||||||
'FontStyle' => $input['FontStyle'] ?? null,
|
'FontStyle' => $input['FontStyle'] ?? null,
|
||||||
'VisibleScr' => $input['VisibleScr'] ?? 1,
|
'isVisibleScr' => $input['isVisibleScr'] ?? 1,
|
||||||
'VisibleRpt' => $input['VisibleRpt'] ?? 1,
|
'isVisibleRpt' => $input['isVisibleRpt'] ?? 1,
|
||||||
'CountStat' => $input['CountStat'] ?? 1,
|
'isCountStat' => $input['isCountStat'] ?? 1,
|
||||||
'StartDate' => $input['StartDate'] ?? date('Y-m-d H:i:s'),
|
'StartDate' => $input['StartDate'] ?? date('Y-m-d H:i:s'),
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -253,9 +253,9 @@ class TestsController extends BaseController
|
|||||||
'SeqRpt',
|
'SeqRpt',
|
||||||
'IndentLeft',
|
'IndentLeft',
|
||||||
'FontStyle',
|
'FontStyle',
|
||||||
'VisibleScr',
|
'isVisibleScr',
|
||||||
'VisibleRpt',
|
'isVisibleRpt',
|
||||||
'CountStat',
|
'isCountStat',
|
||||||
'StartDate',
|
'StartDate',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -109,7 +109,7 @@ class CreateOrganization extends Migration {
|
|||||||
'WorkstationName' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
|
'WorkstationName' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
|
||||||
'Type' => ['type' => 'VARCHAR', 'constraint' => 10, 'null'=> true],
|
'Type' => ['type' => 'VARCHAR', 'constraint' => 10, 'null'=> true],
|
||||||
'LinkTo' => ['type' => 'int', 'null'=> true],
|
'LinkTo' => ['type' => 'int', 'null'=> true],
|
||||||
'Enable' => ['type' => 'VARCHAR', 'constraint' => 10, 'null'=> true],
|
'isEnable' => ['type' => 'VARCHAR', 'constraint' => 10, 'null'=> true],
|
||||||
'CreateDate' => ['type'=>'DATETIME', 'null' => true],
|
'CreateDate' => ['type'=>'DATETIME', 'null' => true],
|
||||||
'EndDate' => ['type'=>'DATETIME', 'null' => true]
|
'EndDate' => ['type'=>'DATETIME', 'null' => true]
|
||||||
]);
|
]);
|
||||||
|
|||||||
@ -31,11 +31,11 @@ class CreateTestDefinitions extends Migration {
|
|||||||
'SeqRpt' => ['type' => 'int', 'null' => true],
|
'SeqRpt' => ['type' => 'int', 'null' => true],
|
||||||
'IndentLeft' => ['type' => 'int', 'null' => true, 'default' => 0],
|
'IndentLeft' => ['type' => 'int', 'null' => true, 'default' => 0],
|
||||||
'FontStyle' => ['type' => 'varchar', 'constraint'=> 50, 'null' => true],
|
'FontStyle' => ['type' => 'varchar', 'constraint'=> 50, 'null' => true],
|
||||||
'VisibleScr' => ['type' => 'int', 'null' => true, 'default' => 1],
|
'isVisibleScr' => ['type' => 'int', 'null' => true, 'default' => 1],
|
||||||
'VisibleRpt' => ['type' => 'int', 'null' => true, 'default' => 1],
|
'isVisibleRpt' => ['type' => 'int', 'null' => true, 'default' => 1],
|
||||||
'CountStat' => ['type' => 'int', 'null' => true, 'default' => 1],
|
'isCountStat' => ['type' => 'int', 'null' => true, 'default' => 1],
|
||||||
'Level' => ['type' => 'int', 'null' => true],
|
'Level' => ['type' => 'int', 'null' => true],
|
||||||
'Requestable' => [ 'type' => 'TINYINT', 'constraint' => 1, 'null' => true, 'default' => 1, 'comment' => 'Flag indicating if test can be requested (1=yes, 0=no)' ],
|
'isRequestable' => [ 'type' => 'TINYINT', 'constraint' => 1, 'null' => true, 'default' => 1, 'comment' => 'Flag indicating if test can be requested (1=yes, 0=no)' ],
|
||||||
'CreateDate' => ['type' => 'Datetime', 'null' => true],
|
'CreateDate' => ['type' => 'Datetime', 'null' => true],
|
||||||
'StartDate' => ['type' => 'Datetime', 'null' => true],
|
'StartDate' => ['type' => 'Datetime', 'null' => true],
|
||||||
'EndDate' => ['type' => 'Datetime', 'null' => true],
|
'EndDate' => ['type' => 'Datetime', 'null' => true],
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class CreateLabInfrastructure extends Migration {
|
|||||||
'InstrumentID' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
|
'InstrumentID' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
|
||||||
'InstrumentName' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
|
'InstrumentName' => ['type' => 'varchar', 'constraint'=> 150, 'null'=> true],
|
||||||
'WorkstationID' => ['type' => 'int', 'unsigned' => true ],
|
'WorkstationID' => ['type' => 'int', 'unsigned' => true ],
|
||||||
'Enable' => ['type' => 'bit', 'null'=> false],
|
'isEnable' => ['type' => 'bit', 'null'=> false],
|
||||||
'EquipmentRole' => ['type' => 'varchar', 'constraint' => 1, 'null'=> false],
|
'EquipmentRole' => ['type' => 'varchar', 'constraint' => 1, 'null'=> false],
|
||||||
'CreateDate' => ['type'=>'DATETIME', 'null' => true],
|
'CreateDate' => ['type'=>'DATETIME', 'null' => true],
|
||||||
'EndDate' => ['type'=>'DATETIME', 'null' => true]
|
'EndDate' => ['type'=>'DATETIME', 'null' => true]
|
||||||
|
|||||||
@ -38,7 +38,7 @@ class CreatePatientCore extends Migration {
|
|||||||
'Religion' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
|
'Religion' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
|
||||||
'Ethnic' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
|
'Ethnic' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
|
||||||
'Citizenship' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
'Citizenship' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
||||||
'DeathIndicator'=> ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
|
'isDead'=> ['type' => 'VARCHAR', 'constraint' => 10, 'null' => true],
|
||||||
'TimeOfDeath' => ['type' => 'DATETIME', 'null' => true],
|
'TimeOfDeath' => ['type' => 'DATETIME', 'null' => true],
|
||||||
'LinkTo' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
'LinkTo' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true],
|
||||||
'CreateDate' => ['type' => 'DATETIME', 'null' => true],
|
'CreateDate' => ['type' => 'DATETIME', 'null' => true],
|
||||||
|
|||||||
@ -53,48 +53,48 @@ class OrganizationSeeder extends Seeder
|
|||||||
$this->db->table('department')->insertBatch($data);
|
$this->db->table('department')->insertBatch($data);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
['WorkstationID' => '1', 'DepartmentID' => '1', 'WorkstationCode' => 'HAUTO', 'WorkstationName' => 'Hematologi Auto', 'Type' => '0', 'LinkTo' => '', 'Enable' => '1', 'CreateDate' => "$now"],
|
['WorkstationID' => '1', 'DepartmentID' => '1', 'WorkstationCode' => 'HAUTO', 'WorkstationName' => 'Hematologi Auto', 'Type' => '0', 'LinkTo' => '', 'isEnable' => '1', 'CreateDate' => "$now"],
|
||||||
['WorkstationID' => '2', 'DepartmentID' => '1', 'WorkstationCode' => 'HBACK', 'WorkstationName' => 'Hematologi Backup', 'Type' => '1', 'LinkTo' => '1', 'Enable' => '1', 'CreateDate' => "$now"],
|
['WorkstationID' => '2', 'DepartmentID' => '1', 'WorkstationCode' => 'HBACK', 'WorkstationName' => 'Hematologi Backup', 'Type' => '1', 'LinkTo' => '1', 'isEnable' => '1', 'CreateDate' => "$now"],
|
||||||
['WorkstationID' => '3', 'DepartmentID' => '3', 'WorkstationCode' => 'CAUTO', 'WorkstationName' => 'Kimia Auto', 'Type' => '0', 'LinkTo' => '', 'Enable' => '1', 'CreateDate' => "$now"],
|
['WorkstationID' => '3', 'DepartmentID' => '3', 'WorkstationCode' => 'CAUTO', 'WorkstationName' => 'Kimia Auto', 'Type' => '0', 'LinkTo' => '', 'isEnable' => '1', 'CreateDate' => "$now"],
|
||||||
['WorkstationID' => '4', 'DepartmentID' => '3', 'WorkstationCode' => 'CBACK', 'WorkstationName' => 'Kimia Backup', 'Type' => '1', 'LinkTo' => '3', 'Enable' => '1', 'CreateDate' => "$now"],
|
['WorkstationID' => '4', 'DepartmentID' => '3', 'WorkstationCode' => 'CBACK', 'WorkstationName' => 'Kimia Backup', 'Type' => '1', 'LinkTo' => '3', 'isEnable' => '1', 'CreateDate' => "$now"],
|
||||||
['WorkstationID' => '5', 'DepartmentID' => '3', 'WorkstationCode' => 'CMAN', 'WorkstationName' => 'Kimia Manual', 'Type' => '0', 'LinkTo' => '', 'Enable' => '1', 'CreateDate' => "$now"],
|
['WorkstationID' => '5', 'DepartmentID' => '3', 'WorkstationCode' => 'CMAN', 'WorkstationName' => 'Kimia Manual', 'Type' => '0', 'LinkTo' => '', 'isEnable' => '1', 'CreateDate' => "$now"],
|
||||||
['WorkstationID' => '6', 'DepartmentID' => '4', 'WorkstationCode' => 'IAUTO', 'WorkstationName' => 'Imunologi Auto', 'Type' => '0', 'LinkTo' => '', 'Enable' => '1', 'CreateDate' => "$now"],
|
['WorkstationID' => '6', 'DepartmentID' => '4', 'WorkstationCode' => 'IAUTO', 'WorkstationName' => 'Imunologi Auto', 'Type' => '0', 'LinkTo' => '', 'isEnable' => '1', 'CreateDate' => "$now"],
|
||||||
['WorkstationID' => '7', 'DepartmentID' => '4', 'WorkstationCode' => 'IMAN', 'WorkstationName' => 'Imunologi Manual', 'Type' => '0', 'LinkTo' => '', 'Enable' => '1', 'CreateDate' => "$now"],
|
['WorkstationID' => '7', 'DepartmentID' => '4', 'WorkstationCode' => 'IMAN', 'WorkstationName' => 'Imunologi Manual', 'Type' => '0', 'LinkTo' => '', 'isEnable' => '1', 'CreateDate' => "$now"],
|
||||||
['WorkstationID' => '8', 'DepartmentID' => '6', 'WorkstationCode' => 'UAUTO', 'WorkstationName' => 'Urin Auto', 'Type' => '0', 'LinkTo' => '', 'Enable' => '1', 'CreateDate' => "$now"],
|
['WorkstationID' => '8', 'DepartmentID' => '6', 'WorkstationCode' => 'UAUTO', 'WorkstationName' => 'Urin Auto', 'Type' => '0', 'LinkTo' => '', 'isEnable' => '1', 'CreateDate' => "$now"],
|
||||||
['WorkstationID' => '9', 'DepartmentID' => '6', 'WorkstationCode' => 'UMAN', 'WorkstationName' => 'Urin Manual', 'Type' => '0', 'LinkTo' => '', 'Enable' => '1', 'CreateDate' => "$now"],
|
['WorkstationID' => '9', 'DepartmentID' => '6', 'WorkstationCode' => 'UMAN', 'WorkstationName' => 'Urin Manual', 'Type' => '0', 'LinkTo' => '', 'isEnable' => '1', 'CreateDate' => "$now"],
|
||||||
];
|
];
|
||||||
$this->db->table('workstation')->insertBatch($data);
|
$this->db->table('workstation')->insertBatch($data);
|
||||||
|
|
||||||
// Equipment/Instruments for each workstation
|
// Equipment/Instruments for each workstation
|
||||||
$data = [
|
$data = [
|
||||||
// Hematology Auto (WorkstationID: 1)
|
// Hematology Auto (WorkstationID: 1)
|
||||||
['EID' => 1, 'IEID' => 'EQ-HEM-001', 'DepartmentID' => '1', 'InstrumentID' => 'SYSMEX_XN1000', 'InstrumentName' => 'Sysmex XN-1000 Hematology Analyzer', 'WorkstationID' => 1, 'Enable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
['EID' => 1, 'IEID' => 'EQ-HEM-001', 'DepartmentID' => '1', 'InstrumentID' => 'SYSMEX_XN1000', 'InstrumentName' => 'Sysmex XN-1000 Hematology Analyzer', 'WorkstationID' => 1, 'isEnable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
||||||
['EID' => 2, 'IEID' => 'EQ-HEM-002', 'DepartmentID' => '1', 'InstrumentID' => 'SYSMEX_XS1000', 'InstrumentName' => 'Sysmex XS-1000i', 'WorkstationID' => 1, 'Enable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
['EID' => 2, 'IEID' => 'EQ-HEM-002', 'DepartmentID' => '1', 'InstrumentID' => 'SYSMEX_XS1000', 'InstrumentName' => 'Sysmex XS-1000i', 'WorkstationID' => 1, 'isEnable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
||||||
// Hematology Backup (WorkstationID: 2)
|
// Hematology Backup (WorkstationID: 2)
|
||||||
['EID' => 3, 'IEID' => 'EQ-HEM-003', 'DepartmentID' => '1', 'InstrumentID' => 'SYSMEX_XN550', 'InstrumentName' => 'Sysmex XN-550 Backup', 'WorkstationID' => 2, 'Enable' => 1, 'EquipmentRole' => 'B', 'CreateDate' => "$now"],
|
['EID' => 3, 'IEID' => 'EQ-HEM-003', 'DepartmentID' => '1', 'InstrumentID' => 'SYSMEX_XN550', 'InstrumentName' => 'Sysmex XN-550 Backup', 'WorkstationID' => 2, 'isEnable' => 1, 'EquipmentRole' => 'B', 'CreateDate' => "$now"],
|
||||||
['EID' => 4, 'IEID' => 'EQ-HEM-004', 'DepartmentID' => '1', 'InstrumentID' => 'MANUAL_DIFF', 'InstrumentName' => 'Manual Differential Counter', 'WorkstationID' => 2, 'Enable' => 1, 'EquipmentRole' => 'M', 'CreateDate' => "$now"],
|
['EID' => 4, 'IEID' => 'EQ-HEM-004', 'DepartmentID' => '1', 'InstrumentID' => 'MANUAL_DIFF', 'InstrumentName' => 'Manual Differential Counter', 'WorkstationID' => 2, 'isEnable' => 1, 'EquipmentRole' => 'M', 'CreateDate' => "$now"],
|
||||||
// Chemistry Auto (WorkstationID: 3)
|
// Chemistry Auto (WorkstationID: 3)
|
||||||
['EID' => 5, 'IEID' => 'EQ-CHEM-001', 'DepartmentID' => '3', 'InstrumentID' => 'COBAS_C501', 'InstrumentName' => 'Roche Cobas C501 Chemistry Analyzer', 'WorkstationID' => 3, 'Enable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
['EID' => 5, 'IEID' => 'EQ-CHEM-001', 'DepartmentID' => '3', 'InstrumentID' => 'COBAS_C501', 'InstrumentName' => 'Roche Cobas C501 Chemistry Analyzer', 'WorkstationID' => 3, 'isEnable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
||||||
['EID' => 6, 'IEID' => 'EQ-CHEM-002', 'DepartmentID' => '3', 'InstrumentID' => 'COBAS_C311', 'InstrumentName' => 'Roche Cobas C311', 'WorkstationID' => 3, 'Enable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
['EID' => 6, 'IEID' => 'EQ-CHEM-002', 'DepartmentID' => '3', 'InstrumentID' => 'COBAS_C311', 'InstrumentName' => 'Roche Cobas C311', 'WorkstationID' => 3, 'isEnable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
||||||
// Chemistry Backup (WorkstationID: 4)
|
// Chemistry Backup (WorkstationID: 4)
|
||||||
['EID' => 7, 'IEID' => 'EQ-CHEM-003', 'DepartmentID' => '3', 'InstrumentID' => 'COBAS_E411', 'InstrumentName' => 'Roche Cobas E411 Immunoassay', 'WorkstationID' => 4, 'Enable' => 1, 'EquipmentRole' => 'B', 'CreateDate' => "$now"],
|
['EID' => 7, 'IEID' => 'EQ-CHEM-003', 'DepartmentID' => '3', 'InstrumentID' => 'COBAS_E411', 'InstrumentName' => 'Roche Cobas E411 Immunoassay', 'WorkstationID' => 4, 'isEnable' => 1, 'EquipmentRole' => 'B', 'CreateDate' => "$now"],
|
||||||
// Chemistry Manual (WorkstationID: 5)
|
// Chemistry Manual (WorkstationID: 5)
|
||||||
['EID' => 8, 'IEID' => 'EQ-CHEM-004', 'DepartmentID' => '3', 'InstrumentID' => 'SPEC_MANUAL', 'InstrumentName' => 'Spectrophotometer Manual', 'WorkstationID' => 5, 'Enable' => 1, 'EquipmentRole' => 'M', 'CreateDate' => "$now"],
|
['EID' => 8, 'IEID' => 'EQ-CHEM-004', 'DepartmentID' => '3', 'InstrumentID' => 'SPEC_MANUAL', 'InstrumentName' => 'Spectrophotometer Manual', 'WorkstationID' => 5, 'isEnable' => 1, 'EquipmentRole' => 'M', 'CreateDate' => "$now"],
|
||||||
// Immunology Auto (WorkstationID: 6)
|
// Immunology Auto (WorkstationID: 6)
|
||||||
['EID' => 9, 'IEID' => 'EQ-IMM-001', 'DepartmentID' => '4', 'InstrumentID' => 'ARCH_I2000', 'InstrumentName' => 'Architect i2000 Immunoassay', 'WorkstationID' => 6, 'Enable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
['EID' => 9, 'IEID' => 'EQ-IMM-001', 'DepartmentID' => '4', 'InstrumentID' => 'ARCH_I2000', 'InstrumentName' => 'Architect i2000 Immunoassay', 'WorkstationID' => 6, 'isEnable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
||||||
['EID' => 10, 'IEID' => 'EQ-IMM-002', 'DepartmentID' => '4', 'InstrumentID' => 'COBAS_E601', 'InstrumentName' => 'Roche Cobas E601', 'WorkstationID' => 6, 'Enable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
['EID' => 10, 'IEID' => 'EQ-IMM-002', 'DepartmentID' => '4', 'InstrumentID' => 'COBAS_E601', 'InstrumentName' => 'Roche Cobas E601', 'WorkstationID' => 6, 'isEnable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
||||||
// Immunology Manual (WorkstationID: 7)
|
// Immunology Manual (WorkstationID: 7)
|
||||||
['EID' => 11, 'IEID' => 'EQ-IMM-003', 'DepartmentID' => '4', 'InstrumentID' => 'ELISA_READER', 'InstrumentName' => 'ELISA Plate Reader', 'WorkstationID' => 7, 'Enable' => 1, 'EquipmentRole' => 'M', 'CreateDate' => "$now"],
|
['EID' => 11, 'IEID' => 'EQ-IMM-003', 'DepartmentID' => '4', 'InstrumentID' => 'ELISA_READER', 'InstrumentName' => 'ELISA Plate Reader', 'WorkstationID' => 7, 'isEnable' => 1, 'EquipmentRole' => 'M', 'CreateDate' => "$now"],
|
||||||
['EID' => 12, 'IEID' => 'EQ-IMM-004', 'DepartmentID' => '4', 'InstrumentID' => 'FLUORIMETER', 'InstrumentName' => 'Fluorimeter Manual', 'WorkstationID' => 7, 'Enable' => 1, 'EquipmentRole' => 'M', 'CreateDate' => "$now"],
|
['EID' => 12, 'IEID' => 'EQ-IMM-004', 'DepartmentID' => '4', 'InstrumentID' => 'FLUORIMETER', 'InstrumentName' => 'Fluorimeter Manual', 'WorkstationID' => 7, 'isEnable' => 1, 'EquipmentRole' => 'M', 'CreateDate' => "$now"],
|
||||||
// Urinalysis Auto (WorkstationID: 8)
|
// Urinalysis Auto (WorkstationID: 8)
|
||||||
['EID' => 13, 'IEID' => 'EQ-URI-001', 'DepartmentID' => '6', 'InstrumentID' => 'URISYS_1100', 'InstrumentName' => 'Urisys 1100 Urine Analyzer', 'WorkstationID' => 8, 'Enable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
['EID' => 13, 'IEID' => 'EQ-URI-001', 'DepartmentID' => '6', 'InstrumentID' => 'URISYS_1100', 'InstrumentName' => 'Urisys 1100 Urine Analyzer', 'WorkstationID' => 8, 'isEnable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
||||||
['EID' => 14, 'IEID' => 'EQ-URI-002', 'DepartmentID' => '6', 'InstrumentID' => 'CLINITEK', 'InstrumentName' => 'Clinitek Urine Chemistry', 'WorkstationID' => 8, 'Enable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
['EID' => 14, 'IEID' => 'EQ-URI-002', 'DepartmentID' => '6', 'InstrumentID' => 'CLINITEK', 'InstrumentName' => 'Clinitek Urine Chemistry', 'WorkstationID' => 8, 'isEnable' => 1, 'EquipmentRole' => 'A', 'CreateDate' => "$now"],
|
||||||
// Urinalysis Manual (WorkstationID: 9)
|
// Urinalysis Manual (WorkstationID: 9)
|
||||||
['EID' => 15, 'IEID' => 'EQ-URI-003', 'DepartmentID' => '6', 'InstrumentID' => 'MICROSCOPE', 'InstrumentName' => 'Microscope Manual', 'WorkstationID' => 9, 'Enable' => 1, 'EquipmentRole' => 'M', 'CreateDate' => "$now"],
|
['EID' => 15, 'IEID' => 'EQ-URI-003', 'DepartmentID' => '6', 'InstrumentID' => 'MICROSCOPE', 'InstrumentName' => 'Microscope Manual', 'WorkstationID' => 9, 'isEnable' => 1, 'EquipmentRole' => 'M', 'CreateDate' => "$now"],
|
||||||
['EID' => 16, 'IEID' => 'EQ-URI-004', 'DepartmentID' => '6', 'InstrumentID' => 'CENTRIFUGE', 'InstrumentName' => 'Centrifuge Urine', 'WorkstationID' => 9, 'Enable' => 1, 'EquipmentRole' => 'M', 'CreateDate' => "$now"],
|
['EID' => 16, 'IEID' => 'EQ-URI-004', 'DepartmentID' => '6', 'InstrumentID' => 'CENTRIFUGE', 'InstrumentName' => 'Centrifuge Urine', 'WorkstationID' => 9, 'isEnable' => 1, 'EquipmentRole' => 'M', 'CreateDate' => "$now"],
|
||||||
// Additional equipment (disabled)
|
// Additional equipment (disabled)
|
||||||
['EID' => 17, 'IEID' => 'EQ-HEM-005', 'DepartmentID' => '1', 'InstrumentID' => 'OLD_ANALYZER', 'InstrumentName' => 'Old Hematology Analyzer', 'WorkstationID' => 1, 'Enable' => 0, 'EquipmentRole' => 'B', 'CreateDate' => "$now"],
|
['EID' => 17, 'IEID' => 'EQ-HEM-005', 'DepartmentID' => '1', 'InstrumentID' => 'OLD_ANALYZER', 'InstrumentName' => 'Old Hematology Analyzer', 'WorkstationID' => 1, 'isEnable' => 0, 'EquipmentRole' => 'B', 'CreateDate' => "$now"],
|
||||||
['EID' => 18, 'IEID' => 'EQ-CHEM-005', 'DepartmentID' => '3', 'InstrumentID' => 'MAINTENANCE', 'InstrumentName' => 'Chemistry Analyzer Under Maintenance', 'WorkstationID' => 3, 'Enable' => 0, 'EquipmentRole' => 'B', 'CreateDate' => "$now"],
|
['EID' => 18, 'IEID' => 'EQ-CHEM-005', 'DepartmentID' => '3', 'InstrumentID' => 'MAINTENANCE', 'InstrumentName' => 'Chemistry Analyzer Under Maintenance', 'WorkstationID' => 3, 'isEnable' => 0, 'EquipmentRole' => 'B', 'CreateDate' => "$now"],
|
||||||
];
|
];
|
||||||
$this->db->table('equipmentlist')->insertBatch($data);
|
$this->db->table('equipmentlist')->insertBatch($data);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,7 +46,7 @@ class PatientSeeder extends Seeder
|
|||||||
'Religion' => 'ISLAM',
|
'Religion' => 'ISLAM',
|
||||||
'Ethnic' => 'TNGHA',
|
'Ethnic' => 'TNGHA',
|
||||||
'Citizenship' => 'WNI',
|
'Citizenship' => 'WNI',
|
||||||
'DeathIndicator' => 'N',
|
'isDead' => '0',
|
||||||
'TimeOfDeath' => null,
|
'TimeOfDeath' => null,
|
||||||
'LinkTo' => null,
|
'LinkTo' => null,
|
||||||
'CreateDate' => $now,
|
'CreateDate' => $now,
|
||||||
@ -84,7 +84,7 @@ class PatientSeeder extends Seeder
|
|||||||
'Religion' => 'KRSTN',
|
'Religion' => 'KRSTN',
|
||||||
'Ethnic' => 'TNGHA',
|
'Ethnic' => 'TNGHA',
|
||||||
'Citizenship' => 'WNI',
|
'Citizenship' => 'WNI',
|
||||||
'DeathIndicator' => 'N',
|
'isDead' => '0',
|
||||||
'TimeOfDeath' => null,
|
'TimeOfDeath' => null,
|
||||||
'LinkTo' => null,
|
'LinkTo' => null,
|
||||||
'CreateDate' => $now,
|
'CreateDate' => $now,
|
||||||
@ -122,7 +122,7 @@ class PatientSeeder extends Seeder
|
|||||||
'Religion' => 'ISLAM',
|
'Religion' => 'ISLAM',
|
||||||
'Ethnic' => 'TNGHA',
|
'Ethnic' => 'TNGHA',
|
||||||
'Citizenship' => 'WNI',
|
'Citizenship' => 'WNI',
|
||||||
'DeathIndicator' => 'N',
|
'isDead' => '0',
|
||||||
'TimeOfDeath' => null,
|
'TimeOfDeath' => null,
|
||||||
'LinkTo' => '1,2',
|
'LinkTo' => '1,2',
|
||||||
'CreateDate' => $now,
|
'CreateDate' => $now,
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace App\Database\Seeds;
|
namespace App\Database\Seeds;
|
||||||
|
|
||||||
use CodeIgniter\Database\Seeder;
|
use CodeIgniter\Database\Seeder;
|
||||||
use App\Libraries\ValueSet;
|
use App\Libraries\ValueSet;
|
||||||
use App\Services\RuleExpressionService;
|
use App\Services\RuleExpressionService;
|
||||||
|
|
||||||
class TestSeeder extends Seeder
|
class TestSeeder extends Seeder
|
||||||
{
|
{
|
||||||
@ -71,42 +71,42 @@ class TestSeeder extends Seeder
|
|||||||
// ========================================
|
// ========================================
|
||||||
|
|
||||||
// GROUP: CBC (Complete Blood Count)
|
// GROUP: CBC (Complete Blood Count)
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'CBC', 'TestSiteName' => 'Complete Blood Count', 'TestType' => 'GROUP', 'Description' => 'Darah Lengkap', 'SeqScr' => '10', 'SeqRpt' => '10', 'IndentLeft' => '0', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'ResultType' => 'NORES', 'RefType' => 'NOREF', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'CBC', 'TestSiteName' => 'Complete Blood Count', 'TestType' => 'GROUP', 'Description' => 'Darah Lengkap', 'SeqScr' => '10', 'SeqRpt' => '10', 'IndentLeft' => '0', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'ResultType' => 'NORES', 'RefType' => 'NOREF', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['CBC'] = $this->db->insertID();
|
$tIDs['CBC'] = $this->db->insertID();
|
||||||
|
|
||||||
// PARAM: (none for Hematology)
|
// PARAM: (none for Hematology)
|
||||||
|
|
||||||
// TEST: Hematology Tests
|
// TEST: Hematology Tests
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'HB', 'TestSiteName' => 'Hemoglobin', 'TestType' => 'TEST', 'Description' => '', 'SeqScr' => '100', 'SeqRpt' => '100', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => 'g/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'HB', 'TestSiteName' => 'Hemoglobin', 'TestType' => 'TEST', 'Description' => '', 'SeqScr' => '100', 'SeqRpt' => '100', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => 'g/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['HB'] = $this->db->insertID();
|
$tIDs['HB'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'HCT', 'TestSiteName' => 'Hematocrit', 'TestType' => 'TEST', 'Description' => '', 'SeqScr' => '110', 'SeqRpt' => '110', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => '%', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'HCT', 'TestSiteName' => 'Hematocrit', 'TestType' => 'TEST', 'Description' => '', 'SeqScr' => '110', 'SeqRpt' => '110', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => '%', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['HCT'] = $this->db->insertID();
|
$tIDs['HCT'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'RBC', 'TestSiteName' => 'Red Blood Cell', 'TestType' => 'TEST', 'Description' => 'Eritrosit', 'SeqScr' => '120', 'SeqRpt' => '120', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => 'x10^6/uL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '2', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'RBC', 'TestSiteName' => 'Red Blood Cell', 'TestType' => 'TEST', 'Description' => 'Eritrosit', 'SeqScr' => '120', 'SeqRpt' => '120', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => 'x10^6/uL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '2', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['RBC'] = $this->db->insertID();
|
$tIDs['RBC'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'WBC', 'TestSiteName' => 'White Blood Cell', 'TestType' => 'TEST', 'Description' => 'Leukosit', 'SeqScr' => '130', 'SeqRpt' => '130', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => 'x10^3/uL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '2', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'WBC', 'TestSiteName' => 'White Blood Cell', 'TestType' => 'TEST', 'Description' => 'Leukosit', 'SeqScr' => '130', 'SeqRpt' => '130', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => 'x10^3/uL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '2', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['WBC'] = $this->db->insertID();
|
$tIDs['WBC'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'PLT', 'TestSiteName' => 'Platelet', 'TestType' => 'TEST', 'Description' => 'Trombosit', 'SeqScr' => '140', 'SeqRpt' => '140', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => 'x10^3/uL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'PLT', 'TestSiteName' => 'Platelet', 'TestType' => 'TEST', 'Description' => 'Trombosit', 'SeqScr' => '140', 'SeqRpt' => '140', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => 'x10^3/uL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['PLT'] = $this->db->insertID();
|
$tIDs['PLT'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'MCV', 'TestSiteName' => 'MCV', 'TestType' => 'TEST', 'Description' => 'Mean Corpuscular Volume', 'SeqScr' => '150', 'SeqRpt' => '150', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => 'fL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'MCV', 'TestSiteName' => 'MCV', 'TestType' => 'TEST', 'Description' => 'Mean Corpuscular Volume', 'SeqScr' => '150', 'SeqRpt' => '150', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => 'fL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['MCV'] = $this->db->insertID();
|
$tIDs['MCV'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'MCH', 'TestSiteName' => 'MCH', 'TestType' => 'TEST', 'Description' => 'Mean Corpuscular Hemoglobin', 'SeqScr' => '160', 'SeqRpt' => '160', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => 'pg', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'MCH', 'TestSiteName' => 'MCH', 'TestType' => 'TEST', 'Description' => 'Mean Corpuscular Hemoglobin', 'SeqScr' => '160', 'SeqRpt' => '160', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => 'pg', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['MCH'] = $this->db->insertID();
|
$tIDs['MCH'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'MCHC', 'TestSiteName' => 'MCHC', 'TestType' => 'TEST', 'Description' => 'Mean Corpuscular Hemoglobin Concentration', 'SeqScr' => '170', 'SeqRpt' => '170', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => 'g/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'MCHC', 'TestSiteName' => 'MCHC', 'TestType' => 'TEST', 'Description' => 'Mean Corpuscular Hemoglobin Concentration', 'SeqScr' => '170', 'SeqRpt' => '170', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '1', 'DepartmentID' => '1', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '500', 'ReqQtyUnit' => 'uL', 'Unit1' => 'g/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => 'CBC Analyzer', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['MCHC'] = $this->db->insertID();
|
$tIDs['MCHC'] = $this->db->insertID();
|
||||||
|
|
||||||
@ -130,82 +130,82 @@ class TestSeeder extends Seeder
|
|||||||
// ========================================
|
// ========================================
|
||||||
|
|
||||||
// GROUP: LIPID, LFT, RFT
|
// GROUP: LIPID, LFT, RFT
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'LIPID', 'TestSiteName' => 'Lipid Profile', 'TestType' => 'GROUP', 'Description' => 'Profil Lipid', 'SeqScr' => '10', 'SeqRpt' => '10', 'IndentLeft' => '0', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'ResultType' => 'NORES', 'RefType' => 'NOREF', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'LIPID', 'TestSiteName' => 'Lipid Profile', 'TestType' => 'GROUP', 'Description' => 'Profil Lipid', 'SeqScr' => '10', 'SeqRpt' => '10', 'IndentLeft' => '0', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'ResultType' => 'NORES', 'RefType' => 'NOREF', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['LIPID'] = $this->db->insertID();
|
$tIDs['LIPID'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'LFT', 'TestSiteName' => 'Liver Function Test', 'TestType' => 'GROUP', 'Description' => 'Fungsi Hati', 'SeqScr' => '20', 'SeqRpt' => '20', 'IndentLeft' => '0', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'ResultType' => 'NORES', 'RefType' => 'NOREF', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'LFT', 'TestSiteName' => 'Liver Function Test', 'TestType' => 'GROUP', 'Description' => 'Fungsi Hati', 'SeqScr' => '20', 'SeqRpt' => '20', 'IndentLeft' => '0', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'ResultType' => 'NORES', 'RefType' => 'NOREF', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['LFT'] = $this->db->insertID();
|
$tIDs['LFT'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'RFT', 'TestSiteName' => 'Renal Function Test', 'TestType' => 'GROUP', 'Description' => 'Fungsi Ginjal', 'SeqScr' => '30', 'SeqRpt' => '30', 'IndentLeft' => '0', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'ResultType' => 'NORES', 'RefType' => 'NOREF', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'RFT', 'TestSiteName' => 'Renal Function Test', 'TestType' => 'GROUP', 'Description' => 'Fungsi Ginjal', 'SeqScr' => '30', 'SeqRpt' => '30', 'IndentLeft' => '0', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'ResultType' => 'NORES', 'RefType' => 'NOREF', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['RFT'] = $this->db->insertID();
|
$tIDs['RFT'] = $this->db->insertID();
|
||||||
|
|
||||||
// PARAM: (none for Chemistry)
|
// PARAM: (none for Chemistry)
|
||||||
|
|
||||||
// TEST: Chemistry Tests
|
// TEST: Chemistry Tests
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'GLU', 'TestSiteName' => 'Glucose', 'TestType' => 'TEST', 'Description' => 'Glukosa Sewaktu', 'SeqScr' => '100', 'SeqRpt' => '100', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '0.0555', 'Unit2' => 'mmol/L', 'Decimal' => '0', 'Method' => 'Hexokinase', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'GLU', 'TestSiteName' => 'Glucose', 'TestType' => 'TEST', 'Description' => 'Glukosa Sewaktu', 'SeqScr' => '100', 'SeqRpt' => '100', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '0.0555', 'Unit2' => 'mmol/L', 'Decimal' => '0', 'Method' => 'Hexokinase', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['GLU'] = $this->db->insertID();
|
$tIDs['GLU'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'CREA', 'TestSiteName' => 'Creatinine', 'TestType' => 'TEST', 'Description' => 'Kreatinin', 'SeqScr' => '110', 'SeqRpt' => '110', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '88.4', 'Unit2' => 'umol/L', 'Decimal' => '2', 'Method' => 'Enzymatic', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'CREA', 'TestSiteName' => 'Creatinine', 'TestType' => 'TEST', 'Description' => 'Kreatinin', 'SeqScr' => '110', 'SeqRpt' => '110', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '88.4', 'Unit2' => 'umol/L', 'Decimal' => '2', 'Method' => 'Enzymatic', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['CREA'] = $this->db->insertID();
|
$tIDs['CREA'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'UREA', 'TestSiteName' => 'Blood Urea Nitrogen', 'TestType' => 'TEST', 'Description' => 'BUN', 'SeqScr' => '120', 'SeqRpt' => '120', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => 'Urease-GLDH', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'UREA', 'TestSiteName' => 'Blood Urea Nitrogen', 'TestType' => 'TEST', 'Description' => 'BUN', 'SeqScr' => '120', 'SeqRpt' => '120', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => 'Urease-GLDH', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['UREA'] = $this->db->insertID();
|
$tIDs['UREA'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'SGOT', 'TestSiteName' => 'AST (SGOT)', 'TestType' => 'TEST', 'Description' => 'Aspartate Aminotransferase', 'SeqScr' => '130', 'SeqRpt' => '130', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'U/L', 'Factor' => '0.017', 'Unit2' => 'ukat/L', 'Decimal' => '0', 'Method' => 'IFCC', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'SGOT', 'TestSiteName' => 'AST (SGOT)', 'TestType' => 'TEST', 'Description' => 'Aspartate Aminotransferase', 'SeqScr' => '130', 'SeqRpt' => '130', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'U/L', 'Factor' => '0.017', 'Unit2' => 'ukat/L', 'Decimal' => '0', 'Method' => 'IFCC', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['SGOT'] = $this->db->insertID();
|
$tIDs['SGOT'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'SGPT', 'TestSiteName' => 'ALT (SGPT)', 'TestType' => 'TEST', 'Description' => 'Alanine Aminotransferase', 'SeqScr' => '140', 'SeqRpt' => '140', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'U/L', 'Factor' => '0.017', 'Unit2' => 'ukat/L', 'Decimal' => '0', 'Method' => 'IFCC', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'SGPT', 'TestSiteName' => 'ALT (SGPT)', 'TestType' => 'TEST', 'Description' => 'Alanine Aminotransferase', 'SeqScr' => '140', 'SeqRpt' => '140', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'U/L', 'Factor' => '0.017', 'Unit2' => 'ukat/L', 'Decimal' => '0', 'Method' => 'IFCC', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['SGPT'] = $this->db->insertID();
|
$tIDs['SGPT'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'CHOL', 'TestSiteName' => 'Total Cholesterol', 'TestType' => 'TEST', 'Description' => 'Kolesterol Total', 'SeqScr' => '150', 'SeqRpt' => '150', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => 'Enzymatic', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'CHOL', 'TestSiteName' => 'Total Cholesterol', 'TestType' => 'TEST', 'Description' => 'Kolesterol Total', 'SeqScr' => '150', 'SeqRpt' => '150', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => 'Enzymatic', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['CHOL'] = $this->db->insertID();
|
$tIDs['CHOL'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'TG', 'TestSiteName' => 'Triglycerides', 'TestType' => 'TEST', 'Description' => 'Trigliserida', 'SeqScr' => '160', 'SeqRpt' => '160', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => 'GPO-PAP', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'TG', 'TestSiteName' => 'Triglycerides', 'TestType' => 'TEST', 'Description' => 'Trigliserida', 'SeqScr' => '160', 'SeqRpt' => '160', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => 'GPO-PAP', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['TG'] = $this->db->insertID();
|
$tIDs['TG'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'HDL', 'TestSiteName' => 'HDL Cholesterol', 'TestType' => 'TEST', 'Description' => 'Kolesterol HDL', 'SeqScr' => '170', 'SeqRpt' => '170', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => 'Direct', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'HDL', 'TestSiteName' => 'HDL Cholesterol', 'TestType' => 'TEST', 'Description' => 'Kolesterol HDL', 'SeqScr' => '170', 'SeqRpt' => '170', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => 'Direct', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['HDL'] = $this->db->insertID();
|
$tIDs['HDL'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'LDL', 'TestSiteName' => 'LDL Cholesterol', 'TestType' => 'TEST', 'Description' => 'Kolesterol LDL', 'SeqScr' => '180', 'SeqRpt' => '180', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => 'Direct', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'LDL', 'TestSiteName' => 'LDL Cholesterol', 'TestType' => 'TEST', 'Description' => 'Kolesterol LDL', 'SeqScr' => '180', 'SeqRpt' => '180', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => 'Direct', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['LDL'] = $this->db->insertID();
|
$tIDs['LDL'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'TBIL', 'TestSiteName' => 'Total Bilirubin', 'TestType' => 'TEST', 'Description' => 'Bilirubin Total', 'SeqScr' => '185', 'SeqRpt' => '185', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '2', 'Method' => 'Diazo', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'TBIL', 'TestSiteName' => 'Total Bilirubin', 'TestType' => 'TEST', 'Description' => 'Bilirubin Total', 'SeqScr' => '185', 'SeqRpt' => '185', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '2', 'Method' => 'Diazo', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['TBIL'] = $this->db->insertID();
|
$tIDs['TBIL'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'DBIL', 'TestSiteName' => 'Direct Bilirubin', 'TestType' => 'TEST', 'Description' => 'Bilirubin Direk', 'SeqScr' => '186', 'SeqRpt' => '186', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '2', 'Method' => 'Diazo', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'DBIL', 'TestSiteName' => 'Direct Bilirubin', 'TestType' => 'TEST', 'Description' => 'Bilirubin Direk', 'SeqScr' => '186', 'SeqRpt' => '186', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '2', 'DepartmentID' => '2', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '300', 'ReqQtyUnit' => 'uL', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '2', 'Method' => 'Diazo', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['DBIL'] = $this->db->insertID();
|
$tIDs['DBIL'] = $this->db->insertID();
|
||||||
|
|
||||||
// CALC: Chemistry Calculated Tests
|
// CALC: Chemistry Calculated Tests
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'EGFR', 'TestSiteName' => 'eGFR (CKD-EPI)', 'TestType' => 'CALC', 'Description' => 'Estimated Glomerular Filtration Rate', 'SeqScr' => '190', 'SeqRpt' => '190', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '0', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'EGFR', 'TestSiteName' => 'eGFR (CKD-EPI)', 'TestType' => 'CALC', 'Description' => 'Estimated Glomerular Filtration Rate', 'SeqScr' => '190', 'SeqRpt' => '190', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '0', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
|
||||||
$tIDs['EGFR'] = $this->db->insertID();
|
|
||||||
$data = ['TestSiteID' => $tIDs['EGFR'], 'DisciplineID' => '2', 'DepartmentID' => '2', 'FormulaCode' => '142 * (({CREA}/{KAPPA}) < 1 ? ({CREA}/{KAPPA}) : 1) ** {ALPHA} * (({CREA}/{KAPPA}) > 1 ? ({CREA}/{KAPPA}) : 1) ** -1.200 * (0.9938 ** {AGE}) * {SEXFAC}', 'RefType' => 'RANGE', 'Unit1' => 'mL/min/1.73m2', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'CreateDate' => "$now"];
|
|
||||||
$this->db->table('testdefcal')->insert($data);
|
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'LDLCALC', 'TestSiteName' => 'LDL Cholesterol (Calculated)', 'TestType' => 'CALC', 'Description' => 'Friedewald formula: TC - HDL - (TG/5)', 'SeqScr' => '200', 'SeqRpt' => '200', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '0', 'CreateDate' => "$now"];
|
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['LDLCALC'] = $this->db->insertID();
|
$tIDs['EGFR'] = $this->db->insertID();
|
||||||
$data = ['TestSiteID' => $tIDs['LDLCALC'], 'DisciplineID' => '2', 'DepartmentID' => '2', 'FormulaCode' => '{CHOL} - {HDL} - ({TG}/5)', 'RefType' => 'RANGE', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'CreateDate' => "$now"];
|
$data = ['TestSiteID' => $tIDs['EGFR'], 'DisciplineID' => '2', 'DepartmentID' => '2', 'FormulaCode' => '142 * (({CREA}/{KAPPA}) < 1 ? ({CREA}/{KAPPA}) : 1) ** {ALPHA} * (({CREA}/{KAPPA}) > 1 ? ({CREA}/{KAPPA}) : 1) ** -1.200 * (0.9938 ** {AGE}) * {SEXFAC}', 'RefType' => 'RANGE', 'Unit1' => 'mL/min/1.73m2', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefcal')->insert($data);
|
$this->db->table('testdefcal')->insert($data);
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'IBIL', 'TestSiteName' => 'Indirect Bilirubin', 'TestType' => 'CALC', 'Description' => 'Bilirubin Indirek: TBIL - DBIL', 'SeqScr' => '210', 'SeqRpt' => '210', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '0', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'LDLCALC', 'TestSiteName' => 'LDL Cholesterol (Calculated)', 'TestType' => 'CALC', 'Description' => 'Friedewald formula: TC - HDL - (TG/5)', 'SeqScr' => '200', 'SeqRpt' => '200', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '0', 'CreateDate' => "$now"];
|
||||||
|
$this->db->table('testdefsite')->insert($data);
|
||||||
|
$tIDs['LDLCALC'] = $this->db->insertID();
|
||||||
|
$data = ['TestSiteID' => $tIDs['LDLCALC'], 'DisciplineID' => '2', 'DepartmentID' => '2', 'FormulaCode' => '{CHOL} - {HDL} - ({TG}/5)', 'RefType' => 'RANGE', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'CreateDate' => "$now"];
|
||||||
|
$this->db->table('testdefcal')->insert($data);
|
||||||
|
|
||||||
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'IBIL', 'TestSiteName' => 'Indirect Bilirubin', 'TestType' => 'CALC', 'Description' => 'Bilirubin Indirek: TBIL - DBIL', 'SeqScr' => '210', 'SeqRpt' => '210', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '0', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['IBIL'] = $this->db->insertID();
|
$tIDs['IBIL'] = $this->db->insertID();
|
||||||
$data = ['TestSiteID' => $tIDs['IBIL'], 'DisciplineID' => '2', 'DepartmentID' => '2', 'FormulaCode' => '{TBIL} - {DBIL}', 'RefType' => 'RANGE', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '2', 'CreateDate' => "$now"];
|
$data = ['TestSiteID' => $tIDs['IBIL'], 'DisciplineID' => '2', 'DepartmentID' => '2', 'FormulaCode' => '{TBIL} - {DBIL}', 'RefType' => 'RANGE', 'Unit1' => 'mg/dL', 'Factor' => '', 'Unit2' => '', 'Decimal' => '2', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefcal')->insert($data);
|
$this->db->table('testdefcal')->insert($data);
|
||||||
|
|
||||||
// CALC dependencies are grouped via testdefgrp
|
// CALC dependencies are grouped via testdefgrp
|
||||||
@ -251,19 +251,19 @@ class TestSeeder extends Seeder
|
|||||||
// PARAM: (none for Urinalysis)
|
// PARAM: (none for Urinalysis)
|
||||||
|
|
||||||
// TEST: Urinalysis Tests
|
// TEST: Urinalysis Tests
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'UCOLOR', 'TestSiteName' => 'Urine Color', 'TestType' => 'TEST', 'Description' => 'Warna Urine', 'SeqScr' => '100', 'SeqRpt' => '100', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '4', 'DepartmentID' => '4', 'ResultType' => 'VSET', 'RefType' => 'VSET', 'VSet' => '1001', 'ReqQty' => '10', 'ReqQtyUnit' => 'mL', 'Unit1' => '', 'Factor' => '', 'Unit2' => '', 'Decimal' => '', 'Method' => 'Visual', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'UCOLOR', 'TestSiteName' => 'Urine Color', 'TestType' => 'TEST', 'Description' => 'Warna Urine', 'SeqScr' => '100', 'SeqRpt' => '100', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '4', 'DepartmentID' => '4', 'ResultType' => 'VSET', 'RefType' => 'VSET', 'VSet' => '1001', 'ReqQty' => '10', 'ReqQtyUnit' => 'mL', 'Unit1' => '', 'Factor' => '', 'Unit2' => '', 'Decimal' => '', 'Method' => 'Visual', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['UCOLOR'] = $this->db->insertID();
|
$tIDs['UCOLOR'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'UGLUC', 'TestSiteName' => 'Urine Glucose', 'TestType' => 'TEST', 'Description' => 'Glukosa Urine', 'SeqScr' => '110', 'SeqRpt' => '110', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '4', 'DepartmentID' => '4', 'ResultType' => 'VSET', 'RefType' => 'VSET', 'VSet' => '1002', 'ReqQty' => '10', 'ReqQtyUnit' => 'mL', 'Unit1' => '', 'Factor' => '', 'Unit2' => '', 'Decimal' => '', 'Method' => 'Dipstick', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'UGLUC', 'TestSiteName' => 'Urine Glucose', 'TestType' => 'TEST', 'Description' => 'Glukosa Urine', 'SeqScr' => '110', 'SeqRpt' => '110', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '4', 'DepartmentID' => '4', 'ResultType' => 'VSET', 'RefType' => 'VSET', 'VSet' => '1002', 'ReqQty' => '10', 'ReqQtyUnit' => 'mL', 'Unit1' => '', 'Factor' => '', 'Unit2' => '', 'Decimal' => '', 'Method' => 'Dipstick', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['UGLUC'] = $this->db->insertID();
|
$tIDs['UGLUC'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'UPROT', 'TestSiteName' => 'Urine Protein', 'TestType' => 'TEST', 'Description' => 'Protein Urine', 'SeqScr' => '120', 'SeqRpt' => '120', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '4', 'DepartmentID' => '4', 'ResultType' => 'VSET', 'RefType' => 'VSET', 'VSet' => '1003', 'ReqQty' => '10', 'ReqQtyUnit' => 'mL', 'Unit1' => '', 'Factor' => '', 'Unit2' => '', 'Decimal' => '', 'Method' => 'Dipstick', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'UPROT', 'TestSiteName' => 'Urine Protein', 'TestType' => 'TEST', 'Description' => 'Protein Urine', 'SeqScr' => '120', 'SeqRpt' => '120', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '4', 'DepartmentID' => '4', 'ResultType' => 'VSET', 'RefType' => 'VSET', 'VSet' => '1003', 'ReqQty' => '10', 'ReqQtyUnit' => 'mL', 'Unit1' => '', 'Factor' => '', 'Unit2' => '', 'Decimal' => '', 'Method' => 'Dipstick', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['UPROT'] = $this->db->insertID();
|
$tIDs['UPROT'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'PH', 'TestSiteName' => 'Urine pH', 'TestType' => 'TEST', 'Description' => 'pH Urine', 'SeqScr' => '130', 'SeqRpt' => '130', 'IndentLeft' => '1', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '1', 'DisciplineID' => '4', 'DepartmentID' => '4', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '10', 'ReqQtyUnit' => 'mL', 'Unit1' => '', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => 'Dipstick', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'PH', 'TestSiteName' => 'Urine pH', 'TestType' => 'TEST', 'Description' => 'pH Urine', 'SeqScr' => '130', 'SeqRpt' => '130', 'IndentLeft' => '1', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '1', 'DisciplineID' => '4', 'DepartmentID' => '4', 'ResultType' => 'NMRIC', 'RefType' => 'RANGE', 'VSet' => '', 'ReqQty' => '10', 'ReqQtyUnit' => 'mL', 'Unit1' => '', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => 'Dipstick', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['PH'] = $this->db->insertID();
|
$tIDs['PH'] = $this->db->insertID();
|
||||||
|
|
||||||
@ -277,109 +277,109 @@ class TestSeeder extends Seeder
|
|||||||
// GROUP: (none for General)
|
// GROUP: (none for General)
|
||||||
|
|
||||||
// PARAM: General Parameters (< 100)
|
// PARAM: General Parameters (< 100)
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'HEIGHT', 'TestSiteName' => 'Height', 'TestType' => 'PARAM', 'Description' => 'Tinggi Badan', 'SeqScr' => '10', 'SeqRpt' => '10', 'IndentLeft' => '0', 'VisibleScr' => '1', 'VisibleRpt' => '0', 'CountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => 'cm', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => '', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'HEIGHT', 'TestSiteName' => 'Height', 'TestType' => 'PARAM', 'Description' => 'Tinggi Badan', 'SeqScr' => '10', 'SeqRpt' => '10', 'IndentLeft' => '0', 'isVisibleScr' => '1', 'isVisibleRpt' => '0', 'isCountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => 'cm', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => '', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['HEIGHT'] = $this->db->insertID();
|
$tIDs['HEIGHT'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'WEIGHT', 'TestSiteName' => 'Weight', 'TestType' => 'PARAM', 'Description' => 'Berat Badan', 'SeqScr' => '20', 'SeqRpt' => '20', 'IndentLeft' => '0', 'VisibleScr' => '1', 'VisibleRpt' => '0', 'CountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => 'kg', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => '', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'WEIGHT', 'TestSiteName' => 'Weight', 'TestType' => 'PARAM', 'Description' => 'Berat Badan', 'SeqScr' => '20', 'SeqRpt' => '20', 'IndentLeft' => '0', 'isVisibleScr' => '1', 'isVisibleRpt' => '0', 'isCountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => 'kg', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => '', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['WEIGHT'] = $this->db->insertID();
|
$tIDs['WEIGHT'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'AGE', 'TestSiteName' => 'Age', 'TestType' => 'PARAM', 'Description' => 'Usia', 'SeqScr' => '30', 'SeqRpt' => '30', 'IndentLeft' => '0', 'VisibleScr' => '1', 'VisibleRpt' => '0', 'CountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => 'years', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => '', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'AGE', 'TestSiteName' => 'Age', 'TestType' => 'PARAM', 'Description' => 'Usia', 'SeqScr' => '30', 'SeqRpt' => '30', 'IndentLeft' => '0', 'isVisibleScr' => '1', 'isVisibleRpt' => '0', 'isCountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => 'years', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => '', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['AGE'] = $this->db->insertID();
|
$tIDs['AGE'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'ALPHA', 'TestSiteName' => 'Alpha', 'TestType' => 'PARAM', 'Description' => 'eGFR Alpha', 'SeqScr' => '35', 'SeqRpt' => '35', 'IndentLeft' => '0', 'VisibleScr' => '1', 'VisibleRpt' => '0', 'CountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => '', 'Factor' => '', 'Unit2' => '', 'Decimal' => '3', 'Method' => '', 'CreateDate' => "$now"];
|
|
||||||
$this->db->table('testdefsite')->insert($data);
|
|
||||||
$tIDs['ALPHA'] = $this->db->insertID();
|
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'KAPPA', 'TestSiteName' => 'Kappa', 'TestType' => 'PARAM', 'Description' => 'eGFR Kappa', 'SeqScr' => '36', 'SeqRpt' => '36', 'IndentLeft' => '0', 'VisibleScr' => '1', 'VisibleRpt' => '0', 'CountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => '', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => '', 'CreateDate' => "$now"];
|
|
||||||
$this->db->table('testdefsite')->insert($data);
|
|
||||||
$tIDs['KAPPA'] = $this->db->insertID();
|
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'SEXFAC', 'TestSiteName' => 'Sex Factor', 'TestType' => 'PARAM', 'Description' => 'eGFR Sex Factor', 'SeqScr' => '37', 'SeqRpt' => '37', 'IndentLeft' => '0', 'VisibleScr' => '1', 'VisibleRpt' => '0', 'CountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => '', 'Factor' => '', 'Unit2' => '', 'Decimal' => '3', 'Method' => '', 'CreateDate' => "$now"];
|
|
||||||
$this->db->table('testdefsite')->insert($data);
|
|
||||||
$tIDs['SEXFAC'] = $this->db->insertID();
|
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'SYSTL', 'TestSiteName' => 'Systolic BP', 'TestType' => 'PARAM', 'Description' => 'Tekanan Darah Sistolik', 'SeqScr' => '40', 'SeqRpt' => '40', 'IndentLeft' => '0', 'VisibleScr' => '1', 'VisibleRpt' => '0', 'CountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => 'mmHg', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => '', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'ALPHA', 'TestSiteName' => 'Alpha', 'TestType' => 'PARAM', 'Description' => 'eGFR Alpha', 'SeqScr' => '35', 'SeqRpt' => '35', 'IndentLeft' => '0', 'isVisibleScr' => '1', 'isVisibleRpt' => '0', 'isCountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => '', 'Factor' => '', 'Unit2' => '', 'Decimal' => '3', 'Method' => '', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['SYSTL'] = $this->db->insertID();
|
$tIDs['ALPHA'] = $this->db->insertID();
|
||||||
|
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'DIASTL', 'TestSiteName' => 'Diastolic BP', 'TestType' => 'PARAM', 'Description' => 'Tekanan Darah Diastolik', 'SeqScr' => '50', 'SeqRpt' => '50', 'IndentLeft' => '0', 'VisibleScr' => '1', 'VisibleRpt' => '0', 'CountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => 'mmHg', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => '', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'KAPPA', 'TestSiteName' => 'Kappa', 'TestType' => 'PARAM', 'Description' => 'eGFR Kappa', 'SeqScr' => '36', 'SeqRpt' => '36', 'IndentLeft' => '0', 'isVisibleScr' => '1', 'isVisibleRpt' => '0', 'isCountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => '', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'Method' => '', 'CreateDate' => "$now"];
|
||||||
|
$this->db->table('testdefsite')->insert($data);
|
||||||
|
$tIDs['KAPPA'] = $this->db->insertID();
|
||||||
|
|
||||||
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'SEXFAC', 'TestSiteName' => 'Sex Factor', 'TestType' => 'PARAM', 'Description' => 'eGFR Sex Factor', 'SeqScr' => '37', 'SeqRpt' => '37', 'IndentLeft' => '0', 'isVisibleScr' => '1', 'isVisibleRpt' => '0', 'isCountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => '', 'Factor' => '', 'Unit2' => '', 'Decimal' => '3', 'Method' => '', 'CreateDate' => "$now"];
|
||||||
|
$this->db->table('testdefsite')->insert($data);
|
||||||
|
$tIDs['SEXFAC'] = $this->db->insertID();
|
||||||
|
|
||||||
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'SYSTL', 'TestSiteName' => 'Systolic BP', 'TestType' => 'PARAM', 'Description' => 'Tekanan Darah Sistolik', 'SeqScr' => '40', 'SeqRpt' => '40', 'IndentLeft' => '0', 'isVisibleScr' => '1', 'isVisibleRpt' => '0', 'isCountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => 'mmHg', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => '', 'CreateDate' => "$now"];
|
||||||
|
$this->db->table('testdefsite')->insert($data);
|
||||||
|
$tIDs['SYSTL'] = $this->db->insertID();
|
||||||
|
|
||||||
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'DIASTL', 'TestSiteName' => 'Diastolic BP', 'TestType' => 'PARAM', 'Description' => 'Tekanan Darah Diastolik', 'SeqScr' => '50', 'SeqRpt' => '50', 'IndentLeft' => '0', 'isVisibleScr' => '1', 'isVisibleRpt' => '0', 'isCountStat' => '0', 'DisciplineID' => '10', 'DepartmentID' => '', 'ResultType' => 'NMRIC', 'RefType' => '', 'VSet' => '', 'ReqQty' => '', 'ReqQtyUnit' => '', 'Unit1' => 'mmHg', 'Factor' => '', 'Unit2' => '', 'Decimal' => '0', 'Method' => '', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['DIASTL'] = $this->db->insertID();
|
$tIDs['DIASTL'] = $this->db->insertID();
|
||||||
|
|
||||||
// TEST: (none for General)
|
// TEST: (none for General)
|
||||||
|
|
||||||
// CALC: BMI (>= 100)
|
// CALC: BMI (>= 100)
|
||||||
$data = ['SiteID' => '1', 'TestSiteCode' => 'BMI', 'TestSiteName' => 'Body Mass Index', 'TestType' => 'CALC', 'Description' => 'Indeks Massa Tubuh - weight/(height^2)', 'SeqScr' => '100', 'SeqRpt' => '100', 'IndentLeft' => '0', 'VisibleScr' => '1', 'VisibleRpt' => '1', 'CountStat' => '0', 'CreateDate' => "$now"];
|
$data = ['SiteID' => '1', 'TestSiteCode' => 'BMI', 'TestSiteName' => 'Body Mass Index', 'TestType' => 'CALC', 'Description' => 'Indeks Massa Tubuh - weight/(height^2)', 'SeqScr' => '100', 'SeqRpt' => '100', 'IndentLeft' => '0', 'isVisibleScr' => '1', 'isVisibleRpt' => '1', 'isCountStat' => '0', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefsite')->insert($data);
|
$this->db->table('testdefsite')->insert($data);
|
||||||
$tIDs['BMI'] = $this->db->insertID();
|
$tIDs['BMI'] = $this->db->insertID();
|
||||||
$data = ['TestSiteID' => $tIDs['BMI'], 'DisciplineID' => '10', 'DepartmentID' => '', 'FormulaCode' => '{WEIGHT} / (({HEIGHT}/100) * ({HEIGHT}/100))', 'RefType' => 'RANGE', 'Unit1' => 'kg/m2', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'CreateDate' => "$now"];
|
$data = ['TestSiteID' => $tIDs['BMI'], 'DisciplineID' => '10', 'DepartmentID' => '', 'FormulaCode' => '{WEIGHT} / (({HEIGHT}/100) * ({HEIGHT}/100))', 'RefType' => 'RANGE', 'Unit1' => 'kg/m2', 'Factor' => '', 'Unit2' => '', 'Decimal' => '1', 'CreateDate' => "$now"];
|
||||||
$this->db->table('testdefcal')->insert($data);
|
$this->db->table('testdefcal')->insert($data);
|
||||||
|
|
||||||
$this->db->table('testdefgrp')->insertBatch([
|
$this->db->table('testdefgrp')->insertBatch([
|
||||||
['TestSiteID' => $tIDs['BMI'], 'Member' => $tIDs['WEIGHT'], 'CreateDate' => "$now"],
|
['TestSiteID' => $tIDs['BMI'], 'Member' => $tIDs['WEIGHT'], 'CreateDate' => "$now"],
|
||||||
['TestSiteID' => $tIDs['BMI'], 'Member' => $tIDs['HEIGHT'], 'CreateDate' => "$now"],
|
['TestSiteID' => $tIDs['BMI'], 'Member' => $tIDs['HEIGHT'], 'CreateDate' => "$now"],
|
||||||
['TestSiteID' => $tIDs['EGFR'], 'Member' => $tIDs['AGE'], 'CreateDate' => "$now"],
|
['TestSiteID' => $tIDs['EGFR'], 'Member' => $tIDs['AGE'], 'CreateDate' => "$now"],
|
||||||
['TestSiteID' => $tIDs['EGFR'], 'Member' => $tIDs['ALPHA'], 'CreateDate' => "$now"],
|
['TestSiteID' => $tIDs['EGFR'], 'Member' => $tIDs['ALPHA'], 'CreateDate' => "$now"],
|
||||||
['TestSiteID' => $tIDs['EGFR'], 'Member' => $tIDs['KAPPA'], 'CreateDate' => "$now"],
|
['TestSiteID' => $tIDs['EGFR'], 'Member' => $tIDs['KAPPA'], 'CreateDate' => "$now"],
|
||||||
['TestSiteID' => $tIDs['EGFR'], 'Member' => $tIDs['SEXFAC'], 'CreateDate' => "$now"],
|
['TestSiteID' => $tIDs['EGFR'], 'Member' => $tIDs['SEXFAC'], 'CreateDate' => "$now"],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
// RULES: Auto-fill ALPHA/KAPPA by sex
|
// RULES: Auto-fill ALPHA/KAPPA by sex
|
||||||
// ========================================
|
// ========================================
|
||||||
$ruleExpr = new RuleExpressionService();
|
$ruleExpr = new RuleExpressionService();
|
||||||
$ruleDefs = [
|
$ruleDefs = [
|
||||||
[
|
[
|
||||||
'RuleCode' => 'ALPHA_SEX',
|
'RuleCode' => 'ALPHA_SEX',
|
||||||
'RuleName' => 'Set ALPHA from sex',
|
'RuleName' => 'Set ALPHA from sex',
|
||||||
'Description' => 'Set ALPHA based on patient sex (M=-0.302, F/other=-0.241)',
|
'Description' => 'Set ALPHA based on patient sex (M=-0.302, F/other=-0.241)',
|
||||||
'EventCode' => 'test_created',
|
'EventCode' => 'test_created',
|
||||||
'TestSiteID' => $tIDs['ALPHA'],
|
'TestSiteID' => $tIDs['ALPHA'],
|
||||||
'Expr' => "if(sex('M'); set_result(-0.302); set_result(-0.241))",
|
'Expr' => "if(sex('M'); set_result(-0.302); set_result(-0.241))",
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'RuleCode' => 'KAPPA_SEX',
|
'RuleCode' => 'KAPPA_SEX',
|
||||||
'RuleName' => 'Set KAPPA from sex',
|
'RuleName' => 'Set KAPPA from sex',
|
||||||
'Description' => 'Set KAPPA based on patient sex (M=0.9, F/other=0.7)',
|
'Description' => 'Set KAPPA based on patient sex (M=0.9, F/other=0.7)',
|
||||||
'EventCode' => 'test_created',
|
'EventCode' => 'test_created',
|
||||||
'TestSiteID' => $tIDs['KAPPA'],
|
'TestSiteID' => $tIDs['KAPPA'],
|
||||||
'Expr' => "if(sex('M'); set_result(0.9); set_result(0.7))",
|
'Expr' => "if(sex('M'); set_result(0.9); set_result(0.7))",
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'RuleCode' => 'SEXFAC_SEX',
|
'RuleCode' => 'SEXFAC_SEX',
|
||||||
'RuleName' => 'Set SEXFAC from sex',
|
'RuleName' => 'Set SEXFAC from sex',
|
||||||
'Description' => 'Set SEXFAC based on patient sex (F=1.012, M/other=1)',
|
'Description' => 'Set SEXFAC based on patient sex (F=1.012, M/other=1)',
|
||||||
'EventCode' => 'test_created',
|
'EventCode' => 'test_created',
|
||||||
'TestSiteID' => $tIDs['SEXFAC'],
|
'TestSiteID' => $tIDs['SEXFAC'],
|
||||||
'Expr' => "if(sex('F'); set_result(1.012); set_result(1))",
|
'Expr' => "if(sex('F'); set_result(1.012); set_result(1))",
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($ruleDefs as $ruleDef) {
|
foreach ($ruleDefs as $ruleDef) {
|
||||||
$compiled = $ruleExpr->compile($ruleDef['Expr']);
|
$compiled = $ruleExpr->compile($ruleDef['Expr']);
|
||||||
$data = [
|
$data = [
|
||||||
'RuleCode' => $ruleDef['RuleCode'],
|
'RuleCode' => $ruleDef['RuleCode'],
|
||||||
'RuleName' => $ruleDef['RuleName'],
|
'RuleName' => $ruleDef['RuleName'],
|
||||||
'Description' => $ruleDef['Description'],
|
'Description' => $ruleDef['Description'],
|
||||||
'EventCode' => $ruleDef['EventCode'],
|
'EventCode' => $ruleDef['EventCode'],
|
||||||
'ConditionExpr' => $ruleDef['Expr'],
|
'ConditionExpr' => $ruleDef['Expr'],
|
||||||
'ConditionExprCompiled' => json_encode($compiled),
|
'ConditionExprCompiled' => json_encode($compiled),
|
||||||
'CreateDate' => $now,
|
'CreateDate' => $now,
|
||||||
'StartDate' => null,
|
'StartDate' => null,
|
||||||
'EndDate' => null,
|
'EndDate' => null,
|
||||||
];
|
];
|
||||||
$this->db->table('ruledef')->insert($data);
|
$this->db->table('ruledef')->insert($data);
|
||||||
$ruleID = $this->db->insertID();
|
$ruleID = $this->db->insertID();
|
||||||
|
|
||||||
$this->db->table('testrule')->insert([
|
$this->db->table('testrule')->insert([
|
||||||
'RuleID' => $ruleID,
|
'RuleID' => $ruleID,
|
||||||
'TestSiteID' => $ruleDef['TestSiteID'],
|
'TestSiteID' => $ruleDef['TestSiteID'],
|
||||||
'CreateDate' => $now,
|
'CreateDate' => $now,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
// TEST MAP - Specimen Mapping
|
// TEST MAP - Specimen Mapping
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class EquipmentListModel extends BaseModel {
|
|||||||
'InstrumentID',
|
'InstrumentID',
|
||||||
'InstrumentName',
|
'InstrumentName',
|
||||||
'WorkstationID',
|
'WorkstationID',
|
||||||
'Enable',
|
'isEnable',
|
||||||
'EquipmentRole',
|
'EquipmentRole',
|
||||||
'CreateDate',
|
'CreateDate',
|
||||||
'EndDate'
|
'EndDate'
|
||||||
@ -43,8 +43,8 @@ class EquipmentListModel extends BaseModel {
|
|||||||
if (!empty($filter['WorkstationID'])) {
|
if (!empty($filter['WorkstationID'])) {
|
||||||
$builder->where('equipmentlist.WorkstationID', $filter['WorkstationID']);
|
$builder->where('equipmentlist.WorkstationID', $filter['WorkstationID']);
|
||||||
}
|
}
|
||||||
if (isset($filter['Enable'])) {
|
if (isset($filter['isEnable'])) {
|
||||||
$builder->where('equipmentlist.Enable', $filter['Enable']);
|
$builder->where('equipmentlist.isEnable', $filter['isEnable']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows = $builder->get()->getResultArray();
|
$rows = $builder->get()->getResultArray();
|
||||||
|
|||||||
@ -6,7 +6,7 @@ use App\Libraries\ValueSet;
|
|||||||
class WorkstationModel extends BaseModel {
|
class WorkstationModel extends BaseModel {
|
||||||
protected $table = 'workstation';
|
protected $table = 'workstation';
|
||||||
protected $primaryKey = 'WorkstationID';
|
protected $primaryKey = 'WorkstationID';
|
||||||
protected $allowedFields = ['DepartmentID', 'WorkstationCode', 'WorkstationName', 'Type', 'LinkTo', 'Enable',
|
protected $allowedFields = ['DepartmentID', 'WorkstationCode', 'WorkstationName', 'Type', 'LinkTo', 'isEnable',
|
||||||
'EquipmentID', 'CreateDate', 'EndDate'];
|
'EquipmentID', 'CreateDate', 'EndDate'];
|
||||||
|
|
||||||
protected $useTimestamps = true;
|
protected $useTimestamps = true;
|
||||||
@ -41,7 +41,7 @@ class WorkstationModel extends BaseModel {
|
|||||||
|
|
||||||
$row = ValueSet::transformLabels([$row], [
|
$row = ValueSet::transformLabels([$row], [
|
||||||
'Type' => 'ws_type',
|
'Type' => 'ws_type',
|
||||||
'Enable' => 'enable_disable',
|
'isEnable' => 'enable_disable',
|
||||||
])[0];
|
])[0];
|
||||||
|
|
||||||
return $row;
|
return $row;
|
||||||
|
|||||||
@ -13,9 +13,9 @@ use App\Services\AuditService;
|
|||||||
class PatientModel extends BaseModel {
|
class PatientModel extends BaseModel {
|
||||||
protected $table = 'patient';
|
protected $table = 'patient';
|
||||||
protected $primaryKey = 'InternalPID';
|
protected $primaryKey = 'InternalPID';
|
||||||
protected $allowedFields = ['PatientID', 'AlternatePID', 'Prefix', 'NameFirst', 'NameMiddle', 'NameMaiden', 'NameLast', 'Suffix', 'NameAlias', 'Sex', 'Birthdate', 'PlaceOfBirth', 'Street_1', 'Street_2', 'Street_3',
|
protected $allowedFields = ['PatientID', 'AlternatePID', 'Prefix', 'NameFirst', 'NameMiddle', 'NameMaiden', 'NameLast', 'Suffix', 'NameAlias', 'Sex', 'Birthdate', 'PlaceOfBirth', 'Street_1', 'Street_2', 'Street_3',
|
||||||
'City', 'Province', 'ZIP', 'EmailAddress1', 'EmailAddress2', 'Phone', 'MobilePhone', 'Custodian', 'AccountNumber', 'Country', 'Race', 'MaritalStatus', 'Religion', 'Ethnic', 'Citizenship',
|
'City', 'Province', 'ZIP', 'EmailAddress1', 'EmailAddress2', 'Phone', 'MobilePhone', 'Custodian', 'AccountNumber', 'Country', 'Race', 'MaritalStatus', 'Religion', 'Ethnic', 'Citizenship',
|
||||||
'DeathIndicator', 'TimeOfDeath', 'LinkTo', 'CreateDate', 'DelDate' ];
|
'isDead', 'TimeOfDeath', 'LinkTo', 'CreateDate', 'DelDate' ];
|
||||||
|
|
||||||
protected $useTimestamps = true;
|
protected $useTimestamps = true;
|
||||||
protected $createdField = 'CreateDate';
|
protected $createdField = 'CreateDate';
|
||||||
@ -88,7 +88,7 @@ class PatientModel extends BaseModel {
|
|||||||
'Race' => 'race',
|
'Race' => 'race',
|
||||||
'Religion' => 'religion',
|
'Religion' => 'religion',
|
||||||
'Ethnic' => 'ethnic',
|
'Ethnic' => 'ethnic',
|
||||||
'DeathIndicator' => 'death_indicator',
|
'isDead' => 'death_indicator',
|
||||||
'MaritalStatus' => 'marital_status',
|
'MaritalStatus' => 'marital_status',
|
||||||
])[0];
|
])[0];
|
||||||
|
|
||||||
|
|||||||
@ -16,8 +16,8 @@ class TestDefSiteModel extends BaseModel {
|
|||||||
'ResultType', 'RefType', 'Vset',
|
'ResultType', 'RefType', 'Vset',
|
||||||
'Unit1', 'Factor', 'Unit2', 'Decimal',
|
'Unit1', 'Factor', 'Unit2', 'Decimal',
|
||||||
'ReqQty', 'ReqQtyUnit', 'CollReq', 'Method', 'ExpectedTAT',
|
'ReqQty', 'ReqQtyUnit', 'CollReq', 'Method', 'ExpectedTAT',
|
||||||
'SeqScr', 'SeqRpt', 'IndentLeft', 'FontStyle', 'VisibleScr', 'VisibleRpt',
|
'SeqScr', 'SeqRpt', 'IndentLeft', 'FontStyle', 'isVisibleScr', 'isVisibleRpt',
|
||||||
'CountStat', 'Level', 'Requestable',
|
'isCountStat', 'Level', 'isRequestable',
|
||||||
'CreateDate', 'StartDate','EndDate'
|
'CreateDate', 'StartDate','EndDate'
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -28,9 +28,9 @@ class TestDefSiteModel extends BaseModel {
|
|||||||
protected $deletedField = "EndDate";
|
protected $deletedField = "EndDate";
|
||||||
|
|
||||||
public function getTests($siteId = null, $testType = null, $visibleScr = null, $visibleRpt = null, $search = null, $page = 1, $perPage = 20) {
|
public function getTests($siteId = null, $testType = null, $visibleScr = null, $visibleRpt = null, $search = null, $page = 1, $perPage = 20) {
|
||||||
$builder = $this->select("testdefsite.TestSiteID, testdefsite.TestSiteCode, testdefsite.TestSiteName, testdefsite.TestType,
|
$builder = $this->select("testdefsite.TestSiteID, testdefsite.TestSiteCode, testdefsite.TestSiteName, testdefsite.TestType,
|
||||||
testdefsite.SeqScr, testdefsite.SeqRpt, testdefsite.VisibleScr, testdefsite.VisibleRpt,
|
testdefsite.SeqScr, testdefsite.SeqRpt, testdefsite.isVisibleScr, testdefsite.isVisibleRpt,
|
||||||
testdefsite.CountStat, testdefsite.StartDate, testdefsite.EndDate")
|
testdefsite.isCountStat, testdefsite.StartDate, testdefsite.EndDate")
|
||||||
->where('testdefsite.EndDate IS NULL');
|
->where('testdefsite.EndDate IS NULL');
|
||||||
|
|
||||||
if ($siteId) {
|
if ($siteId) {
|
||||||
@ -41,13 +41,13 @@ class TestDefSiteModel extends BaseModel {
|
|||||||
$builder->where('testdefsite.TestType', $testType);
|
$builder->where('testdefsite.TestType', $testType);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($visibleScr !== null) {
|
if ($visibleScr !== null) {
|
||||||
$builder->where('testdefsite.VisibleScr', $visibleScr);
|
$builder->where('testdefsite.isVisibleScr', $visibleScr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($visibleRpt !== null) {
|
if ($visibleRpt !== null) {
|
||||||
$builder->where('testdefsite.VisibleRpt', $visibleRpt);
|
$builder->where('testdefsite.isVisibleRpt', $visibleRpt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($search) {
|
if ($search) {
|
||||||
$builder->groupStart()
|
$builder->groupStart()
|
||||||
@ -83,10 +83,10 @@ class TestDefSiteModel extends BaseModel {
|
|||||||
*/
|
*/
|
||||||
public function getTestsWithRelations($filters = []) {
|
public function getTestsWithRelations($filters = []) {
|
||||||
$builder = $this->db->table('testdefsite')
|
$builder = $this->db->table('testdefsite')
|
||||||
->select(
|
->select(
|
||||||
"testdefsite.TestSiteID, testdefsite.TestSiteCode, testdefsite.TestSiteName, testdefsite.TestType,
|
"testdefsite.TestSiteID, testdefsite.TestSiteCode, testdefsite.TestSiteName, testdefsite.TestType,
|
||||||
testdefsite.SeqScr, testdefsite.SeqRpt, testdefsite.VisibleScr, testdefsite.VisibleRpt,
|
testdefsite.SeqScr, testdefsite.SeqRpt, testdefsite.isVisibleScr, testdefsite.isVisibleRpt,
|
||||||
testdefsite.CountStat, testdefsite.StartDate, testdefsite.EndDate,
|
testdefsite.isCountStat, testdefsite.StartDate, testdefsite.EndDate,
|
||||||
COALESCE(testdefsite.DisciplineID, cal.DisciplineID) as DisciplineID,
|
COALESCE(testdefsite.DisciplineID, cal.DisciplineID) as DisciplineID,
|
||||||
COALESCE(testdefsite.DepartmentID, cal.DepartmentID) as DepartmentID,
|
COALESCE(testdefsite.DepartmentID, cal.DepartmentID) as DepartmentID,
|
||||||
d.DisciplineName, dept.DepartmentName"
|
d.DisciplineName, dept.DepartmentName"
|
||||||
@ -104,13 +104,13 @@ class TestDefSiteModel extends BaseModel {
|
|||||||
$builder->where('testdefsite.TestType', $filters['TestType']);
|
$builder->where('testdefsite.TestType', $filters['TestType']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($filters['VisibleScr'])) {
|
if (isset($filters['isVisibleScr'])) {
|
||||||
$builder->where('testdefsite.VisibleScr', $filters['VisibleScr']);
|
$builder->where('testdefsite.isVisibleScr', $filters['isVisibleScr']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($filters['VisibleRpt'])) {
|
if (isset($filters['isVisibleRpt'])) {
|
||||||
$builder->where('testdefsite.VisibleRpt', $filters['VisibleRpt']);
|
$builder->where('testdefsite.isVisibleRpt', $filters['isVisibleRpt']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($filters['TestSiteName'])) {
|
if (!empty($filters['TestSiteName'])) {
|
||||||
$builder->like('testdefsite.TestSiteName', $filters['TestSiteName']);
|
$builder->like('testdefsite.TestSiteName', $filters['TestSiteName']);
|
||||||
|
|||||||
@ -4416,7 +4416,7 @@ paths:
|
|||||||
- GROUP
|
- GROUP
|
||||||
- TITLE
|
- TITLE
|
||||||
description: Filter by test type
|
description: Filter by test type
|
||||||
- name: VisibleScr
|
- name: isVisibleScr
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
@ -4424,7 +4424,7 @@ paths:
|
|||||||
- 0
|
- 0
|
||||||
- 1
|
- 1
|
||||||
description: Filter by screen visibility (0=hidden, 1=visible)
|
description: Filter by screen visibility (0=hidden, 1=visible)
|
||||||
- name: VisibleRpt
|
- name: isVisibleRpt
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
@ -4472,9 +4472,9 @@ paths:
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 11
|
SeqScr: 11
|
||||||
SeqRpt: 11
|
SeqRpt: 11
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
StartDate: '2026-01-01 00:00:00'
|
StartDate: '2026-01-01 00:00:00'
|
||||||
EndDate: null
|
EndDate: null
|
||||||
DisciplineID: 2
|
DisciplineID: 2
|
||||||
@ -4487,9 +4487,9 @@ paths:
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 12
|
SeqScr: 12
|
||||||
SeqRpt: 12
|
SeqRpt: 12
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
StartDate: '2026-01-01 00:00:00'
|
StartDate: '2026-01-01 00:00:00'
|
||||||
EndDate: null
|
EndDate: null
|
||||||
DisciplineID: 2
|
DisciplineID: 2
|
||||||
@ -4579,11 +4579,11 @@ paths:
|
|||||||
type: integer
|
type: integer
|
||||||
FontStyle:
|
FontStyle:
|
||||||
type: string
|
type: string
|
||||||
VisibleScr:
|
isVisibleScr:
|
||||||
type: integer
|
type: integer
|
||||||
VisibleRpt:
|
isVisibleRpt:
|
||||||
type: integer
|
type: integer
|
||||||
CountStat:
|
isCountStat:
|
||||||
type: integer
|
type: integer
|
||||||
testdefcal:
|
testdefcal:
|
||||||
type: object
|
type: object
|
||||||
@ -4634,9 +4634,9 @@ paths:
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 500
|
SeqScr: 500
|
||||||
SeqRpt: 500
|
SeqRpt: 500
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
DisciplineID: 2
|
DisciplineID: 2
|
||||||
DepartmentID: 2
|
DepartmentID: 2
|
||||||
Unit1: mg/dL
|
Unit1: mg/dL
|
||||||
@ -4650,9 +4650,9 @@ paths:
|
|||||||
TestType: PARAM
|
TestType: PARAM
|
||||||
SeqScr: 10
|
SeqScr: 10
|
||||||
SeqRpt: 10
|
SeqRpt: 10
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 0
|
isVisibleRpt: 0
|
||||||
CountStat: 0
|
isCountStat: 0
|
||||||
DisciplineID: 10
|
DisciplineID: 10
|
||||||
DepartmentID: 0
|
DepartmentID: 0
|
||||||
Unit1: cm
|
Unit1: cm
|
||||||
@ -4666,9 +4666,9 @@ paths:
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 105
|
SeqScr: 105
|
||||||
SeqRpt: 105
|
SeqRpt: 105
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
refnum:
|
refnum:
|
||||||
- NumRefType: NMRC
|
- NumRefType: NMRC
|
||||||
RangeType: REF
|
RangeType: REF
|
||||||
@ -4695,9 +4695,9 @@ paths:
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 110
|
SeqScr: 110
|
||||||
SeqRpt: 110
|
SeqRpt: 110
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
refnum:
|
refnum:
|
||||||
- NumRefType: NMRC
|
- NumRefType: NMRC
|
||||||
RangeType: REF
|
RangeType: REF
|
||||||
@ -4760,9 +4760,9 @@ paths:
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 115
|
SeqScr: 115
|
||||||
SeqRpt: 115
|
SeqRpt: 115
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
refnum:
|
refnum:
|
||||||
- NumRefType: THOLD
|
- NumRefType: THOLD
|
||||||
RangeType: PANIC
|
RangeType: PANIC
|
||||||
@ -4787,9 +4787,9 @@ paths:
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 120
|
SeqScr: 120
|
||||||
SeqRpt: 120
|
SeqRpt: 120
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
refnum:
|
refnum:
|
||||||
- NumRefType: THOLD
|
- NumRefType: THOLD
|
||||||
RangeType: PANIC
|
RangeType: PANIC
|
||||||
@ -4838,9 +4838,9 @@ paths:
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 130
|
SeqScr: 130
|
||||||
SeqRpt: 130
|
SeqRpt: 130
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
reftxt:
|
reftxt:
|
||||||
- SpcType: GEN
|
- SpcType: GEN
|
||||||
TxtRefType: TEXT
|
TxtRefType: TEXT
|
||||||
@ -4863,9 +4863,9 @@ paths:
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 135
|
SeqScr: 135
|
||||||
SeqRpt: 135
|
SeqRpt: 135
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
reftxt:
|
reftxt:
|
||||||
- SpcType: GEN
|
- SpcType: GEN
|
||||||
TxtRefType: TEXT
|
TxtRefType: TEXT
|
||||||
@ -4905,9 +4905,9 @@ paths:
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 140
|
SeqScr: 140
|
||||||
SeqRpt: 140
|
SeqRpt: 140
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
reftxt:
|
reftxt:
|
||||||
- SpcType: GEN
|
- SpcType: GEN
|
||||||
TxtRefType: VSET
|
TxtRefType: VSET
|
||||||
@ -4930,9 +4930,9 @@ paths:
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 145
|
SeqScr: 145
|
||||||
SeqRpt: 145
|
SeqRpt: 145
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
reftxt:
|
reftxt:
|
||||||
- SpcType: GEN
|
- SpcType: GEN
|
||||||
TxtRefType: VSET
|
TxtRefType: VSET
|
||||||
@ -4965,9 +4965,9 @@ paths:
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 150
|
SeqScr: 150
|
||||||
SeqRpt: 150
|
SeqRpt: 150
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
testmap:
|
testmap:
|
||||||
- HostType: SITE
|
- HostType: SITE
|
||||||
HostID: '1'
|
HostID: '1'
|
||||||
@ -4992,9 +4992,9 @@ paths:
|
|||||||
TestType: CALC
|
TestType: CALC
|
||||||
SeqScr: 190
|
SeqScr: 190
|
||||||
SeqRpt: 190
|
SeqRpt: 190
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 0
|
isCountStat: 0
|
||||||
DisciplineID: 2
|
DisciplineID: 2
|
||||||
DepartmentID: 2
|
DepartmentID: 2
|
||||||
testdefcal:
|
testdefcal:
|
||||||
@ -5012,9 +5012,9 @@ paths:
|
|||||||
TestType: CALC
|
TestType: CALC
|
||||||
SeqScr: 195
|
SeqScr: 195
|
||||||
SeqRpt: 195
|
SeqRpt: 195
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 0
|
isCountStat: 0
|
||||||
refnum:
|
refnum:
|
||||||
- NumRefType: NMRC
|
- NumRefType: NMRC
|
||||||
RangeType: REF
|
RangeType: REF
|
||||||
@ -5054,9 +5054,9 @@ paths:
|
|||||||
TestType: GROUP
|
TestType: GROUP
|
||||||
SeqScr: 10
|
SeqScr: 10
|
||||||
SeqRpt: 10
|
SeqRpt: 10
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
testmap:
|
testmap:
|
||||||
- HostType: SITE
|
- HostType: SITE
|
||||||
HostID: '1'
|
HostID: '1'
|
||||||
@ -5183,11 +5183,11 @@ paths:
|
|||||||
type: integer
|
type: integer
|
||||||
FontStyle:
|
FontStyle:
|
||||||
type: string
|
type: string
|
||||||
VisibleScr:
|
isVisibleScr:
|
||||||
type: integer
|
type: integer
|
||||||
VisibleRpt:
|
isVisibleRpt:
|
||||||
type: integer
|
type: integer
|
||||||
CountStat:
|
isCountStat:
|
||||||
type: integer
|
type: integer
|
||||||
testdefcal:
|
testdefcal:
|
||||||
type: object
|
type: object
|
||||||
@ -6289,12 +6289,12 @@ components:
|
|||||||
$ref: '#/components/schemas/LinkedPatient'
|
$ref: '#/components/schemas/LinkedPatient'
|
||||||
Custodian:
|
Custodian:
|
||||||
$ref: '#/components/schemas/Custodian'
|
$ref: '#/components/schemas/Custodian'
|
||||||
DeathIndicator:
|
isDead:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- 'Y'
|
- '0'
|
||||||
- 'N'
|
- '1'
|
||||||
description: 'Y: Yes (deceased), N: No (alive)'
|
description: '0: No (alive), 1: Yes (deceased)'
|
||||||
TimeOfDeath:
|
TimeOfDeath:
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
@ -6899,20 +6899,20 @@ components:
|
|||||||
default: 0
|
default: 0
|
||||||
FontStyle:
|
FontStyle:
|
||||||
type: string
|
type: string
|
||||||
VisibleScr:
|
isVisibleScr:
|
||||||
type: integer
|
type: integer
|
||||||
default: 1
|
default: 1
|
||||||
description: Screen visibility (0=hidden, 1=visible)
|
description: Screen visibility (0=hidden, 1=visible)
|
||||||
VisibleRpt:
|
isVisibleRpt:
|
||||||
type: integer
|
type: integer
|
||||||
default: 1
|
default: 1
|
||||||
description: Report visibility (0=hidden, 1=visible)
|
description: Report visibility (0=hidden, 1=visible)
|
||||||
CountStat:
|
isCountStat:
|
||||||
type: integer
|
type: integer
|
||||||
default: 1
|
default: 1
|
||||||
Level:
|
Level:
|
||||||
type: integer
|
type: integer
|
||||||
Requestable:
|
isRequestable:
|
||||||
type: integer
|
type: integer
|
||||||
default: 1
|
default: 1
|
||||||
description: Flag indicating if test can be requested (1=yes, 0=no)
|
description: Flag indicating if test can be requested (1=yes, 0=no)
|
||||||
@ -7067,9 +7067,9 @@ components:
|
|||||||
Method: Hexokinase
|
Method: Hexokinase
|
||||||
SeqScr: 11
|
SeqScr: 11
|
||||||
SeqRpt: 11
|
SeqRpt: 11
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
refnum:
|
refnum:
|
||||||
- RefNumID: 1
|
- RefNumID: 1
|
||||||
NumRefType: NMRC
|
NumRefType: NMRC
|
||||||
@ -7105,9 +7105,9 @@ components:
|
|||||||
Method: Hexokinase
|
Method: Hexokinase
|
||||||
SeqScr: 11
|
SeqScr: 11
|
||||||
SeqRpt: 11
|
SeqRpt: 11
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
refnum:
|
refnum:
|
||||||
- RefNumID: 2
|
- RefNumID: 2
|
||||||
NumRefType: THOLD
|
NumRefType: THOLD
|
||||||
@ -7137,9 +7137,9 @@ components:
|
|||||||
RefType: TEXT
|
RefType: TEXT
|
||||||
SeqScr: 50
|
SeqScr: 50
|
||||||
SeqRpt: 50
|
SeqRpt: 50
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
reftxt:
|
reftxt:
|
||||||
- RefTxtID: 1
|
- RefTxtID: 1
|
||||||
TxtRefType: TEXT
|
TxtRefType: TEXT
|
||||||
@ -7164,9 +7164,9 @@ components:
|
|||||||
Decimal: 0
|
Decimal: 0
|
||||||
SeqScr: 40
|
SeqScr: 40
|
||||||
SeqRpt: 40
|
SeqRpt: 40
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 0
|
isVisibleRpt: 0
|
||||||
CountStat: 0
|
isCountStat: 0
|
||||||
CALC:
|
CALC:
|
||||||
summary: Calculated test with reference
|
summary: Calculated test with reference
|
||||||
value:
|
value:
|
||||||
@ -7181,9 +7181,9 @@ components:
|
|||||||
Decimal: 0
|
Decimal: 0
|
||||||
SeqScr: 20
|
SeqScr: 20
|
||||||
SeqRpt: 20
|
SeqRpt: 20
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 0
|
isCountStat: 0
|
||||||
testdefcal:
|
testdefcal:
|
||||||
- TestCalID: 1
|
- TestCalID: 1
|
||||||
DisciplineID: 2
|
DisciplineID: 2
|
||||||
@ -7230,9 +7230,9 @@ components:
|
|||||||
DepartmentID: 2
|
DepartmentID: 2
|
||||||
SeqScr: 51
|
SeqScr: 51
|
||||||
SeqRpt: 51
|
SeqRpt: 51
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
testdefgrp:
|
testdefgrp:
|
||||||
- TestGrpID: 1
|
- TestGrpID: 1
|
||||||
TestSiteID: 6
|
TestSiteID: 6
|
||||||
@ -7260,9 +7260,9 @@ components:
|
|||||||
DepartmentID: 2
|
DepartmentID: 2
|
||||||
SeqScr: 100
|
SeqScr: 100
|
||||||
SeqRpt: 100
|
SeqRpt: 100
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 0
|
isCountStat: 0
|
||||||
TestMap:
|
TestMap:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -8101,17 +8101,17 @@ components:
|
|||||||
type: integer
|
type: integer
|
||||||
SeqRpt:
|
SeqRpt:
|
||||||
type: integer
|
type: integer
|
||||||
VisibleScr:
|
isVisibleScr:
|
||||||
type: integer
|
type: integer
|
||||||
enum:
|
enum:
|
||||||
- 0
|
- 0
|
||||||
- 1
|
- 1
|
||||||
VisibleRpt:
|
isVisibleRpt:
|
||||||
type: integer
|
type: integer
|
||||||
enum:
|
enum:
|
||||||
- 0
|
- 0
|
||||||
- 1
|
- 1
|
||||||
CountStat:
|
isCountStat:
|
||||||
type: integer
|
type: integer
|
||||||
StartDate:
|
StartDate:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@ -135,10 +135,10 @@ Patient:
|
|||||||
$ref: 'patient.yaml#/LinkedPatient'
|
$ref: 'patient.yaml#/LinkedPatient'
|
||||||
Custodian:
|
Custodian:
|
||||||
$ref: 'patient.yaml#/Custodian'
|
$ref: 'patient.yaml#/Custodian'
|
||||||
DeathIndicator:
|
isDead:
|
||||||
type: string
|
type: string
|
||||||
enum: [Y, N]
|
enum: ['0', '1']
|
||||||
description: 'Y: Yes (deceased), N: No (alive)'
|
description: '0: No (alive), 1: Yes (deceased)'
|
||||||
TimeOfDeath:
|
TimeOfDeath:
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
|
|||||||
@ -1,48 +1,48 @@
|
|||||||
TestDefinitionListItem:
|
TestDefinitionListItem:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
TestSiteID:
|
TestSiteID:
|
||||||
type: integer
|
type: integer
|
||||||
TestSiteCode:
|
TestSiteCode:
|
||||||
type: string
|
type: string
|
||||||
TestSiteName:
|
TestSiteName:
|
||||||
type: string
|
type: string
|
||||||
TestType:
|
TestType:
|
||||||
type: string
|
type: string
|
||||||
enum: [TEST, PARAM, CALC, GROUP, TITLE]
|
enum: [TEST, PARAM, CALC, GROUP, TITLE]
|
||||||
SeqScr:
|
SeqScr:
|
||||||
type: integer
|
type: integer
|
||||||
SeqRpt:
|
SeqRpt:
|
||||||
type: integer
|
type: integer
|
||||||
VisibleScr:
|
isVisibleScr:
|
||||||
type: integer
|
type: integer
|
||||||
enum: [0, 1]
|
enum: [0, 1]
|
||||||
VisibleRpt:
|
isVisibleRpt:
|
||||||
type: integer
|
type: integer
|
||||||
enum: [0, 1]
|
enum: [0, 1]
|
||||||
CountStat:
|
isCountStat:
|
||||||
type: integer
|
type: integer
|
||||||
StartDate:
|
StartDate:
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
EndDate:
|
EndDate:
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
nullable: true
|
nullable: true
|
||||||
DisciplineID:
|
DisciplineID:
|
||||||
type: integer
|
type: integer
|
||||||
nullable: true
|
nullable: true
|
||||||
DepartmentID:
|
DepartmentID:
|
||||||
type: integer
|
type: integer
|
||||||
nullable: true
|
nullable: true
|
||||||
DisciplineName:
|
DisciplineName:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
DepartmentName:
|
DepartmentName:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
|
|
||||||
TestDefinition:
|
TestDefinition:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
TestSiteID:
|
TestSiteID:
|
||||||
@ -149,20 +149,20 @@ TestDefinition:
|
|||||||
default: 0
|
default: 0
|
||||||
FontStyle:
|
FontStyle:
|
||||||
type: string
|
type: string
|
||||||
VisibleScr:
|
isVisibleScr:
|
||||||
type: integer
|
type: integer
|
||||||
default: 1
|
default: 1
|
||||||
description: Screen visibility (0=hidden, 1=visible)
|
description: Screen visibility (0=hidden, 1=visible)
|
||||||
VisibleRpt:
|
isVisibleRpt:
|
||||||
type: integer
|
type: integer
|
||||||
default: 1
|
default: 1
|
||||||
description: Report visibility (0=hidden, 1=visible)
|
description: Report visibility (0=hidden, 1=visible)
|
||||||
CountStat:
|
isCountStat:
|
||||||
type: integer
|
type: integer
|
||||||
default: 1
|
default: 1
|
||||||
Level:
|
Level:
|
||||||
type: integer
|
type: integer
|
||||||
Requestable:
|
isRequestable:
|
||||||
type: integer
|
type: integer
|
||||||
default: 1
|
default: 1
|
||||||
description: Flag indicating if test can be requested (1=yes, 0=no)
|
description: Flag indicating if test can be requested (1=yes, 0=no)
|
||||||
@ -313,9 +313,9 @@ TestDefinition:
|
|||||||
Method: Hexokinase
|
Method: Hexokinase
|
||||||
SeqScr: 11
|
SeqScr: 11
|
||||||
SeqRpt: 11
|
SeqRpt: 11
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
refnum:
|
refnum:
|
||||||
- RefNumID: 1
|
- RefNumID: 1
|
||||||
NumRefType: NMRC
|
NumRefType: NMRC
|
||||||
@ -351,9 +351,9 @@ TestDefinition:
|
|||||||
Method: Hexokinase
|
Method: Hexokinase
|
||||||
SeqScr: 11
|
SeqScr: 11
|
||||||
SeqRpt: 11
|
SeqRpt: 11
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
refnum:
|
refnum:
|
||||||
- RefNumID: 2
|
- RefNumID: 2
|
||||||
NumRefType: THOLD
|
NumRefType: THOLD
|
||||||
@ -383,9 +383,9 @@ TestDefinition:
|
|||||||
RefType: TEXT
|
RefType: TEXT
|
||||||
SeqScr: 50
|
SeqScr: 50
|
||||||
SeqRpt: 50
|
SeqRpt: 50
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
reftxt:
|
reftxt:
|
||||||
- RefTxtID: 1
|
- RefTxtID: 1
|
||||||
TxtRefType: TEXT
|
TxtRefType: TEXT
|
||||||
@ -410,9 +410,9 @@ TestDefinition:
|
|||||||
Decimal: 0
|
Decimal: 0
|
||||||
SeqScr: 40
|
SeqScr: 40
|
||||||
SeqRpt: 40
|
SeqRpt: 40
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 0
|
isVisibleRpt: 0
|
||||||
CountStat: 0
|
isCountStat: 0
|
||||||
CALC:
|
CALC:
|
||||||
summary: Calculated test with reference
|
summary: Calculated test with reference
|
||||||
value:
|
value:
|
||||||
@ -427,9 +427,9 @@ TestDefinition:
|
|||||||
Decimal: 0
|
Decimal: 0
|
||||||
SeqScr: 20
|
SeqScr: 20
|
||||||
SeqRpt: 20
|
SeqRpt: 20
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 0
|
isCountStat: 0
|
||||||
testdefcal:
|
testdefcal:
|
||||||
- TestCalID: 1
|
- TestCalID: 1
|
||||||
DisciplineID: 2
|
DisciplineID: 2
|
||||||
@ -476,9 +476,9 @@ TestDefinition:
|
|||||||
DepartmentID: 2
|
DepartmentID: 2
|
||||||
SeqScr: 51
|
SeqScr: 51
|
||||||
SeqRpt: 51
|
SeqRpt: 51
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
testdefgrp:
|
testdefgrp:
|
||||||
- TestGrpID: 1
|
- TestGrpID: 1
|
||||||
TestSiteID: 6
|
TestSiteID: 6
|
||||||
@ -506,9 +506,9 @@ TestDefinition:
|
|||||||
DepartmentID: 2
|
DepartmentID: 2
|
||||||
SeqScr: 100
|
SeqScr: 100
|
||||||
SeqRpt: 100
|
SeqRpt: 100
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 0
|
isCountStat: 0
|
||||||
|
|
||||||
TestMap:
|
TestMap:
|
||||||
type: object
|
type: object
|
||||||
|
|||||||
@ -28,13 +28,13 @@
|
|||||||
type: string
|
type: string
|
||||||
enum: [TEST, PARAM, CALC, GROUP, TITLE]
|
enum: [TEST, PARAM, CALC, GROUP, TITLE]
|
||||||
description: Filter by test type
|
description: Filter by test type
|
||||||
- name: VisibleScr
|
- name: isVisibleScr
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
enum: [0, 1]
|
enum: [0, 1]
|
||||||
description: Filter by screen visibility (0=hidden, 1=visible)
|
description: Filter by screen visibility (0=hidden, 1=visible)
|
||||||
- name: VisibleRpt
|
- name: isVisibleRpt
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
@ -53,57 +53,57 @@
|
|||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
status:
|
status:
|
||||||
type: string
|
type: string
|
||||||
message:
|
message:
|
||||||
type: string
|
type: string
|
||||||
data:
|
data:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '../components/schemas/tests.yaml#/TestDefinitionListItem'
|
$ref: '../components/schemas/tests.yaml#/TestDefinitionListItem'
|
||||||
pagination:
|
pagination:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
total:
|
total:
|
||||||
type: integer
|
type: integer
|
||||||
description: Total number of records matching the query
|
description: Total number of records matching the query
|
||||||
examples:
|
examples:
|
||||||
list_flat:
|
list_flat:
|
||||||
summary: Flat list response from testdefsite
|
summary: Flat list response from testdefsite
|
||||||
value:
|
value:
|
||||||
status: success
|
status: success
|
||||||
message: Data fetched successfully
|
message: Data fetched successfully
|
||||||
data:
|
data:
|
||||||
- TestSiteID: 21
|
- TestSiteID: 21
|
||||||
TestSiteCode: GLU
|
TestSiteCode: GLU
|
||||||
TestSiteName: Glucose
|
TestSiteName: Glucose
|
||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 11
|
SeqScr: 11
|
||||||
SeqRpt: 11
|
SeqRpt: 11
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
StartDate: '2026-01-01 00:00:00'
|
StartDate: '2026-01-01 00:00:00'
|
||||||
EndDate: null
|
EndDate: null
|
||||||
DisciplineID: 2
|
DisciplineID: 2
|
||||||
DepartmentID: 2
|
DepartmentID: 2
|
||||||
DisciplineName: Clinical Chemistry
|
DisciplineName: Clinical Chemistry
|
||||||
DepartmentName: Laboratory
|
DepartmentName: Laboratory
|
||||||
- TestSiteID: 22
|
- TestSiteID: 22
|
||||||
TestSiteCode: CREA
|
TestSiteCode: CREA
|
||||||
TestSiteName: Creatinine
|
TestSiteName: Creatinine
|
||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 12
|
SeqScr: 12
|
||||||
SeqRpt: 12
|
SeqRpt: 12
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
StartDate: '2026-01-01 00:00:00'
|
StartDate: '2026-01-01 00:00:00'
|
||||||
EndDate: null
|
EndDate: null
|
||||||
DisciplineID: 2
|
DisciplineID: 2
|
||||||
DepartmentID: 2
|
DepartmentID: 2
|
||||||
DisciplineName: Clinical Chemistry
|
DisciplineName: Clinical Chemistry
|
||||||
DepartmentName: Laboratory
|
DepartmentName: Laboratory
|
||||||
|
|
||||||
post:
|
post:
|
||||||
tags: [Test]
|
tags: [Test]
|
||||||
@ -172,34 +172,34 @@
|
|||||||
type: integer
|
type: integer
|
||||||
FontStyle:
|
FontStyle:
|
||||||
type: string
|
type: string
|
||||||
VisibleScr:
|
isVisibleScr:
|
||||||
type: integer
|
type: integer
|
||||||
VisibleRpt:
|
isVisibleRpt:
|
||||||
type: integer
|
type: integer
|
||||||
CountStat:
|
isCountStat:
|
||||||
type: integer
|
type: integer
|
||||||
testdefcal:
|
testdefcal:
|
||||||
type: object
|
type: object
|
||||||
description: Calculated test metadata persisted in the `testdefcal` table.
|
description: Calculated test metadata persisted in the `testdefcal` table.
|
||||||
properties:
|
properties:
|
||||||
FormulaCode:
|
FormulaCode:
|
||||||
type: string
|
type: string
|
||||||
description: Formula expression for calculated tests (e.g., "{TBIL} - {DBIL}")
|
description: Formula expression for calculated tests (e.g., "{TBIL} - {DBIL}")
|
||||||
testdefgrp:
|
testdefgrp:
|
||||||
type: object
|
type: object
|
||||||
description: Group member payload stored in the `testdefgrp` table.
|
description: Group member payload stored in the `testdefgrp` table.
|
||||||
properties:
|
properties:
|
||||||
members:
|
members:
|
||||||
type: array
|
type: array
|
||||||
description: Array of member TestSiteIDs for CALC/GROUP definitions.
|
description: Array of member TestSiteIDs for CALC/GROUP definitions.
|
||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
TestSiteID:
|
TestSiteID:
|
||||||
type: integer
|
type: integer
|
||||||
description: Foreign key referencing the member test's TestSiteID.
|
description: Foreign key referencing the member test's TestSiteID.
|
||||||
required:
|
required:
|
||||||
- TestSiteID
|
- TestSiteID
|
||||||
refnum:
|
refnum:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@ -227,9 +227,9 @@
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 500
|
SeqScr: 500
|
||||||
SeqRpt: 500
|
SeqRpt: 500
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
DisciplineID: 2
|
DisciplineID: 2
|
||||||
DepartmentID: 2
|
DepartmentID: 2
|
||||||
Unit1: mg/dL
|
Unit1: mg/dL
|
||||||
@ -243,9 +243,9 @@
|
|||||||
TestType: PARAM
|
TestType: PARAM
|
||||||
SeqScr: 10
|
SeqScr: 10
|
||||||
SeqRpt: 10
|
SeqRpt: 10
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 0
|
isVisibleRpt: 0
|
||||||
CountStat: 0
|
isCountStat: 0
|
||||||
DisciplineID: 10
|
DisciplineID: 10
|
||||||
DepartmentID: 0
|
DepartmentID: 0
|
||||||
Unit1: cm
|
Unit1: cm
|
||||||
@ -259,9 +259,9 @@
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 105
|
SeqScr: 105
|
||||||
SeqRpt: 105
|
SeqRpt: 105
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
refnum:
|
refnum:
|
||||||
- NumRefType: NMRC
|
- NumRefType: NMRC
|
||||||
RangeType: REF
|
RangeType: REF
|
||||||
@ -288,9 +288,9 @@
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 110
|
SeqScr: 110
|
||||||
SeqRpt: 110
|
SeqRpt: 110
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
refnum:
|
refnum:
|
||||||
- NumRefType: NMRC
|
- NumRefType: NMRC
|
||||||
RangeType: REF
|
RangeType: REF
|
||||||
@ -353,9 +353,9 @@
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 115
|
SeqScr: 115
|
||||||
SeqRpt: 115
|
SeqRpt: 115
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
refnum:
|
refnum:
|
||||||
- NumRefType: THOLD
|
- NumRefType: THOLD
|
||||||
RangeType: PANIC
|
RangeType: PANIC
|
||||||
@ -380,9 +380,9 @@
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 120
|
SeqScr: 120
|
||||||
SeqRpt: 120
|
SeqRpt: 120
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
refnum:
|
refnum:
|
||||||
- NumRefType: THOLD
|
- NumRefType: THOLD
|
||||||
RangeType: PANIC
|
RangeType: PANIC
|
||||||
@ -431,9 +431,9 @@
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 130
|
SeqScr: 130
|
||||||
SeqRpt: 130
|
SeqRpt: 130
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
reftxt:
|
reftxt:
|
||||||
- SpcType: GEN
|
- SpcType: GEN
|
||||||
TxtRefType: TEXT
|
TxtRefType: TEXT
|
||||||
@ -456,9 +456,9 @@
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 135
|
SeqScr: 135
|
||||||
SeqRpt: 135
|
SeqRpt: 135
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
reftxt:
|
reftxt:
|
||||||
- SpcType: GEN
|
- SpcType: GEN
|
||||||
TxtRefType: TEXT
|
TxtRefType: TEXT
|
||||||
@ -498,9 +498,9 @@
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 140
|
SeqScr: 140
|
||||||
SeqRpt: 140
|
SeqRpt: 140
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
reftxt:
|
reftxt:
|
||||||
- SpcType: GEN
|
- SpcType: GEN
|
||||||
TxtRefType: VSET
|
TxtRefType: VSET
|
||||||
@ -523,9 +523,9 @@
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 145
|
SeqScr: 145
|
||||||
SeqRpt: 145
|
SeqRpt: 145
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
reftxt:
|
reftxt:
|
||||||
- SpcType: GEN
|
- SpcType: GEN
|
||||||
TxtRefType: VSET
|
TxtRefType: VSET
|
||||||
@ -558,9 +558,9 @@
|
|||||||
TestType: TEST
|
TestType: TEST
|
||||||
SeqScr: 150
|
SeqScr: 150
|
||||||
SeqRpt: 150
|
SeqRpt: 150
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
testmap:
|
testmap:
|
||||||
- HostType: SITE
|
- HostType: SITE
|
||||||
HostID: '1'
|
HostID: '1'
|
||||||
@ -585,9 +585,9 @@
|
|||||||
TestType: CALC
|
TestType: CALC
|
||||||
SeqScr: 190
|
SeqScr: 190
|
||||||
SeqRpt: 190
|
SeqRpt: 190
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 0
|
isCountStat: 0
|
||||||
DisciplineID: 2
|
DisciplineID: 2
|
||||||
DepartmentID: 2
|
DepartmentID: 2
|
||||||
testdefcal:
|
testdefcal:
|
||||||
@ -605,9 +605,9 @@
|
|||||||
TestType: CALC
|
TestType: CALC
|
||||||
SeqScr: 195
|
SeqScr: 195
|
||||||
SeqRpt: 195
|
SeqRpt: 195
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 0
|
isCountStat: 0
|
||||||
refnum:
|
refnum:
|
||||||
- NumRefType: NMRC
|
- NumRefType: NMRC
|
||||||
RangeType: REF
|
RangeType: REF
|
||||||
@ -647,9 +647,9 @@
|
|||||||
TestType: GROUP
|
TestType: GROUP
|
||||||
SeqScr: 10
|
SeqScr: 10
|
||||||
SeqRpt: 10
|
SeqRpt: 10
|
||||||
VisibleScr: 1
|
isVisibleScr: 1
|
||||||
VisibleRpt: 1
|
isVisibleRpt: 1
|
||||||
CountStat: 1
|
isCountStat: 1
|
||||||
testmap:
|
testmap:
|
||||||
- HostType: SITE
|
- HostType: SITE
|
||||||
HostID: '1'
|
HostID: '1'
|
||||||
@ -762,34 +762,34 @@
|
|||||||
type: integer
|
type: integer
|
||||||
FontStyle:
|
FontStyle:
|
||||||
type: string
|
type: string
|
||||||
VisibleScr:
|
isVisibleScr:
|
||||||
type: integer
|
type: integer
|
||||||
VisibleRpt:
|
isVisibleRpt:
|
||||||
type: integer
|
type: integer
|
||||||
CountStat:
|
isCountStat:
|
||||||
type: integer
|
type: integer
|
||||||
testdefcal:
|
testdefcal:
|
||||||
type: object
|
type: object
|
||||||
description: Calculated test metadata persisted in the `testdefcal` table.
|
description: Calculated test metadata persisted in the `testdefcal` table.
|
||||||
properties:
|
properties:
|
||||||
FormulaCode:
|
FormulaCode:
|
||||||
type: string
|
type: string
|
||||||
description: Formula expression for calculated tests (e.g., "{TBIL} - {DBIL}")
|
description: Formula expression for calculated tests (e.g., "{TBIL} - {DBIL}")
|
||||||
testdefgrp:
|
testdefgrp:
|
||||||
type: object
|
type: object
|
||||||
description: Group member payload stored in the `testdefgrp` table.
|
description: Group member payload stored in the `testdefgrp` table.
|
||||||
properties:
|
properties:
|
||||||
members:
|
members:
|
||||||
type: array
|
type: array
|
||||||
description: Array of member TestSiteIDs for CALC/GROUP definitions.
|
description: Array of member TestSiteIDs for CALC/GROUP definitions.
|
||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
TestSiteID:
|
TestSiteID:
|
||||||
type: integer
|
type: integer
|
||||||
description: Foreign key referencing the member test's TestSiteID.
|
description: Foreign key referencing the member test's TestSiteID.
|
||||||
required:
|
required:
|
||||||
- TestSiteID
|
- TestSiteID
|
||||||
refnum:
|
refnum:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
|||||||
@ -34,7 +34,7 @@ trait CreatesPatients
|
|||||||
'Religion' => (string) $faker->numberBetween(206, 212),
|
'Religion' => (string) $faker->numberBetween(206, 212),
|
||||||
'Ethnic' => (string) $faker->numberBetween(213, 220),
|
'Ethnic' => (string) $faker->numberBetween(213, 220),
|
||||||
'Citizenship' => 'WNI',
|
'Citizenship' => 'WNI',
|
||||||
'DeathIndicator' => (string) $faker->numberBetween(16, 17),
|
'isDead' => (string) $faker->numberBetween(0, 1),
|
||||||
'PatIdt' => [
|
'PatIdt' => [
|
||||||
'IdentifierType' => 'ID',
|
'IdentifierType' => 'ID',
|
||||||
'Identifier' => $faker->numerify('################')
|
'Identifier' => $faker->numerify('################')
|
||||||
@ -45,7 +45,7 @@ trait CreatesPatients
|
|||||||
'PatCom' => $faker->sentence,
|
'PatCom' => $faker->sentence,
|
||||||
], $overrides);
|
], $overrides);
|
||||||
|
|
||||||
if ($patientPayload['DeathIndicator'] === '16') {
|
if ($patientPayload['isDead'] === '1') {
|
||||||
$patientPayload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
$patientPayload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
||||||
} else {
|
} else {
|
||||||
$patientPayload['DeathDateTime'] = null;
|
$patientPayload['DeathDateTime'] = null;
|
||||||
|
|||||||
@ -6,15 +6,15 @@ use CodeIgniter\Test\FeatureTestTrait;
|
|||||||
use CodeIgniter\Test\CIUnitTestCase;
|
use CodeIgniter\Test\CIUnitTestCase;
|
||||||
use Faker\Factory;
|
use Faker\Factory;
|
||||||
|
|
||||||
class PatientCreateTest extends CIUnitTestCase
|
class PatientCreateTest extends CIUnitTestCase
|
||||||
{
|
{
|
||||||
use FeatureTestTrait;
|
use FeatureTestTrait;
|
||||||
protected $endpoint = 'api/patient';
|
protected $endpoint = 'api/patient';
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 400 - Passed
|
// 400 - Passed
|
||||||
// Validation Gagal - Array Tidak Complete
|
// Validation Gagal - Array Tidak Complete
|
||||||
@ -81,7 +81,7 @@ class PatientCreateTest extends CIUnitTestCase
|
|||||||
"Religion" => (string) $faker->numberBetween(206, 212),
|
"Religion" => (string) $faker->numberBetween(206, 212),
|
||||||
"Ethnic" => (string) $faker->numberBetween(213, 220),
|
"Ethnic" => (string) $faker->numberBetween(213, 220),
|
||||||
"Citizenship" => "WNI",
|
"Citizenship" => "WNI",
|
||||||
"DeathIndicator" => (string) $faker->numberBetween(16, 17),
|
"isDead" => (string) $faker->numberBetween(0, 1),
|
||||||
"LinkTo" => (string) $faker->numberBetween(2, 3),
|
"LinkTo" => (string) $faker->numberBetween(2, 3),
|
||||||
"Custodian" => $i-1,
|
"Custodian" => $i-1,
|
||||||
"PatIdt" => [
|
"PatIdt" => [
|
||||||
@ -93,7 +93,7 @@ class PatientCreateTest extends CIUnitTestCase
|
|||||||
],
|
],
|
||||||
"PatCom" => $faker->sentence,
|
"PatCom" => $faker->sentence,
|
||||||
];
|
];
|
||||||
if($payload['DeathIndicator'] == '16') {
|
if($payload['isDead'] == '1') {
|
||||||
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
||||||
} else {
|
} else {
|
||||||
$payload['DeathDateTime'] = null;
|
$payload['DeathDateTime'] = null;
|
||||||
@ -142,7 +142,7 @@ class PatientCreateTest extends CIUnitTestCase
|
|||||||
"Religion" => (string) $faker->numberBetween(206, 212),
|
"Religion" => (string) $faker->numberBetween(206, 212),
|
||||||
"Ethnic" => (string) $faker->numberBetween(213, 220),
|
"Ethnic" => (string) $faker->numberBetween(213, 220),
|
||||||
"Citizenship" => "WNI",
|
"Citizenship" => "WNI",
|
||||||
"DeathIndicator" => (string) $faker->numberBetween(16, 17),
|
"isDead" => (string) $faker->numberBetween(0, 1),
|
||||||
"LinkTo" => (string) $faker->numberBetween(2, 3),
|
"LinkTo" => (string) $faker->numberBetween(2, 3),
|
||||||
"Custodian" => 1,
|
"Custodian" => 1,
|
||||||
"PatIdt" => [
|
"PatIdt" => [
|
||||||
@ -156,7 +156,7 @@ class PatientCreateTest extends CIUnitTestCase
|
|||||||
"PatCom" => $faker->sentence,
|
"PatCom" => $faker->sentence,
|
||||||
];
|
];
|
||||||
|
|
||||||
if($payload['DeathIndicator'] == '16') {
|
if($payload['isDead'] == '1') {
|
||||||
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
||||||
} else {
|
} else {
|
||||||
$payload['DeathDateTime'] = null;
|
$payload['DeathDateTime'] = null;
|
||||||
@ -201,7 +201,7 @@ class PatientCreateTest extends CIUnitTestCase
|
|||||||
"Religion" => (string) $faker->numberBetween(206, 212),
|
"Religion" => (string) $faker->numberBetween(206, 212),
|
||||||
"Ethnic" => (string) $faker->numberBetween(213, 220),
|
"Ethnic" => (string) $faker->numberBetween(213, 220),
|
||||||
"Citizenship" => "WNI",
|
"Citizenship" => "WNI",
|
||||||
"DeathIndicator" => (string) $faker->numberBetween(16, 17),
|
"isDead" => (string) $faker->numberBetween(0, 1),
|
||||||
"LinkTo" => (string) $faker->numberBetween(2, 3),
|
"LinkTo" => (string) $faker->numberBetween(2, 3),
|
||||||
"Custodian" => 1,
|
"Custodian" => 1,
|
||||||
"PatIdt" => [
|
"PatIdt" => [
|
||||||
@ -212,7 +212,7 @@ class PatientCreateTest extends CIUnitTestCase
|
|||||||
"PatCom" => $faker->sentence,
|
"PatCom" => $faker->sentence,
|
||||||
];
|
];
|
||||||
|
|
||||||
if($payload['DeathIndicator'] == '16') {
|
if($payload['isDead'] == '1') {
|
||||||
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
||||||
} else {
|
} else {
|
||||||
$payload['DeathDateTime'] = null;
|
$payload['DeathDateTime'] = null;
|
||||||
@ -257,7 +257,7 @@ class PatientCreateTest extends CIUnitTestCase
|
|||||||
"Religion" => (string) $faker->numberBetween(206, 212),
|
"Religion" => (string) $faker->numberBetween(206, 212),
|
||||||
"Ethnic" => (string) $faker->numberBetween(213, 220),
|
"Ethnic" => (string) $faker->numberBetween(213, 220),
|
||||||
"Citizenship" => "WNI",
|
"Citizenship" => "WNI",
|
||||||
"DeathIndicator" => (string) $faker->numberBetween(16, 17),
|
"isDead" => (string) $faker->numberBetween(0, 1),
|
||||||
"LinkTo" => (string) $faker->numberBetween(2, 3),
|
"LinkTo" => (string) $faker->numberBetween(2, 3),
|
||||||
"Custodian" => 1,
|
"Custodian" => 1,
|
||||||
"PatIdt" => [
|
"PatIdt" => [
|
||||||
@ -272,7 +272,7 @@ class PatientCreateTest extends CIUnitTestCase
|
|||||||
"PatCom" => null,
|
"PatCom" => null,
|
||||||
];
|
];
|
||||||
|
|
||||||
if($payload['DeathIndicator'] == '16') {
|
if($payload['isDead'] == '1') {
|
||||||
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
||||||
} else {
|
} else {
|
||||||
$payload['DeathDateTime'] = null;
|
$payload['DeathDateTime'] = null;
|
||||||
@ -317,7 +317,7 @@ class PatientCreateTest extends CIUnitTestCase
|
|||||||
"Religion" => (string) $faker->numberBetween(206, 212),
|
"Religion" => (string) $faker->numberBetween(206, 212),
|
||||||
"Ethnic" => (string) $faker->numberBetween(213, 220),
|
"Ethnic" => (string) $faker->numberBetween(213, 220),
|
||||||
"Citizenship" => "WNI",
|
"Citizenship" => "WNI",
|
||||||
"DeathIndicator" => (string) $faker->numberBetween(16, 17),
|
"isDead" => (string) $faker->numberBetween(0, 1),
|
||||||
"LinkTo" => (string) $faker->numberBetween(2, 3),
|
"LinkTo" => (string) $faker->numberBetween(2, 3),
|
||||||
"Custodian" => 1,
|
"Custodian" => 1,
|
||||||
"PatIdt" => [
|
"PatIdt" => [
|
||||||
@ -332,7 +332,7 @@ class PatientCreateTest extends CIUnitTestCase
|
|||||||
"PatCom" => [],
|
"PatCom" => [],
|
||||||
];
|
];
|
||||||
|
|
||||||
if($payload['DeathIndicator'] == '16') {
|
if($payload['isDead'] == '1') {
|
||||||
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
||||||
} else {
|
} else {
|
||||||
$payload['DeathDateTime'] = null;
|
$payload['DeathDateTime'] = null;
|
||||||
|
|||||||
@ -6,23 +6,23 @@ use CodeIgniter\Test\FeatureTestTrait;
|
|||||||
use CodeIgniter\Test\CIUnitTestCase;
|
use CodeIgniter\Test\CIUnitTestCase;
|
||||||
use Faker\Factory;
|
use Faker\Factory;
|
||||||
|
|
||||||
class PatientUpdateTest extends CIUnitTestCase
|
class PatientUpdateTest extends CIUnitTestCase
|
||||||
{
|
{
|
||||||
use FeatureTestTrait;
|
use FeatureTestTrait;
|
||||||
protected $endpoint = 'api/patient';
|
protected $endpoint = 'api/patient';
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 400 - Validation Fail
|
* 400 - Validation Fail
|
||||||
* Coba update tanpa field wajib → harus gagal validasi.
|
* Coba update tanpa field wajib → harus gagal validasi.
|
||||||
*/
|
*/
|
||||||
public function testUpdatePatientValidationFail()
|
public function testUpdatePatientValidationFail()
|
||||||
{
|
{
|
||||||
$payload = [ 'InternalPID' => null, 'NameFirst' => '' ]; // Tidak valid
|
$payload = [ 'InternalPID' => null, 'NameFirst' => '' ]; // Tidak valid
|
||||||
$result = $this->withBodyFormat('json')->call('patch', $this->endpoint . '/1', $payload);
|
$result = $this->withBodyFormat('json')->call('patch', $this->endpoint . '/1', $payload);
|
||||||
|
|
||||||
$result->assertStatus(400);
|
$result->assertStatus(400);
|
||||||
$json = $result->getJSON();
|
$json = $result->getJSON();
|
||||||
@ -38,12 +38,12 @@ class PatientUpdateTest extends CIUnitTestCase
|
|||||||
{
|
{
|
||||||
$faker = Factory::create('id_ID');
|
$faker = Factory::create('id_ID');
|
||||||
|
|
||||||
$payload = [
|
$payload = [
|
||||||
"PatientID" => "SMAJ1",
|
"PatientID" => "SMAJ1",
|
||||||
"EmailAddress1" => 'asaas7890@gmail.com',
|
"EmailAddress1" => 'asaas7890@gmail.com',
|
||||||
"Phone" => $faker->numerify('08##########'),
|
"Phone" => $faker->numerify('08##########'),
|
||||||
"MobilePhone" => $faker->numerify('08##########'),
|
"MobilePhone" => $faker->numerify('08##########'),
|
||||||
'NameFirst' => $faker->firstName,
|
'NameFirst' => $faker->firstName,
|
||||||
'NameLast' => $faker->lastName,
|
'NameLast' => $faker->lastName,
|
||||||
'Sex' => '1',
|
'Sex' => '1',
|
||||||
'Birthdate' => $faker->date('Y-m-d'),
|
'Birthdate' => $faker->date('Y-m-d'),
|
||||||
@ -54,7 +54,7 @@ class PatientUpdateTest extends CIUnitTestCase
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $this->withBodyFormat('json')->call('patch', $this->endpoint . '/999999', $payload);
|
$result = $this->withBodyFormat('json')->call('patch', $this->endpoint . '/999999', $payload);
|
||||||
|
|
||||||
$result->assertStatus(201); // Update returns success even if no rows found (depending on logic)
|
$result->assertStatus(201); // Update returns success even if no rows found (depending on logic)
|
||||||
}
|
}
|
||||||
@ -69,11 +69,11 @@ class PatientUpdateTest extends CIUnitTestCase
|
|||||||
|
|
||||||
// NOTE: Sebaiknya ambil InternalPID yang sudah ada (mock atau dari DB fixture)
|
// NOTE: Sebaiknya ambil InternalPID yang sudah ada (mock atau dari DB fixture)
|
||||||
// Untuk contoh ini kita asumsikan ada ID 1
|
// Untuk contoh ini kita asumsikan ada ID 1
|
||||||
$payload = [
|
$payload = [
|
||||||
"PatientID" => "SMAJ1",
|
"PatientID" => "SMAJ1",
|
||||||
'NameFirst' => $faker->firstName,
|
'NameFirst' => $faker->firstName,
|
||||||
'NameMiddle' => $faker->firstName,
|
'NameMiddle' => $faker->firstName,
|
||||||
'NameLast' => $faker->lastName,
|
'NameLast' => $faker->lastName,
|
||||||
'Sex' => '1',
|
'Sex' => '1',
|
||||||
'Birthdate' => $faker->date('Y-m-d'),
|
'Birthdate' => $faker->date('Y-m-d'),
|
||||||
'EmailAddress1' => 'update_' . $faker->numberBetween(1,999) . '@gmail.com',
|
'EmailAddress1' => 'update_' . $faker->numberBetween(1,999) . '@gmail.com',
|
||||||
@ -86,19 +86,19 @@ class PatientUpdateTest extends CIUnitTestCase
|
|||||||
'IdentifierType' => 'KTP',
|
'IdentifierType' => 'KTP',
|
||||||
'Identifier' => $faker->nik(),
|
'Identifier' => $faker->nik(),
|
||||||
],
|
],
|
||||||
"DeathIndicator" => (string) $faker->numberBetween(16, 17),
|
"isDead" => (string) $faker->numberBetween(0, 1),
|
||||||
'PatCom' => 'Update be',
|
'PatCom' => 'Update be',
|
||||||
'PatAtt' => [
|
'PatAtt' => [
|
||||||
[ 'Address' => '/api/upload/' . $faker->uuid . '.jpg' ],
|
[ 'Address' => '/api/upload/' . $faker->uuid . '.jpg' ],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
if($payload['DeathIndicator'] == '16') {
|
if($payload['isDead'] == '1') {
|
||||||
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
||||||
} else {
|
} else {
|
||||||
$payload['DeathDateTime'] = null;
|
$payload['DeathDateTime'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->withBodyFormat('json')->call('patch', $this->endpoint . '/1', $payload);
|
$result = $this->withBodyFormat('json')->call('patch', $this->endpoint . '/1', $payload);
|
||||||
$result->assertStatus(201);
|
$result->assertStatus(201);
|
||||||
$json = $result->getJSON();
|
$json = $result->getJSON();
|
||||||
$data = json_decode($json, true);
|
$data = json_decode($json, true);
|
||||||
@ -112,11 +112,11 @@ class PatientUpdateTest extends CIUnitTestCase
|
|||||||
{
|
{
|
||||||
$faker = Factory::create('id_ID');
|
$faker = Factory::create('id_ID');
|
||||||
|
|
||||||
$payload = [
|
$payload = [
|
||||||
"PatientID" => "SMAJ1",
|
"PatientID" => "SMAJ1",
|
||||||
'NameFirst' => $faker->firstName,
|
'NameFirst' => $faker->firstName,
|
||||||
'NameMiddle' => $faker->firstName,
|
'NameMiddle' => $faker->firstName,
|
||||||
'NameLast' => $faker->lastName,
|
'NameLast' => $faker->lastName,
|
||||||
'Sex' => '1',
|
'Sex' => '1',
|
||||||
'Birthdate' => $faker->date('Y-m-d'),
|
'Birthdate' => $faker->date('Y-m-d'),
|
||||||
'EmailAddress1' => 'update_' . $faker->numberBetween(1,999) . '@gmail.com',
|
'EmailAddress1' => 'update_' . $faker->numberBetween(1,999) . '@gmail.com',
|
||||||
@ -128,19 +128,19 @@ class PatientUpdateTest extends CIUnitTestCase
|
|||||||
'IdentifierType' => 'KTP',
|
'IdentifierType' => 'KTP',
|
||||||
'Identifier' => $faker->nik(),
|
'Identifier' => $faker->nik(),
|
||||||
],
|
],
|
||||||
"DeathIndicator" => (string) $faker->numberBetween(16, 17),
|
"isDead" => (string) $faker->numberBetween(0, 1),
|
||||||
'PatCom' => null,
|
'PatCom' => null,
|
||||||
'PatAtt' => [
|
'PatAtt' => [
|
||||||
[ 'Address' => '/api/upload/' . $faker->uuid . '.jpg' ],
|
[ 'Address' => '/api/upload/' . $faker->uuid . '.jpg' ],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
if($payload['DeathIndicator'] == '16') {
|
if($payload['isDead'] == '1') {
|
||||||
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
||||||
} else {
|
} else {
|
||||||
$payload['DeathDateTime'] = null;
|
$payload['DeathDateTime'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->withBodyFormat('json')->call('patch', $this->endpoint . '/1', $payload);
|
$result = $this->withBodyFormat('json')->call('patch', $this->endpoint . '/1', $payload);
|
||||||
$result->assertStatus(201);
|
$result->assertStatus(201);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,11 +151,11 @@ class PatientUpdateTest extends CIUnitTestCase
|
|||||||
{
|
{
|
||||||
$faker = Factory::create('id_ID');
|
$faker = Factory::create('id_ID');
|
||||||
|
|
||||||
$payload = [
|
$payload = [
|
||||||
"PatientID" => "SMAJ1",
|
"PatientID" => "SMAJ1",
|
||||||
'NameFirst' => $faker->firstName,
|
'NameFirst' => $faker->firstName,
|
||||||
'NameMiddle' => $faker->firstName,
|
'NameMiddle' => $faker->firstName,
|
||||||
'NameLast' => $faker->lastName,
|
'NameLast' => $faker->lastName,
|
||||||
'Sex' => '1',
|
'Sex' => '1',
|
||||||
'Birthdate' => $faker->date('Y-m-d'),
|
'Birthdate' => $faker->date('Y-m-d'),
|
||||||
'EmailAddress1' => 'update_' . $faker->numberBetween(1,999) . '@gmail.com',
|
'EmailAddress1' => 'update_' . $faker->numberBetween(1,999) . '@gmail.com',
|
||||||
@ -167,17 +167,17 @@ class PatientUpdateTest extends CIUnitTestCase
|
|||||||
'IdentifierType' => 'KTP',
|
'IdentifierType' => 'KTP',
|
||||||
'Identifier' => $faker->nik(),
|
'Identifier' => $faker->nik(),
|
||||||
],
|
],
|
||||||
"DeathIndicator" => (string) $faker->numberBetween(16, 17),
|
"isDead" => (string) $faker->numberBetween(0, 1),
|
||||||
'PatCom' => null,
|
'PatCom' => null,
|
||||||
'PatAtt' => [],
|
'PatAtt' => [],
|
||||||
];
|
];
|
||||||
if($payload['DeathIndicator'] == '16') {
|
if($payload['isDead'] == '1') {
|
||||||
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
||||||
} else {
|
} else {
|
||||||
$payload['DeathDateTime'] = null;
|
$payload['DeathDateTime'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->withBodyFormat('json')->call('patch', $this->endpoint . '/1', $payload);
|
$result = $this->withBodyFormat('json')->call('patch', $this->endpoint . '/1', $payload);
|
||||||
$result->assertStatus(201);
|
$result->assertStatus(201);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,11 +188,11 @@ class PatientUpdateTest extends CIUnitTestCase
|
|||||||
{
|
{
|
||||||
$faker = Factory::create('id_ID');
|
$faker = Factory::create('id_ID');
|
||||||
|
|
||||||
$payload = [
|
$payload = [
|
||||||
"PatientID" => "SMAJ1",
|
"PatientID" => "SMAJ1",
|
||||||
'NameFirst' => $faker->firstName,
|
'NameFirst' => $faker->firstName,
|
||||||
'NameMiddle' => $faker->firstName,
|
'NameMiddle' => $faker->firstName,
|
||||||
'NameLast' => $faker->lastName,
|
'NameLast' => $faker->lastName,
|
||||||
'Sex' => '1',
|
'Sex' => '1',
|
||||||
'Birthdate' => $faker->date('Y-m-d'),
|
'Birthdate' => $faker->date('Y-m-d'),
|
||||||
'EmailAddress1' => 'update_' . $faker->numberBetween(1,999) . '@gmail.com',
|
'EmailAddress1' => 'update_' . $faker->numberBetween(1,999) . '@gmail.com',
|
||||||
@ -204,19 +204,19 @@ class PatientUpdateTest extends CIUnitTestCase
|
|||||||
'IdentifierType' => 'KTP',
|
'IdentifierType' => 'KTP',
|
||||||
'Identifier' => $faker->nik(),
|
'Identifier' => $faker->nik(),
|
||||||
],
|
],
|
||||||
"DeathIndicator" => (string) $faker->numberBetween(16, 17),
|
"isDead" => (string) $faker->numberBetween(0, 1),
|
||||||
'PatCom' => null,
|
'PatCom' => null,
|
||||||
'PatAtt' => [
|
'PatAtt' => [
|
||||||
[ 'Address' => '/api/upload/' . $faker->uuid . '.jpg' ],
|
[ 'Address' => '/api/upload/' . $faker->uuid . '.jpg' ],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
if($payload['DeathIndicator'] == '16') {
|
if($payload['isDead'] == '1') {
|
||||||
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
||||||
} else {
|
} else {
|
||||||
$payload['DeathDateTime'] = null;
|
$payload['DeathDateTime'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->withBodyFormat('json')->call('patch', $this->endpoint . '/1', $payload);
|
$result = $this->withBodyFormat('json')->call('patch', $this->endpoint . '/1', $payload);
|
||||||
$result->assertStatus(201);
|
$result->assertStatus(201);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,11 +227,11 @@ class PatientUpdateTest extends CIUnitTestCase
|
|||||||
{
|
{
|
||||||
$faker = Factory::create('id_ID');
|
$faker = Factory::create('id_ID');
|
||||||
|
|
||||||
$payload = [
|
$payload = [
|
||||||
"PatientID" => "SMAJ1",
|
"PatientID" => "SMAJ1",
|
||||||
'NameFirst' => $faker->firstName,
|
'NameFirst' => $faker->firstName,
|
||||||
'NameMiddle' => $faker->firstName,
|
'NameMiddle' => $faker->firstName,
|
||||||
'NameLast' => $faker->lastName,
|
'NameLast' => $faker->lastName,
|
||||||
'Sex' => '1',
|
'Sex' => '1',
|
||||||
'Birthdate' => $faker->date('Y-m-d'),
|
'Birthdate' => $faker->date('Y-m-d'),
|
||||||
'EmailAddress1' => 'update_' . $faker->numberBetween(1,999) . '@gmail.com',
|
'EmailAddress1' => 'update_' . $faker->numberBetween(1,999) . '@gmail.com',
|
||||||
@ -243,19 +243,19 @@ class PatientUpdateTest extends CIUnitTestCase
|
|||||||
'IdentifierType' => [],
|
'IdentifierType' => [],
|
||||||
'Identifier' => $faker->nik(),
|
'Identifier' => $faker->nik(),
|
||||||
],
|
],
|
||||||
"DeathIndicator" => (string) $faker->numberBetween(16, 17),
|
"isDead" => (string) $faker->numberBetween(0, 1),
|
||||||
'PatCom' => null,
|
'PatCom' => null,
|
||||||
'PatAtt' => [
|
'PatAtt' => [
|
||||||
[ 'Address' => '/api/upload/' . $faker->uuid . '.jpg' ],
|
[ 'Address' => '/api/upload/' . $faker->uuid . '.jpg' ],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
if($payload['DeathIndicator'] == '16') {
|
if($payload['isDead'] == '1') {
|
||||||
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
$payload['DeathDateTime'] = $faker->date('Y-m-d H:i:s');
|
||||||
} else {
|
} else {
|
||||||
$payload['DeathDateTime'] = null;
|
$payload['DeathDateTime'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->withBodyFormat('json')->call('patch', $this->endpoint . '/1', $payload);
|
$result = $this->withBodyFormat('json')->call('patch', $this->endpoint . '/1', $payload);
|
||||||
|
|
||||||
$result->assertStatus(500);
|
$result->assertStatus(500);
|
||||||
$json = $result->getJSON();
|
$json = $result->getJSON();
|
||||||
|
|||||||
@ -234,9 +234,9 @@ class TestCreateVariantsTest extends CIUnitTestCase
|
|||||||
'TestType' => $testType,
|
'TestType' => $testType,
|
||||||
'SeqScr' => 900,
|
'SeqScr' => 900,
|
||||||
'SeqRpt' => 900,
|
'SeqRpt' => 900,
|
||||||
'VisibleScr' => 1,
|
'isVisibleScr' => 1,
|
||||||
'VisibleRpt' => 1,
|
'isVisibleRpt' => 1,
|
||||||
'CountStat' => 1,
|
'isCountStat' => 1,
|
||||||
];
|
];
|
||||||
|
|
||||||
$payload['details'] = $this->normalizeDetails($details);
|
$payload['details'] = $this->normalizeDetails($details);
|
||||||
@ -253,9 +253,9 @@ class TestCreateVariantsTest extends CIUnitTestCase
|
|||||||
'TestType' => 'CALC',
|
'TestType' => 'CALC',
|
||||||
'SeqScr' => 1000,
|
'SeqScr' => 1000,
|
||||||
'SeqRpt' => 1000,
|
'SeqRpt' => 1000,
|
||||||
'VisibleScr' => 1,
|
'isVisibleScr' => 1,
|
||||||
'VisibleRpt' => 1,
|
'isVisibleRpt' => 1,
|
||||||
'CountStat' => 0,
|
'isCountStat' => 0,
|
||||||
'details' => [
|
'details' => [
|
||||||
'DisciplineID' => 2,
|
'DisciplineID' => 2,
|
||||||
'DepartmentID' => 2,
|
'DepartmentID' => 2,
|
||||||
@ -276,9 +276,9 @@ class TestCreateVariantsTest extends CIUnitTestCase
|
|||||||
'TestType' => 'GROUP',
|
'TestType' => 'GROUP',
|
||||||
'SeqScr' => 300,
|
'SeqScr' => 300,
|
||||||
'SeqRpt' => 300,
|
'SeqRpt' => 300,
|
||||||
'VisibleScr' => 1,
|
'isVisibleScr' => 1,
|
||||||
'VisibleRpt' => 1,
|
'isVisibleRpt' => 1,
|
||||||
'CountStat' => 1,
|
'isCountStat' => 1,
|
||||||
'details' => [
|
'details' => [
|
||||||
'members' => array_map(fn ($id) => ['TestSiteID' => $id], $members),
|
'members' => array_map(fn ($id) => ['TestSiteID' => $id], $members),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -197,20 +197,20 @@ class PatientModelTest extends CIUnitTestCase
|
|||||||
$this->assertContains('MaritalStatus', $allowedFields);
|
$this->assertContains('MaritalStatus', $allowedFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test Case 13: Model allowed fields contain death indicator
|
* Test Case 13: Model allowed fields contain death indicator
|
||||||
*/
|
*/
|
||||||
public function testModelHasDeathIndicatorField()
|
public function testModelHasIsDeadField()
|
||||||
{
|
{
|
||||||
$reflection = new \ReflectionClass($this->model);
|
$reflection = new \ReflectionClass($this->model);
|
||||||
$property = $reflection->getProperty('allowedFields');
|
$property = $reflection->getProperty('allowedFields');
|
||||||
$property->setAccessible(true);
|
$property->setAccessible(true);
|
||||||
|
|
||||||
$allowedFields = $property->getValue($this->model);
|
$allowedFields = $property->getValue($this->model);
|
||||||
|
|
||||||
$this->assertContains('DeathIndicator', $allowedFields);
|
$this->assertContains('isDead', $allowedFields);
|
||||||
$this->assertContains('TimeOfDeath', $allowedFields);
|
$this->assertContains('TimeOfDeath', $allowedFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test Case 14: Model has getPatients method
|
* Test Case 14: Model has getPatients method
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user