<?php
namespace Application;

use Application\Factory\ChainFactory;
use Application\Factory\DbFactory;
use Application\Factory\EdcDbFactory;
use Application\Factory\SdmFactory;
use Application\Factory\ShareDbFactory;
use Application\Service\DB;
use Application\Service\DB\Item\Planviolate;
use Application\Service\Extension\Helper\ArrayHelper;

$dbServerMap =  [
    'aliases'  => [
        'itemInfo' => DB\Item\Info::class,
        'itemCenterdata' => DB\Item\Centerdata::class,
        'itemDrugbatch' => DB\Item\ItemDrugbatch::class,
        'itemSigdrugbatch' => DB\Item\ItemSigdrugbatch::class,
        'itemSigdrugset' => DB\Item\ItemSigdrugset::class,
        'itemPatientdrugbatch' => DB\Item\ItemPatientdrugbatch::class,
        'itemPatientdrugset' => DB\Item\ItemPatientdrugset::class,
        'itemSignatory' => DB\Item\Signatory::class,
        'itemResearchstage' => DB\Item\Researchstage::class,
        'itemRandom' => DB\Item\Random::class,
        'itemJobstaff' => DB\Item\Jobstaff::class,
        'itemResearchflowcat' => DB\Item\Researchflowcat::class,
        'itemChecktime' => DB\Item\Checktime::class,
        'itemCheckname' => DB\Item\Checknames::class,
        'itemItemdocument' => DB\Item\Itemdocument::class,
        'itemDocumentcontent' => DB\Item\Documentcontent::class,
        'itemResearchremark' => DB\Item\Researchremark::class,
        'itemSuperrole' => DB\Item\Superrole::class,
        'itemCheckcontent' => DB\Item\Checkcontent::class,
        'itemPatientcheckcontent' => DB\Item\Patientcheckcontent::class,
        'DictionaryCheckcategory' => DB\Dictionary\Checkcategory::class,
        'DictionaryCheckname' => DB\Dictionary\Checkname::class,
        'DictionaryCsset' => DB\Dictionary\Csset::class,
        'DictionaryDocument' => DB\Dictionary\Document::class,
        'Jobstaff' => DB\Item\Jobstaff::class,
        'Researchflowcat' => DB\Item\Researchflowcat::class,
        'DictionaryGenercsetinfo' => DB\Dictionary\Genercsetinfo::class,
        'DictionaryGenercsetinfotype' => DB\Dictionary\Genercsetinfotype::class,
        'DictionaryPatientattrselect' => DB\Dictionary\Patientattrselect::class,
        'dictionaryCheckcategory' => DB\Dictionary\Checkcategory::class,
        'dictionaryCheckname' => DB\Dictionary\Checkname::class,
        'dictionaryCsset' => DB\Dictionary\Csset::class,
        'dictionaryDocument' => DB\Dictionary\Document::class,
        'dictionaryGenercsetinfo' => DB\Dictionary\Genercsetinfo::class,
        'dictionaryGenercsetinfotype' => DB\Dictionary\Genercsetinfotype::class,
        'dictionaryItemjob' => DB\Dictionary\Itemjob::class,
        'dictionaryPatientattr' => DB\Dictionary\Patientattr::class,
        'dictionaryPatientattrselect' => DB\Dictionary\Patientattrselect::class,
        'dictionaryChecknameattr' => DB\Dictionary\Checknameattr::class,
        'dictionaryUnblinding' => DB\Dictionary\Unblinding::class,
        'dictionaryOcr' => DB\Dictionary\Ocr::class,
        'dictionaryUnit' => DB\Dictionary\Unit::class,
        'adminMenu' => DB\Admin\Menu::class,
        'adminUser' => DB\Admin\User::class,
        'adminRole' => DB\Admin\Role::class,
        'adminAppletsrolemenurelation' => DB\Admin\Appletsrolemenurelation::class,
        'adminAppletsmenu' => DB\Admin\Appletsmenu::class,
        'roleMenuRelation' => DB\Admin\Rolemenurelation::class,
        'roleSignatoryRelation' => DB\Admin\Realrolesignatoryrelation::class,
        'userRoleRelation' => DB\Admin\Userrolerelation::class,
        'realRole' => DB\Admin\Realrole::class,
        'adminLog' => DB\Admin\Log::class,
        'signatoryInfo' => DB\Signatory\Info::class,
        'signatoryUser' => DB\Signatory\User::class,
        'signatoryDepartment' => DB\Signatory\Department::class,
        'patient' => DB\Item\Patient::class,
        'patientForm' => DB\Item\PatientForm::class,
        'patientFormContent' => DB\Item\PatientFormContent::class,
        'patientFormContentImg' => DB\Item\PatientFormContentImg::class,
        'patientattrs' => DB\Item\Patientattrs::class,
        'dictionaryForm' => DB\Dictionary\Form::class,
        'dictionaryFormVersion' => DB\Dictionary\FormVersion::class,
        'patientCard' => DB\Item\PatientCard::class,
        'itemRandblock' => DB\Item\Randblock::class,
        'itemRandgroup' => DB\Item\Randgroup::class,
        'itemRandnumber' => DB\Item\Randnumber::class,
        'itemRandomdetails' => DB\Item\Randomdetails::class,
        'itemBlockgroup' => DB\Item\Blockgroup::class,
        'dictionaryFormField' => DB\Dictionary\FormField::class,
        'dictionaryFormFieldText' => DB\Dictionary\ItemFormFieldText::class,
        'dictionaryFormFieldRadio' => DB\Dictionary\ItemFormFieldRadio::class,
        'itemFormFieldText' => DB\Item\FormFieldText::class,
        'itemFormFieldRadio' => DB\Item\FormFieldRadio::class,
        'dictionaryFormGroup' => DB\Dictionary\FormGroup::class,
        'itemForm' => DB\Dictionary\ItemForm::class,
        'itemFormVersion' => DB\Item\ItemFormVersion::class,
        'itemFormField' => DB\Dictionary\ItemFormField::class,
        'itemFormGroup' => DB\Dictionary\ItemFormGroup::class,
        'realRolemodulerelation' => DB\Item\Rolemodulerelation::class,
        'itemPatientchecktime' => DB\Item\Patientchecktime::class,
        'itemInformedconsent' => DB\Item\Informedconsent::class,
        'itemImgtxtdiscern' => DB\Item\Imgtxtdiscern::class,
        'itemPatientworkannex' => DB\Project\Patientworkannex::class,
        'itemIdentificationresult' => DB\Project\Identificationresult::class,
        'itemUnblinding' => DB\Item\Unblindings::class,
        'itemIdentificationresultchange' => DB\Project\Identificationresultchange::class,
        'itemUrgentunblind' => DB\Item\Urgentunblind::class,
        'itemFile' => DB\Item\File::class,
        'dictionarySetocrfield' => DB\Project\Setocrfield::class,
        'itemQuestion' => DB\Item\Question::class,
        'itemReply' => DB\Item\Reply::class,
        'dictionaryFormRelation' => DB\Dictionary\FormRelation::class,
        'itemFormRelation' => DB\Item\FormRelation::class,
        'itemExport' => DB\Item\Export::class,
        'itemPatientFormContentFieldLock' => DB\Item\PatientFormContentFieldLock::class,
        'itemPatientbooked' => DB\Item\Patientbooked::class,
        'itemCsae' => DB\Project\Csae::class,
        'itemPatientChecktimeForm' => DB\Item\PatientChecktimeForm::class,
        'itemPatientAeContent' => DB\Item\PatientAeContent::class,
        'itemCsaeRelation' => DB\Project\CsaeRelation::class,
        'itemMedication' => DB\Item\Medication::class,
        'itemAppletsdata' => DB\Item\Appletsdata::class,
        'itemVicecopy' => DB\Item\Vicecopy::class,
        'itemInformedconsentsign' => DB\Item\Informedconsentsign::class,
        'workShow' => DB\Work\Show::class,
        'workSchedule' => DB\Work\Schedule::class,
        'workApproval' => DB\Work\Approval::class,
        'itemDownpicture' => DB\Item\Downpicture::class,
        'itemCsaeChecked' => DB\Item\ItemCsaeChecked::class,
        'itemQuestionanswer' => DB\Item\Answer::class,
        'signatoryPatient' => DB\Item\Signatorypatient::class,
        'itemAgecountset' => DB\Item\Agecountset::class,
        'dictionaryRule' => DB\Dictionary\Rule::class,
        'dictionaryFormtype' => DB\Dictionary\Formtype::class,
        'dictionaryFormtyperule' => DB\Dictionary\Formtyperule::class,
        'dictionaryWorkset' => DB\Dictionary\Workset::class,
        'worklistItemworklist' => DB\Worklist\Itemworklist::class,
        'worklistItemcustomname' => DB\Worklist\Itemcustomname::class,
        'worklistItemworklistset' => DB\Worklist\Itemworklistset::class,
        'worklistSigworklist' => DB\Worklist\Sigworklist::class,
        'worklistSigcustomname' => DB\Worklist\Sigcustomname::class,
        'worklistSigworklistset' => DB\Worklist\Sigworklistset::class,
        'worklistPatientinfo' => DB\Worklist\Patientinfo::class,
        'worklistPatientconnect' => DB\Worklist\Patientconnect::class,
        'worklistPatientworklist' => DB\Worklist\Patientworklist::class,
        'itemFormpatientsign' => DB\Item\Formpatientsign::class,
        'dictionaryListset' => DB\Dictionary\Listset::class,
        'listsetItemlist' => DB\Listset\Itemlist::class,
        'listsetSiglist' => DB\Listset\Siglist::class,
        'listsetOperate' => DB\Listset\Operate::class,
        'listsetAnnex' => DB\Listset\Annex::class,
        'listsetAnnexcat' => DB\Listset\Annexcat::class,
        'listsetFlow' => DB\Listset\Flow::class,
        'businessCategory' => DB\Business\Category::class,
        'businessRecord' => DB\Business\Record::class,
        'businessRecordannex' => DB\Business\Recordannex::class,
        'arkQuery' => DB\Ark\ArkQuery::class,
        'itemBackupschange' => DB\Project\Backupschange::class,
        'dictionaryQuestionanswer' => DB\Dictionary\Questionanswer::class,
        'odmSyncRecord' => DB\Odm\OdmSyncRecord::class,
        'itemInfosign' => DB\Item\ItemInfosign::class,
        'itemLogtype' => DB\Item\Logtype::class,
        'itemExportpdf' => DB\Item\Exportpdf::class,
        'itemIdentificationresultdestroy' => DB\Project\Identificationresultdestroy::class,
        'patientFormUnlock' => DB\Item\PatientFormUnlock::class, // 受试者表单申请解锁表
        'patientWorkCount' => DB\Item\PatientWorkCount::class,
        'itemChangesendlog' => DB\Project\Changesendlog::class,
        'itemLock' => DB\Item\Lock::class,
        'adminWebsitefiling' => DB\Admin\Websitefiling::class,
        'itemDoctoridea' => DB\Project\Doctoridea::class,
        'itemQuestionconfig' => DB\Dictionary\Questionconfig::class,
        'Configtable' => DB\Admin\Configtable::class,
        'patientChecktimeList' => DB\Item\PatientChecktimeList::class,
        'Send' => DB\Admin\Send::class,
        'ocrKeyword' => DB\Ocr\Keyword::class,
        'ocrRawdata' => DB\Ocr\Rawdata::class,
        'ocrMatedata' => DB\Ocr\Matedata::class,
        'ocrMedicalword' => DB\Ocr\Medicalword::class,
        'ocrMatewhite' => DB\Ocr\Matewhite::class,
        'ocrMateblack' => DB\Ocr\Mateblack::class,
        'ocrSigpatient' => DB\Ocr\Medicalmate::class,
        'ocrSigpatient' => DB\Ocr\Sigpatient::class,
        'ocrMedical' => DB\Ocr\Medical::class,
        'ocrOcrannex' => DB\Ocr\Ocrannex::class,
        'ocrRawword' => DB\Ocr\Rawword::class,
        'ocrRawblack' => DB\Ocr\Rawblack::class,
        'itemFormmodel' => DB\Item\Formmodel::class,
        'ocrRawlock' => DB\Ocr\Rawlock::class,
        'ocrMedicallock' => DB\Ocr\Medicallock::class,
        'ocrChangetype' => DB\Ocr\Changetype::class,
        'ocrDeletename' => DB\Ocr\Deletename::class,
        'ocrReplace' => DB\Ocr\Replace::class,
        'ocrAnnextype' => DB\Ocr\Annextype::class,
        'ocrSigkeyword' => DB\Ocr\Sigkeyword::class,
        'ocrCt' => DB\Ocr\Ct::class,
        'blindMethodLog' => DB\Item\Blindmethodlog::class,
        'ocrLoseannex' => DB\Ocr\Loseannex::class,
        'dictionaryChecknameweight' => DB\Dictionary\Checknameweight::class,
        'ocrMatesearch' => DB\Ocr\Matesearch::class,
        'itemChecknameweight' => DB\Item\Checknameweight::class,
        'itemSign' => DB\Item\Sign::class,
        'itemOcrCsae' => DB\Project\OcrCsae::class,
        'itemOcrTitleKeys' => DB\Project\OcrTitleKeys::class,
        'itemOcrCsaePaitent' => DB\Project\OcrCsaePaitent::class,
        'itemOcrCsaePaitentDetail' => DB\Project\OcrCsaePatientDetail::class,
        'itemOcrCasePatientSpecialdetail' => DB\Project\OcrCasePatientSpecialdetail::class,
        'itemRemarks' => DB\Item\ItemRemarks::class,
        'ocrCtcase' => DB\Ocr\Ctcase::class,
        'ocrCaseremark' => DB\Ocr\Caseremark::class,
        'itemOcrCsaeNew' => DB\Project\OcrCsaeNew::class,
        'itemOcrCsaePaitentDetailNew' => DB\Project\OcrCsaePatientDetailNew::class,
        'itemOcrCasePatientSpecialdetailNew' => DB\Project\OcrCasePatientSpecialdetailNew::class,
        'ocrOcrannexnew' => DB\Ocr\Ocrannexnew::class,
        'ocrDrug' => DB\Ocr\Drug::class,
        'ocrTake' => DB\Ocr\Take::class,
        'ocrCtreplace' => DB\Ocr\Ctreplace::class,
        'ocrMatedrug' => DB\Ocr\Matedrug::class,
        'ocrDrugcategory' => DB\Ocr\Drugcategory::class,
        'dictionaryMedicaltake' => DB\Dictionary\Medicaltake::class,
        'dictionaryMedicalword' => DB\Dictionary\Medicalword::class,
        'dictionaryDrugcategory' => DB\Dictionary\Drugcategory::class,
        'dictionaryDrug' => DB\Dictionary\Drug::class,
        'itemConfirm' => DB\Item\Confirm::class,
        'itemLock' => DB\Item\Lock::class,
        'medicalMatewhite' => DB\Medical\Matewhite::class,
        'medicalMateblack' => DB\Medical\Mateblack::class,
        'medicalMatedrug' => DB\Medical\Matedrug::class,
        'medicalOcrdata' => DB\Medical\Ocrdata::class,
        'medicalLock' => DB\Medical\Lock::class,
        'Allowpatientwrite' => DB\Item\Allowpatientwrite::class,
        'changeUpdateLog' => DB\Project\Changeupdatelog::class,
        'Recharge' => DB\Pay\Recharge::class,
        'Transfer' => DB\Pay\Transfer::class,
        'tmpDeletename' => DB\Tmp\Deletename::class,
        'tmpDrug' => DB\Tmp\Drug::class,
        'tmpDrugcategory' => DB\Tmp\Drugcategory::class,
        'tmpKeyword' => DB\Tmp\Keyword::class,
        'tmpMedical' => DB\Tmp\Medical::class,
        'tmpMedicalblack' => DB\Tmp\Medicalblack::class,
        'tmpMedicaldrug' => DB\Tmp\Medicaldrug::class,
        'tmpMedicallock' => DB\Tmp\Medicallock::class,
        'tmpMedicaltake' => DB\Tmp\Medicaltake::class,
        'tmpMedicalwhite' => DB\Tmp\Medicalwhite::class,
        'tmpMedicalword' => DB\Tmp\Medicalword::class,
        'tmpRawblack' => DB\Tmp\Rawblack::class,
        'tmpRawdata' => DB\Tmp\Rawdata::class,
        'tmpRawlock' => DB\Tmp\Rawlock::class,
        'tmpRawmate' => DB\Tmp\Rawmate::class,
        'tmpRawword' => DB\Tmp\Rawword::class,
        'tmpReplace' => DB\Tmp\Replace::class,
        'tmpSigkeyword' => DB\Tmp\Sigkeyword::class,
        'tmpHospital' => DB\Tmp\Hospital::class,
        'tmpInspect' => DB\Tmp\Inspect::class,
        'tmpPatienthospital' => DB\Tmp\Patienthospital::class,
        'tmpReport' => DB\Tmp\Report::class,
        'dictionaryDiseasecategory' => DB\Dictionary\Diseasecategory::class,
        'dictionaryDisease' => DB\Dictionary\Disease::class,
        'tmpAnnex' => DB\Tmp\Annex::class,
        'tmpPatient' => DB\Tmp\Patient::class,
        'tmpPatientct' => DB\Tmp\Patientct::class,
        'tmpCustom' => DB\Tmp\Custom::class,
        'tmpTable' => DB\Tmp\Table::class,
        'tmpText' => DB\Tmp\Text::class,
        'tmpOutmedical' => DB\Tmp\Outmedical::class,
        'tmpIntervene' => DB\Tmp\Intervene::class,
        'tmpIntervene0' => DB\Tmp\Intervene0::class,
        'tmpIntervene1' => DB\Tmp\Intervene1::class,
        'tmpIntervene2' => DB\Tmp\Intervene2::class,
        'ocrRawlockunique' => DB\Ocr\Rawlockunique::class,
        'tmpCtreplace' => DB\Tmp\Ctreplace::class,
        'TmpDoctoradviceoriginal' => DB\Tmp\Doctoradviceoriginal::class,
        'tmpDoctoradvicelock' => DB\Tmp\Doctoradvicelock::class,
        'tmpDoctoradviceannex' => DB\Tmp\Doctoradviceannex::class,
        'tmpDoctoradvicereplace' => DB\Tmp\Doctoradvicereplace::class,
        'tmpDoctoradvicematewhite' => DB\Tmp\Doctoradvicematewhite::class,
        'tmpDoctoradvicemateblack' => DB\Tmp\Doctoradvicemateblack::class,
        'tmpDoctoradvicematedrug' => DB\Tmp\Doctoradvicematedrug::class,
        'tmpDoctoradvicetable' => DB\Tmp\Doctoradvicetable::class,
        'tmpDoctoradvicepatient' => DB\Tmp\Doctoradvicepatient::class,
        'tmpDoctoradviceformal' => DB\Tmp\Doctoradviceformal::class,
        'itemMessageField' => DB\Item\MessageField::class,
        'itemMessageSend' => DB\Item\MessageSend::class,
        'itemMessageSendPatient' => DB\Item\MessageSendPatient::class,
        'itemMessageSendLog' => DB\Item\MessageSendLog::class,
        'collectCategory' => DB\Collect\Category::class,
        'collectInspect' => DB\Collect\Inspect::class,
        'collectHospital' => DB\Collect\Hospital::class,
        'collectItemhospital' => DB\Collect\Itemhospital::class,
        'collectOut' => DB\Collect\Out::class,
        'collectItemout' => DB\Collect\Itemout::class,
        'collectDrugcategory' => DB\Collect\Drugcategory::class,
        'collectDrug' => DB\Collect\Drug::class,
        'collectMedicaltake' => DB\Collect\Medicaltake::class,
        'collectMedicalword' => DB\Collect\Medicalword::class,
        'collectItemdrug' => DB\Collect\Itemdrug::class,
        'collectEcg' => DB\Collect\Ecg::class,
        'collectItemecg' => DB\Collect\Itemecg::class,
        'collectCt' => DB\Collect\Ct::class,
        'collectItemct' => DB\Collect\Itemct::class,
        'collectReport' => DB\Collect\Report::class,
        'collectItemreport' => DB\Collect\Itemreport::class,
        'collectKeywordcat' => DB\Collect\Keywordcat::class,
        'collectKeyword' => DB\Collect\Keyword::class,
        'collectRawword' => DB\Collect\Rawword::class,
        'collectItemkeyword' => DB\Collect\Itemkeyword::class,
        'collectCost' => DB\Collect\Cost::class,
        'collectItemcost' => DB\Collect\Itemcost::class,
        'itemMessagePatientChase' => DB\Item\MessageSendPatientChase::class,
        'collectPatienthospital' => DB\Collect\Patienthospital::class,
        'itemChangeReference' => DB\Project\ChangeReference::class,
        'collectPatientecg' => DB\Collect\Patientecg::class,
        'collectPatientct' => DB\Collect\Patientct::class,
        'collectPatientreport' => DB\Collect\Patientreport::class,
        'collectPatientraw' => DB\Collect\Patientraw::class,
        'collectPatientrawmate' => DB\Collect\Patientrawmate::class,
        'collectPatientrawblack' => DB\Collect\Patientrawblack::class,
        'collectPatientrawlock' => DB\Collect\Patientrawlock::class,
        'collectPatientmedical' => DB\Collect\Patientmedical::class,
        'collectPatientmedicalwhite' => DB\Collect\Patientmedicalwhite::class,
        'collectPatientmedicalblack' => DB\Collect\Patientmedicalblack::class,
        'collectPatientmedicaldrug' => DB\Collect\Patientmedicaldrug::class,
        'collectPatientmedicallock' => DB\Collect\Patientmedicallock::class,
        'collectPatientout' => DB\Collect\Patientout::class,
        'ocrSpecialmedical' => DB\Ocr\Specialmedical::class,
        'collectPatient' => DB\Collect\Patient::class,
        'collectAnnex' => DB\Collect\Annex::class,
        'exportSas' => DB\Export\Sas::class,
        'collectSighospital' => DB\Collect\Sighospital::class,
        'collectSigout' => DB\Collect\Sigout::class,
        'collectSigkeyword' => DB\Collect\Sigkeyword::class,
        'itemFormrecognition' => DB\Project\Itemformrecognition::class,
        'itemPatientFormContentRecognition' => DB\Project\PatientFormContentRecognition::class,
        'itemPatientformimgcontent' => DB\Item\Patientformimgcontent::class,
        'dictionaryDetectname' => DB\Dictionary\Detectname::class,
        'dictionaryDetectkeyword' => DB\Dictionary\Detectkeyword::class,
        'collectTable' => DB\Collect\Table::class,
        'collectText' => DB\Collect\Text::class,
        'collectCustom' => DB\Collect\Custom::class,
        'dictionaryDetectblackword' => DB\Dictionary\Detectblackword::class,
        'itemIdentificationexport' => DB\Project\Identificationexport::class,
        'itemResultidentify' => DB\Item\ItemResultidentify::class,
        'itemEventwatchdog' => DB\Item\itemEventwatchdog::class,
        'templeAnnex' => DB\Temple\Annex::class,
        'templeChecklist' => DB\Temple\checklist::class,
        'itemMedicaltake' => DB\Item\ItemMedicaltake::class,
        'doctoradviceOriginal' => DB\Doctoradvice\DoctoradviceOriginal::class,
        'itemPatientinfo' => DB\Item\Patientinfo::class,
        'dictionaryLeverform' => DB\Dictionary\Leverform::class,
        'dictionaryLevervalue' => DB\Dictionary\Levervalue::class,
        'itemSignaturebatch' => DB\Item\Signaturebatch::class,
        'itemSignaturedetail' => DB\Item\Signaturedetail::class,
        'itemSignatoryCollecttypeocr'  => DB\Item\SignatoryCollecttypeocr::class,
        'itemDetectpatient' => DB\Item\Detectpatient::class,
        'dictionaryOcrreplace' => DB\Dictionary\Ocrreplace::class,
        'itemCissclass' => DB\Item\Cissclass::class,
        'itemCissoption' => DB\Item\Cissoption::class,
        'itemPatientciss' => DB\Item\Patientciss::class,
        'fixednametype' => DB\Dictionary\Fixednametype::class,
        'fixedname' => DB\Dictionary\Fixedname::class,
        'projectMsgset' => DB\Project\Msgset::class,
        'projectMsginfo' => DB\Project\Msginfo::class,
        'projectMsgsend' => DB\Project\Msgsend::class,
        'itemPlanviolate' => DB\Item\Planviolate::class,
        'adminWeblink' => DB\Admin\Weblink::class,
        'adminWorkbatch' => DB\Admin\Workbatch::class,
        'adminWorkinfo' => DB\Admin\Workinfo::class,
        'dictionaryEventset' => DB\Dictionary\Eventset::class,
        'dictionaryEventattr' => DB\Dictionary\Eventattr::class,
        'adminMedicallock' => DB\Admin\Medicallock::class,
        'itemPatientevent' => DB\Item\Patientevent::class,
        'itemPatienteventannex' => DB\Item\Patienteventannex::class,
        'itemPatienteventset' => DB\Item\Patienteventset::class,
        'projectPatientwork' => DB\Project\Patientwork::class,
        'itemRandomsecondary' => DB\Item\Randomsecondary::class,
        'projectMedicalquestion' => DB\Project\Medicalquestion::class,
        'projectMedicalquestioninfo' => DB\Project\Medicalquestioninfo::class,
        'projectMedicalconfirm' => DB\Project\Medicalconfirm::class,
        'projectMedicalconfirminfo' => DB\Project\Medicalconfirminfo::class,
        'projectMedicalset' => DB\Project\Medicalset::class,
        'itemCheckdate' => DB\Item\Checkdate::class,
        'dictionaryRegion' => DB\Dictionary\Region::class,
        'projectExceedswindow' => DB\Project\Exceedswindow::class,
        'projectCmdrugset' => DB\Project\Cmdrugset::class,
        'collectPatientdrug' => DB\Collect\Patientdrug::class,
        'dictionaryItemcategory' => DB\Dictionary\Itemcategory::class,
        'itemPackage' => DB\Item\Package::class,
    ],
    'factories' => [
        DB\Item\Info::class => DbFactory::class,
        DB\Item\Centerdata::class => DbFactory::class,
        DB\Item\ItemDrugbatch::class => DbFactory::class,
        DB\Item\ItemSigdrugbatch::class => DbFactory::class,
        DB\Item\ItemSigdrugset::class => DbFactory::class,
        DB\Item\ItemPatientdrugbatch::class => DbFactory::class,
        DB\Item\ItemPatientdrugset::class => DbFactory::class,
        DB\Item\Signatory::class => DbFactory::class,
        DB\Item\Jobstaff::class => DbFactory::class,
        DB\Item\Researchflowcat::class => DbFactory::class,
        DB\Item\Researchstage::class => DbFactory::class,
        DB\Item\Random::class => DbFactory::class,
        DB\Item\Checktime::class => DbFactory::class,
        DB\Item\Checknames::class => DbFactory::class,
        DB\Item\Itemdocument::class => DbFactory::class,
        DB\Item\Documentcontent::class => DbFactory::class,
        DB\Item\Researchremark::class => DbFactory::class,
        DB\Item\PatientChecktimeForm::class => DbFactory::class,
        DB\Item\Superrole::class => DbFactory::class,
        DB\Item\Checkcontent::class => DbFactory::class,
        DB\Item\Patientcheckcontent::class => DbFactory::class,
        DB\Dictionary\Checkcategory::class => ShareDbFactory::class,
        DB\Dictionary\Checkname::class => ShareDbFactory::class,
        DB\Dictionary\Csset::class => ShareDbFactory::class,
        DB\Dictionary\Document::class => ShareDbFactory::class,
        DB\Dictionary\Genercsetinfo::class => ShareDbFactory::class,
        DB\Dictionary\Genercsetinfotype::class => ShareDbFactory::class,
        DB\Dictionary\Itemjob::class => ShareDbFactory::class,
        DB\Dictionary\Patientattr::class => ShareDbFactory::class,
        DB\Dictionary\Patientattrselect::class => ShareDbFactory::class,
        DB\Dictionary\Checknameattr::class => ShareDbFactory::class,
        DB\Dictionary\Unblinding::class => ShareDbFactory::class,
        DB\Dictionary\Ocr::class => ShareDbFactory::class,
        DB\Dictionary\Unit::class => ShareDbFactory::class,
        DB\Admin\Menu::class => DbFactory::class,
        DB\Admin\User::class => DbFactory::class,
        DB\Admin\Role::class => DbFactory::class,
        DB\Admin\Rolemenurelation::class => DbFactory::class,
        DB\Admin\Userrolerelation::class => DbFactory::class,
        DB\Admin\Realrole::class => DbFactory::class,
        DB\Admin\Realrolesignatoryrelation::class => DbFactory::class,
        DB\Admin\Log::class => DbFactory::class,
        DB\Admin\Appletsrolemenurelation::class => DbFactory::class,
        DB\Admin\Appletsmenu::class => DbFactory::class,
        DB\Signatory\Info::class => DbFactory::class,
        DB\Signatory\User::class => DbFactory::class,
        DB\Signatory\Department::class => DbFactory::class,
        DB\Item\Patient::class => DbFactory::class,
        DB\Item\Patientattrs::class => DbFactory::class,
        DB\Dictionary\Form::class => DbFactory::class,
        DB\Item\PatientCard::class => DbFactory::class,
        DB\Item\Randblock::class => DbFactory::class,
        DB\Item\Randgroup::class => DbFactory::class,
        DB\Item\Randnumber::class => DbFactory::class,
        DB\Item\Randomdetails::class => DbFactory::class,
        DB\Item\Blockgroup::class => DbFactory::class,
        DB\Dictionary\FormField::class => DbFactory::class,
        DB\Dictionary\FormVersion::class => DbFactory::class,
        DB\Dictionary\FormGroup::class => DbFactory::class,
        DB\Dictionary\ItemForm::class => DbFactory::class,
        DB\Dictionary\ItemFormField::class => DbFactory::class,
        DB\Item\ItemFormVersion::class => DbFactory::class,
        DB\Dictionary\ItemFormGroup::class => DbFactory::class,
        DB\Item\Rolemodulerelation::class => DbFactory::class,
        DB\Dictionary\ItemFormFieldText::class => DbFactory::class,
        DB\Dictionary\ItemFormFieldRadio::class => DbFactory::class,
        DB\Item\FormFieldText::class => DbFactory::class,
        DB\Item\FormFieldRadio::class => DbFactory::class,
        DB\Item\Patientchecktime::class => DbFactory::class,
        DB\Item\PatientForm::class => DbFactory::class,
        DB\Item\Informedconsent::class => DbFactory::class,
        DB\Item\Imgtxtdiscern::class => DbFactory::class,
        DB\Project\Patientworkannex::class => DbFactory::class,
        DB\Project\Identificationresult::class => DbFactory::class,
        DB\Item\Unblindings::class => DbFactory::class,
        DB\Item\PatientFormContent::class => DbFactory::class,
        DB\Item\PatientFormContentImg::class => DbFactory::class,
        DB\Project\Identificationresultchange::class => DbFactory::class,
        DB\Item\Urgentunblind::class => DbFactory::class,
        DB\Item\File::class => DbFactory::class,
        DB\Project\Setocrfield::class => DbFactory::class,
        DB\Item\Question::class => DbFactory::class,
        DB\Item\Reply::class => DbFactory::class,
        DB\Dictionary\FormRelation::class => DbFactory::class,
        DB\Item\FormRelation::class => DbFactory::class,
        DB\Item\Export::class => DbFactory::class,
        DB\Item\PatientFormContentFieldLock::class => DbFactory::class,
        DB\Item\Patientbooked::class => DbFactory::class,
        DB\Project\Csae::class => DbFactory::class,
        DB\Item\PatientAeContent::class => DbFactory::class,
        DB\Project\CsaeRelation::class => DbFactory::class,
        DB\Item\Medication::class => DbFactory::class,
        DB\Item\Appletsdata::class => DbFactory::class,
        DB\Item\Vicecopy::class => DbFactory::class,
        DB\Item\Informedconsentsign::class => DbFactory::class,
        DB\Work\Show::class => DbFactory::class,
        DB\Work\Schedule::class => DbFactory::class,
        DB\Work\Approval::class => DbFactory::class,
        DB\Item\Downpicture::class => DbFactory::class,
        DB\Item\ItemCsaeChecked::class => DbFactory::class,
        DB\Item\Answer::class => DbFactory::class,
        DB\Item\Signatorypatient::class => DbFactory::class,
        DB\Item\Agecountset::class => DbFactory::class,
        DB\Dictionary\Rule::class => ShareDbFactory::class,
        DB\Dictionary\Formtype::class => ShareDbFactory::class,
        DB\Dictionary\Formtyperule::class => ShareDbFactory::class,
        DB\Dictionary\Workset::class => ShareDbFactory::class,
        DB\Worklist\Itemworklist::class => ShareDbFactory::class,
        DB\Worklist\Itemcustomname::class => ShareDbFactory::class,
        DB\Worklist\Itemworklistset::class => ShareDbFactory::class,
        DB\Worklist\Sigworklist::class => ShareDbFactory::class,
        DB\Worklist\Sigcustomname::class => ShareDbFactory::class,
        DB\Worklist\Sigworklistset::class => ShareDbFactory::class,
        DB\Worklist\Patientinfo::class => ShareDbFactory::class,
        DB\Worklist\Patientconnect::class => ShareDbFactory::class,
        DB\Worklist\Patientworklist::class => ShareDbFactory::class,
        DB\Item\Formpatientsign::class => ShareDbFactory::class,
        DB\Dictionary\Listset::class => ShareDbFactory::class,
        DB\Listset\Itemlist::class => ShareDbFactory::class,
        DB\Listset\Siglist::class => ShareDbFactory::class,
        DB\Listset\Operate::class => ShareDbFactory::class,
        DB\Listset\Annex::class => ShareDbFactory::class,
        DB\Listset\Annexcat::class => ShareDbFactory::class,
        DB\Listset\Flow::class => ShareDbFactory::class,
        DB\Business\Category::class => ShareDbFactory::class,
        DB\Business\Record::class => ShareDbFactory::class,
        DB\Business\Recordannex::class => ShareDbFactory::class,
        DB\Ark\ArkQuery::class => ArkDbFactory::class,
        DB\Project\Backupschange::class => ShareDbFactory::class,
        DB\Dictionary\Questionanswer::class => ShareDbFactory::class,
        DB\Project\Changesendlog::class => ShareDbFactory::class,
        DB\Odm\OdmSyncRecord::class => DbFactory::class,
        DB\Item\ItemInfosign::class => DbFactory::class,
        DB\Item\Logtype::class => DbFactory::class,
        DB\Item\Exportpdf::class => DbFactory::class,
        DB\Project\Identificationresultdestroy::class => DbFactory::class,
        DB\Item\PatientFormUnlock::class => DbFactory::class,
        DB\Item\PatientWorkCount::class => DbFactory::class,
        DB\Admin\Websitefiling::class => DbFactory::class,
        DB\Project\Doctoridea::class => DbFactory::class,
        DB\Item\PatientFormLogic::class => DbFactory::class,
        DB\Item\PatientFormLogicError::class => DbFactory::class,
        DB\Dictionary\Questionconfig::class => EdcDbFactory::class,
        DB\Admin\Configtable::class => DbFactory::class,
        DB\Admin\Send::class => DbFactory::class,
        DB\Item\PatientChecktimeList::class => DbFactory::class,
        DB\Item\Formmodel::class => DbFactory::class,
        DB\Ocr\Keyword::class => ShareDbFactory::class,
        DB\Ocr\Rawdata::class => ShareDbFactory::class,
        DB\Ocr\Matedata::class => ShareDbFactory::class,
        DB\Ocr\Medicalword::class => ShareDbFactory::class,
        DB\Ocr\Matewhite::class => ShareDbFactory::class,
        DB\Ocr\Mateblack::class => ShareDbFactory::class,
        DB\Ocr\Sigpatient::class => ShareDbFactory::class,
        DB\Ocr\Medical::class => ShareDbFactory::class,
        DB\Ocr\Ocrannex::class => ShareDbFactory::class,
        DB\Ocr\Rawword::class => ShareDbFactory::class,
        DB\Ocr\Rawblack::class => ShareDbFactory::class,
        DB\Ocr\Rawlock::class => ShareDbFactory::class,
        DB\Ocr\Medicallock::class => ShareDbFactory::class,
        DB\Ocr\Changetype::class => ShareDbFactory::class,
        DB\Ocr\Deletename::class => ShareDbFactory::class,
        DB\Ocr\Replace::class => ShareDbFactory::class,
        DB\Ocr\Annextype::class => ShareDbFactory::class,
        DB\Ocr\Sigkeyword::class => ShareDbFactory::class,
        DB\Ocr\Ct::class => ShareDbFactory::class,
        DB\Item\Blindmethodlog::class => DbFactory::class,
        DB\Ocr\Loseannex::class => DbFactory::class,
        DB\Dictionary\Checknameweight::class => ShareDbFactory::class,
        DB\Ocr\Matesearch::class => DbFactory::class,
        DB\Item\Checknameweight::class => DbFactory::class,
        DB\Item\Sign::class => DbFactory::class,
        DB\Item\Checknameweight::class => ShareDbFactory::class,
        DB\Project\OcrCsae::class => DbFactory::class,
        DB\Project\OcrTitleKeys::class => DbFactory::class,
        DB\Project\OcrCsaePaitent::class => DbFactory::class,
        DB\Project\OcrCsaePatientDetail::class => DbFactory::class,
        DB\Project\OcrCasePatientSpecialdetail::class => DbFactory::class,
        DB\Item\ItemRemarks::class => DbFactory::class,
        DB\Ocr\Ctcase::class => ShareDbFactory::class,
        DB\Ocr\Caseremark::class => ShareDbFactory::class,
        DB\Project\OcrCsaeNew::class => DbFactory::class,
        DB\Project\OcrCsaePatientDetailNew::class => DbFactory::class,
        DB\Project\OcrCasePatientSpecialdetailNew::class => DbFactory::class,
        DB\Ocr\Ocrannexnew::class => ShareDbFactory::class,
        DB\Ocr\Drug::class => ShareDbFactory::class,
        DB\Ocr\Take::class => ShareDbFactory::class,
        DB\Ocr\Ctreplace::class => ShareDbFactory::class,
        DB\Ocr\Matedrug::class => ShareDbFactory::class,
        DB\Ocr\Drugcategory::class => ShareDbFactory::class,
        DB\Dictionary\Medicaltake::class => ShareDbFactory::class,
        DB\Dictionary\Medicalword::class => ShareDbFactory::class,
        DB\Dictionary\Drugcategory::class => ShareDbFactory::class,
        DB\Dictionary\Drug::class => ShareDbFactory::class,
        DB\Medical\Matewhite::class => ShareDbFactory::class,
        DB\Medical\Mateblack::class => ShareDbFactory::class,
        DB\Medical\Matedrug::class => ShareDbFactory::class,
        DB\Medical\Ocrdata::class => ShareDbFactory::class,
        DB\Medical\Lock::class => ShareDbFactory::class,
        DB\Item\Allowpatientwrite::class => DbFactory::class,
        DB\Project\Changeupdatelog::class => DbFactory::class,
        DB\Pay\Recharge::class => DbFactory::class,
        DB\Pay\Transfer::class => DbFactory::class,
        DB\Tmp\Deletename::class => ShareDbFactory::class,
        DB\Tmp\Drug::class => ShareDbFactory::class,
        DB\Tmp\Drugcategory::class => ShareDbFactory::class,
        DB\Tmp\Keyword::class => ShareDbFactory::class,
        DB\Tmp\Medical::class => ShareDbFactory::class,
        DB\Tmp\Medicalblack::class => ShareDbFactory::class,
        DB\Tmp\Medicaldrug::class => ShareDbFactory::class,
        DB\Tmp\Medicallock::class => ShareDbFactory::class,
        DB\Tmp\Medicaltake::class => ShareDbFactory::class,
        DB\Tmp\Medicalwhite::class => ShareDbFactory::class,
        DB\Tmp\Medicalword::class => ShareDbFactory::class,
        DB\Tmp\Rawblack::class => ShareDbFactory::class,
        DB\Tmp\Rawdata::class => ShareDbFactory::class,
        DB\Tmp\Rawlock::class => ShareDbFactory::class,
        DB\Tmp\Rawmate::class => ShareDbFactory::class,
        DB\Tmp\Rawword::class => ShareDbFactory::class,
        DB\Tmp\Replace::class => ShareDbFactory::class,
        DB\Tmp\Sigkeyword::class => ShareDbFactory::class,
        DB\Tmp\Hospital::class => ShareDbFactory::class,
        DB\Tmp\Inspect::class => ShareDbFactory::class,
        DB\Tmp\Patienthospital::class => ShareDbFactory::class,
        DB\Tmp\Report::class => ShareDbFactory::class,
        DB\Dictionary\Disease::class => ShareDbFactory::class,
        DB\Dictionary\Diseasecategory::class => ShareDbFactory::class,
        DB\Tmp\Annex::class => ShareDbFactory::class,
        DB\Tmp\Patient::class => ShareDbFactory::class,
        DB\Tmp\Patientct::class => ShareDbFactory::class,
        DB\Tmp\Custom::class => ShareDbFactory::class,
        DB\Tmp\Table::class => ShareDbFactory::class,
        DB\Tmp\Text::class => ShareDbFactory::class,
        DB\Tmp\Outmedical::class => ShareDbFactory::class,
        DB\Tmp\Intervene::class => ShareDbFactory::class,
        DB\Tmp\Intervene0::class => ShareDbFactory::class,
        DB\Tmp\Intervene1::class => ShareDbFactory::class,
        DB\Tmp\Intervene2::class => ShareDbFactory::class,
        DB\Ocr\Rawlockunique::class => ShareDbFactory::class,
        DB\Tmp\Ctreplace::class => ShareDbFactory::class,
        DB\Tmp\Doctoradviceoriginal::class => ShareDbFactory::class,
        DB\Tmp\Doctoradvicelock::class => ShareDbFactory::class,
        DB\Tmp\Doctoradvicematewhite::class => ShareDbFactory::class,
        DB\Tmp\Doctoradvicemateblack::class => ShareDbFactory::class,
        DB\Tmp\Doctoradvicematedrug::class => ShareDbFactory::class,
        DB\Tmp\Doctoradvicetable::class => ShareDbFactory::class,
        DB\Tmp\Doctoradviceannex::class => ShareDbFactory::class,
        DB\Tmp\Doctoradvicepatient::class => ShareDbFactory::class,
        DB\Tmp\Doctoradviceformal::class => ShareDbFactory::class,
        DB\Item\MessageField::class => DbFactory::class,
        DB\Item\MessageSend::class => DbFactory::class,
        DB\Item\MessageSendPatient::class => DbFactory::class,
        DB\Item\MessageSendLog::class => DbFactory::class,
        DB\Collect\Category::class => ShareDbFactory::class,
        DB\Collect\Inspect::class => ShareDbFactory::class,
        DB\Collect\Hospital::class => ShareDbFactory::class,
        DB\Collect\Itemhospital::class => ShareDbFactory::class,
        DB\Collect\Out::class => ShareDbFactory::class,
        DB\Collect\Itemout::class => ShareDbFactory::class,
        DB\Collect\Drugcategory::class => ShareDbFactory::class,
        DB\Collect\Drug::class => ShareDbFactory::class,
        DB\Collect\Medicaltake::class => ShareDbFactory::class,
        DB\Collect\Medicalword::class => ShareDbFactory::class,
        DB\Collect\Itemdrug::class => ShareDbFactory::class,
        DB\Collect\Ecg::class => ShareDbFactory::class,
        DB\Collect\Itemecg::class => ShareDbFactory::class,
        DB\Collect\Ct::class => ShareDbFactory::class,
        DB\Collect\Itemct::class => ShareDbFactory::class,
        DB\Collect\Report::class => ShareDbFactory::class,
        DB\Collect\Itemreport::class => ShareDbFactory::class,
        DB\Collect\Keywordcat::class => ShareDbFactory::class,
        DB\Collect\Keyword::class => ShareDbFactory::class,
        DB\Collect\Rawword::class => ShareDbFactory::class,
        DB\Collect\Itemkeyword::class => ShareDbFactory::class,
        DB\Collect\Cost::class => ShareDbFactory::class,
        DB\Collect\Itemcost::class => ShareDbFactory::class,
        DB\Item\MessageSendPatientChase::class => DbFactory::class,
        DB\Collect\Patienthospital::class => ShareDbFactory::class,
        DB\Project\ChangeReference::class => DbFactory::class,
        DB\Collect\Patientecg::class => ShareDbFactory::class,
        DB\Collect\Patientct::class => ShareDbFactory::class,
        DB\Collect\Patientreport::class => ShareDbFactory::class,
        DB\Collect\Patientraw::class => ShareDbFactory::class,
        DB\Collect\Patientrawmate::class => ShareDbFactory::class,
        DB\Collect\Patientrawblack::class => ShareDbFactory::class,
        DB\Collect\Patientrawlock::class => ShareDbFactory::class,
        DB\Collect\Patientmedical::class => ShareDbFactory::class,
        DB\Collect\Patientmedicalwhite::class => ShareDbFactory::class,
        DB\Collect\Patientmedicalblack::class => ShareDbFactory::class,
        DB\Collect\Patientmedicaldrug::class => ShareDbFactory::class,
        DB\Collect\Patientmedicallock::class => ShareDbFactory::class,
        DB\Collect\Patientout::class => ShareDbFactory::class,
        DB\Ocr\Specialmedical::class => ShareDbFactory::class,
        DB\Collect\Patient::class => ShareDbFactory::class,
        DB\Collect\Annex::class => ShareDbFactory::class,
        DB\Export\Sas::class    => DbFactory::class,
        DB\Collect\Sighospital::class    => ShareDbFactory::class,
        DB\Collect\Sigout::class    => ShareDbFactory::class,
        DB\Collect\Sigkeyword::class    => ShareDbFactory::class,
        DB\Project\Itemformrecognition::class  => DbFactory::class,
        DB\Project\PatientFormContentRecognition::class  => DbFactory::class,
        DB\Item\Patientformimgcontent::class  => DbFactory::class,
        DB\Dictionary\Detectname::class => ShareDbFactory::class,
        DB\Dictionary\Detectkeyword::class => ShareDbFactory::class,
        DB\Dictionary\Detectblackword::class => ShareDbFactory::class,
        DB\Collect\Table::class => ShareDbFactory::class,
        DB\Collect\Text::class => ShareDbFactory::class,
        DB\Collect\Custom::class => ShareDbFactory::class,
        DB\Project\Identificationexport::class => DbFactory::class,
        DB\Item\ItemResultidentify::class => DbFactory::class,
        DB\Item\itemEventwatchdog::class => DbFactory::class,
        DB\Temple\Annex::class => DbFactory::class,
        DB\Temple\checklist::class => DbFactory::class,
        DB\Item\ItemMedicaltake::class => DbFactory::class,
        DB\Doctoradvice\DoctoradviceOriginal::class => DbFactory::class,
        DB\Item\Patientinfo::class => DbFactory::class,
        DB\Dictionary\Leverform::class => ShareDbFactory::class,
        DB\Dictionary\Levervalue::class => ShareDbFactory::class,
        DB\Item\SignatoryCollecttypeocr::class => DbFactory::class,
        DB\Item\Detectpatient::class => ShareDbFactory::class,
        DB\Dictionary\Ocrreplace::class => ShareDbFactory::class,
        DB\Item\Cissclass::class => ShareDbFactory::class,
        DB\Item\Cissoption::class => ShareDbFactory::class,
        DB\Item\Patientciss::class => ShareDbFactory::class,
        DB\Dictionary\Fixednametype::class => ShareDbFactory::class,
        DB\Dictionary\Fixedname::class => ShareDbFactory::class,
        DB\Project\Msgset::class => ShareDbFactory::class,
        DB\Project\Msginfo::class => ShareDbFactory::class,
        DB\Project\Msgsend::class => ShareDbFactory::class,
        DB\Item\Planviolate::class => ShareDbFactory::class,
        DB\Admin\Weblink::class => DbFactory::class,
        DB\Admin\Workbatch::class => ShareDbFactory::class,
        DB\Admin\Workinfo::class => ShareDbFactory::class,
        DB\Dictionary\Eventset::class => ShareDbFactory::class,
        DB\Dictionary\Eventattr::class => ShareDbFactory::class,
        DB\Admin\Medicallock::class => ShareDbFactory::class,
        DB\Item\Patientevent::class => ShareDbFactory::class,
        DB\Item\Patienteventannex::class => ShareDbFactory::class,
        DB\Item\Patienteventset::class => ShareDbFactory::class,
        DB\Project\Patientwork::class => ShareDbFactory::class,
        DB\Item\Randomsecondary::class => ShareDbFactory::class,
        DB\Project\Medicalquestion::class => ShareDbFactory::class,
        DB\Project\Medicalquestioninfo::class => ShareDbFactory::class,
        DB\Project\Medicalconfirm::class => ShareDbFactory::class,
        DB\Project\Medicalconfirminfo::class => ShareDbFactory::class,
        DB\Project\Medicalset::class => ShareDbFactory::class,
        DB\Item\Checkdate::class => ShareDbFactory::class,
        DB\Dictionary\Region::class => ShareDbFactory::class,
        DB\Project\Exceedswindow::class => ShareDbFactory::class,
        DB\Project\Cmdrugset::class => ShareDbFactory::class,
        DB\Collect\Patientdrug::class => ShareDbFactory::class,
        DB\Dictionary\Itemcategory::class => ShareDbFactory::class,
        DB\Item\Package::class => ShareDbFactory::class,
    ]
];


