OEM: add spark command oem:export-lab-templates to regenerate seed files

This commit is contained in:
DevSoftTech Server 2026-04-03 15:29:11 +05:30
parent f79d7f50c9
commit 1be7b51812
8 changed files with 6522 additions and 14 deletions

View File

@ -0,0 +1,331 @@
<?php
namespace App\Commands;
use CodeIgniter\CLI\BaseCommand;
use CodeIgniter\CLI\CLI;
use CodeIgniter\Database\BaseConnection;
/**
* OEM Lab Template Exporter
*
* Reads the current database and re-generates the SQL seed files in
* app/Database/Seeds/LabOemData/ so they can be committed and deployed
* to new/remote installations via git + db:seed.
*
* Usage:
* php spark oem:export-lab-templates
*
* Workflow:
* 1. Add/edit lab templates in the app UI
* 2. php spark oem:export-lab-templates
* 3. git add app/Database/Seeds/LabOemData/ && git commit && git push
* 4. On remote: git pull && php spark db:seed LabTemplateSeeder
*/
class ExportLabTemplates extends BaseCommand
{
protected $group = 'OEM';
protected $name = 'oem:export-lab-templates';
protected $description = 'Export current lab/radiology templates to OEM seed SQL files.';
protected $usage = 'oem:export-lab-templates';
/** Directory where SQL seed files are written. */
private string $outDir;
/** @var BaseConnection */
private $db;
public function run(array $params): void
{
$this->db = \Config\Database::connect();
$this->outDir = APPPATH . 'Database' . DIRECTORY_SEPARATOR . 'Seeds'
. DIRECTORY_SEPARATOR . 'LabOemData' . DIRECTORY_SEPARATOR;
if (! is_dir($this->outDir)) {
mkdir($this->outDir, 0755, true);
}
CLI::write('Exporting lab/radiology templates to OEM seed files…', 'yellow');
CLI::newLine();
$this->exportTable(
filename: '01_lab_rgroups.sql',
table: 'lab_rgroups',
columns: ['mstRGrpKey', 'RepoGrp', 'PreFix', 'Suffix', 'LastNo', 'sort_order', 'Notes'],
schema: $this->schemaLabRgroups(),
);
$this->exportTable(
filename: '02_hc_items_lab.sql',
table: 'hc_items',
columns: ['id', 'itype', 'idesc', 'idesc_detail', 'amount', 'amount_r',
'echs_sr_no', 'update_date', 'last_update_desc'],
schema: $this->schemaHcItems(),
where: 'itype IN (5,6)',
orderBy: 'id ASC',
);
$this->exportTable(
filename: '03_lab_repo.sql',
table: 'lab_repo',
columns: ['mstRepoKey', 'Title', 'RTFData', 'HTMLData', 'GrpKey',
'IncludeHeader', 'IncludeFooter', 'charge_id'],
schema: $this->schemaLabRepo(),
orderBy: 'mstRepoKey ASC',
);
$this->exportTable(
filename: '04_lab_tests.sql',
table: 'lab_tests',
columns: ['mstTestKey', 'Test', 'TestID', 'Result', 'Options', 'Formula',
'VRule', 'VMsg', 'Unit', 'FixedNormals', 'isGenderSpecific', 'FixedNormalsWomen'],
schema: $this->schemaLabTests(),
orderBy: 'mstTestKey ASC',
);
$this->exportTable(
filename: '05_lab_tests_option.sql',
table: 'lab_tests_option',
columns: ['id', 'mstTestKey', 'sort_id', 'option_value', 'option_text', 'option_bold'],
schema: $this->schemaLabTestsOption(),
orderBy: 'mstTestKey ASC, sort_id ASC',
);
$this->exportTable(
filename: '06_lab_repotests.sql',
table: 'lab_repotests',
columns: ['id', 'mstRepoKey', 'mstTestKey', 'EOrder'],
schema: $this->schemaLabRepotests(),
orderBy: 'mstRepoKey ASC, EOrder ASC',
);
$this->exportTable(
filename: '07_radiology_ultrasound_template.sql',
table: 'radiology_ultrasound_template',
columns: ['id', 'template_name', 'keywords', 'title', 'Modality', 'charge_id',
'Findings', 'Impression', 'impression_cat'],
schema: $this->schemaRadiology(),
orderBy: 'id ASC',
);
CLI::newLine();
CLI::write('All files written to:', 'green');
CLI::write(' ' . $this->outDir, 'cyan');
CLI::newLine();
CLI::write('Next steps:', 'yellow');
CLI::write(' git add app/Database/Seeds/LabOemData/');
CLI::write(' git commit -m "OEM: update lab template seed data"');
CLI::write(' git push');
CLI::write(' # On remote server: git pull && php spark db:seed LabTemplateSeeder');
}
// ------------------------------------------------------------------
// Core export logic
// ------------------------------------------------------------------
/**
* Exports a single table to a SQL file.
*
* @param string $filename Output SQL filename (basename only)
* @param string $table Source table name
* @param string[] $columns Columns to export (in order)
* @param string $schema CREATE TABLE IF NOT EXISTS ... statement
* @param string $where Optional WHERE clause (no "WHERE" keyword)
* @param string $orderBy Optional ORDER BY clause (no "ORDER BY" keyword)
*/
private function exportTable(
string $filename,
string $table,
array $columns,
string $schema,
string $where = '',
string $orderBy = ''
): void {
$builder = $this->db->table($table)->select(implode(', ', $columns));
if ($where !== '') {
$builder->where($where, null, false);
}
if ($orderBy !== '') {
$builder->orderBy($orderBy, '', false);
}
$rows = $builder->get()->getResultArray();
$count = count($rows);
$path = $this->outDir . $filename;
// Build SQL content
$sql = $schema . PHP_EOL;
$sql .= PHP_EOL;
if ($count > 0) {
$backtickCols = implode(', ', array_map(fn($c) => "`$c`", $columns));
// Group rows into chunks of 100 for readability
foreach (array_chunk($rows, 100) as $chunk) {
$valuesClauses = array_map(fn($row) => $this->buildValuesClause($row), $chunk);
$sql .= "INSERT IGNORE INTO `$table` ($backtickCols) VALUES" . PHP_EOL;
$sql .= implode(',' . PHP_EOL, $valuesClauses) . ';' . PHP_EOL;
$sql .= PHP_EOL;
}
} else {
$sql .= "-- No rows found in `$table`" . PHP_EOL;
}
file_put_contents($path, $sql, LOCK_EX);
CLI::write(sprintf(' [OK] %-45s %4d rows', $filename, $count), 'green');
}
/**
* Converts one result-array row to a VALUES (...) clause with proper escaping.
*/
private function buildValuesClause(array $row): string
{
$vals = [];
foreach ($row as $value) {
if ($value === null) {
$vals[] = 'NULL';
} else {
// Escape backslashes first, then single quotes
$escaped = str_replace(['\\', "'"], ['\\\\', "\\'"], (string) $value);
$vals[] = "'" . $escaped . "'";
}
}
return '(' . implode(', ', $vals) . ')';
}
// ------------------------------------------------------------------
// Schema definitions (CREATE TABLE IF NOT EXISTS)
// ------------------------------------------------------------------
private function schemaLabRgroups(): string
{
return <<<'SQL'
CREATE TABLE IF NOT EXISTS `lab_rgroups` (
`mstRGrpKey` int NOT NULL AUTO_INCREMENT,
`RepoGrp` varchar(100) NOT NULL,
`PreFix` varchar(3) NOT NULL DEFAULT '0',
`Suffix` varchar(3) NOT NULL DEFAULT '0',
`LastNo` int NOT NULL DEFAULT '0',
`sort_order` int NOT NULL DEFAULT '0',
`Notes` varchar(50) NOT NULL DEFAULT '0',
PRIMARY KEY (`mstRGrpKey`),
UNIQUE KEY `RepoGrp` (`RepoGrp`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
SQL;
}
private function schemaHcItems(): string
{
return <<<'SQL'
CREATE TABLE IF NOT EXISTS `hc_items` (
`id` int NOT NULL AUTO_INCREMENT,
`itype` int DEFAULT '0',
`idesc` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`idesc_detail` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
`amount` decimal(10,2) DEFAULT '0.00',
`amount_r` decimal(10,2) DEFAULT '0.00',
`echs_sr_no` int DEFAULT '0',
`update_date` datetime DEFAULT NULL,
`last_update_desc` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
SQL;
}
private function schemaLabRepo(): string
{
return <<<'SQL'
CREATE TABLE IF NOT EXISTS `lab_repo` (
`mstRepoKey` int NOT NULL AUTO_INCREMENT,
`Title` varchar(100) NOT NULL,
`RTFData` longtext,
`HTMLData` longtext,
`GrpKey` int NOT NULL,
`IncludeHeader` tinyint(1) DEFAULT '1',
`IncludeFooter` tinyint(1) DEFAULT '1',
`charge_id` int DEFAULT '0',
PRIMARY KEY (`mstRepoKey`),
UNIQUE KEY `Title` (`Title`),
KEY `GrpKey` (`GrpKey`),
KEY `charge_id` (`charge_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;
SQL;
}
private function schemaLabTests(): string
{
return <<<'SQL'
CREATE TABLE IF NOT EXISTS `lab_tests` (
`mstTestKey` int NOT NULL AUTO_INCREMENT,
`Test` varchar(80) NOT NULL DEFAULT '0',
`TestID` varchar(15) NOT NULL,
`Result` varchar(180) NOT NULL DEFAULT '0',
`Options` text,
`Formula` varchar(50) DEFAULT NULL,
`VRule` varchar(50) DEFAULT NULL,
`VMsg` varchar(50) DEFAULT NULL,
`Unit` varchar(10) NOT NULL DEFAULT '0',
`FixedNormals` varchar(30) NOT NULL DEFAULT '0',
`isGenderSpecific` int NOT NULL DEFAULT '0',
`FixedNormalsWomen` varchar(30) NOT NULL,
PRIMARY KEY (`mstTestKey`),
UNIQUE KEY `TestID` (`TestID`),
KEY `Test` (`Test`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;
SQL;
}
private function schemaLabTestsOption(): string
{
return <<<'SQL'
CREATE TABLE IF NOT EXISTS `lab_tests_option` (
`id` int NOT NULL AUTO_INCREMENT,
`mstTestKey` int DEFAULT NULL,
`sort_id` int DEFAULT NULL,
`option_value` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`option_text` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
`option_bold` int DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `mstTestKey_sort_id` (`mstTestKey`,`sort_id`),
UNIQUE KEY `mstTestKey_option_value` (`mstTestKey`,`option_value`),
KEY `option_value` (`option_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
SQL;
}
private function schemaLabRepotests(): string
{
return <<<'SQL'
CREATE TABLE IF NOT EXISTS `lab_repotests` (
`id` int NOT NULL AUTO_INCREMENT,
`mstRepoKey` int NOT NULL,
`mstTestKey` int NOT NULL,
`EOrder` tinyint unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`mstRepoKey`,`mstTestKey`),
UNIQUE KEY `id` (`id`),
UNIQUE KEY `mstRepoKey_EOrder` (`mstRepoKey`,`EOrder`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;
SQL;
}
private function schemaRadiology(): string
{
return <<<'SQL'
CREATE TABLE IF NOT EXISTS `radiology_ultrasound_template` (
`id` int NOT NULL AUTO_INCREMENT,
`template_name` varchar(200) CHARACTER SET utf32 COLLATE utf32_unicode_ci DEFAULT NULL,
`keywords` varchar(1000) CHARACTER SET utf32 COLLATE utf32_unicode_ci DEFAULT NULL,
`title` varchar(200) CHARACTER SET utf32 COLLATE utf32_unicode_ci DEFAULT NULL,
`Modality` int DEFAULT NULL,
`charge_id` int DEFAULT NULL,
`Findings` longtext CHARACTER SET utf32 COLLATE utf32_unicode_ci,
`Impression` longtext CHARACTER SET utf32 COLLATE utf32_unicode_ci,
`impression_cat` int DEFAULT '0' COMMENT '0 Not Noteable,1 Noteable',
PRIMARY KEY (`id`) USING BTREE,
KEY `template_name` (`template_name`) USING BTREE,
KEY `title` (`title`) USING BTREE,
KEY `keywords` (`keywords`(768))
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_unicode_ci;
SQL;
}
}

View File

@ -1,4 +1,4 @@
CREATE TABLE IF NOT EXISTS `lab_rgroups` (
CREATE TABLE IF NOT EXISTS `lab_rgroups` (
`mstRGrpKey` int NOT NULL AUTO_INCREMENT,
`RepoGrp` varchar(100) NOT NULL,
`PreFix` varchar(3) NOT NULL DEFAULT '0',
@ -10,4 +10,18 @@
UNIQUE KEY `RepoGrp` (`RepoGrp`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
INSERT IGNORE INTO `lab_rgroups` (`mstRGrpKey`, `RepoGrp`, `PreFix`, `Suffix`, `LastNo`, `sort_order`, `Notes`) VALUES (1,'BIO CHEMISTRY','BIO','',0,2,''),(2,'Biopsy','BP','',0,3,''),(3,'CLINICAL PATHOLOGY','CP','',0,4,''),(4,'MICRO BIOLOGY','CUL','',0,5,''),(5,'General','GEN','',1,6,''),(6,'HAEMATOLOGY','HAE','',0,1,''),(8,'Urine','US','',0,8,''),(9,'Fluid Examination','FE','0',0,9,'0'),(10,'CYTO-PATHOLOGY','CYP','0',0,10,'0'),(11,'HISTOPATHOLOGY','HP','0',0,11,'0'),(12,'IMMUNOLOGY-SEROLOGY','IS','0',0,12,'0'),(13,'ENDOCRINOLOGY','ELO','0',0,13,'0'),(15,'','0','0',0,14,'0');
INSERT IGNORE INTO `lab_rgroups` (`mstRGrpKey`, `RepoGrp`, `PreFix`, `Suffix`, `LastNo`, `sort_order`, `Notes`) VALUES
('1', 'BIO CHEMISTRY', 'BIO', '', '0', '2', ''),
('2', 'Biopsy', 'BP', '', '0', '3', ''),
('3', 'CLINICAL PATHOLOGY', 'CP', '', '0', '4', ''),
('4', 'MICRO BIOLOGY', 'CUL', '', '0', '5', ''),
('5', 'General', 'GEN', '', '1', '6', ''),
('6', 'HAEMATOLOGY', 'HAE', '', '0', '1', ''),
('8', 'Urine', 'US', '', '0', '8', ''),
('9', 'Fluid Examination', 'FE', '0', '0', '9', '0'),
('10', 'CYTO-PATHOLOGY', 'CYP', '0', '0', '10', '0'),
('11', 'HISTOPATHOLOGY', 'HP', '0', '0', '11', '0'),
('12', 'IMMUNOLOGY-SEROLOGY', 'IS', '0', '0', '12', '0'),
('13', 'ENDOCRINOLOGY', 'ELO', '0', '0', '13', '0'),
('15', '', '0', '0', '0', '14', '0');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
CREATE TABLE IF NOT EXISTS `lab_repotests` (
CREATE TABLE IF NOT EXISTS `lab_repotests` (
`id` int NOT NULL AUTO_INCREMENT,
`mstRepoKey` int NOT NULL,
`mstTestKey` int NOT NULL,
@ -7,5 +7,337 @@
UNIQUE KEY `id` (`id`),
UNIQUE KEY `mstRepoKey_EOrder` (`mstRepoKey`,`EOrder`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3;
INSERT IGNORE INTO `lab_repotests` (`id`, `mstRepoKey`, `mstTestKey`, `EOrder`) VALUES (1,1,1,1),(2,1,2,2),(4,1,4,4),(5,1,5,5),(7,1,7,8),(10,1,10,12),(11,1,11,17),(12,1,12,14),(13,1,13,15),(14,1,14,16),(15,1,15,13),(278,1,26,18),(270,1,182,7),(276,1,188,11),(16,2,16,1),(27,2,27,4),(28,2,28,5),(29,2,29,6),(30,2,30,7),(31,2,31,8),(32,2,32,9),(180,2,80,2),(181,2,81,3),(275,2,187,10),(17,3,17,1),(18,3,18,2),(19,3,19,3),(20,3,20,5),(21,3,21,6),(22,3,22,4),(33,4,33,1),(286,4,195,2),(34,5,34,1),(35,6,35,1),(36,6,36,2),(160,7,108,1),(37,8,37,1),(38,9,38,1),(39,10,39,1),(40,11,40,1),(41,11,41,2),(42,11,42,4),(43,11,43,5),(44,11,44,6),(46,11,46,10),(47,11,47,11),(48,11,48,12),(49,11,49,13),(285,11,148,14),(280,11,191,3),(281,11,192,15),(282,11,193,7),(283,11,194,9),(50,12,50,1),(51,12,51,2),(52,13,52,1),(451,13,200,2),(53,14,53,1),(54,14,54,2),(55,14,55,3),(56,14,56,4),(57,15,57,3),(58,15,58,2),(273,15,185,1),(59,16,59,1),(60,16,60,2),(61,17,61,1),(62,18,62,1),(63,18,63,2),(64,18,64,3),(65,18,65,4),(66,18,66,5),(67,18,67,6),(68,18,68,7),(69,18,69,8),(70,18,70,9),(71,18,71,10),(72,18,72,11),(73,18,73,12),(74,18,74,13),(89,19,76,1),(90,19,77,2),(91,19,78,3),(75,20,62,1),(76,20,63,2),(77,20,64,3),(78,20,65,4),(79,20,66,5),(80,20,67,6),(81,20,68,7),(82,20,69,8),(84,20,71,12),(86,20,73,13),(87,20,74,14),(88,20,75,10),(92,21,79,1),(93,21,80,2),(94,21,81,3),(95,22,82,1),(96,23,83,1),(97,24,84,1),(98,25,16,1),(99,26,27,1),(100,27,28,1),(165,28,112,1),(102,29,4,2),(103,29,5,3),(105,29,7,6),(106,29,8,7),(107,29,9,8),(269,29,182,5),(113,30,4,1),(114,31,5,1),(116,33,10,1),(117,34,11,1),(118,35,12,1),(119,36,13,1),(120,37,14,1),(121,38,15,1),(122,39,17,1),(123,40,18,1),(124,41,19,1),(125,42,20,1),(126,43,21,1),(127,44,22,1),(128,45,24,1),(129,46,25,1),(130,47,26,1),(131,48,29,1),(133,50,73,1),(134,51,76,1),(135,52,77,1),(136,54,1,1),(137,55,85,1),(138,55,86,2),(139,55,87,4),(140,55,88,5),(141,55,89,6),(145,55,93,9),(146,55,94,10),(147,55,95,11),(148,55,96,13),(149,55,97,3),(151,55,99,12),(279,55,190,14),(152,56,100,1),(153,56,101,5),(154,56,102,2),(155,56,103,3),(156,56,104,4),(157,57,105,1),(158,57,106,2),(159,58,107,1),(161,59,78,1),(164,62,111,1),(234,63,152,1),(235,63,153,2),(236,63,154,3),(237,63,155,4),(238,63,156,5),(239,63,157,6),(240,63,158,7),(241,63,159,8),(242,63,160,9),(243,63,161,10),(244,63,162,11),(245,63,163,12),(246,63,164,13),(247,63,165,14),(248,63,166,15),(249,63,167,16),(250,63,168,17),(251,63,169,18),(252,63,170,19),(162,64,109,1),(163,65,110,1),(166,66,113,1),(167,67,114,1),(168,68,115,1),(169,68,116,2),(170,69,117,1),(224,70,142,1),(225,70,143,2),(226,70,144,3),(227,70,145,4),(228,70,146,5),(229,70,147,6),(230,70,148,7),(231,70,149,8),(232,70,150,9),(233,70,151,10),(173,71,120,3),(174,71,121,2),(172,72,119,1),(175,73,122,1),(177,74,124,1),(176,75,123,1),(178,76,125,1),(187,77,132,1),(179,78,126,1),(182,79,127,1),(183,79,128,2),(184,79,129,3),(185,80,130,1),(186,81,131,1),(188,82,133,1),(189,83,134,1),(190,86,135,1),(192,87,137,1),(223,88,141,1),(257,91,175,1),(193,92,1,1),(194,92,2,2),(195,92,4,3),(196,92,5,4),(197,92,6,5),(198,92,7,6),(199,92,8,7),(200,92,9,8),(201,92,10,9),(202,92,11,10),(203,92,12,11),(204,92,13,12),(205,92,14,13),(206,92,15,14),(207,92,26,15),(208,93,138,1),(209,95,139,1),(211,97,62,1),(212,97,63,2),(213,97,64,3),(214,97,65,4),(215,97,66,5),(216,97,67,6),(217,97,68,7),(218,97,69,8),(220,97,71,10),(221,97,73,11),(222,97,74,12),(219,97,75,9),(253,98,171,1),(254,99,172,1),(255,100,173,1),(256,101,174,1),(258,102,176,1),(259,103,177,1),(264,128,178,1),(265,128,179,2),(266,128,180,3),(267,128,181,4),(271,129,183,1),(272,130,184,1),(274,131,186,1),(421,132,1,1),(422,132,2,2),(423,132,4,3),(424,132,5,4),(426,132,7,6),(428,132,10,8),(433,132,11,13),(430,132,12,10),(431,132,13,11),(432,132,14,12),(429,132,15,9),(434,132,26,14),(437,132,39,17),(435,132,59,15),(436,132,60,16),(443,132,76,23),(444,132,77,24),(445,132,78,25),(438,132,100,18),(442,132,101,22),(439,132,102,19),(440,132,103,20),(441,132,104,21),(425,132,182,5),(427,132,188,7),(379,133,1,1),(380,133,2,2),(381,133,4,3),(382,133,5,4),(384,133,7,6),(386,133,10,8),(391,133,11,13),(388,133,12,10),(389,133,13,11),(390,133,14,12),(387,133,15,9),(404,133,16,26),(414,133,17,36),(415,133,18,37),(416,133,19,38),(418,133,20,40),(419,133,21,41),(417,133,22,39),(392,133,26,14),(407,133,27,29),(408,133,28,30),(409,133,29,31),(410,133,30,32),(411,133,31,33),(412,133,32,34),(420,133,38,42),(395,133,39,17),(393,133,59,15),(394,133,61,16),(401,133,76,23),(402,133,77,24),(403,133,78,25),(405,133,80,27),(406,133,81,28),(396,133,100,18),(400,133,101,22),(397,133,102,19),(398,133,103,20),(399,133,104,21),(383,133,182,5),(413,133,187,35),(385,133,188,7),(447,133,196,43),(446,134,196,1),(448,135,197,1),(449,136,198,1),(450,137,199,1);
INSERT IGNORE INTO `lab_repotests` (`id`, `mstRepoKey`, `mstTestKey`, `EOrder`) VALUES
('1', '1', '1', '1'),
('2', '1', '2', '2'),
('4', '1', '4', '4'),
('5', '1', '5', '5'),
('270', '1', '182', '7'),
('7', '1', '7', '8'),
('276', '1', '188', '11'),
('10', '1', '10', '12'),
('15', '1', '15', '13'),
('12', '1', '12', '14'),
('13', '1', '13', '15'),
('14', '1', '14', '16'),
('11', '1', '11', '17'),
('278', '1', '26', '18'),
('16', '2', '16', '1'),
('180', '2', '80', '2'),
('181', '2', '81', '3'),
('27', '2', '27', '4'),
('28', '2', '28', '5'),
('29', '2', '29', '6'),
('30', '2', '30', '7'),
('31', '2', '31', '8'),
('32', '2', '32', '9'),
('275', '2', '187', '10'),
('17', '3', '17', '1'),
('18', '3', '18', '2'),
('19', '3', '19', '3'),
('22', '3', '22', '4'),
('20', '3', '20', '5'),
('21', '3', '21', '6'),
('33', '4', '33', '1'),
('286', '4', '195', '2'),
('34', '5', '34', '1'),
('35', '6', '35', '1'),
('36', '6', '36', '2'),
('160', '7', '108', '1'),
('37', '8', '37', '1'),
('38', '9', '38', '1'),
('39', '10', '39', '1'),
('40', '11', '40', '1'),
('41', '11', '41', '2'),
('280', '11', '191', '3'),
('42', '11', '42', '4'),
('43', '11', '43', '5'),
('44', '11', '44', '6'),
('282', '11', '193', '7'),
('283', '11', '194', '9'),
('46', '11', '46', '10'),
('47', '11', '47', '11'),
('48', '11', '48', '12'),
('49', '11', '49', '13'),
('285', '11', '148', '14'),
('281', '11', '192', '15'),
('50', '12', '50', '1'),
('51', '12', '51', '2'),
('52', '13', '52', '1'),
('451', '13', '200', '2'),
('53', '14', '53', '1'),
('54', '14', '54', '2'),
('55', '14', '55', '3'),
('56', '14', '56', '4'),
('273', '15', '185', '1'),
('58', '15', '58', '2'),
('57', '15', '57', '3'),
('59', '16', '59', '1'),
('60', '16', '60', '2'),
('61', '17', '61', '1'),
('62', '18', '62', '1'),
('63', '18', '63', '2'),
('64', '18', '64', '3'),
('65', '18', '65', '4'),
('66', '18', '66', '5'),
('67', '18', '67', '6'),
('68', '18', '68', '7'),
('69', '18', '69', '8'),
('70', '18', '70', '9'),
('71', '18', '71', '10'),
('72', '18', '72', '11'),
('73', '18', '73', '12'),
('74', '18', '74', '13'),
('89', '19', '76', '1'),
('90', '19', '77', '2'),
('91', '19', '78', '3'),
('75', '20', '62', '1'),
('76', '20', '63', '2'),
('77', '20', '64', '3'),
('78', '20', '65', '4'),
('79', '20', '66', '5'),
('80', '20', '67', '6'),
('81', '20', '68', '7'),
('82', '20', '69', '8'),
('88', '20', '75', '10'),
('84', '20', '71', '12'),
('86', '20', '73', '13'),
('87', '20', '74', '14'),
('92', '21', '79', '1'),
('93', '21', '80', '2'),
('94', '21', '81', '3'),
('95', '22', '82', '1'),
('96', '23', '83', '1');
INSERT IGNORE INTO `lab_repotests` (`id`, `mstRepoKey`, `mstTestKey`, `EOrder`) VALUES
('97', '24', '84', '1'),
('98', '25', '16', '1'),
('99', '26', '27', '1'),
('100', '27', '28', '1'),
('165', '28', '112', '1'),
('102', '29', '4', '2'),
('103', '29', '5', '3'),
('269', '29', '182', '5'),
('105', '29', '7', '6'),
('106', '29', '8', '7'),
('107', '29', '9', '8'),
('113', '30', '4', '1'),
('114', '31', '5', '1'),
('116', '33', '10', '1'),
('117', '34', '11', '1'),
('118', '35', '12', '1'),
('119', '36', '13', '1'),
('120', '37', '14', '1'),
('121', '38', '15', '1'),
('122', '39', '17', '1'),
('123', '40', '18', '1'),
('124', '41', '19', '1'),
('125', '42', '20', '1'),
('126', '43', '21', '1'),
('127', '44', '22', '1'),
('128', '45', '24', '1'),
('129', '46', '25', '1'),
('130', '47', '26', '1'),
('131', '48', '29', '1'),
('133', '50', '73', '1'),
('134', '51', '76', '1'),
('135', '52', '77', '1'),
('136', '54', '1', '1'),
('137', '55', '85', '1'),
('138', '55', '86', '2'),
('149', '55', '97', '3'),
('139', '55', '87', '4'),
('140', '55', '88', '5'),
('141', '55', '89', '6'),
('145', '55', '93', '9'),
('146', '55', '94', '10'),
('147', '55', '95', '11'),
('151', '55', '99', '12'),
('148', '55', '96', '13'),
('279', '55', '190', '14'),
('152', '56', '100', '1'),
('154', '56', '102', '2'),
('155', '56', '103', '3'),
('156', '56', '104', '4'),
('153', '56', '101', '5'),
('157', '57', '105', '1'),
('158', '57', '106', '2'),
('159', '58', '107', '1'),
('161', '59', '78', '1'),
('164', '62', '111', '1'),
('234', '63', '152', '1'),
('235', '63', '153', '2'),
('236', '63', '154', '3'),
('237', '63', '155', '4'),
('238', '63', '156', '5'),
('239', '63', '157', '6'),
('240', '63', '158', '7'),
('241', '63', '159', '8'),
('242', '63', '160', '9'),
('243', '63', '161', '10'),
('244', '63', '162', '11'),
('245', '63', '163', '12'),
('246', '63', '164', '13'),
('247', '63', '165', '14'),
('248', '63', '166', '15'),
('249', '63', '167', '16'),
('250', '63', '168', '17'),
('251', '63', '169', '18'),
('252', '63', '170', '19'),
('162', '64', '109', '1'),
('163', '65', '110', '1'),
('166', '66', '113', '1'),
('167', '67', '114', '1'),
('168', '68', '115', '1'),
('169', '68', '116', '2'),
('170', '69', '117', '1'),
('224', '70', '142', '1'),
('225', '70', '143', '2'),
('226', '70', '144', '3'),
('227', '70', '145', '4'),
('228', '70', '146', '5'),
('229', '70', '147', '6'),
('230', '70', '148', '7'),
('231', '70', '149', '8'),
('232', '70', '150', '9'),
('233', '70', '151', '10'),
('174', '71', '121', '2'),
('173', '71', '120', '3'),
('172', '72', '119', '1'),
('175', '73', '122', '1'),
('177', '74', '124', '1'),
('176', '75', '123', '1'),
('178', '76', '125', '1'),
('187', '77', '132', '1'),
('179', '78', '126', '1');
INSERT IGNORE INTO `lab_repotests` (`id`, `mstRepoKey`, `mstTestKey`, `EOrder`) VALUES
('182', '79', '127', '1'),
('183', '79', '128', '2'),
('184', '79', '129', '3'),
('185', '80', '130', '1'),
('186', '81', '131', '1'),
('188', '82', '133', '1'),
('189', '83', '134', '1'),
('190', '86', '135', '1'),
('192', '87', '137', '1'),
('223', '88', '141', '1'),
('257', '91', '175', '1'),
('193', '92', '1', '1'),
('194', '92', '2', '2'),
('195', '92', '4', '3'),
('196', '92', '5', '4'),
('197', '92', '6', '5'),
('198', '92', '7', '6'),
('199', '92', '8', '7'),
('200', '92', '9', '8'),
('201', '92', '10', '9'),
('202', '92', '11', '10'),
('203', '92', '12', '11'),
('204', '92', '13', '12'),
('205', '92', '14', '13'),
('206', '92', '15', '14'),
('207', '92', '26', '15'),
('208', '93', '138', '1'),
('209', '95', '139', '1'),
('211', '97', '62', '1'),
('212', '97', '63', '2'),
('213', '97', '64', '3'),
('214', '97', '65', '4'),
('215', '97', '66', '5'),
('216', '97', '67', '6'),
('217', '97', '68', '7'),
('218', '97', '69', '8'),
('219', '97', '75', '9'),
('220', '97', '71', '10'),
('221', '97', '73', '11'),
('222', '97', '74', '12'),
('253', '98', '171', '1'),
('254', '99', '172', '1'),
('255', '100', '173', '1'),
('256', '101', '174', '1'),
('258', '102', '176', '1'),
('259', '103', '177', '1'),
('264', '128', '178', '1'),
('265', '128', '179', '2'),
('266', '128', '180', '3'),
('267', '128', '181', '4'),
('271', '129', '183', '1'),
('272', '130', '184', '1'),
('274', '131', '186', '1'),
('421', '132', '1', '1'),
('422', '132', '2', '2'),
('423', '132', '4', '3'),
('424', '132', '5', '4'),
('425', '132', '182', '5'),
('426', '132', '7', '6'),
('427', '132', '188', '7'),
('428', '132', '10', '8'),
('429', '132', '15', '9'),
('430', '132', '12', '10'),
('431', '132', '13', '11'),
('432', '132', '14', '12'),
('433', '132', '11', '13'),
('434', '132', '26', '14'),
('435', '132', '59', '15'),
('436', '132', '60', '16'),
('437', '132', '39', '17'),
('438', '132', '100', '18'),
('439', '132', '102', '19'),
('440', '132', '103', '20'),
('441', '132', '104', '21'),
('442', '132', '101', '22'),
('443', '132', '76', '23'),
('444', '132', '77', '24'),
('445', '132', '78', '25'),
('379', '133', '1', '1'),
('380', '133', '2', '2'),
('381', '133', '4', '3'),
('382', '133', '5', '4'),
('383', '133', '182', '5'),
('384', '133', '7', '6'),
('385', '133', '188', '7'),
('386', '133', '10', '8'),
('387', '133', '15', '9'),
('388', '133', '12', '10'),
('389', '133', '13', '11'),
('390', '133', '14', '12'),
('391', '133', '11', '13'),
('392', '133', '26', '14'),
('393', '133', '59', '15'),
('394', '133', '61', '16'),
('395', '133', '39', '17'),
('396', '133', '100', '18'),
('397', '133', '102', '19'),
('398', '133', '103', '20'),
('399', '133', '104', '21'),
('400', '133', '101', '22');
INSERT IGNORE INTO `lab_repotests` (`id`, `mstRepoKey`, `mstTestKey`, `EOrder`) VALUES
('401', '133', '76', '23'),
('402', '133', '77', '24'),
('403', '133', '78', '25'),
('404', '133', '16', '26'),
('405', '133', '80', '27'),
('406', '133', '81', '28'),
('407', '133', '27', '29'),
('408', '133', '28', '30'),
('409', '133', '29', '31'),
('410', '133', '30', '32'),
('411', '133', '31', '33'),
('412', '133', '32', '34'),
('413', '133', '187', '35'),
('414', '133', '17', '36'),
('415', '133', '18', '37'),
('416', '133', '19', '38'),
('417', '133', '22', '39'),
('418', '133', '20', '40'),
('419', '133', '21', '41'),
('420', '133', '38', '42'),
('447', '133', '196', '43'),
('446', '134', '196', '1'),
('448', '135', '197', '1'),
('449', '136', '198', '1'),
('450', '137', '199', '1');

File diff suppressed because one or more lines are too long