fda_submission_package
Version:
this plug-in be use FDA Submission
1 lines • 5.78 kB
JavaScript
const a1_0x3fe2=['parse','CODELIST_LONG_NAME','array-sort','CODELIST_EXTENSIBLE','CODELIST_DEFINITION','CODE','utils','forEach','sheet_to_json','NCI_PREFERRED_TERM','ENDORSEMENT_LEVEL','Sheets','target','CODE_DEFINITION','DOMAIN','xlsx/dist/xlsx.full.min','keys','indexOf','assign','filter','stringify','min','push','!ref','CODELIST_SHORT_NAME','length','result','SUBMISSION_VALUE','CODE_EXTENSIBLE','CODELIST','DISPLAY_ORDER','DATA_TYPE','encode_range','max','SYNONYM','hasOwnProperty','replace','CODELIST_CODE','map','USED','DECODE'];(function(_0x33e393,_0x3fe207){const _0x3de469=function(_0x40e77d){while(--_0x40e77d){_0x33e393['push'](_0x33e393['shift']());}};_0x3de469(++_0x3fe207);}(a1_0x3fe2,0x13e));const a1_0x3de4=function(_0x33e393,_0x3fe207){_0x33e393=_0x33e393-0x0;let _0x3de469=a1_0x3fe2[_0x33e393];return _0x3de469;};var XLSX=require(a1_0x3de4('0x19')),arraySort=require(a1_0x3de4('0xc'));function loadCT(_0x1c4fbc,_0x48f806){let _0x1e3c02={};_0x1e3c02['CT']=[];let _0x26d3d2=![];_0x48f806=_0x48f806||null;if(_0x1c4fbc){let _0x103453=_0x1c4fbc[a1_0x3de4('0x16')][a1_0x3de4('0x24')],_0x5257ac=XLSX['read'](_0x103453,{'type':'binary'});for(let _0x2f9d9a in _0x5257ac[a1_0x3de4('0x15')]){let _0x97237c=_0x5257ac['Sheets'][_0x2f9d9a];update_sheet_range(_0x97237c);let _0x48a74e=XLSX[a1_0x3de4('0x10')][a1_0x3de4('0x12')](_0x97237c),_0x3f8d3a={},_0x564f86={},_0x2ed430=[];if(_0x48a74e[a1_0x3de4('0x23')]){if(_0x48a74e[0x0][a1_0x3de4('0x4')](a1_0x3de4('0x22'))){var _0x16c43c=arraySort(_0x48a74e,[_0x48f806,'ENDORSEMENT_LEVEL',a1_0x3de4('0x22'),a1_0x3de4('0x6'),a1_0x3de4('0x0')]);for(let _0x25f6ad=0x0;_0x25f6ad<_0x16c43c[a1_0x3de4('0x23')];_0x25f6ad++){let _0xa821f7=_0x16c43c[_0x25f6ad],_0x5da44b={},_0x57f082={};for(let _0x6b8bb4 in _0xa821f7){_0x5da44b[_0x6b8bb4[a1_0x3de4('0x5')](/\s/g,'')]=_0xa821f7[_0x6b8bb4];let _0x31cd47=_0x6b8bb4['replace'](/\s|_/g,'');_0x31cd47==_0x48f806&&_0xa821f7[_0x6b8bb4]!=''&&(_0x26d3d2=!![],_0x57f082['USED']=!![]);}_0x57f082[a1_0x3de4('0xf')]=_0x5da44b[a1_0x3de4('0xf')],_0x57f082['SUBMISSION_VALUE']=_0x5da44b[a1_0x3de4('0x25')],_0x57f082[a1_0x3de4('0x9')]=_0x5da44b['DECODE'],_0x57f082[a1_0x3de4('0x17')]=_0x5da44b[a1_0x3de4('0x17')],_0x57f082[a1_0x3de4('0x28')]=_0x5da44b['DISPLAY_ORDER'],_0x57f082['RANK']=_0x5da44b['RANK'],_0x5da44b[a1_0x3de4('0xd')]&&(_0x57f082[a1_0x3de4('0x26')]=_0x5da44b[a1_0x3de4('0xd')]),_0x5da44b['CDISC_SYNONYM']&&(_0x57f082[a1_0x3de4('0x3')]=_0x5da44b['CDISC_SYNONYM']),_0x5da44b[a1_0x3de4('0x22')]==a1_0x3de4('0x18')&&(_0x57f082[a1_0x3de4('0x9')]=_0x57f082['SYNONYM']),_0x5da44b[a1_0x3de4('0x13')]&&!_0x57f082[a1_0x3de4('0x9')]&&(_0x57f082['DECODE']=_0x5da44b[a1_0x3de4('0x13')]),Object[a1_0x3de4('0x1a')](_0x3f8d3a)[a1_0x3de4('0x23')]!=0x0&&((_0x3f8d3a['CODELIST_CODE']!=_0x5da44b['CODELIST_CODE']||_0x3f8d3a[a1_0x3de4('0x22')]!=_0x5da44b['CODELIST_SHORT_NAME']||_0x3f8d3a[a1_0x3de4('0x0')]!=_0x5da44b[a1_0x3de4('0x0')])&&(_0x564f86[a1_0x3de4('0x14')]=_0x3f8d3a[a1_0x3de4('0x14')],_0x564f86[a1_0x3de4('0x6')]=_0x3f8d3a[a1_0x3de4('0x6')],_0x564f86[a1_0x3de4('0xe')]=_0x3f8d3a[a1_0x3de4('0xe')],_0x564f86[a1_0x3de4('0xb')]=_0x3f8d3a[a1_0x3de4('0xb')],_0x564f86[a1_0x3de4('0x22')]=_0x3f8d3a[a1_0x3de4('0x22')],_0x3f8d3a['CODELIST_EXTENSIBLE']&&(_0x564f86[a1_0x3de4('0xd')]=_0x3f8d3a[a1_0x3de4('0xd')]),_0x564f86['DATA_TYPE']=_0x3f8d3a['DATA_TYPE'],_0x564f86[a1_0x3de4('0x27')]=JSON['parse'](JSON['stringify'](_0x2ed430)),_0x1e3c02['CT'][a1_0x3de4('0x20')](JSON[a1_0x3de4('0xa')](JSON[a1_0x3de4('0x1e')](_0x564f86))),_0x564f86={},_0x2ed430=[]),_0x25f6ad==_0x48a74e[a1_0x3de4('0x23')]-0x1&&(_0x564f86[a1_0x3de4('0x6')]=_0x5da44b['CODELIST_CODE'],_0x564f86[a1_0x3de4('0xe')]=_0x5da44b[a1_0x3de4('0xe')],_0x564f86[a1_0x3de4('0xb')]=_0x5da44b['CODELIST_LONG_NAME'],_0x564f86[a1_0x3de4('0x22')]=_0x5da44b[a1_0x3de4('0x22')],_0x564f86['DATA_TYPE']=_0x5da44b['DATA_TYPE'],_0x2ed430[a1_0x3de4('0x20')](JSON['parse'](JSON['stringify'](_0x57f082))),_0x564f86['CODELIST']=JSON[a1_0x3de4('0xa')](JSON[a1_0x3de4('0x1e')](_0x2ed430)),_0x1e3c02['CT']['push'](JSON[a1_0x3de4('0xa')](JSON[a1_0x3de4('0x1e')](_0x564f86))))),_0x2ed430[a1_0x3de4('0x20')](JSON['parse'](JSON[a1_0x3de4('0x1e')](_0x57f082))),_0x3f8d3a=Object[a1_0x3de4('0x1c')]({},_0x5da44b);}}}}}return _0x26d3d2?_0x1e3c02['CT']=_0x1e3c02['CT']['filter'](_0x191477=>{let _0x3ea5b0=![];return _0x191477['CODELIST']=_0x191477[a1_0x3de4('0x27')][a1_0x3de4('0x1d')](_0x12a4a5=>{return _0x12a4a5['USED']&&(_0x3ea5b0=!![]),_0x12a4a5[a1_0x3de4('0x8')];}),_0x3ea5b0&&(_0x191477['USED']=!![]),_0x191477[a1_0x3de4('0x8')]==!![];}):_0x1e3c02['CT']=_0x1e3c02['CT'][a1_0x3de4('0x7')](_0x203fe2=>{let _0x1bd31d=![],_0x5d4d44=[];return _0x203fe2[a1_0x3de4('0x27')]=_0x203fe2[a1_0x3de4('0x27')][a1_0x3de4('0x7')](_0x2aaac0=>{let _0x2af20b=_0x5d4d44[a1_0x3de4('0x1b')](_0x2aaac0[a1_0x3de4('0x25')]);return _0x2af20b==-0x1&&(_0x2aaac0[a1_0x3de4('0x8')]=!![],_0x1bd31d=!![],_0x5d4d44[a1_0x3de4('0x20')](_0x2aaac0[a1_0x3de4('0x25')])),_0x2aaac0;}),_0x1bd31d&&(_0x203fe2[a1_0x3de4('0x8')]=!![]),_0x203fe2;}),_0x1e3c02['CT'];}function update_sheet_range(_0x251292){var _0x154f46={'s':{'r':Infinity,'c':Infinity},'e':{'r':0x0,'c':0x0}};Object[a1_0x3de4('0x1a')](_0x251292)['filter'](function(_0x3fe77f){return _0x3fe77f['charAt'](0x0)!='!';})[a1_0x3de4('0x7')](XLSX[a1_0x3de4('0x10')]['decode_cell'])[a1_0x3de4('0x11')](function(_0x983400){_0x154f46['s']['c']=Math[a1_0x3de4('0x1f')](_0x154f46['s']['c'],_0x983400['c']),_0x154f46['s']['r']=Math[a1_0x3de4('0x1f')](_0x154f46['s']['r'],_0x983400['r']),_0x154f46['e']['c']=Math[a1_0x3de4('0x2')](_0x154f46['e']['c'],_0x983400['c']),_0x154f46['e']['r']=Math[a1_0x3de4('0x2')](_0x154f46['e']['r'],_0x983400['r']);}),_0x251292[a1_0x3de4('0x21')]=XLSX[a1_0x3de4('0x10')][a1_0x3de4('0x1')](_0x154f46);}module['exports']={'loadCT':loadCT};