$appendMap = [
    'itemPatientFormLogicErrorQuery' => [DB\Item\PatientFormLogicErrorQuery::class, EdcDbFactory::class],
    'itemPatientFormLogicErrorPointer' => [DB\Item\PatientFormLogicErrorPointer::class, EdcDbFactory::class], // 逻辑核查错误表
    'itemPatientFormLogic' => [DB\Item\PatientFormLogic::class, EdcDbFactory::class], // 逻辑核查公式表
    'itemPatientFormLogicError' => [DB\Item\PatientFormLogicError::class, EdcDbFactory::class], // 逻辑核查错误表
    'itemPatientFormLogicErrorLog' => [DB\Item\PatientFormLogicErrorLog::class, EdcDbFactory::class],
    'patientChecktimeListEdc' => [DB\Item\PatientChecktimeListEdc::class, EdcDbFactory::class],
    'patientWorkCountEdc' => [DB\Item\PatientWorkCountEdc::class, EdcDbFactory::class],
    'realRolemodulerelationEdc' => [DB\Item\RolemodulerelationEdc::class, EdcDbFactory::class],
    'adminMenuEdc' => [DB\Admin\MenuEdc::class, EdcDbFactory::class],
    'itemLock' => [DB\Item\Lock::class, EdcDbFactory::class],
    'itemConfirm' => [DB\Item\Confirm::class, EdcDbFactory::class],
    'patientFormLock' => DB\Item\PatientFormLock::class,
    'itemFormEdc' => [DB\Item\ItemFormEdc::class, EdcDbFactory::class],
    'itemCheckcontentEdc' => [DB\Item\ItemCheckcontentEdc::class, EdcDbFactory::class],
    'patientFormContentUpdated' => DB\Item\PatientFormContentUpdated::class,
    'patientFormContentUpdatedLog' => [DB\Item\PatientFormContentUpdatedLog::class, ChainFactory::class],
    'patientFormContentCm' => DB\Item\PatientFormContentCm::class,
    'itemSignaturebatch' => [DB\Item\Signaturebatch::class, EdcDbFactory::class],
    'itemSignaturedetail' => [DB\Item\Signaturedetail::class, EdcDbFactory::class],
    'itemLogicErrorReportBlack' => [DB\Item\ItemLogicErrorReportBlack::class, EdcDbFactory::class],
    'patientFormResultchangeUpdated' => DB\Item\PatientFormResultchangeUpdated::class,
    'itemPatientFormContentDelete' => DB\Item\PatientFormContentDelete::class,
    'projectPatientworkbatch' => [DB\Project\Patientworkbatch::class, EdcDbFactory::class],
    'projectPatientworkinfo' => [DB\Project\Patientworkinfo::class, EdcDbFactory::class],
    'logLogin' => [DB\Log\LogLogin::class, DbFactory::class],
];

//function generate123 ($appendMap): array {
//    $r = [];
//    foreach ($appendMap as $name => $db) {
//        if (is_array($db)) {
//            list($class, $factory) = $db;
//            $r['aliases'][$name] = $class;
//            $r['factories'][$class] = $factory;
//        } else {
//            $r['aliases'][$name] = $db;
//            $r['factories'][$db] = DbFactory::class;
//        }
//    }
//
//    return $r;
//}

return ArrayHelper::merge($dbServerMap, call_user_func(function () use ($appendMap) {
    $r = [];
    foreach ($appendMap as $name => $db) {
        if (is_array($db)) {
            list($class, $factory) = $db;
            $r['aliases'][$name] = $class;
            $r['factories'][$class] = $factory;
        } else {
            $r['aliases'][$name] = $db;
            $r['factories'][$db] = DbFactory::class;
        }
    }

    return $r;
}));