1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963 |
- /**
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 진료 - 질병 및 수술분류 ( SMMRD00700_질병및수술분류.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
-
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- **/
- /**
- * @ver : 2007/12/27
- * @desc :폼초기화 및 공통코드 load,opener여부
- * @ :
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- **/
- function fInitialize()
- {
- // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
- mmbfGetHardCodeInfo("/root/send/reqdata", "/root/temp/deptcd", 5501);
- mmbfGetHardCodeInfo("/root/send/reqdata", "/root/temp/dutplcecd", 5502);
- // KNUH_20101207_박성호_end
- //공통코드 가져오기(종교,감염종류1,감염원인2,합병증,재수술코드,직업,차트상태,주/부진단,R/o진단,확정진단,종양구분,가코딩사유코드 가져오기)
- zbcfGetCodeList(new Array("M0070","M0151","M0414", "M0484", "M0159","M0149","M0416","M0019","M0018","M0417","M0433","M0434", "M0415"),
- new Array("/root/init/relignList","/root/init/maryStatList","/root/init/cmpllist", "/root/init/infccaselist","/root/init/reOpResnList",
- "/root/init/jobList","/root/init/disposstatlist","/root/init/diagkindcdflag",
- "/root/init/diagkindcd","/root/init/unprepstatlist","/root/init/cncrlist","/root/init/tmpcoderesnlist", "/root/init/wundcasclslist"), true);
- zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/init/diagchgndeptlist", "depthngnm", "asc");// 임상과리스트
- copyNodeset("/root/init/opchgndeptlist/dept", "/root/init/diagchgndeptlist/dept");
- model.removeNodeset("/root/main/indxinfo/ccindxinfo/ccindxlist");
- model.removeNodeset("/root/main/indxinfo/bfindxlist/bfindxinfo");
- model.removeNodeset("/root/main/indxinfo/diagindxinfo/diagindxlist");
- model.removeNodeset("/root/main/indxinfo/diaginfo/diaglist");
- model.removeNodeset("/root/main/indxinfo/insudiaginfo/insudiaglist");
- model.removeNodeset("/root/opinfo/opindxdtlinfo/opindxdtllist");
- model.removeNodeset("/root/main/indxinfo/cnstinfo/cnstlist");
- model.removeNodeset("/root/main/indxinfo/opinfo/oplist");
- model.removeNodeset("/root/main/indxinfo/cureindxinfo/cureindxlist");
- model.removeNodeset("/root/main/indxinfo/dethindxinfo/dethindxlist");
- model.removeNodeset("/root/main/indxinfo/serdiaginfo/serdiaglist");
- model.removeNodeset("/root/main/indxinfo/cnstinfo/cnstlist");
- if(checkOpener()){
- var parampid = opener.javascript.getParameter("SMMRD00400_pid");
- var paramdschdd = opener.javascript.getParameter("SMMRD00400_dschdd");
- fUserAdmin();//의료정보사용자한하여 저장버튼 visible
- chk_cretchknum.value = "false";
- model.setValue("/root/main/indxinfo/dschpatinfo/patinfo/pid", parampid);
- if(parampid != "")
- {
- fPidKeyPress();
- if(paramdschdd!=""){
- var sDschdd=model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- if(paramdschdd!=sDschdd){
- cmb_dschdd.refresh();
- model.setValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd", paramdschdd);
- fSelectDschdd();
- }
- }
- }
- }
- model.refresh();
- }
- /**
- * @desc : 수술 색인정보 조회
- * @id :
- * @event : xforms
- * @return : void
- * @authur :
- */
- function fOpIndxInfo()
- {
- submit("TRMRD00706");
- }
- function fOpIndxList()
- {
- submit("TRMRD00707");
- }
- /**
- * @desc : 등록번호로 조회
- * @id :
- * @event : xforms
- * @return : void
- * @authur :
- */
- function fPidKeyPress()
- {
- button99.dispatch("onclick");
- var sPid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var instcd= getUserInfo("dutplceinstcd");
- if(model.getValue("/root/init/checknum/value") == "true"){//체킹번호 체크
- var cret_pid = getCretCheckNo(sPid, instcd);
- model.makeValue("/root/send/reqdata/pid", cret_pid);
- model.makeValue("/root/main/indxinfo/dschpatinfo/patinfo/pid", cret_pid);
- } else {
- model.makeValue("/root/send/reqdata/pid", sPid);
- }
-
- // 이중번호 체크 관련
- model.makeValue("/root/send/cond/srchcond", "1");
- model.makeValue("/root/send/cond/pid", ipt_pid.currentText);
-
- if(model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid").length >= 1 )
- {
-
- if(submit("TRPMC02500"))
- {
- model.removeNodeset("/root/main/indxinfo/infdisinfo/infdislist");
- model.makeValue("/root/send/reqdata/instcd",instcd);
- if(submit("TRMRD00703")){
- //퇴원일자와 동시에 퇴원일자에 따른 환자내용 가져오기
- if(getNodesetCnt(model,"/root/init/dschpatinfo/chgdschinfo/chgdschddlist")>0){
- var dschdd = model.getValue("/root/init/dschpatinfo/chgdschinfo/chgdschddlist/dschdd[1]");
- var dschddnm = model.getValue("/root/init/dschpatinfo/chgdschinfo/chgdschddlist/dschddnm[1]");
- var indxmyn = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/indxmyn");
- model.setValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd" ,dschddnm);
- model.makeValue("/root/send/reqdata/dschdd" ,dschdd);
- model.makeValue("/root/send/reqdata/indd" ,model.getValue("/root/init/dschpatinfo/chgdschinfo/chgdschddlist[dschdd='"+dschdd+"']/indd"));
- model.makeValue("/root/send/reqdata/cretno" ,model.getValue("/root/init/dschpatinfo/chgdschinfo/chgdschddlist[dschdd='"+dschdd+"']/cretno"));
- fOpIndxInfo();
- if(submit("TRMRD00702")){
- //2013/01/08 Start 퇴원분석이 되지 않은 상태에서는 질병 및 수술분류를 하지 못하도록 블럭킹 처리
- var getcretno=model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/cretno");
- if(getcretno==""){
- messageBox("퇴원 분석 후 ","C003");
- btn_save.disabled=true;
- return;
- }
- btn_save.disabled=false;
- //2013/01/08 End
- var code = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/infccas");
- var chngdeptyn = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/chngdeptyn");
- fGetInFcCas(code);
- fChgTmpCodeyn();
- if(chngdeptyn !="Y"){ //전출 여부에 따른 진단,수술 전출과컬럼 disabled
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngdeptcd"))=true;
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngclrsdeptcd"))=true;
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngdeptcd"))=true;
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngclrsdeptcd"))=true;
- }else{
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngdeptcd"))=false;
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngclrsdeptcd"))=false;
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngdeptcd"))=false;
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngclrsdeptcd"))=false;
- }
- if(getNodesetCnt(model,"/root/main/indxinfo/infdisinfo/infdislist")>0){
- model.setValue("/root/main/indxinfo/dschpatinfo/patinfo/infdisyn","01");
- btn_infdis.disabled= false;
- }else{
- model.setValue("/root/main/indxinfo/dschpatinfo/patinfo/infdisyn","02");
- btn_infdis.disabled= true;
- }
- model.makeValue("/root/main/indxinfo/dschpatinfo/patinfo/infdisyncd",model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/infdisyn"));
- cmb_infdisyn.refresh();
- ipt_infdisyncd.refresh();
- var sPid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var sDschDD = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- sDschDD = sDschDD.substr(0,4)+"/"+sDschDD.substr(4,2)+"/"+sDschDD.substr(6,2)
- var diagtermcd = model.getValue("/root/main/indxinfo/diagindxinfo/diagindxlist/diagtermcd");
- var fstrgstdt = model.getValue("/root/main/indxinfo/indxmastinfo/indxmast/fstrgstdt");
- var fstrgstrnm = model.getValue("/root/main/indxinfo/indxmastinfo/indxmast/fstrgstrnm");
- if((diagtermcd!="")&&((fstrgstdt!="")||(fstrgstrnm!="")) ){
- messageBox(sPid + "환자의" + sDschDD +"의 질병및수술분류가 되어","I010");
- }
-
- }
- }else{
- messageBox("없는 환자 번호 입니다.", "E999", "");
- model.setFocus("ipt_pid");
- }
- }
- }
- }else{
- messageBox("환자등록번호를 정확히", "C001");
- }
- model.refresh();
- }
- /**
- * @desc : 환자의 퇴원일자 가져오기
- * @id :
- * @event : xforms
- * @return : void
- * @authur :
- */
- function fSelectDschdd()
- {
- //퇴원일자 선택시 모든 정보 변경
- var dschdd=model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var sPid=model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var indd=model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/orgindd");
- var cretno=model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/cretno");
- model.removeNodeset("/root/main/indxinfo/infdisinfo/infdislist");
- model.makeValue("/root/send/reqdata/dschdd" ,dschdd);
- model.makeValue("/root/send/reqdata/pid" ,sPid);
- model.makeValue("/root/send/reqdata/indd" ,model.getValue("/root/init/dschpatinfo/chgdschinfo/chgdschddlist[dschdd='"+dschdd+"']/indd"));
- model.makeValue("/root/send/reqdata/cretno" ,model.getValue("/root/init/dschpatinfo/chgdschinfo/chgdschddlist[dschdd='"+dschdd+"']/cretno"));
-
-
- if(submit("TRMRD00702")){
- //2013/01/08 Start 퇴원분석이 되지 않은 상태에서는 질병 및 수술분류를 하지 못하도록 블럭킹 처리
- var getcretno=model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/cretno");
- if(getcretno==""){
- messageBox("퇴원 분석 후 ","C003");
- btn_save.disabled=true;
- return;
- }
- btn_save.disabled=false;
- //2013/01/08 End
- var code = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/infccas");
- var chngdeptyn = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/chngdeptyn");
- fGetInFcCas(code);
- fChgTmpCodeyn();
-
- // 수술정보 가져오기(20120831 이윤주)
- fOpIndxInfo();
-
- if(chngdeptyn !="Y"){ //전출 여부에 따른 진단,수술 전출과컬럼 disabled
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngdeptcd"))=true;
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngclrsdeptcd"))=true;
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngdeptcd"))=true;
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngclrsdeptcd"))=true;
- }else{
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngdeptcd"))=false;
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngclrsdeptcd"))=false;
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngdeptcd"))=false;
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngclrsdeptcd"))=false;
- }
- if(getNodesetCnt(model,"/root/main/indxinfo/infdisinfo/infdislist")>0){
- model.setValue("/root/main/indxinfo/dschpatinfo/patinfo/infdisyn","01");
- btn_infdis.disabled= false;
- }else{
- model.setValue("/root/main/indxinfo/dschpatinfo/patinfo/infdisyn","02");
- btn_infdis.disabled= true;
- }
- model.makeValue("/root/main/indxinfo/dschpatinfo/patinfo/infdisyncd",model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/infdisyn"));
- cmb_infdisyn.refresh();
- ipt_infdisyncd.refresh();
- var sPid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var sDschDD = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- sDschDD = sDschDD.substr(0,4)+"/"+sDschDD.substr(4,2)+"/"+sDschDD.substr(6,2)
- var diagtermcd = model.getValue("/root/main/indxinfo/diagindxinfo/diagindxlist/diagtermcd");
- var fstrgstdt = model.getValue("/root/main/indxinfo/indxmastinfo/indxmast/fstrgstdt");
- var fstrgstrnm = model.getValue("/root/main/indxinfo/indxmastinfo/indxmast/fstrgstrnm");
- if((diagtermcd!="")&&((fstrgstdt!="")||(fstrgstrnm!="")) ){
- messageBox(sPid + "환자의" + sDschDD +"의 질병및수술분류가 되어","I010");
- }
- }
- }
- /**
- * @desc :
- * @id : 주호소 팝업 과 연계
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fCcIndxList(flag)
- {
- var sPid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var sDschdd = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- if((sPid=="")&&(sDschdd=="")){
- messageBox("퇴원일자가 선택되지" ,"E007");
- return;
- }
- clearParameter("SPMRF04200_SEARCHDATA");
- model.removeNodeset("/root/temp/selectdiaglist");
- var ccengnm = model.getValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/ccengnm");
- var cCol=grd_ccindxlist.col;
- if(flag == "eng"){
- if(ccengnm==""){
- return;
- }else
- setParameter("SPMRF04200_SEARCHDATA", ccengnm);
- }else{
- setParameter("SPMRF04200_SEARCHDATA","");
- }
- modal("SPMRF04200");
- var nodelist = instance1.selectNodes("/root/temp/selectdiaglist");
- for(var i = 1; i <= nodelist.length; i++)
- {
- var termcd = model.getValue("/root/temp/selectdiaglist["+i+"]/termcd");
- var termengnm = model.getValue("/root/temp/selectdiaglist["+i+"]/termengnm");
- var termhngnm = model.getValue("/root/temp/selectdiaglist["+i+"]/termhngnm");
- var pid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var dschdd = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var instcd = getUserInfo("dutplceinstcd");
- var iFndRow = grd_ccindxlist.findRow(termcd, 0, parseInt(grd_ccindxlist.colRef("cctermcd")), "true", "true");//중복 code check
- if(flag != "eng"){
- if(iFndRow > 0){
- messageBox(termcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_ccindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/cctermcd", termcd);
- model.makeValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/cchngnm" , termhngnm);
- model.makeValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/ccengnm" , termengnm);
- model.setValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/pid" , pid);
- model.setValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/dschdd" , dschdd);
- model.setValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/instcd" , instcd);
- grd_ccindxlist.refresh();
- }
- }else if((flag == "eng") && (i != 1)){
- if(iFndRow > 0){
- messageBox(termcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_ccindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/cctermcd", termcd);
- model.makeValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/cchngnm" , termhngnm);
- model.makeValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/ccengnm" , termengnm);
- model.setValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/pid" , pid);
- model.setValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/dschdd" , dschdd);
- model.setValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/instcd" , instcd);
- grd_ccindxlist.refresh();
- }
- }else if((flag == "eng") && (i == 1)){
- if(iFndRow > 0){
- messageBox(termcd+" 코드는 이미입력하신 코드","I009");
- }else{
- model.makeValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/cctermcd", termcd);
- model.makeValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/cchngnm" , termhngnm);
- model.makeValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/ccengnm" , termengnm);
- model.setValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/pid" , pid);
- model.setValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/dschdd" , dschdd);
- model.setValue("/root/main/indxinfo/ccindxinfo/ccindxlist["+grd_ccindxlist.Row+"]/instcd" , instcd);
- grd_ccindxlist.refresh();
- }
- }
- }
-
- model.refresh();
- }
- /**
- * @desc :
- * @id : 진단 팝업과 연계
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fDiagIndxList(flag){
- //진단용어
- var sPid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var sDschdd = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var iCol = grd_diagindxlist.colRef("dispdiagcd");
- var diagRow = grd_diagindxlist.row - grd_diagindxlist.fixedRows + 1
- if((sPid=="")&&(sDschdd=="")){
- messageBox("퇴원일자가 선택되지" ,"E007");
- return;
- }
- clearParameter("SPMRT01600_FLAG");
- clearParameter("SPMRT01600_SEARCHDATA");
- clearParameter("stndd");
- model.removeNodeset("/root/temp/selectdiaglist");
- model.removeNodeset("/root/tmp/selectoplist");
- var dispdiagcd = model.getValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+diagRow+"]/dispdiagcd");
- if((iCol!="")&&(flag == "code")){
- if(dispdiagcd !=""){
- if(dispdiagcd.indexOf("/") > 0){
- setParameter("SPMRT01600_FLAG","2");
- }else{
- setParameter("SPMRT01600_FLAG","1");
- setParameter("stndd",sDschdd);
- }
- setParameter("SPMRT01600_SEARCHDATA",dispdiagcd);
- setParameter("stndd",sDschdd);
- }else
- return;
- }else{
- setParameter("SPMRT01600_FLAG","1");
- setParameter("stndd",sDschdd);
- }
- modal("SPMRT01600");
- var nodelist = instance1.selectNodes("/root/temp/selectdiaglist");
- var duplFlag = false;
- for(var i = 1; i <= nodelist.length; i++)
- {
- var diagcd = model.getValue("/root/temp/selectdiaglist["+i+"]/diagcd"); //진단코드
- var dispdiagcd = model.getValue("/root/temp/selectdiaglist["+i+"]/dispdiagcd"); //진단속성코드
- var diagengnm = model.getValue("/root/temp/selectdiaglist["+i+"]/diagengnm");
- var diaghngnm = model.getValue("/root/temp/selectdiaglist["+i+"]/diaghngnm");
- var seqno = model.getValue("/root/temp/selectdiaglist["+i+"]/seqno"); //Mophology 코드 순번
- var lglydisflag = model.getValue("/root/temp/selectdiaglist["+i+"]/lglydisflag"); //전염병 구분
- var pid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var dschdd = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var instcd = getUserInfo("dutplceinstcd");
- for(var rowcnt = 0; rowcnt < grd_diagindxlist.rows; rowcnt++){
- if((model.getValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+ rowcnt + "]/diagtermcd") == diagcd)
- && (model.getValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+ rowcnt + "]/diagseqno") == seqno)){
- duplFlag = true;
- break;
- } else {
- duplFlag = false;
- }
- }
- if(flag != "code"){
- if(duplFlag == true){
- messageBox(diagcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_diagindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/poa" , "Y");
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagtermcd" , diagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dispdiagcd" , dispdiagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/hngnm" , diaghngnm);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/engnm" , diagengnm);
- if((lglydisflag=="00")||(lglydisflag=="")){
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , "");
- }else{
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , lglydisflag+"군");
- }
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagseqno" , seqno);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/pid" , pid);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dschdd" , dschdd);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/instcd" , instcd);
- //grd_diagindxlist.refresh();
- }
- }else if((flag == "code")&& (i != 1)){
- if(duplFlag == true){
- messageBox(diagcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_diagindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/poa" , "Y");
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagtermcd" , diagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dispdiagcd" , dispdiagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/hngnm" , diaghngnm);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/engnm" , diagengnm);
- if((lglydisflag=="00")||(lglydisflag=="")){
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , "");
- }else{
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , lglydisflag+"군");
- }
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagseqno" , seqno);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/pid" , pid);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dschdd" , dschdd);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/instcd" , instcd);
- //grd_diagindxlist.refresh();
- }
- }else if((flag == "code") && (i == 1)){
- if(duplFlag == true){
- messageBox(diagcd+" 코드는 이미입력하신 코드","I009");
- }else{
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/poa" , "Y");
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagtermcd" , diagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dispdiagcd" , dispdiagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/hngnm" , diaghngnm);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/engnm" , diagengnm);
- if((lglydisflag=="00")||(lglydisflag=="")){
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" ,"");
- }else{
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , lglydisflag+"군");
- }
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagseqno" , seqno);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/pid" , pid);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dschdd" , dschdd);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/instcd" , instcd);
- //grd_diagindxlist.refresh();
- }
- }
- }
- //수술용어
- if(getNodesetCnt(model,"/root/tmp/selectoplist")>0){
- var nodelist = instance1.selectNodes("/root/tmp/selectoplist");
- for(var i = 1; i <= nodelist.length; i++){
- var opcd = model.getValue("/root/tmp/selectoplist["+i+"]/opcd");
- var dispopcd = model.getValue("/root/tmp/selectoplist["+i+"]/dispopcd");
- var opengnm = model.getValue("/root/tmp/selectoplist["+i+"]/opengnm");
- var ophngnm = model.getValue("/root/tmp/selectoplist["+i+"]/ophngnm");
- var pid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var dschdd=model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var instcd= getUserInfo("dutplceinstcd");
- var opflag=1;//수술,처치 구분 수술="0",처치="1"
- var iFndRow1 = grd_cureindxlist.findRow(opcd, 0, parseInt(grd_cureindxlist.colRef("optermcd")), "true", "true");//중복 code check
- if(flag != "code"){
- if(iFndRow1>0){
- messageBox(opcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_cureindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/disoptermcd" ,dispopcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/optermcd" ,opcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/ophngnm" ,ophngnm);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/opengnm" ,opengnm);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/pid" ,pid);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/dschdd" ,dschdd);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/instcd" ,instcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/opflag" ,opflag);
- //grd_cureindxlist.refresh();
- }
- }else if((flag == "code") && (i != 1)){
- if(iFndRow1>0){
- messageBox(opcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_cureindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/disoptermcd" ,dispopcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/optermcd" ,opcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/ophngnm" ,ophngnm);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/opengnm" ,opengnm);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/pid" ,pid);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/dschdd" ,dschdd);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/instcd" ,instcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/opflag" ,opflag);
- // grd_cureindxlist.refresh();
- }
- }else if((flag == "code") && (i == 1)){
- if(iFndRow1>0){
- messageBox(opcd+" 코드는 이미입력하신 코드","I009");
- }else{
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/disoptermcd" ,dispopcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/optermcd" ,opcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/ophngnm" ,ophngnm);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/opengnm" ,opengnm);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/pid" ,pid);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/dschdd" ,dschdd);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/instcd" ,instcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/opflag" ,opflag);
- // grd_cureindxlist.refresh();
- }
- }
- }
- }
- model.refresh();
- }
- /**
- * @desc :
- * @id : 수술 팝업
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fOpGridIndxList(flag)
- {
- var sPid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var sDschdd = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var iCol = grd_opindxlist.col;
- if((sPid=="")&&(sDschdd=="")){
- messageBox("퇴원일자가 선택되지" ,"E007");
- return;
- }
- clearParameter("SPMRT01600_FLAG");
- clearParameter("SPMRT01600_SEARCHDATA");
- clearParameter("stndd");
- model.removeNodeset("/root/temp/selectdiaglist");
- model.removeNodeset("/root/tmp/selectoplist");
- var disoptermcd =model.getValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/disoptermcd");
- if((iCol!="")&&(flag == "code")){
- if(disoptermcd !=""){
- setParameter("SPMRT01600_FLAG","5");
- setParameter("SPMRT01600_SEARCHDATA",disoptermcd);
- setParameter("stndd",sDschdd);
- }else{
- return;
- }
- }else{
- setParameter("SPMRT01600_FLAG","5");
- setParameter("stndd",sDschdd);
- }
- modal("SPMRT01600");
- var nodelist = instance1.selectNodes("/root/tmp/selectoplist");
- for(var i = 1; i <= nodelist.length; i++){
- var opcd = model.getValue("/root/tmp/selectoplist["+i+"]/opcd");
- var dispopcd = model.getValue("/root/tmp/selectoplist["+i+"]/dispopcd");
- var opengnm = model.getValue("/root/tmp/selectoplist["+i+"]/opengnm");
- var ophngnm = model.getValue("/root/tmp/selectoplist["+i+"]/ophngnm");
- var pid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var dschdd = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var instcd = getUserInfo("dutplceinstcd");
- var opflag=0;//수술,처치 구분 수술="0",처치="1"
- var iFndRow1 = grd_opindxlist.findRow(opcd, 0, parseInt(grd_opindxlist.colRef("optermcd")), "true", "true");//중복 code check
- iFndRow1 = 0 ;
- var selectedRow = grd_oplist.row ;
- var dsopno = model.getValue("/root/main/indxinfo/opinfo/oplist["+selectedRow+"]/dsopno") ;
- if(flag != "code"){
- if(iFndRow1>0){
- messageBox(opcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_opindxlist.addRow(false);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/disoptermcd" ,dispopcd);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/optermcd" ,opcd);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/ophngnm" ,ophngnm);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/opengnm" ,opengnm);
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/pid" ,pid);
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/dschdd" ,dschdd);
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/instcd" ,instcd);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/opflag" ,opflag);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/dsopno" ,dsopno);
- //grd_opindxlist.refresh();
- }
- }else if((flag == "code") && (i != 1)){
- if(iFndRow1>0){
- messageBox(opcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_opindxlist.addRow(false);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/disoptermcd" ,dispopcd);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/optermcd" ,opcd);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/ophngnm" ,ophngnm);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/opengnm" ,opengnm);
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/pid" ,pid);
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/dschdd" ,dschdd);
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/instcd" ,instcd);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/opflag" ,opflag);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/dsopno" ,dsopno);
- // grd_opindxlist.refresh();
- }
- }else if((flag == "code") && (i == 1)){
- if(iFndRow1>0){
- messageBox(opcd+" 코드는 이미입력하신 코드","I009");
- }else{
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/disoptermcd" ,dispopcd);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/optermcd" ,opcd);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/ophngnm" ,ophngnm);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/opengnm" ,opengnm);
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/pid" ,pid);
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/dschdd" ,dschdd);
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/instcd" ,instcd);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/opflag" ,opflag);
- model.makeValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+grd_opindxlist.row+"]/dsopno" ,dsopno);
- // grd_opindxlist.refresh();
- }
- }
- }
- if(getNodesetCnt(model,"/root/temp/selectdiaglist")>0){
- var nodelist = instance1.selectNodes("/root/temp/selectdiaglist");
- var duplFlag = false;
- for(var i = 1; i <= nodelist.length; i++)
- {
- var diagcd = model.getValue("/root/temp/selectdiaglist["+i+"]/diagcd"); //진단코드
- var dispdiagcd = model.getValue("/root/temp/selectdiaglist["+i+"]/dispdiagcd");//진단속성코드
- var diagengnm = model.getValue("/root/temp/selectdiaglist["+i+"]/diagengnm");
- var diaghngnm = model.getValue("/root/temp/selectdiaglist["+i+"]/diaghngnm");
- var seqno = model.getValue("/root/temp/selectdiaglist["+i+"]/seqno");//Mophology 코드 순번
- var lglydisflag = model.getValue("/root/temp/selectdiaglist["+i+"]/lglydisflag");
- var pid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var dschdd = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var instcd = getUserInfo("dutplceinstcd");
- for(var rowcnt = 0; rowcnt < grd_diagindxlist.rows; rowcnt++){
- if((model.getValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+ rowcnt + "]/diagtermcd") == diagcd)
- && (model.getValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+ rowcnt + "]/diagseqno") == seqno)){
- duplFlag = true;
- break;
- } else {
- duplFlag = false;
- }
- }
- if(flag != "code"){
- if(duplFlag == true){
- messageBox(diagcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_diagindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagtermcd" , diagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dispdiagcd" , dispdiagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/hngnm" , diaghngnm);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/engnm" , diagengnm);
- if((lglydisflag=="00")||(lglydisflag=="")){
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , "");
- }else{
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , lglydisflag+"군");
- }
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagseqno" , seqno);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/pid" , pid);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dschdd" , dschdd);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/instcd" , instcd);
- // grd_diagindxlist.refresh();
- }
- }else if((flag == "code")&& (i != 1)){
- if(duplFlag == true){
- messageBox(diagcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_diagindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagtermcd" , diagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dispdiagcd" , dispdiagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/hngnm" , diaghngnm);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/engnm" , diagengnm);
- if((lglydisflag=="00")||(lglydisflag=="")){
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , "");
- }else{
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , lglydisflag+"군");
- }
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagseqno" , seqno);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/pid" , pid);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dschdd" , dschdd);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/instcd" , instcd);
- // grd_diagindxlist.refresh();
- }
- }else if((flag == "code") && (i == 1)){
- if(duplFlag == true){
- messageBox(diagcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_diagindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagtermcd" , diagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dispdiagcd" , dispdiagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/hngnm" , diaghngnm);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/engnm" , diagengnm);
- if((lglydisflag=="00")||(lglydisflag=="")){
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" ,"");
- }else{
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , lglydisflag+"군");
- }
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagseqno" , seqno);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/pid" , pid);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dschdd" , dschdd);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/instcd" , instcd);
- //grd_diagindxlist.refresh();
- }
- }
- }
- }
- model.refresh();
- }
- function fCureGridIndxList(flag)
- {
- var sPid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var sDschdd = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var iCol = grd_cureindxlist.col;
- if((sPid=="")&&(sDschdd=="")){
- messageBox("퇴원일자가 선택되지" ,"E007");
- return;
- }
- clearParameter("SPMRT01600_FLAG");
- clearParameter("SPMRT01600_SEARCHDATA");
- clearParameter("stndd");
- model.removeNodeset("/root/temp/selectdiaglist");
- model.removeNodeset("/root/tmp/selectoplist");
- var disoptermcd =model.getValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/disoptermcd");
- if((iCol!="")&&(flag == "code")){
- if(disoptermcd !=""){
- setParameter("SPMRT01600_FLAG","5");
- setParameter("SPMRT01600_SEARCHDATA",disoptermcd);
- setParameter("stndd",sDschdd);
- }else{
- return;
- }
- }else{
- setParameter("SPMRT01600_FLAG","5");
- setParameter("stndd",sDschdd);
- }
- modal("SPMRT01600");
- var nodelist = instance1.selectNodes("/root/tmp/selectoplist");
- for(var i = 1; i <= nodelist.length; i++){
- var opcd = model.getValue("/root/tmp/selectoplist["+i+"]/opcd");
- var dispopcd = model.getValue("/root/tmp/selectoplist["+i+"]/dispopcd");
- var opengnm = model.getValue("/root/tmp/selectoplist["+i+"]/opengnm");
- var ophngnm = model.getValue("/root/tmp/selectoplist["+i+"]/ophngnm");
- var pid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var dschdd = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var instcd = getUserInfo("dutplceinstcd");
- var opflag=1;//수술,처치 구분 수술="0",처치="1"
- var iFndRow1 = grd_cureindxlist.findRow(opcd, 0, parseInt(grd_cureindxlist.colRef("optermcd")), "true", "true");//중복 code check
- if(flag != "code"){
- if(iFndRow1>0){
- messageBox(opcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_cureindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/disoptermcd" ,dispopcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/optermcd" ,opcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/ophngnm" ,ophngnm);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/opengnm" ,opengnm);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/pid" ,pid);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/dschdd" ,dschdd);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/instcd" ,instcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/opflag" ,opflag);
- //grd_cureindxlist.refresh();
- }
- }else if((flag == "code") && (i != 1)){
- if(iFndRow1>0){
- messageBox(opcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_cureindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/disoptermcd" ,dispopcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/optermcd" ,opcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/ophngnm" ,ophngnm);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/opengnm" ,opengnm);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/pid" ,pid);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/dschdd" ,dschdd);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/instcd" ,instcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/opflag" ,opflag);
- // grd_cureindxlist.refresh();
- }
- }else if((flag == "code") && (i == 1)){
- if(iFndRow1>0){
- messageBox(opcd+" 코드는 이미입력하신 코드","I009");
- }else{
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/disoptermcd" ,dispopcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/optermcd" ,opcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/ophngnm" ,ophngnm);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/opengnm" ,opengnm);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/pid" ,pid);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/dschdd" ,dschdd);
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/instcd" ,instcd);
- model.makeValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+grd_cureindxlist.row+"]/opflag" ,opflag);
- // grd_cureindxlist.refresh();
- }
- }
- }
- if(getNodesetCnt(model,"/root/temp/selectdiaglist")>0){
- var nodelist = instance1.selectNodes("/root/temp/selectdiaglist");
- var duplFlag = false;
- for(var i = 1; i <= nodelist.length; i++)
- {
- var diagcd = model.getValue("/root/temp/selectdiaglist["+i+"]/diagcd"); //진단코드
- var dispdiagcd = model.getValue("/root/temp/selectdiaglist["+i+"]/dispdiagcd");//진단속성코드
- var diagengnm = model.getValue("/root/temp/selectdiaglist["+i+"]/diagengnm");
- var diaghngnm = model.getValue("/root/temp/selectdiaglist["+i+"]/diaghngnm");
- var seqno = model.getValue("/root/temp/selectdiaglist["+i+"]/seqno");//Mophology 코드 순번
- var lglydisflag = model.getValue("/root/temp/selectdiaglist["+i+"]/lglydisflag");
- var pid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var dschdd = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var instcd = getUserInfo("dutplceinstcd");
- for(var rowcnt = 0; rowcnt < grd_diagindxlist.rows; rowcnt++){
- if((model.getValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+ rowcnt + "]/diagtermcd") == diagcd)
- && (model.getValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+ rowcnt + "]/diagseqno") == seqno)){
- duplFlag = true;
- break;
- } else {
- duplFlag = false;
- }
- }
- if(flag != "code"){
- if(duplFlag == true){
- messageBox(diagcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_diagindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagtermcd" , diagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dispdiagcd" , dispdiagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/hngnm" , diaghngnm);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/engnm" , diagengnm);
- if((lglydisflag=="00")||(lglydisflag=="")){
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , "");
- }else{
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , lglydisflag+"군");
- }
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagseqno" , seqno);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/pid" , pid);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dschdd" , dschdd);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/instcd" , instcd);
- // grd_diagindxlist.refresh();
- }
- }else if((flag == "code")&& (i != 1)){
- if(duplFlag == true){
- messageBox(diagcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_diagindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagtermcd" , diagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dispdiagcd" , dispdiagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/hngnm" , diaghngnm);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/engnm" , diagengnm);
- if((lglydisflag=="00")||(lglydisflag=="")){
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , "");
- }else{
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , lglydisflag+"군");
- }
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagseqno" , seqno);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/pid" , pid);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dschdd" , dschdd);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/instcd" , instcd);
- // grd_diagindxlist.refresh();
- }
- }else if((flag == "code") && (i == 1)){
- if(duplFlag == true){
- messageBox(diagcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_diagindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagtermcd" , diagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dispdiagcd" , dispdiagcd);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/hngnm" , diaghngnm);
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/engnm" , diagengnm);
- if((lglydisflag=="00")||(lglydisflag=="")){
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" ,"");
- }else{
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/lglydisflag" , lglydisflag+"군");
- }
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/diagseqno" , seqno);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/pid" , pid);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/dschdd" , dschdd);
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+grd_diagindxlist.row+"]/instcd" , instcd);
- //grd_diagindxlist.refresh();
- }
- }
- }
- }
- model.refresh();
- }
- /**
- * @desc : 사망 분석 버튼 클릭(팝업)
- * @id :
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fDethPopup()
- {
- var dschdd =model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var xDschpatinfoPath ="/root/main/indxinfo/dschpatinfo/patinfo";
- if(dschdd==""){
- messageBox("환자의 퇴원일자가 선택되지", "E007");
- return;
- }
- if(model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dethyn")=="N"){
- messageBox("사망환자일 경우에만 선택","I006");
- return;
- }
- var sPid = model.getValue(xDschpatinfoPath+"/pid" );
- setParameter("SMMRD00500_pid",sPid);
- open("SMMRD00500", 1, 0, 0, "", "", "", "left:0px; top:0px");
- }
- /**
- * @desc : 진단 팝업 선택시(사망인덱스)
- * @id :
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fDethCd(flag,editflag)
- {
- var dPid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- if(dPid ==""){
- messageBox("환자번호를","C001");
- return;
- }
- if(model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dethyn")=="N"){
- messageBox("사망환자일 경우에만 선택","I006");
- return;
- }
- clearParameter("SPMRT01600_FLAG");
- clearParameter("SPMRT01600_SEARCHDATA");
- clearParameter("stndd");
- model.removeNodeset("/root/temp/selectdiaglist");
- var iRow = grd_dethindxlist.row -grd_dethindxlist.fixedRows + 1
- var iCol = grd_dethindxlist.col;
- var Dschdd = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var basedethcd = model.getValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+iRow+"]/basedethcd");
- var mdldethcd = model.getValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+iRow+"]/mdldethcd");
- var direcdethcd = model.getValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+iRow+"]/direcdethcd");
- if(flag == "B"){
- if(((flag == "B")&&(editflag=="1"))&&(iCol==0)){
- if(basedethcd!=""){
- setParameter("SPMRT01600_FLAG","1");
- setParameter("SPMRT01600_SEARCHDATA",basedethcd);
- setParameter("stndd",Dschdd);
- }else{
- if(basedethcd==""){
- return;
- }
- setParameter("SPMRT01600_FLAG","1");
- setParameter("stndd",Dschdd);
- }
- }else{
- setParameter("SPMRT01600_FLAG","1");
- setParameter("stndd",Dschdd);
- }
- }else if(flag=="M"){
- if(((flag=="M")&&(editflag=="2"))&&(iCol==2)){
- if(mdldethcd!=""){
- setParameter("SPMRT01600_FLAG","1");
- setParameter("SPMRT01600_SEARCHDATA",mdldethcd);
- setParameter("stndd",Dschdd);
- }else{
- if(mdldethcd==""){
- return;
- }
- setParameter("SPMRT01600_FLAG","1");
- setParameter("stndd",Dschdd);
- }
- }else{
- setParameter("SPMRT01600_FLAG","1");
- setParameter("stndd",Dschdd);
- }
- }else if(flag =="D"){
- if(((flag =="D")&&(editflag=="3"))&&(iCol==4)){
- if(direcdethcd!=""){
- setParameter("SPMRT01600_FLAG","1");
- setParameter("SPMRT01600_SEARCHDATA",direcdethcd);
- setParameter("stndd",Dschdd);
- }else{
- if(direcdethcd==""){
- return;
- }
- setParameter("SPMRT01600_FLAG","1");
- setParameter("stndd",Dschdd);
- }
- }else{
- setParameter("SPMRT01600_FLAG","1");
- setParameter("stndd",Dschdd);
- }
- }
- modal("SPMRT01600");
- var nodelist = instance1.selectNodes("/root/temp/selectdiaglist");
- var iRow = grd_dethindxlist.row - grd_dethindxlist.fixedRows + 1
- var duplFlag = false;
- var nodelist = instance1.selectNodes("/root/temp/selectdiaglist");
- for(var i = 1; i <= nodelist.length; i++){
- var Disdethcd =model.getValue("/root/temp/selectdiaglist["+i+"]/dispdiagcd");//진단속성코드
- var dethcd = model.getValue("/root/temp/selectdiaglist["+i+"]/diagcd"); //진단코드
- if(getNodesetCnt(model,"/root/temp/selectdiaglist")>0){
- for(var rowcnt = 0; rowcnt < grd_dethindxlist.rows; rowcnt++){
- var basedethcd = model.getValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+rowcnt+"]/basedethcd");
- var mdldethdiagcd = model.getValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+rowcnt+"]/mdldethdiagcd");
- var direcdethcd = model.getValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+rowcnt+"]/direcdethcd");
- if((basedethcd == dethcd)||(mdldethdiagcd == dethcd)||(direcdethcd == dethcd)){
- duplFlag = true; //중복 코드 체크
- break;
- } else {
- duplFlag = false;
- }
- }
- if(flag =="B"){
- if(duplFlag==true){
- messageBox(dethcd+" 코드는 이미입력하신 코드","I009");
- }else{
- grd_dethindxlist.addRow(false);
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/basedethcd" ,Disdethcd);
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/basedethdiagcd" ,dethcd);
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/pid" ,model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid"));
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/dschdd" ,model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd"));
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/instcd" ,getUserInfo("dutplceinstcd"));
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/dethcdflag1" ,"B");
- }
- }else if((flag == "B")&&(editflag=="1")){
- if(duplFlag==true){
- messageBox(dethcd+" 코드는 이미입력하신 코드","I009");
- }else{
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/basedethcd" ,Disdethcd);
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/basedethdiagcd" ,dethcd);
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/pid" ,model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid"));
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/dschdd" ,model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd"));
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/instcd" ,getUserInfo("dutplceinstcd"));
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/dethcdflag1" ,"B");
- }
- }else if((flag =="M")||(editflag=="2")){
- if(duplFlag==true){
- messageBox(dethcd+" 코드는 이미입력하신 코드","I009");
- }else{
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/mdldethcd" ,Disdethcd);
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/mdldethdiagcd" ,dethcd);
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/dethcdflag2" ,"M");
- }
- }else if((flag =="D")||(editflag=="3")){
- if(duplFlag==true){
- messageBox(dethcd+" 코드는 이미입력하신 코드","I009");
- }else{
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/direcdethcd" ,Disdethcd);
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/direcdethdiagcd" ,dethcd);
- model.makeValue("/root/main/indxinfo/dethindxinfo/dethindxlist["+grd_dethindxlist.row+"]/dethcdflag3" ,"D");
- }
- }
- }
- }
- model.refresh();
- }
- /**
- * @desc : 저장
- * @id :
- * @event : xforms-select(주호소인덱스,진단인덱스,수술인덱스,처치인덱스,가코딩 및 종양구분 저장
- ,감염원인1,감염원인2,전염병,합병증,재수술 업데이트)
- * @return : void
- * @authur :
- */
- function fSave()
- {
- var dschdd = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var pid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var cctermcd = model.getValue("/root/main/indxinfo/ccindxinfo/ccindxlist/cctermcd");
- var diagtermcd = model.getValue("/root/main/indxinfo/diagindxinfo/diagindxlist/diagtermcd");
- var dethyn = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dethyn");
-
- if(pid=="")
- {
- messageBox("환자 등록번호가 입력되지","E007");
- model.setFocus("ipt_pid");
- return;
- }
- if(dschdd=="")
- {
- messageBox("환자의 퇴원일자가 선택되지", "E007");
- return;
- }
- if(diagtermcd=="")
- {
- messageBox("환자의 진단이 선택되지", "E007");
- return;
- }
-
- //2012/10/19 Start
- //모든 수술건에 대해서 수술코딩을 했는지 확인
- var nodeSetcnt = getNodesetCount("/root/main/indxinfo/dsopinfo/dsoplist");
- for (var i=1; i<=nodeSetcnt; i++)
- {
- var dsopno = model.getValue("/root/main/indxinfo/dsopinfo/dsoplist["+i+"]/dsopno");
-
- var dsopinfo = model.getValue("/root/main/indxinfo/dsopinfo/dsoplist["+i+"]/dsopinfo");
-
-
- var existcnt = getNodesetCnt(model, "/root/opinfo/opindxdtlinfo/opindxdtllist[dsopno = '" + dsopno + "']");
-
- if ( existcnt == 0) {
- messageBox("수술코딩 되지 않은 수술정보("+dsopinfo+")가 존재하여 진행 불가합니다", "E999");
- return;
- }
-
- }
- //2012/10/19 End
-
- //병용금기상병 체크(20180402 이윤주)
- fGetHardCDList("N", 6157, 0 , "/root/hidden/icd10s");
-
- var icd10cnt = getNodeSetCnt("/root/hidden/icd10s/hardcd");
- var gicd10cd1 ="";
- var gicd10cd2 ="";
- var t1="";
- var t2="";
- var a1="";
- var a2="";
-
- for(var i = grd_diagindxlist.fixedrows; i < grd_diagindxlist.rows; i++) {
- gicd10cd1 = grd_diagindxlist.valueMatrix(i,grd_diagindxlist.colRef("dispdiagcd"));
-
- for(var k = grd_diagindxlist.fixedrows; k < grd_diagindxlist.rows; k++){
- gicd10cd2 = grd_diagindxlist.valueMatrix(k,grd_diagindxlist.colRef("dispdiagcd"));
- t1 = gicd10cd1.split(".")[0];
- t2 = gicd10cd2.split(".")[0];
-
- for ( var j = 1; j <= icd10cnt; j++) {
- a1 = model.getValue("/root/hidden/icd10s/hardcd["+j+"]/hardcd");
- a2 = model.getValue("/root/hidden/icd10s/hardcd["+j+"]/hardcdnm");
-
- if (t1+t2==a1+a2 || t1+t2==a2+a1 || t2+t1==a1+a2 || t2+t1==a2+a1 ) {
- messageBox(a1+", "+a2+" 병용 불가상병 재확인 부탁드립니다!","Q");
- return;
- }
- }
-
- }
-
- }
-
- //주호소 인덱스저장
- grd_ccindxlist.clearStatus();
- for(var i = grd_ccindxlist.fixedrows; i < grd_ccindxlist.rows; i++)
- {
- grd_ccindxlist.addStatus(i, "insert")
-
- }
-
- //진단 인덱스 저장
- grd_diagindxlist.clearStatus();
- for(var i = grd_diagindxlist.fixedrows; i < grd_diagindxlist.rows; i++)
- {
- grd_diagindxlist.addStatus(i, "insert");
- /*if(i==1){
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+i+"]/diagkindcdflag","M");
- }else{
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+i+"]/diagkindcdflag","S");
- }*/
- }
-
- //수술 인덱스 저장
- grd_opindxlist.clearStatus();
- for(var i = grd_opindxlist.fixedrows; i < grd_opindxlist.rows; i++)
- {
- var opkindcdflag = model.getValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+i+"]/opkindcdflag");
-
- var dsopno = model.getValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+i+"]/dsopno");
-
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+i+"]/opflag","0");
- grd_opindxlist.addStatus(i, "insert");
-
- }
-
- //처치 인덱스 저장
- grd_cureindxlist.clearStatus();
- for(var i = grd_cureindxlist.fixedrows; i < grd_cureindxlist.rows; i++)
- {
- var opkindcdflag = model.getValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+i+"]/opkindcdflag");
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+i+"]/opflag","1");
- grd_cureindxlist.addStatus(i, "insert");
- }
- //사망 인덱스 저장
- grd_dethindxlist.clearStatus();
- for(var i = grd_dethindxlist.fixedrows; i < grd_dethindxlist.rows; i++)
- {
- grd_dethindxlist.addStatus(i, "insert");
- }
-
- //주호소인덱스 저장
- model.makeValue("/root/send/savedata/ccindxlist" , grd_ccindxlist.getUpdateData());
- //진단인덱스 저장
- model.makeValue("/root/send/savedata/diagindxlist" , grd_diagindxlist.getUpdateData());
- //수술인덱스 저장
- model.makeValue("/root/send/savedata/opindxlist" , grd_opindxlist.getUpdateData());
- //처지인덱스 저장(20120831 이윤주)
- model.makeValue("/root/send/savedata/cureindxlist" , grd_cureindxlist.getUpdateData());
- //사망인덱스 저장
- if(dethyn =="Y"){
- if(grd_dethindxlist.labelMatrix(1,1) ==""){
- messageBox("사망환자의 사인이 선택되지", "E007");
- return;
- }else{
- model.makeValue("/root/send/savedata/dethindxlist" , grd_dethindxlist.getUpdateData());
- }
- }
- //가코딩 여부 및 종양 구분 저장
- model.makeValue("/root/send/savedata/indxmast/cncrflag" , model.getValue("/root/main/indxinfo/indxmastinfo/indxmast/cncrflag"));
- model.makeValue("/root/send/savedata/indxmast/tmpcodeyn" , model.getValue("/root/main/indxinfo/indxmastinfo/indxmast/tmpcodeyn"));
- model.makeValue("/root/send/savedata/indxmast/tmpcoderesncd" , model.getValue("/root/main/indxinfo/indxmastinfo/indxmast/tmpcoderesncd"));
- model.makeValue("/root/send/savedata/indxmast/memo" , model.getValue("/root/main/indxinfo/indxmastinfo/indxmast/memo"));
- model.makeValue("/root/send/savedata/indxmast/pid" , model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid"));
- model.makeValue("/root/send/savedata/indxmast/dschdd" , model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd"));
- model.makeValue("/root/send/savedata/indxmast/instcd" , getUserInfo("dutplceinstcd"));
- model.makeValue("/root/send/savedata/indxmast/fstrgstrid" , model.getValue("/root/main/indxinfo/indxmastinfo/indxmast/fstrgstrid"));
- model.makeValue("/root/send/savedata/indxmast/fstrgstdt" , model.getValue("/root/main/indxinfo/indxmastinfo/indxmast/fstrgstdt"));
- model.makeValue("/root/send/savedata/indxmast/lastupdtrid" , model.getValue("/root/main/indxinfo/indxmastinfo/indxmast/lastupdtrid"));
- model.makeValue("/root/send/savedata/indxmast/lastupdtdt" , model.getValue("/root/main/indxinfo/indxmastinfo/indxmast/lastupdtdt"));
- //감염원인,감염부위,전염병,합병증,재수술을 퇴원분석에 저장
- model.makeValue("/root/send/savedata/dschpatinfo/infccascd" , model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/infccascd"));
- model.makeValue("/root/send/savedata/dschpatinfo/infcpartcd" , model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/infcpartcd"));
- model.makeValue("/root/send/savedata/dschpatinfo/infdisyn" , model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/infdisyn").substr(1,1));
- model.makeValue("/root/send/savedata/dschpatinfo/cmplcd" , model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/cmplcd"));
- model.makeValue("/root/send/savedata/dschpatinfo/reopresncd" , model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/reopresncd"));
- model.makeValue("/root/send/savedata/dschpatinfo/pid" , model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid"));
- model.makeValue("/root/send/savedata/dschpatinfo/indd" , model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/indd"));
- model.makeValue("/root/send/savedata/dschpatinfo/dschdd" , model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd"));
- model.makeValue("/root/send/savedata/dschpatinfo/cretno" , model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/cretno"));
-
- //재검토 저장
- model.makeValue("/root/send/savedata/indxmast/reviewyn" , model.getValue("/root/main/indxinfo/indxmastinfo/indxmast/reviewyn"));
-
-
- if(submit("TXMRD00703"))
- {
- messageBox("저장","I002");
- model.setValue("/root/main/indxinfo/dschpatinfo/patinfo/pid", "");
- model.setFocus("ipt_pid");
- fOpIndxInfo();
- //button100.dispatch("onclick");
- }else{
- messageBox("저장을", "E009");
- }
-
- model.removeNodeset("/root/send/savedata");
- model.refresh();
-
- }
- /**
- * @desc : 인덱스 그리드 위아래 변경
- * @id :
- * @event : grdobj =해당그리드,direcflag = up,down여부, flag=구분값
- * @return : void
- * @authur :
- */
- function fChgValueIndxGrd(grdObj, direcflag,flag)
- {
- var srcRow = grdObj.row - grdObj.fixedRows + 1; //(화면 그리드베이스에서 선택한 행 - 그리드 제목 줄)+1
- if(srcRow =="0")
- return;
- var sRow; //방향 위치가 위로 일때
- if(direcflag == "up"){ //위로
- if(srcRow == 1){ //현재 위치가 맨 위일 경우
- return;
- }
- sRow = srcRow - 1; //아니면 위로 올린다
-
- }else if(direcflag == "down"){ //아래로
- if(srcRow == grdObj.rows - grdObj.fixedRows){ //현재 위치가 맨 아래일 경우
- return;
- }
- sRow = srcRow + 1;
-
- }
- if(flag =="Ccindx"){//주호소 인덱스
- model.removeNodeset("/root/temp/tmp");
- model.makeNode("/root/temp/tmp/ccindx");
- model.copyNode("/root/temp/tmp/ccindx", "/root/main/indxinfo/ccindxinfo/ccindxlist[" + srcRow + "]");
- model.copyNode("/root/main/indxinfo/ccindxinfo/ccindxlist[" + srcRow + "]", "/root/main/indxinfo/ccindxinfo/ccindxlist[" + sRow + "]");
- model.copyNode("/root/main/indxinfo/ccindxinfo/ccindxlist[" + sRow + "]", "/root/temp/tmp/ccindx");
- }else if(flag =="diagindx"){//진단인덱스
- model.removeNodeset("/root/temp/tmp");
- model.makeNode("/root/temp/tmp/diagindx");
- model.copyNode("/root/temp/tmp/diagindx", "/root/main/indxinfo/diagindxinfo/diagindxlist[" + srcRow + "]");
- model.copyNode("/root/main/indxinfo/diagindxinfo/diagindxlist[" + srcRow + "]", "/root/main/indxinfo/diagindxinfo/diagindxlist[" + sRow + "]");
- model.copyNode("/root/main/indxinfo/diagindxinfo/diagindxlist[" + sRow + "]", "/root/temp/tmp/diagindx");
- }else if(flag =="opindx"){//수술인덱스
- model.removeNodeset("/root/temp/tmp");
- model.makeNode("/root/temp/tmp/opindx");
- model.copyNode("/root/temp/tmp/opindx", "/root/opinfo/opindxdtlinfo/opindxdtllist[" + srcRow + "]");
- model.copyNode("/root/opinfo/opindxdtlinfo/opindxdtllist[" + srcRow + "]", "/root/opinfo/opindxdtlinfo/opindxdtllist[" + sRow + "]");
- model.copyNode("/root/opinfo/opindxdtlinfo/opindxdtllist[" + sRow + "]", "/root/temp/tmp/opindx");
- }else if(flag =="cureindx"){//처치인덱스
- model.removeNodeset("/root/temp/tmp");
- model.makeNode("/root/temp/tmp/cureindx");
- model.copyNode("/root/temp/tmp/cureindx", "/root/main/indxinfo/cureindxinfo/cureindxlist[" + srcRow + "]");
- model.copyNode("/root/main/indxinfo/cureindxinfo/cureindxlist[" + srcRow + "]", "/root/main/indxinfo/cureindxinfo/cureindxlist[" + sRow + "]");
- model.copyNode("/root/main/indxinfo/cureindxinfo/cureindxlist[" + sRow + "]", "/root/temp/tmp/cureindx");
- }
- // grdObj.rebuild();
- grdObj.refresh();
- return sRow;
- }
- /**
- * @desc :오른쪽 마우스 클릭시 추가 ,삭제(인덱스 )
- * @id :
- * @event :
- * @return : void
- * @authur :
- */
- function fMouseRightindx(){
- if(event.button == 3){
- window.setPopupMenu(true, "/root/hidden/menu/indxlist", "label", "func", false);
- return;
- }
- }
- /**
- * @desc : 인덱스 행추가
- * @id :
- * @event :
- * @return : void
- * @authur :
- */
- function fAddRow_indxlist(grdObj)
- {
- var Pid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var Dschdd = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- //var flag = model.getValue("/Root/Hidden/Chgrowflag");
- var chngdeptyn = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/chngdeptyn");//전출정보 여부
- if((Pid=="")&&(Dschdd=="")){
- messageBox("퇴원일자를 입력 후에 추가","I006");
- return;
- }
- var grdRow = grdObj.row - grdObj.fixedRows + 1;
-
- if(grdRow < 1){
- grdObj.addRow();
- }else if(grdRow >= 1){
- grdObj.insertRow(grdRow, "below", true);
- }
-
- grdObj.valueMatrix( grdObj.row, grdObj.colRef("poa")) = "Y";
-
- if(chngdeptyn !="Y"){ //전출 여부에 따른 진단,수술 전출과컬럼 disabled
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngdeptcd"))=true;
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngclrsdeptcd"))=true;
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngdeptcd"))=true;
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngclrsdeptcd"))=true;
- }else{
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngdeptcd"))=false;
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngclrsdeptcd"))=false;
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngdeptcd"))=false;
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngclrsdeptcd"))=false;
- }
-
- }
- /**
- * @desc : 오른쪽마우스 클릭시 행추가
- * @id :
- * @event : flag= (CC->주호소,DA->진단,OP->수술,DT->사망),//아래로 추가->below,위로 추가-> above
- * @return : void
- * @authur :
- */
- function fAddRow_Rindxlist()
- {
- var Pid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var Dschdd = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd");
- var flag = model.getValue("/root/hidden/chgrowflag");
- var chngdeptyn = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/chngdeptyn");
- if((Pid=="")&&(Dschdd=="")){
- messageBox("퇴원일자를 입력 후에 추가","I006");
- return;
- }
- if(flag=="CC"){
- var ccRow = grd_ccindxlist.row - grd_ccindxlist.fixedRows + 1;
- if(ccRow < 1){
- grd_ccindxlist.addRow();
- }else if(ccRow >= 1){
- grd_ccindxlist.insertRow( ccRow, "above", true);
- }
- }else if(flag=="DA"){
- var diagRow = grd_diagindxlist.row - grd_diagindxlist.fixedRows + 1;
- if(diagRow < 1){
- grd_diagindxlist.addRow();
- }else if(diagRow >= 1){
- grd_diagindxlist.insertRow( diagRow, "above", true);
- }
- if(chngdeptyn !="Y"){ //전출 여부에 따른 진단,수술 전출과컬럼 disabled
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngdeptcd"))=true;
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngclrsdeptcd"))=true;
- }else{
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngdeptcd"))=false;
- grd_diagindxlist.colDisabled(grd_diagindxlist.colRef("chngclrsdeptcd"))=false;
- }
- }else if(flag=="OP"){
- var opRow = grd_opindxlist.row - grd_opindxlist.fixedRows + 1;
- if(opRow < 1){
- grd_opindxlist.addRow();
- }else if(opRow >= 1){
- grd_opindxlist.insertRow( opRow, "above", true);
- }
- if(chngdeptyn !="Y"){ //전출 여부에 따른 진단,수술 전출과컬럼 disabled
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngdeptcd"))=true;
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngclrsdeptcd"))=true;
- }else{
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngdeptcd"))=false;
- grd_opindxlist.colDisabled(grd_opindxlist.colRef("chngclrsdeptcd"))=false;
- }
- }else if(flag=="DT"){
- var dethRow = grd_dethindxlist.row - grd_dethindxlist.fixedRows + 1;
- if(dethRow < 1){
- grd_dethindxlist.addRow();
- }else if(dethRow >= 1){
- grd_dethindxlist.insertRow( dethRow, "above", true);
- }
- }
- //model.refresh();
- }
- /**
- * @desc : 인덱스 행삭제
- * @id :
- * @event : flag= (CC->주호소,DA->진단,OP->수술,DT->사망)
- * @return : void
- * @authur :
- */
- function fDelRow_indxlist(grdObj)
- {
- var flag = model.getValue("/root/hidden/chgrowflag");
- if(flag=="CC")
- {
- if(grd_ccindxlist.row < 0)
- {
- messageBox("삭제할 행이 ", "I004")
- return;
- }
- if (grd_ccindxlist.selectedRows > 0) {
- var selectedRows = Array(grd_ccindxlist.selectedRows);
- for(i=0;i<grd_ccindxlist.selectedRows;i++) {
- selectedRows[i] = grd_ccindxlist.selectedRow(i);
- }
- }
- var rowIdx;
- for ( var i= selectedRows.length ; i >= 0 ; i--)
- {
- rowIdx = selectedRows[i];
- grd_ccindxlist.deleteRow( rowIdx , false);
- }
- }else if(flag=="DA"){
- if(grd_diagindxlist.row < 0)
- {
- messageBox("삭제할 행이 ", "I004")
- return;
- }
- if (grd_diagindxlist.selectedRows > 0) {
- var selectedRows = Array(grd_diagindxlist.selectedRows);
- for(i=0;i<grd_diagindxlist.selectedRows;i++) {
- selectedRows[i] = grd_diagindxlist.selectedRow(i);
- }
- }
- var rowIdx;
- for ( var i= selectedRows.length ; i >= 0 ; i--)
- {
- rowIdx = selectedRows[i];
- grd_diagindxlist.deleteRow( rowIdx , false);
- }
- }else if(flag=="OP"){
- if(grd_opindxlist.row < 0)
- {
- messageBox("삭제할 행이 ", "I004")
- return;
- }
- if (grd_opindxlist.selectedRows > 0) {
- var selectedRows = Array(grd_opindxlist.selectedRows);
- for(i=0;i<grd_opindxlist.selectedRows;i++) {
- selectedRows[i] = grd_opindxlist.selectedRow(i);
- }
- }
- var rowIdx;
- for ( var i= selectedRows.length ; i >= 0 ; i--)
- {
- rowIdx = selectedRows[i];
- grd_opindxlist.deleteRow( rowIdx , false);
- }
-
- }else if(flag=="CURE"){
- if(grd_cureindxlist.row < 0)
- {
- messageBox("삭제할 행이 ", "I004")
- return;
- }
- if (grd_cureindxlist.selectedRows > 0) {
- var selectedRows = Array(grd_cureindxlist.selectedRows);
- for(i=0;i<grd_cureindxlist.selectedRows;i++) {
- selectedRows[i] = grd_cureindxlist.selectedRow(i);
- }
- }
- var rowIdx;
- for ( var i= selectedRows.length ; i >= 0 ; i--)
- {
- rowIdx = selectedRows[i];
- grd_cureindxlist.deleteRow( rowIdx , false);
- }
- }else if(flag=="DT"){
- if(grd_dethindxlist.row < 0)
- {
- messageBox("삭제할 행이 ", "I004")
- return;
- }
- if (grd_dethindxlist.selectedRows > 0) {
- var selectedRows = Array(grd_dethindxlist.selectedRows);
- for(i=0;i<grd_dethindxlist.selectedRows;i++) {
- selectedRows[i] = grd_dethindxlist.selectedRow(i);
- }
- }
- var rowIdx;
- for ( var i= selectedRows.length ; i >= 0 ; i--)
- {
- rowIdx = selectedRows[i];
- grd_dethindxlist.deleteRow( rowIdx , false);
- }
- }
- //model.refresh();
- }
- /**
- * @desc :
- * @id :
- * @event : 가코딩 유무시 가코딩사유및 메모 disabled상태 변경(tmpcodeyn = "Y,N")
- * @return : void
- * @authur :
- */
- function fChgTmpCodeyn()
- {
- var tmpcodeyn=model.getValue("/root/main/indxinfo/indxmastinfo/indxmast/tmpcodeyn")
- if(tmpcodeyn=="Y")
- {
- cmb_tmpcoderesncd.disabled =false;
- tar_memo.disabled=false;
- }else if(tmpcodeyn!="Y")
- {
- if(tmpcodeyn=="N"){
- chk_tmpcodeyn.value="";
- chk_tmpcodeyn.refresh();
- }
- cmb_tmpcoderesncd.disabled =true;
- tar_memo.disabled=true;
- }
- //model.refresh();
- }
- /**
- * @desc :
- * @id :
- * @event : 주진단시 자동으로 나머지 행 부진단으로 변경
- * @return : void
- * @authur : flag =diag -> 진단 인덱스,flag="op" ->수술인덱스 ,flag="cure" ->처치인덱스
- */
- function fChgKindcdFlag(flag)
- {
- var diagRow = grd_diagindxlist.row - grd_diagindxlist.fixedRows + 1;
- var opRow = grd_opindxlist.row - grd_opindxlist.fixedRows + 1;
- var cureRow = grd_cureindxlist.row - grd_cureindxlist.fixedRows + 1;
- var Diagkindcdflag = model.getValue("/root/main/indxinfo/diagindxinfo/diagindxlist[" +diagRow + "]/diagkindcdflag");
- var Opkindcdflag = model.getValue("/root/opinfo/opindxdtlinfo/opindxdtllist[" + opRow + "]/opkindcdflag");
- var Curekindcdflag = model.getValue("/root/main/indxinfo/cureindxinfo/cureindxlist[" + cureRow + "]/opkindcdflag");
- var diagCol = grd_diagindxlist.col;
- var opCol = grd_opindxlist.col;
- var cureCol = grd_cureindxlist.col;
- if(flag =="diag"){
- if(diagCol==1){
- for ( var i= 1; i < grd_diagindxlist.rows; i++){
- if(Diagkindcdflag=="M"){
- if(i != diagRow){
- grd_diagindxlist.valueMatrix(i,1)="S";
- }
- }
- }
- }
- }else if(flag=="op"){
- if(opCol==2){
- for ( var i= 1; i< grd_opindxlist.rows; i++){
- if(Opkindcdflag=="M"){
- if(i != opRow){
- grd_opindxlist.valueMatrix(i,2)="S";
- }
- }
- }
- }
- }else if(flag =="cure"){
- if(cureCol==1){
- for( var i= 1; i< grd_cureindxlist.rows; i++){
- if(Curekindcdflag=="M"){
- if(i != cureRow){
- grd_cureindxlist.valueMatrix(i,1)="S";
- }
- }
- }
- }
- }
- model.refresh();
- }
- /**
- * @ver : 2007-12-01
- * @desc : 초기화버튼
- * @ :
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClearIndxInfo()
- {
- model.resetInstanceNode("/root/main/indxinfo");
- model.removeNodeset("/root/main/indxinfo/ccindxinfo/ccindxlist");
- model.removeNodeset("/root/main/indxinfo/diagindxinfo/diagindxlist");
- model.removeNodeset("/root/opinfo/opindxdtlinfo/opindxdtllist");
- model.removeNodeset("/root/main/indxinfo/cureindxinfo/cureindxlist");
- model.removeNodeset("/root/main/indxinfo/dethindxinfo/dethindxlist");
- model.removeNodeset("/root/main/indxinfo/bfindxlist/bfindxinfo");
- model.removeNodeset("/root/main/indxinfo/diaginfo/diaglist");
- model.removeNodeset("/root/main/indxinfo/insudiaginfo/insudiaglist");
- model.removeNodeset("/root/main/indxinfo/serdiaginfo/serdiaglist");
- model.removeNodeset("/root/main/indxinfo/cnstinfo/cnstlist");
- model.removeNodeset("/root/main/indxinfo/opinfo/oplist");
- model.removeNodeset("/root/init/dschpatinfo/chgdschinfo/chgdschddlist");
- model.removeNodeset("/root/init/infdcpartinfo/infdcpartlist");
- model.refresh();
- cmb_tmpcoderesncd.disabled =true;
- tar_memo.disabled=true;
- }
- /**
- * @ver : 2007-12-01
- * @desc : 의료정보사용자에 한하여 저장버튼 visibility
- * @ :
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fUserAdmin()
- {
- var userinfo = getUserInfo("dutplcecd");
- //의료정보팀
-
- // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
- //if(userinfo=="3230000000")
- if(model.getValue("/root/temp/deptcd/hardcd[hardcd='" + userinfo + "']/hardcd") != "")
- {
- // KNUH_20101207_박성호_end
- btn_save.visible = "true";
- btn_clear.visible = "true";
- model.refresh();
- }
- else
- {
- btn_save.visible = "false";
- btn_clear.visible = "false";
- model.refresh();
- }
- }
- /**
- * @ver : 2008-08-25
- * @desc : 감염종류1의 감염종류2의 하부항목들 조회(퇴원분석과 동일)
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetInFcCas(code){
- switch(code){
-
- case "01":
- zbcfGetCodeList(new Array("M0485"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0485");
- break;
- case "02":
- zbcfGetCodeList(new Array("M0486"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0486");
- break;
- case "03":
- zbcfGetCodeList(new Array("M0487"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0487");
- break;
- case "04":
- zbcfGetCodeList(new Array("M0488"),new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0488");
- break;
- case "05":
- zbcfGetCodeList(new Array("M0489"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0489");
- break;
- case "06":
- zbcfGetCodeList(new Array("M0490"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0490");
- break;
- case "07":
- zbcfGetCodeList(new Array("M0491"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0491");
- break;
- case "08":
- zbcfGetCodeList(new Array("M0492"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0492");
- break;
- case "09":
- zbcfGetCodeList(new Array("M0493"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0493");
- break;
- case "10":
- zbcfGetCodeList(new Array("M0494"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0494");
- break;
- case "11":
- zbcfGetCodeList(new Array("M0495"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0495");
- break;
- case "12":
- zbcfGetCodeList(new Array("M0496"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0496");
- break;
- case "13":
- zbcfGetCodeList(new Array("M0497"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0497");
- break;
- }
- model.refresh();
- model.removeNodeset("/root/hidden/infdcpartinfo/infdcpartlist");
- model.makeNode("/root/hidden/infdcpartinfo/infdcpartlist");
- }
- /**
- * @ver : 2008-12-17
- * @desc : 법정 전염병신고서 화면과 연계
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSendInfdisInfo()
- {
- var reptflag = model.getValue("/root/main/indxinfo/infdisinfo/infdislist/reptflag");
- if(reptflag=="01"){
- setParameter("wrtedt",model.getValue("/root/main/indxinfo/infdisinfo/infdislist/wrtedt"));
- setParameter("seqno",model.getValue("/root/main/indxinfo/infdisinfo/infdislist/seqno"));
- setParameter("pid" , model.getValue("/root/main/indxinfo/infdisinfo/infdislist/pid"));
- setParameter("indd" , model.getValue("/root/main/indxinfo/infdisinfo/infdislist/indd"));
- setParameter("psnflag", "I");
- setParameter("state", "S");
- open("SPASI01500");//법정 전염병신고서
- }else if(reptflag=="02"){
- setParameter("wrtedt",model.getValue("/root/main/indxinfo/infdisinfo/infdislist/wrtedt"));
- setParameter("seqno",model.getValue("/root/main/indxinfo/infdisinfo/infdislist/seqno"));
- setParameter("pid" , model.getValue("/root/main/indxinfo/infdisinfo/infdislist/pid"));
- setParameter("indd" , model.getValue("/root/main/indxinfo/infdisinfo/infdislist/indd"));
- setParameter("psnflag", "I");
- setParameter("state", "S");
- open("SPASI01800");//결핵신고서
- }else if(reptflag=="03"){
- setParameter("wrtedt",model.getValue("/root/main/indxinfo/infdisinfo/infdislist/wrtedt"));
- setParameter("seqno",model.getValue("/root/main/indxinfo/infdisinfo/infdislist/seqno"));
- setParameter("pid" ,model.getValue("/root/main/indxinfo/infdisinfo/infdislist/pid"));
- setParameter("indd" ,model.getValue("/root/main/indxinfo/infdisinfo/infdislist/indd"));
- setParameter("psnflag", "I");
- setParameter("state","S");
- open("SPASI01600");//간염신고서
- }else if(reptflag=="04"){
- setParameter("wrtedt",model.getValue("/root/main/indxinfo/infdisinfo/infdislist/wrtedt"));
- setParameter("seqno" ,model.getValue("/root/main/indxinfo/infdisinfo/infdislist/seqno"));
- setParameter("pid" ,model.getValue("/root/main/indxinfo/infdisinfo/infdislist/pid"));
- setParameter("indd" ,model.getValue("/root/main/indxinfo/infdisinfo/infdislist/indd"));
- setParameter("psnflag", "I");
- setParameter("state" ,"S");
- open("SPASI01900");//선천성 매독신고서
- }else if(reptflag=="05"){
- setParameter("wrtedt",model.getValue("/root/main/indxinfo/infdisinfo/infdislist/wrtedt"));
- setParameter("seqno",model.getValue("/root/main/indxinfo/infdisinfo/infdislist/seqno"));
- setParameter("pid" ,model.getValue("/root/main/indxinfo/infdisinfo/infdislist/pid"));
- setParameter("indd" ,model.getValue("/root/main/indxinfo/infdisinfo/infdislist/indd"));
- setParameter("psnflag", "I");
- setParameter("state","S");
- open("SPASI01700");//성병신고서
- }
- }
- /**
- * @ver : 2009-02-16
- * @desc : 진단/수술 FULL 코드 조회, FULL 코드가 아니면 팝업과 연계
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDiagOpCdFullSearch(flag)
- {
- if(event.keyCode == "13") {
- if(flag =="grd_diagindxlist"){
- var iRow = grd_diagindxlist.row - grd_diagindxlist.fixedRows + 1;
- var dispdiagcd = model.getValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/dispdiagcd");
- if(dispdiagcd==""){
- return;
- }
- if(dispdiagcd!=""){
- model.removenode("/root/send");
- model.makeNode("/root/send");
- model.makeValue("/root/send/indxcd", "null");
- model.makeValue("/root/send/indxflag", "0");
-
- // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
- var dutplcecd = model.getValue("/root/temp/dutplcecd/hardcd/hardcd");
- //model.makeValue("/root/send/deptcd", "3230000000");//의료정보팀 진단용어만
- model.makeValue("/root/send/deptcd", dutplcecd);//의료정보팀 진단용어만
- // KNUH_20101207_박성호_end
-
- model.makeValue("/root/send/deptflag", "Y");
- model.makeValue("/root/send/srchflag", "C");
- var Srchnm = grd_diagindxlist.valueMatrix(iRow,grd_diagindxlist.colRef("dispdiagcd")).toUpperCase();
- model.makeValue("/root/send/srchnm", Srchnm);
- model.makeValue("/root/send/stndd",cmb_dschdd.value);
- if(Srchnm.indexOf("/") > 0){
- if(submit("TRMRT00209")){//Mophology 코드
- if(getNodesetCnt(model,"/root/main/diagcdinfo/kcd4m")==1){
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/dispdiagcd" ,model.getValue("/root/main/diagcdinfo/kcd4m/morphlgccd"));
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/diagtermcd" ,model.getValue("/root/main/diagcdinfo/kcd4m/morphlgccd"));
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/diagseqno" ,model.getValue("/root/main/diagcdinfo/kcd4m/kcd4mseqno"));
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/hngnm" ,model.getValue("/root/main/diagcdinfo/kcd4m/kcd4mhngnm"));
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/engnm" ,model.getValue("/root/main/diagcdinfo/kcd4m/kcd4mengnm"));
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/pid" ,model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid"));
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/dschdd" ,model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd"));
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/instcd" ,getUserInfo("dutplceinstcd"));
- model.removeNodeset("/root/main/diagcdinfo/kcd4");
- model.makeNode("/root/main/diagcdinfo/kcd4");
- grd_diagindxlist.refresh();
- }else{
- fDiagIndxList("code");
- }
- }
- }else if(submit("TRMRT01600")){//진단코드
- if(getNodesetCnt(model,"/root/main/deptdiagcdlist/deptdiagcdinfo")==1){
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/dispdiagcd" ,model.getValue("/root/main/deptdiagcdlist/deptdiagcdinfo/termcd"));
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/diagtermcd" ,model.getValue("/root/main/deptdiagcdlist/deptdiagcdinfo/termcd"));
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/hngnm" ,model.getValue("/root/main/deptdiagcdlist/deptdiagcdinfo/termhngnm"));
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/engnm" ,model.getValue("/root/main/deptdiagcdlist/deptdiagcdinfo/termengnm"));
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/pid" ,model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid"));
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/dschdd" ,model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd"));
- model.setValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/instcd" ,getUserInfo("dutplceinstcd"));
- var lglydisflag = model.getValue("/root/main/deptdiagcdlist/deptdiagcdinfo/lglydisflag");
- if((lglydisflag=="00")||(lglydisflag=="")){
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/lglydisflag" , "");
- }else{
- model.makeValue("/root/main/indxinfo/diagindxinfo/diagindxlist["+iRow+"]/lglydisflag" , lglydisflag+"군");
- }
- model.removeNodeset("/root/main/deptdiagcdlist/deptdiagcdinfo");
- model.makeNode("/root/main/deptdiagcdlist/deptdiagcdinfo");
- grd_diagindxlist.refresh();
- }else{
- fDiagIndxList("code");
- }
- }
- }
- }else if(flag =="grd_opindxlist"){
- var opRow = grd_opindxlist.row - grd_opindxlist.fixedRows + 1;
- var disoptermcd = model.getValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+opRow+"]/disoptermcd");
- if(disoptermcd==""){
- return;
- }
- model.removenode("/root/send");
- model.makeNode("/root/send");
- model.makeValue("/root/send/indxcd", "null");
- model.makeValue("/root/send/indxflag", "9");
-
- // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
- var dutplcecd = model.getValue("/root/temp/dutplcecd/hardcd/hardcd");
- //model.makeValue("/root/send/deptcd", "3230000000");
- model.makeValue("/root/send/deptcd", dutplcecd);//의료정보팀 진단용어만
- // KNUH_20101207_박성호_end
-
- model.makeValue("/root/send/deptflag", "Y");
- model.makeValue("/root/send/srchflag", "C");
- var Srchnm = grd_opindxlist.valueMatrix(opRow,grd_opindxlist.colRef("disoptermcd")).toUpperCase();
- model.makeValue("/root/send/srchnm", Srchnm);
- model.makeValue("/root/send/stndd",cmb_dschdd.value);
- if(submit("TRMRT01601")){//수술코드
- if(getNodesetCnt(model,"/root/main/deptopcdlist/deptopcdinfo")==1){
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+opRow+"]/disoptermcd" ,model.getValue("/root/main/deptopcdlist/deptopcdinfo/termcd"));
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+opRow+"]/optermcd" ,model.getValue("/root/main/deptopcdlist/deptopcdinfo/termcd"));
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+opRow+"]/ophngnm" ,model.getValue("/root/main/deptopcdlist/deptopcdinfo/termhngnm"));
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+opRow+"]/opengnm" ,model.getValue("/root/main/deptopcdlist/deptopcdinfo/termengnm"));
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+opRow+"]/pid" ,model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid"));
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+opRow+"]/dschdd" ,model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd"));
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+opRow+"]/opflag" ,"0");
- model.setValue("/root/opinfo/opindxdtlinfo/opindxdtllist["+opRow+"]/instcd" ,getUserInfo("dutplceinstcd"));
- model.removeNodeset("/root/main/deptopcdlist/deptopcdinfo");
- model.makeNode("/root/main/deptopcdlist/deptopcdinfo");
- grd_opindxlist.refresh();
- }else{
- fOpGridIndxList("code");
- }
- }
- }else if(flag =="grd_cureindxlist"){
- var opRow = grd_cureindxlist.row - grd_cureindxlist.fixedRows + 1;
- var disoptermcd = model.getValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+opRow+"]/disoptermcd");
- if(disoptermcd==""){
- return;
- }
- model.removenode("/root/send");
- model.makeNode("/root/send");
- model.makeValue("/root/send/indxcd", "null");
- model.makeValue("/root/send/indxflag", "9");
-
- // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
- var dutplcecd = model.getValue("/root/temp/dutplcecd/hardcd/hardcd");
- //model.makeValue("/root/send/deptcd", "3230000000");
- model.makeValue("/root/send/deptcd", dutplcecd);//의료정보팀 진단용어만
- // KNUH_20101207_박성호_end
-
- model.makeValue("/root/send/deptflag", "Y");
- model.makeValue("/root/send/srchflag", "C");
- var Srchnm = grd_cureindxlist.valueMatrix(opRow,grd_cureindxlist.colRef("disoptermcd")).toUpperCase();
- model.makeValue("/root/send/srchnm", Srchnm);
- model.makeValue("/root/send/stndd",cmb_dschdd.value);
- if(submit("TRMRT01601")){//수술코드
- if(getNodesetCnt(model,"/root/main/deptopcdlist/deptopcdinfo")==1){
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+opRow+"]/disoptermcd" ,model.getValue("/root/main/deptopcdlist/deptopcdinfo/termcd"));
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+opRow+"]/optermcd" ,model.getValue("/root/main/deptopcdlist/deptopcdinfo/termcd"));
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+opRow+"]/ophngnm" ,model.getValue("/root/main/deptopcdlist/deptopcdinfo/termhngnm"));
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+opRow+"]/opengnm" ,model.getValue("/root/main/deptopcdlist/deptopcdinfo/termengnm"));
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+opRow+"]/pid" ,model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid"));
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+opRow+"]/dschdd" ,model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/dschdd"));
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+opRow+"]/opflag" ,"0");
- model.setValue("/root/main/indxinfo/cureindxinfo/cureindxlist["+opRow+"]/instcd" ,getUserInfo("dutplceinstcd"));
- model.removeNodeset("/root/main/deptopcdlist/deptopcdinfo");
- model.makeNode("/root/main/deptopcdlist/deptopcdinfo");
- grd_cureindxlist.refresh();
- }else{
- fOpGridIndxList("code");
- }
- }
- }
- }
- }
- //입퇴원요약기록지 보여주기
- function fViewDischarge() {
-
- var formrecseq = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/formrecseq");
- var pid = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/pid");
- var hngnm = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/hngnm");
- var sex = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/sex");
- var age = model.getValue("/root/main/indxinfo/dschpatinfo/patinfo/age");
- var sa = sex+"/"+age;
- var orddeptnm = "";
- var roomcd = "";
-
- var disppatinfo = pid +"▦" + hngnm +"▦" + sa+"▦"+orddeptnm +"▦" + roomcd + "▦";
-
- setParameter("openmode", "recform"); //오픈모드는 "recform"
- setParameter("formrecseq", formrecseq); //서식기록테이블의 formrecseq(기록순번)
- setParameter("disppatinfo", disppatinfo);
- modal("SSMMR01100", 1, 0, 0 ,"", "", "");
- }
|