diff --git a/src/controllers/ProfileFamilyMotherController.ts b/src/controllers/ProfileFamilyMotherController.ts index ca042a60..ba3fe3da 100644 --- a/src/controllers/ProfileFamilyMotherController.ts +++ b/src/controllers/ProfileFamilyMotherController.ts @@ -87,6 +87,7 @@ export class ProfileFamilyMotherController extends Controller { motherPrefix: y.motherPrefix, motherFirstName: y.motherFirstName, motherLastName: y.motherLastName, + motherLastNameOld: y.motherLastNameOld, motherCareer: y.motherCareer, motherCitizenId: y.motherCitizenId, motherLive: y.motherLive, @@ -127,6 +128,7 @@ export class ProfileFamilyMotherController extends Controller { motherPrefix: y.motherPrefix, motherFirstName: y.motherFirstName, motherLastName: y.motherLastName, + motherLastNameOld: y.motherLastNameOld, motherCareer: y.motherCareer, motherCitizenId: y.motherCitizenId, motherLive: y.motherLive, diff --git a/src/controllers/ProfileFamilyMotherEmployeeController.ts b/src/controllers/ProfileFamilyMotherEmployeeController.ts index b9bd15a0..606cd817 100644 --- a/src/controllers/ProfileFamilyMotherEmployeeController.ts +++ b/src/controllers/ProfileFamilyMotherEmployeeController.ts @@ -87,6 +87,7 @@ export class ProfileFamilyMotherEmployeeController extends Controller { motherPrefix: y.motherPrefix, motherFirstName: y.motherFirstName, motherLastName: y.motherLastName, + motherLastNameOld: y.motherLastNameOld, motherCareer: y.motherCareer, motherCitizenId: y.motherCitizenId, motherLive: y.motherLive, @@ -130,6 +131,7 @@ export class ProfileFamilyMotherEmployeeController extends Controller { motherPrefix: y.motherPrefix, motherFirstName: y.motherFirstName, motherLastName: y.motherLastName, + motherLastNameOld: y.motherLastNameOld, motherCareer: y.motherCareer, motherCitizenId: y.motherCitizenId, motherLive: y.motherLive, diff --git a/src/controllers/ProfileFamilyMotherEmployeeTempController.ts b/src/controllers/ProfileFamilyMotherEmployeeTempController.ts index 576146b1..e985e9c3 100644 --- a/src/controllers/ProfileFamilyMotherEmployeeTempController.ts +++ b/src/controllers/ProfileFamilyMotherEmployeeTempController.ts @@ -86,6 +86,7 @@ export class ProfileFamilyMotherEmployeeTempController extends Controller { motherPrefix: y.motherPrefix, motherFirstName: y.motherFirstName, motherLastName: y.motherLastName, + motherLastNameOld: y.motherLastNameOld, motherCareer: y.motherCareer, motherCitizenId: y.motherCitizenId, motherLive: y.motherLive, @@ -129,6 +130,7 @@ export class ProfileFamilyMotherEmployeeTempController extends Controller { motherPrefix: y.motherPrefix, motherFirstName: y.motherFirstName, motherLastName: y.motherLastName, + motherLastNameOld: y.motherLastNameOld, motherCareer: y.motherCareer, motherCitizenId: y.motherCitizenId, motherLive: y.motherLive, diff --git a/src/entities/ProfileFamilyMother.ts b/src/entities/ProfileFamilyMother.ts index 3c87ba1b..bbae0100 100644 --- a/src/entities/ProfileFamilyMother.ts +++ b/src/entities/ProfileFamilyMother.ts @@ -27,6 +27,13 @@ export class ProfileFamilyMother extends EntityBase { }) motherLastName: string; + @Column({ + nullable: true, + default: null, + comment: "นามสกุลมารดาเดิม", + }) + motherLastNameOld: string; + @Column({ nullable: true, default: null, diff --git a/src/entities/ProfileFamilyMotherHistory.ts b/src/entities/ProfileFamilyMotherHistory.ts index 457dc15a..7014b507 100644 --- a/src/entities/ProfileFamilyMotherHistory.ts +++ b/src/entities/ProfileFamilyMotherHistory.ts @@ -25,6 +25,13 @@ export class ProfileFamilyMotherHistory extends EntityBase { }) motherLastName: string; + @Column({ + nullable: true, + default: null, + comment: "นามสกุลมารดาเดิม", + }) + motherLastNameOld: string; + @Column({ nullable: true, default: null, diff --git a/src/migration/1730950041973-update_table_profilefam_add_motherLastNameOld.ts b/src/migration/1730950041973-update_table_profilefam_add_motherLastNameOld.ts new file mode 100644 index 00000000..0022494b --- /dev/null +++ b/src/migration/1730950041973-update_table_profilefam_add_motherLastNameOld.ts @@ -0,0 +1,244 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateTableProfilefamAddMotherLastNameOld1730950041973 implements MigrationInterface { + name = 'UpdateTableProfilefamAddMotherLastNameOld1730950041973' + + public async up(queryRunner: QueryRunner): Promise { + // await queryRunner.query(`DELETE FROM \`bma_ehr_organization_demo\`.\`typeorm_metadata\` WHERE \`type\` = ? AND \`name\` = ? AND \`schema\` = ?`, ["VIEW","view_director_acting","bma_ehr_organization_demo"]); + // await queryRunner.query(`DROP VIEW \`view_director_acting\``); + // await queryRunner.query(`DELETE FROM \`bma_ehr_organization_demo\`.\`typeorm_metadata\` WHERE \`type\` = ? AND \`name\` = ? AND \`schema\` = ?`, ["VIEW","view_director","bma_ehr_organization_demo"]); + // await queryRunner.query(`DROP VIEW \`view_director\``); + // await queryRunner.query(`DELETE FROM \`bma_ehr_organization_demo\`.\`typeorm_metadata\` WHERE \`type\` = ? AND \`name\` = ? AND \`schema\` = ?`, ["VIEW","view_director_acting","bma_ehr_organization_demo"]); + // await queryRunner.query(`DROP VIEW \`view_director_acting\``); + // await queryRunner.query(`DELETE FROM \`bma_ehr_organization_demo\`.\`typeorm_metadata\` WHERE \`type\` = ? AND \`name\` = ? AND \`schema\` = ?`, ["VIEW","view_director","bma_ehr_organization_demo"]); + // await queryRunner.query(`DROP VIEW \`view_director\``); + // await queryRunner.query(`DELETE FROM \`bma_ehr_organization_demo\`.\`typeorm_metadata\` WHERE \`type\` = ? AND \`name\` = ? AND \`schema\` = ?`, ["VIEW","view_director_acting","bma_ehr_organization_demo"]); + // await queryRunner.query(`DROP VIEW \`view_director_acting\``); + // await queryRunner.query(`DELETE FROM \`bma_ehr_organization_demo\`.\`typeorm_metadata\` WHERE \`type\` = ? AND \`name\` = ? AND \`schema\` = ?`, ["VIEW","view_director","bma_ehr_organization_demo"]); + // await queryRunner.query(`DROP VIEW \`view_director\``); + // await queryRunner.query(`DELETE FROM \`bma_ehr_organization_demo\`.\`typeorm_metadata\` WHERE \`type\` = ? AND \`name\` = ? AND \`schema\` = ?`, ["VIEW","view_director_acting","bma_ehr_organization_demo"]); + // await queryRunner.query(`DROP VIEW \`view_director_acting\``); + // await queryRunner.query(`DELETE FROM \`bma_ehr_organization_demo\`.\`typeorm_metadata\` WHERE \`type\` = ? AND \`name\` = ? AND \`schema\` = ?`, ["VIEW","view_director","bma_ehr_organization_demo"]); + // await queryRunner.query(`DROP VIEW \`view_director\``); + // await queryRunner.query(`DELETE FROM \`bma_ehr_organization_demo\`.\`typeorm_metadata\` WHERE \`type\` = ? AND \`name\` = ? AND \`schema\` = ?`, ["VIEW","view_director_acting","bma_ehr_organization_demo"]); + // await queryRunner.query(`DROP VIEW \`view_director_acting\``); + await queryRunner.query(`ALTER TABLE \`profileFamilyMotherHistory\` ADD \`motherLastNameOld\` varchar(255) NULL COMMENT 'นามสกุลมารดาเดิม'`); + await queryRunner.query(`ALTER TABLE \`profileFamilyMother\` ADD \`motherLastNameOld\` varchar(255) NULL COMMENT 'นามสกุลมารดาเดิม'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileFamilyMother\` DROP COLUMN \`motherLastNameOld\``); + await queryRunner.query(`ALTER TABLE \`profileFamilyMotherHistory\` DROP COLUMN \`motherLastNameOld\``); + // await queryRunner.query(`CREATE VIEW \`view_director_acting\` AS SELECT + // \`profileChild\`.\`id\` AS \`Id\`, + // \`profileChild\`.\`prefix\` AS \`prefix\`, + // \`profileChild\`.\`firstName\` AS \`firstName\`, + // \`profileChild\`.\`lastName\` AS \`lastName\`, + // \`profileChild\`.\`citizenId\` AS \`citizenId\`, + // \`profileChild\`.\`position\` AS \`position\`, + // NULL AS \`posNo\`, + // \`posMasterChild\`.\`isDirector\` AS \`isDirector\`, + // \`bma_ehr_organization_demo\`.\`posLevel\`.\`posLevelName\` AS \`posLevel\`, + // \`bma_ehr_organization_demo\`.\`posType\`.\`posTypeName\` AS \`posType\`, + // \`bma_ehr_organization_demo\`.\`posMaster\`.\`orgRootId\` AS \`orgRootId\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`id\` AS \`actFullNameId\`, + // CONCAT(\`bma_ehr_organization_demo\`.\`profile\`.\`prefix\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`firstName\`, + // ' ', + // \`bma_ehr_organization_demo\`.\`profile\`.\`lastName\`) AS \`actFullName\` + // FROM + // ((((((\`bma_ehr_organization_demo\`.\`posMasterAct\` + // JOIN \`bma_ehr_organization_demo\`.\`posMaster\` \`posMasterChild\` ON ((\`bma_ehr_organization_demo\`.\`posMasterAct\`.\`posMasterChildId\` = \`posMasterChild\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`profile\` \`profileChild\` ON ((\`posMasterChild\`.\`current_holderId\` = \`profileChild\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posLevel\` ON ((\`profileChild\`.\`posLevelId\` = \`bma_ehr_organization_demo\`.\`posLevel\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posType\` ON ((\`profileChild\`.\`posTypeId\` = \`bma_ehr_organization_demo\`.\`posType\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posMaster\` ON ((\`bma_ehr_organization_demo\`.\`posMasterAct\`.\`posMasterId\` = \`bma_ehr_organization_demo\`.\`posMaster\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`profile\` ON ((\`bma_ehr_organization_demo\`.\`posMaster\`.\`current_holderId\` = \`bma_ehr_organization_demo\`.\`profile\`.\`id\`)))`); + // await queryRunner.query(`INSERT INTO \`bma_ehr_organization_demo\`.\`typeorm_metadata\`(\`database\`, \`schema\`, \`table\`, \`type\`, \`name\`, \`value\`) VALUES (DEFAULT, ?, DEFAULT, ?, ?, ?)`, ["bma_ehr_organization_demo","VIEW","view_director_acting","SELECT \n `profileChild`.`id` AS `Id`,\n `profileChild`.`prefix` AS `prefix`,\n `profileChild`.`firstName` AS `firstName`,\n `profileChild`.`lastName` AS `lastName`,\n `profileChild`.`citizenId` AS `citizenId`,\n `profileChild`.`position` AS `position`,\n NULL AS `posNo`,\n `posMasterChild`.`isDirector` AS `isDirector`,\n `bma_ehr_organization_demo`.`posLevel`.`posLevelName` AS `posLevel`,\n `bma_ehr_organization_demo`.`posType`.`posTypeName` AS `posType`,\n `bma_ehr_organization_demo`.`posMaster`.`orgRootId` AS `orgRootId`,\n `bma_ehr_organization_demo`.`profile`.`id` AS `actFullNameId`,\n CONCAT(`bma_ehr_organization_demo`.`profile`.`prefix`,\n `bma_ehr_organization_demo`.`profile`.`firstName`,\n ' ',\n `bma_ehr_organization_demo`.`profile`.`lastName`) AS `actFullName`\n FROM\n ((((((`bma_ehr_organization_demo`.`posMasterAct`\n JOIN `bma_ehr_organization_demo`.`posMaster` `posMasterChild` ON ((`bma_ehr_organization_demo`.`posMasterAct`.`posMasterChildId` = `posMasterChild`.`id`)))\n JOIN `bma_ehr_organization_demo`.`profile` `profileChild` ON ((`posMasterChild`.`current_holderId` = `profileChild`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posLevel` ON ((`profileChild`.`posLevelId` = `bma_ehr_organization_demo`.`posLevel`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posType` ON ((`profileChild`.`posTypeId` = `bma_ehr_organization_demo`.`posType`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posMaster` ON ((`bma_ehr_organization_demo`.`posMasterAct`.`posMasterId` = `bma_ehr_organization_demo`.`posMaster`.`id`)))\n JOIN `bma_ehr_organization_demo`.`profile` ON ((`bma_ehr_organization_demo`.`posMaster`.`current_holderId` = `bma_ehr_organization_demo`.`profile`.`id`)))"]); + // await queryRunner.query(`CREATE VIEW \`view_director\` AS SELECT + // \`bma_ehr_organization_demo\`.\`profile\`.\`id\` AS \`Id\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`prefix\` AS \`prefix\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`firstName\` AS \`firstName\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`lastName\` AS \`lastName\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`citizenId\` AS \`citizenId\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`position\` AS \`position\`, + // NULL AS \`posNo\`, + // \`bma_ehr_organization_demo\`.\`posMaster\`.\`isDirector\` AS \`isDirector\`, + // \`bma_ehr_organization_demo\`.\`posLevel\`.\`posLevelName\` AS \`posLevel\`, + // \`bma_ehr_organization_demo\`.\`posType\`.\`posTypeName\` AS \`posType\`, + // \`bma_ehr_organization_demo\`.\`posMaster\`.\`orgRootId\` AS \`orgRootId\`, + // NULL AS \`actFullNameId\`, + // NULL AS \`actFullName\` + // FROM + // (((\`bma_ehr_organization_demo\`.\`posMaster\` + // JOIN \`bma_ehr_organization_demo\`.\`profile\` ON ((\`bma_ehr_organization_demo\`.\`posMaster\`.\`current_holderId\` = \`bma_ehr_organization_demo\`.\`profile\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posLevel\` ON ((\`bma_ehr_organization_demo\`.\`profile\`.\`posLevelId\` = \`bma_ehr_organization_demo\`.\`posLevel\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posType\` ON ((\`bma_ehr_organization_demo\`.\`profile\`.\`posTypeId\` = \`bma_ehr_organization_demo\`.\`posType\`.\`id\`)))`); + // await queryRunner.query(`INSERT INTO \`bma_ehr_organization_demo\`.\`typeorm_metadata\`(\`database\`, \`schema\`, \`table\`, \`type\`, \`name\`, \`value\`) VALUES (DEFAULT, ?, DEFAULT, ?, ?, ?)`, ["bma_ehr_organization_demo","VIEW","view_director","SELECT \n `bma_ehr_organization_demo`.`profile`.`id` AS `Id`,\n `bma_ehr_organization_demo`.`profile`.`prefix` AS `prefix`,\n `bma_ehr_organization_demo`.`profile`.`firstName` AS `firstName`,\n `bma_ehr_organization_demo`.`profile`.`lastName` AS `lastName`,\n `bma_ehr_organization_demo`.`profile`.`citizenId` AS `citizenId`,\n `bma_ehr_organization_demo`.`profile`.`position` AS `position`,\n NULL AS `posNo`,\n `bma_ehr_organization_demo`.`posMaster`.`isDirector` AS `isDirector`,\n `bma_ehr_organization_demo`.`posLevel`.`posLevelName` AS `posLevel`,\n `bma_ehr_organization_demo`.`posType`.`posTypeName` AS `posType`,\n `bma_ehr_organization_demo`.`posMaster`.`orgRootId` AS `orgRootId`,\n NULL AS `actFullNameId`,\n NULL AS `actFullName`\n FROM\n (((`bma_ehr_organization_demo`.`posMaster`\n JOIN `bma_ehr_organization_demo`.`profile` ON ((`bma_ehr_organization_demo`.`posMaster`.`current_holderId` = `bma_ehr_organization_demo`.`profile`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posLevel` ON ((`bma_ehr_organization_demo`.`profile`.`posLevelId` = `bma_ehr_organization_demo`.`posLevel`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posType` ON ((`bma_ehr_organization_demo`.`profile`.`posTypeId` = `bma_ehr_organization_demo`.`posType`.`id`)))"]); + // await queryRunner.query(`CREATE VIEW \`view_director_acting\` AS SELECT + // \`profileChild\`.\`id\` AS \`Id\`, + // \`profileChild\`.\`prefix\` AS \`prefix\`, + // \`profileChild\`.\`firstName\` AS \`firstName\`, + // \`profileChild\`.\`lastName\` AS \`lastName\`, + // \`profileChild\`.\`citizenId\` AS \`citizenId\`, + // \`profileChild\`.\`position\` AS \`position\`, + // NULL AS \`posNo\`, + // \`posMasterChild\`.\`isDirector\` AS \`isDirector\`, + // \`bma_ehr_organization_demo\`.\`posLevel\`.\`posLevelName\` AS \`posLevel\`, + // \`bma_ehr_organization_demo\`.\`posType\`.\`posTypeName\` AS \`posType\`, + // \`bma_ehr_organization_demo\`.\`posMaster\`.\`orgRootId\` AS \`orgRootId\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`id\` AS \`actFullNameId\`, + // CONCAT(\`bma_ehr_organization_demo\`.\`profile\`.\`prefix\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`firstName\`, + // ' ', + // \`bma_ehr_organization_demo\`.\`profile\`.\`lastName\`) AS \`actFullName\` + // FROM + // ((((((\`bma_ehr_organization_demo\`.\`posMasterAct\` + // JOIN \`bma_ehr_organization_demo\`.\`posMaster\` \`posMasterChild\` ON ((\`bma_ehr_organization_demo\`.\`posMasterAct\`.\`posMasterChildId\` = \`posMasterChild\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`profile\` \`profileChild\` ON ((\`posMasterChild\`.\`current_holderId\` = \`profileChild\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posLevel\` ON ((\`profileChild\`.\`posLevelId\` = \`bma_ehr_organization_demo\`.\`posLevel\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posType\` ON ((\`profileChild\`.\`posTypeId\` = \`bma_ehr_organization_demo\`.\`posType\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posMaster\` ON ((\`bma_ehr_organization_demo\`.\`posMasterAct\`.\`posMasterId\` = \`bma_ehr_organization_demo\`.\`posMaster\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`profile\` ON ((\`bma_ehr_organization_demo\`.\`posMaster\`.\`current_holderId\` = \`bma_ehr_organization_demo\`.\`profile\`.\`id\`)))`); + // await queryRunner.query(`INSERT INTO \`bma_ehr_organization_demo\`.\`typeorm_metadata\`(\`database\`, \`schema\`, \`table\`, \`type\`, \`name\`, \`value\`) VALUES (DEFAULT, ?, DEFAULT, ?, ?, ?)`, ["bma_ehr_organization_demo","VIEW","view_director_acting","SELECT \n `profileChild`.`id` AS `Id`,\n `profileChild`.`prefix` AS `prefix`,\n `profileChild`.`firstName` AS `firstName`,\n `profileChild`.`lastName` AS `lastName`,\n `profileChild`.`citizenId` AS `citizenId`,\n `profileChild`.`position` AS `position`,\n NULL AS `posNo`,\n `posMasterChild`.`isDirector` AS `isDirector`,\n `bma_ehr_organization_demo`.`posLevel`.`posLevelName` AS `posLevel`,\n `bma_ehr_organization_demo`.`posType`.`posTypeName` AS `posType`,\n `bma_ehr_organization_demo`.`posMaster`.`orgRootId` AS `orgRootId`,\n `bma_ehr_organization_demo`.`profile`.`id` AS `actFullNameId`,\n CONCAT(`bma_ehr_organization_demo`.`profile`.`prefix`,\n `bma_ehr_organization_demo`.`profile`.`firstName`,\n ' ',\n `bma_ehr_organization_demo`.`profile`.`lastName`) AS `actFullName`\n FROM\n ((((((`bma_ehr_organization_demo`.`posMasterAct`\n JOIN `bma_ehr_organization_demo`.`posMaster` `posMasterChild` ON ((`bma_ehr_organization_demo`.`posMasterAct`.`posMasterChildId` = `posMasterChild`.`id`)))\n JOIN `bma_ehr_organization_demo`.`profile` `profileChild` ON ((`posMasterChild`.`current_holderId` = `profileChild`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posLevel` ON ((`profileChild`.`posLevelId` = `bma_ehr_organization_demo`.`posLevel`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posType` ON ((`profileChild`.`posTypeId` = `bma_ehr_organization_demo`.`posType`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posMaster` ON ((`bma_ehr_organization_demo`.`posMasterAct`.`posMasterId` = `bma_ehr_organization_demo`.`posMaster`.`id`)))\n JOIN `bma_ehr_organization_demo`.`profile` ON ((`bma_ehr_organization_demo`.`posMaster`.`current_holderId` = `bma_ehr_organization_demo`.`profile`.`id`)))"]); + // await queryRunner.query(`CREATE VIEW \`view_director\` AS SELECT + // \`bma_ehr_organization_demo\`.\`profile\`.\`id\` AS \`Id\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`prefix\` AS \`prefix\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`firstName\` AS \`firstName\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`lastName\` AS \`lastName\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`citizenId\` AS \`citizenId\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`position\` AS \`position\`, + // NULL AS \`posNo\`, + // \`bma_ehr_organization_demo\`.\`posMaster\`.\`isDirector\` AS \`isDirector\`, + // \`bma_ehr_organization_demo\`.\`posLevel\`.\`posLevelName\` AS \`posLevel\`, + // \`bma_ehr_organization_demo\`.\`posType\`.\`posTypeName\` AS \`posType\`, + // \`bma_ehr_organization_demo\`.\`posMaster\`.\`orgRootId\` AS \`orgRootId\`, + // NULL AS \`actFullNameId\`, + // NULL AS \`actFullName\` + // FROM + // (((\`bma_ehr_organization_demo\`.\`posMaster\` + // JOIN \`bma_ehr_organization_demo\`.\`profile\` ON ((\`bma_ehr_organization_demo\`.\`posMaster\`.\`current_holderId\` = \`bma_ehr_organization_demo\`.\`profile\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posLevel\` ON ((\`bma_ehr_organization_demo\`.\`profile\`.\`posLevelId\` = \`bma_ehr_organization_demo\`.\`posLevel\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posType\` ON ((\`bma_ehr_organization_demo\`.\`profile\`.\`posTypeId\` = \`bma_ehr_organization_demo\`.\`posType\`.\`id\`)))`); + // await queryRunner.query(`INSERT INTO \`bma_ehr_organization_demo\`.\`typeorm_metadata\`(\`database\`, \`schema\`, \`table\`, \`type\`, \`name\`, \`value\`) VALUES (DEFAULT, ?, DEFAULT, ?, ?, ?)`, ["bma_ehr_organization_demo","VIEW","view_director","SELECT \n `bma_ehr_organization_demo`.`profile`.`id` AS `Id`,\n `bma_ehr_organization_demo`.`profile`.`prefix` AS `prefix`,\n `bma_ehr_organization_demo`.`profile`.`firstName` AS `firstName`,\n `bma_ehr_organization_demo`.`profile`.`lastName` AS `lastName`,\n `bma_ehr_organization_demo`.`profile`.`citizenId` AS `citizenId`,\n `bma_ehr_organization_demo`.`profile`.`position` AS `position`,\n NULL AS `posNo`,\n `bma_ehr_organization_demo`.`posMaster`.`isDirector` AS `isDirector`,\n `bma_ehr_organization_demo`.`posLevel`.`posLevelName` AS `posLevel`,\n `bma_ehr_organization_demo`.`posType`.`posTypeName` AS `posType`,\n `bma_ehr_organization_demo`.`posMaster`.`orgRootId` AS `orgRootId`,\n NULL AS `actFullNameId`,\n NULL AS `actFullName`\n FROM\n (((`bma_ehr_organization_demo`.`posMaster`\n JOIN `bma_ehr_organization_demo`.`profile` ON ((`bma_ehr_organization_demo`.`posMaster`.`current_holderId` = `bma_ehr_organization_demo`.`profile`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posLevel` ON ((`bma_ehr_organization_demo`.`profile`.`posLevelId` = `bma_ehr_organization_demo`.`posLevel`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posType` ON ((`bma_ehr_organization_demo`.`profile`.`posTypeId` = `bma_ehr_organization_demo`.`posType`.`id`)))"]); + // await queryRunner.query(`CREATE VIEW \`view_director_acting\` AS SELECT + // \`profileChild\`.\`id\` AS \`Id\`, + // \`profileChild\`.\`prefix\` AS \`prefix\`, + // \`profileChild\`.\`firstName\` AS \`firstName\`, + // \`profileChild\`.\`lastName\` AS \`lastName\`, + // \`profileChild\`.\`citizenId\` AS \`citizenId\`, + // \`profileChild\`.\`position\` AS \`position\`, + // NULL AS \`posNo\`, + // \`posMasterChild\`.\`isDirector\` AS \`isDirector\`, + // \`bma_ehr_organization_demo\`.\`posLevel\`.\`posLevelName\` AS \`posLevel\`, + // \`bma_ehr_organization_demo\`.\`posType\`.\`posTypeName\` AS \`posType\`, + // \`bma_ehr_organization_demo\`.\`posMaster\`.\`orgRootId\` AS \`orgRootId\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`id\` AS \`actFullNameId\`, + // CONCAT(\`bma_ehr_organization_demo\`.\`profile\`.\`prefix\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`firstName\`, + // ' ', + // \`bma_ehr_organization_demo\`.\`profile\`.\`lastName\`) AS \`actFullName\` + // FROM + // ((((((\`bma_ehr_organization_demo\`.\`posMasterAct\` + // JOIN \`bma_ehr_organization_demo\`.\`posMaster\` \`posMasterChild\` ON ((\`bma_ehr_organization_demo\`.\`posMasterAct\`.\`posMasterChildId\` = \`posMasterChild\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`profile\` \`profileChild\` ON ((\`posMasterChild\`.\`current_holderId\` = \`profileChild\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posLevel\` ON ((\`profileChild\`.\`posLevelId\` = \`bma_ehr_organization_demo\`.\`posLevel\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posType\` ON ((\`profileChild\`.\`posTypeId\` = \`bma_ehr_organization_demo\`.\`posType\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posMaster\` ON ((\`bma_ehr_organization_demo\`.\`posMasterAct\`.\`posMasterId\` = \`bma_ehr_organization_demo\`.\`posMaster\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`profile\` ON ((\`bma_ehr_organization_demo\`.\`posMaster\`.\`current_holderId\` = \`bma_ehr_organization_demo\`.\`profile\`.\`id\`)))`); + // await queryRunner.query(`INSERT INTO \`bma_ehr_organization_demo\`.\`typeorm_metadata\`(\`database\`, \`schema\`, \`table\`, \`type\`, \`name\`, \`value\`) VALUES (DEFAULT, ?, DEFAULT, ?, ?, ?)`, ["bma_ehr_organization_demo","VIEW","view_director_acting","SELECT \n `profileChild`.`id` AS `Id`,\n `profileChild`.`prefix` AS `prefix`,\n `profileChild`.`firstName` AS `firstName`,\n `profileChild`.`lastName` AS `lastName`,\n `profileChild`.`citizenId` AS `citizenId`,\n `profileChild`.`position` AS `position`,\n NULL AS `posNo`,\n `posMasterChild`.`isDirector` AS `isDirector`,\n `bma_ehr_organization_demo`.`posLevel`.`posLevelName` AS `posLevel`,\n `bma_ehr_organization_demo`.`posType`.`posTypeName` AS `posType`,\n `bma_ehr_organization_demo`.`posMaster`.`orgRootId` AS `orgRootId`,\n `bma_ehr_organization_demo`.`profile`.`id` AS `actFullNameId`,\n CONCAT(`bma_ehr_organization_demo`.`profile`.`prefix`,\n `bma_ehr_organization_demo`.`profile`.`firstName`,\n ' ',\n `bma_ehr_organization_demo`.`profile`.`lastName`) AS `actFullName`\n FROM\n ((((((`bma_ehr_organization_demo`.`posMasterAct`\n JOIN `bma_ehr_organization_demo`.`posMaster` `posMasterChild` ON ((`bma_ehr_organization_demo`.`posMasterAct`.`posMasterChildId` = `posMasterChild`.`id`)))\n JOIN `bma_ehr_organization_demo`.`profile` `profileChild` ON ((`posMasterChild`.`current_holderId` = `profileChild`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posLevel` ON ((`profileChild`.`posLevelId` = `bma_ehr_organization_demo`.`posLevel`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posType` ON ((`profileChild`.`posTypeId` = `bma_ehr_organization_demo`.`posType`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posMaster` ON ((`bma_ehr_organization_demo`.`posMasterAct`.`posMasterId` = `bma_ehr_organization_demo`.`posMaster`.`id`)))\n JOIN `bma_ehr_organization_demo`.`profile` ON ((`bma_ehr_organization_demo`.`posMaster`.`current_holderId` = `bma_ehr_organization_demo`.`profile`.`id`)))"]); + // await queryRunner.query(`CREATE VIEW \`view_director\` AS SELECT + // \`bma_ehr_organization_demo\`.\`profile\`.\`id\` AS \`Id\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`prefix\` AS \`prefix\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`firstName\` AS \`firstName\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`lastName\` AS \`lastName\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`citizenId\` AS \`citizenId\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`position\` AS \`position\`, + // NULL AS \`posNo\`, + // \`bma_ehr_organization_demo\`.\`posMaster\`.\`isDirector\` AS \`isDirector\`, + // \`bma_ehr_organization_demo\`.\`posLevel\`.\`posLevelName\` AS \`posLevel\`, + // \`bma_ehr_organization_demo\`.\`posType\`.\`posTypeName\` AS \`posType\`, + // \`bma_ehr_organization_demo\`.\`posMaster\`.\`orgRootId\` AS \`orgRootId\`, + // NULL AS \`actFullNameId\`, + // NULL AS \`actFullName\` + // FROM + // (((\`bma_ehr_organization_demo\`.\`posMaster\` + // JOIN \`bma_ehr_organization_demo\`.\`profile\` ON ((\`bma_ehr_organization_demo\`.\`posMaster\`.\`current_holderId\` = \`bma_ehr_organization_demo\`.\`profile\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posLevel\` ON ((\`bma_ehr_organization_demo\`.\`profile\`.\`posLevelId\` = \`bma_ehr_organization_demo\`.\`posLevel\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posType\` ON ((\`bma_ehr_organization_demo\`.\`profile\`.\`posTypeId\` = \`bma_ehr_organization_demo\`.\`posType\`.\`id\`)))`); + // await queryRunner.query(`INSERT INTO \`bma_ehr_organization_demo\`.\`typeorm_metadata\`(\`database\`, \`schema\`, \`table\`, \`type\`, \`name\`, \`value\`) VALUES (DEFAULT, ?, DEFAULT, ?, ?, ?)`, ["bma_ehr_organization_demo","VIEW","view_director","SELECT \n `bma_ehr_organization_demo`.`profile`.`id` AS `Id`,\n `bma_ehr_organization_demo`.`profile`.`prefix` AS `prefix`,\n `bma_ehr_organization_demo`.`profile`.`firstName` AS `firstName`,\n `bma_ehr_organization_demo`.`profile`.`lastName` AS `lastName`,\n `bma_ehr_organization_demo`.`profile`.`citizenId` AS `citizenId`,\n `bma_ehr_organization_demo`.`profile`.`position` AS `position`,\n NULL AS `posNo`,\n `bma_ehr_organization_demo`.`posMaster`.`isDirector` AS `isDirector`,\n `bma_ehr_organization_demo`.`posLevel`.`posLevelName` AS `posLevel`,\n `bma_ehr_organization_demo`.`posType`.`posTypeName` AS `posType`,\n `bma_ehr_organization_demo`.`posMaster`.`orgRootId` AS `orgRootId`,\n NULL AS `actFullNameId`,\n NULL AS `actFullName`\n FROM\n (((`bma_ehr_organization_demo`.`posMaster`\n JOIN `bma_ehr_organization_demo`.`profile` ON ((`bma_ehr_organization_demo`.`posMaster`.`current_holderId` = `bma_ehr_organization_demo`.`profile`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posLevel` ON ((`bma_ehr_organization_demo`.`profile`.`posLevelId` = `bma_ehr_organization_demo`.`posLevel`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posType` ON ((`bma_ehr_organization_demo`.`profile`.`posTypeId` = `bma_ehr_organization_demo`.`posType`.`id`)))"]); + // await queryRunner.query(`CREATE VIEW \`view_director_acting\` AS SELECT + // \`profileChild\`.\`id\` AS \`Id\`, + // \`profileChild\`.\`prefix\` AS \`prefix\`, + // \`profileChild\`.\`firstName\` AS \`firstName\`, + // \`profileChild\`.\`lastName\` AS \`lastName\`, + // \`profileChild\`.\`citizenId\` AS \`citizenId\`, + // \`profileChild\`.\`position\` AS \`position\`, + // NULL AS \`posNo\`, + // \`posMasterChild\`.\`isDirector\` AS \`isDirector\`, + // \`bma_ehr_organization_demo\`.\`posLevel\`.\`posLevelName\` AS \`posLevel\`, + // \`bma_ehr_organization_demo\`.\`posType\`.\`posTypeName\` AS \`posType\`, + // \`bma_ehr_organization_demo\`.\`posMaster\`.\`orgRootId\` AS \`orgRootId\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`id\` AS \`actFullNameId\`, + // CONCAT(\`bma_ehr_organization_demo\`.\`profile\`.\`prefix\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`firstName\`, + // ' ', + // \`bma_ehr_organization_demo\`.\`profile\`.\`lastName\`) AS \`actFullName\` + // FROM + // ((((((\`bma_ehr_organization_demo\`.\`posMasterAct\` + // JOIN \`bma_ehr_organization_demo\`.\`posMaster\` \`posMasterChild\` ON ((\`bma_ehr_organization_demo\`.\`posMasterAct\`.\`posMasterChildId\` = \`posMasterChild\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`profile\` \`profileChild\` ON ((\`posMasterChild\`.\`current_holderId\` = \`profileChild\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posLevel\` ON ((\`profileChild\`.\`posLevelId\` = \`bma_ehr_organization_demo\`.\`posLevel\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posType\` ON ((\`profileChild\`.\`posTypeId\` = \`bma_ehr_organization_demo\`.\`posType\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posMaster\` ON ((\`bma_ehr_organization_demo\`.\`posMasterAct\`.\`posMasterId\` = \`bma_ehr_organization_demo\`.\`posMaster\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`profile\` ON ((\`bma_ehr_organization_demo\`.\`posMaster\`.\`current_holderId\` = \`bma_ehr_organization_demo\`.\`profile\`.\`id\`)))`); + // await queryRunner.query(`INSERT INTO \`bma_ehr_organization_demo\`.\`typeorm_metadata\`(\`database\`, \`schema\`, \`table\`, \`type\`, \`name\`, \`value\`) VALUES (DEFAULT, ?, DEFAULT, ?, ?, ?)`, ["bma_ehr_organization_demo","VIEW","view_director_acting","SELECT \n `profileChild`.`id` AS `Id`,\n `profileChild`.`prefix` AS `prefix`,\n `profileChild`.`firstName` AS `firstName`,\n `profileChild`.`lastName` AS `lastName`,\n `profileChild`.`citizenId` AS `citizenId`,\n `profileChild`.`position` AS `position`,\n NULL AS `posNo`,\n `posMasterChild`.`isDirector` AS `isDirector`,\n `bma_ehr_organization_demo`.`posLevel`.`posLevelName` AS `posLevel`,\n `bma_ehr_organization_demo`.`posType`.`posTypeName` AS `posType`,\n `bma_ehr_organization_demo`.`posMaster`.`orgRootId` AS `orgRootId`,\n `bma_ehr_organization_demo`.`profile`.`id` AS `actFullNameId`,\n CONCAT(`bma_ehr_organization_demo`.`profile`.`prefix`,\n `bma_ehr_organization_demo`.`profile`.`firstName`,\n ' ',\n `bma_ehr_organization_demo`.`profile`.`lastName`) AS `actFullName`\n FROM\n ((((((`bma_ehr_organization_demo`.`posMasterAct`\n JOIN `bma_ehr_organization_demo`.`posMaster` `posMasterChild` ON ((`bma_ehr_organization_demo`.`posMasterAct`.`posMasterChildId` = `posMasterChild`.`id`)))\n JOIN `bma_ehr_organization_demo`.`profile` `profileChild` ON ((`posMasterChild`.`current_holderId` = `profileChild`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posLevel` ON ((`profileChild`.`posLevelId` = `bma_ehr_organization_demo`.`posLevel`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posType` ON ((`profileChild`.`posTypeId` = `bma_ehr_organization_demo`.`posType`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posMaster` ON ((`bma_ehr_organization_demo`.`posMasterAct`.`posMasterId` = `bma_ehr_organization_demo`.`posMaster`.`id`)))\n JOIN `bma_ehr_organization_demo`.`profile` ON ((`bma_ehr_organization_demo`.`posMaster`.`current_holderId` = `bma_ehr_organization_demo`.`profile`.`id`)))"]); + // await queryRunner.query(`CREATE VIEW \`view_director\` AS SELECT + // \`bma_ehr_organization_demo\`.\`profile\`.\`id\` AS \`Id\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`prefix\` AS \`prefix\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`firstName\` AS \`firstName\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`lastName\` AS \`lastName\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`citizenId\` AS \`citizenId\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`position\` AS \`position\`, + // NULL AS \`posNo\`, + // \`bma_ehr_organization_demo\`.\`posMaster\`.\`isDirector\` AS \`isDirector\`, + // \`bma_ehr_organization_demo\`.\`posLevel\`.\`posLevelName\` AS \`posLevel\`, + // \`bma_ehr_organization_demo\`.\`posType\`.\`posTypeName\` AS \`posType\`, + // \`bma_ehr_organization_demo\`.\`posMaster\`.\`orgRootId\` AS \`orgRootId\`, + // NULL AS \`actFullNameId\`, + // NULL AS \`actFullName\` + // FROM + // (((\`bma_ehr_organization_demo\`.\`posMaster\` + // JOIN \`bma_ehr_organization_demo\`.\`profile\` ON ((\`bma_ehr_organization_demo\`.\`posMaster\`.\`current_holderId\` = \`bma_ehr_organization_demo\`.\`profile\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posLevel\` ON ((\`bma_ehr_organization_demo\`.\`profile\`.\`posLevelId\` = \`bma_ehr_organization_demo\`.\`posLevel\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posType\` ON ((\`bma_ehr_organization_demo\`.\`profile\`.\`posTypeId\` = \`bma_ehr_organization_demo\`.\`posType\`.\`id\`)))`); + // await queryRunner.query(`INSERT INTO \`bma_ehr_organization_demo\`.\`typeorm_metadata\`(\`database\`, \`schema\`, \`table\`, \`type\`, \`name\`, \`value\`) VALUES (DEFAULT, ?, DEFAULT, ?, ?, ?)`, ["bma_ehr_organization_demo","VIEW","view_director","SELECT \n `bma_ehr_organization_demo`.`profile`.`id` AS `Id`,\n `bma_ehr_organization_demo`.`profile`.`prefix` AS `prefix`,\n `bma_ehr_organization_demo`.`profile`.`firstName` AS `firstName`,\n `bma_ehr_organization_demo`.`profile`.`lastName` AS `lastName`,\n `bma_ehr_organization_demo`.`profile`.`citizenId` AS `citizenId`,\n `bma_ehr_organization_demo`.`profile`.`position` AS `position`,\n NULL AS `posNo`,\n `bma_ehr_organization_demo`.`posMaster`.`isDirector` AS `isDirector`,\n `bma_ehr_organization_demo`.`posLevel`.`posLevelName` AS `posLevel`,\n `bma_ehr_organization_demo`.`posType`.`posTypeName` AS `posType`,\n `bma_ehr_organization_demo`.`posMaster`.`orgRootId` AS `orgRootId`,\n NULL AS `actFullNameId`,\n NULL AS `actFullName`\n FROM\n (((`bma_ehr_organization_demo`.`posMaster`\n JOIN `bma_ehr_organization_demo`.`profile` ON ((`bma_ehr_organization_demo`.`posMaster`.`current_holderId` = `bma_ehr_organization_demo`.`profile`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posLevel` ON ((`bma_ehr_organization_demo`.`profile`.`posLevelId` = `bma_ehr_organization_demo`.`posLevel`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posType` ON ((`bma_ehr_organization_demo`.`profile`.`posTypeId` = `bma_ehr_organization_demo`.`posType`.`id`)))"]); + // await queryRunner.query(`CREATE VIEW \`view_director_acting\` AS SELECT + // \`profileChild\`.\`id\` AS \`Id\`, + // \`profileChild\`.\`prefix\` AS \`prefix\`, + // \`profileChild\`.\`firstName\` AS \`firstName\`, + // \`profileChild\`.\`lastName\` AS \`lastName\`, + // \`profileChild\`.\`citizenId\` AS \`citizenId\`, + // \`profileChild\`.\`position\` AS \`position\`, + // NULL AS \`posNo\`, + // \`posMasterChild\`.\`isDirector\` AS \`isDirector\`, + // \`bma_ehr_organization_demo\`.\`posLevel\`.\`posLevelName\` AS \`posLevel\`, + // \`bma_ehr_organization_demo\`.\`posType\`.\`posTypeName\` AS \`posType\`, + // \`bma_ehr_organization_demo\`.\`posMaster\`.\`orgRootId\` AS \`orgRootId\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`id\` AS \`actFullNameId\`, + // CONCAT(\`bma_ehr_organization_demo\`.\`profile\`.\`prefix\`, + // \`bma_ehr_organization_demo\`.\`profile\`.\`firstName\`, + // ' ', + // \`bma_ehr_organization_demo\`.\`profile\`.\`lastName\`) AS \`actFullName\` + // FROM + // ((((((\`bma_ehr_organization_demo\`.\`posMasterAct\` + // JOIN \`bma_ehr_organization_demo\`.\`posMaster\` \`posMasterChild\` ON ((\`bma_ehr_organization_demo\`.\`posMasterAct\`.\`posMasterChildId\` = \`posMasterChild\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`profile\` \`profileChild\` ON ((\`posMasterChild\`.\`current_holderId\` = \`profileChild\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posLevel\` ON ((\`profileChild\`.\`posLevelId\` = \`bma_ehr_organization_demo\`.\`posLevel\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posType\` ON ((\`profileChild\`.\`posTypeId\` = \`bma_ehr_organization_demo\`.\`posType\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`posMaster\` ON ((\`bma_ehr_organization_demo\`.\`posMasterAct\`.\`posMasterId\` = \`bma_ehr_organization_demo\`.\`posMaster\`.\`id\`))) + // JOIN \`bma_ehr_organization_demo\`.\`profile\` ON ((\`bma_ehr_organization_demo\`.\`posMaster\`.\`current_holderId\` = \`bma_ehr_organization_demo\`.\`profile\`.\`id\`)))`); + // await queryRunner.query(`INSERT INTO \`bma_ehr_organization_demo\`.\`typeorm_metadata\`(\`database\`, \`schema\`, \`table\`, \`type\`, \`name\`, \`value\`) VALUES (DEFAULT, ?, DEFAULT, ?, ?, ?)`, ["bma_ehr_organization_demo","VIEW","view_director_acting","SELECT \n `profileChild`.`id` AS `Id`,\n `profileChild`.`prefix` AS `prefix`,\n `profileChild`.`firstName` AS `firstName`,\n `profileChild`.`lastName` AS `lastName`,\n `profileChild`.`citizenId` AS `citizenId`,\n `profileChild`.`position` AS `position`,\n NULL AS `posNo`,\n `posMasterChild`.`isDirector` AS `isDirector`,\n `bma_ehr_organization_demo`.`posLevel`.`posLevelName` AS `posLevel`,\n `bma_ehr_organization_demo`.`posType`.`posTypeName` AS `posType`,\n `bma_ehr_organization_demo`.`posMaster`.`orgRootId` AS `orgRootId`,\n `bma_ehr_organization_demo`.`profile`.`id` AS `actFullNameId`,\n CONCAT(`bma_ehr_organization_demo`.`profile`.`prefix`,\n `bma_ehr_organization_demo`.`profile`.`firstName`,\n ' ',\n `bma_ehr_organization_demo`.`profile`.`lastName`) AS `actFullName`\n FROM\n ((((((`bma_ehr_organization_demo`.`posMasterAct`\n JOIN `bma_ehr_organization_demo`.`posMaster` `posMasterChild` ON ((`bma_ehr_organization_demo`.`posMasterAct`.`posMasterChildId` = `posMasterChild`.`id`)))\n JOIN `bma_ehr_organization_demo`.`profile` `profileChild` ON ((`posMasterChild`.`current_holderId` = `profileChild`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posLevel` ON ((`profileChild`.`posLevelId` = `bma_ehr_organization_demo`.`posLevel`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posType` ON ((`profileChild`.`posTypeId` = `bma_ehr_organization_demo`.`posType`.`id`)))\n JOIN `bma_ehr_organization_demo`.`posMaster` ON ((`bma_ehr_organization_demo`.`posMasterAct`.`posMasterId` = `bma_ehr_organization_demo`.`posMaster`.`id`)))\n JOIN `bma_ehr_organization_demo`.`profile` ON ((`bma_ehr_organization_demo`.`posMaster`.`current_holderId` = `bma_ehr_organization_demo`.`profile`.`id`)))"]); + } + +}