1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>영적돌봄기록</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <patient>
- <pid/>
- <sex/>
- <age/>
- <hngnm/>
- <engnm/>
- <rrgstno1/>
- <rrgstno2/>
- <brthdd/>
- <hometel/>
- <mpphontel/>
- <zipcd1/>
- <zipcd2/>
- <zipcdseq/>
- <zipcdaddr/>
- <detladdr/>
- <religncd/>
- <vipyn/>
- <baptnm/>
- <chchnm/>
- </patient>
- <fthcnst>
- <patinfo>
- <pid/>
- <sex/>
- <age/>
- <hngnm/>
- <engnm/>
- <rrgstno1/>
- <rrgstno2/>
- <brthdd/>
- <hometel/>
- <mpphontel/>
- <zipcd1/>
- <zipcd2/>
- <zipcdseq/>
- <addr/>
- <detladdr/>
- <religncd/>
- <vipyn/>
- <baptnm/>
- <chchnm/>
- </patinfo>
- <inptinfo>
- <indd/>
- <wardnm/>
- <roomcd/>
- <orddeptnm/>
- <medispclnm/>
- <fsexamflag/>
- <diagnm/>
- <cretno/>
- <orddeptcd/>
- <medispclid/>
- <pid/>
- <nursreqdd/>
- <carefthactreqtype/>
- <reqqreqdd/>
- <reqdeptcd/>
- <cnstformrecseq/>
- <patmreqdd/>
- <actflag/>
- </inptinfo>
- <reclist>
- <indd/>
- <dschdd/>
- <diagnm/>
- <asesconslrnm/>
- <asesrecdd/>
- <reqkind/>
- <reqdd/>
- <repldd/>
- <enddd/>
- <endresnnm/>
- <pid/>
- <formrecseq/>
- <cretno/>
- <reqdeptcd/>
- <fsexamflag/>
- <formrecdeptcd/>
- <cnstformrecseq/>
- <carefthactreqtype/>
- <asesconslrid/>
- <diagformrecseq/>
- <planvaluformrecseq/>
- <arbtrformrecseq/>
- <endformrecseq/>
- <endresncd/>
- <status/>
- </reclist>
- </fthcnst>
- <paminfo>
- <list/>
- </paminfo>
- <patinfo>
- <patinfolist/>
- </patinfo>
- <popupendflag/>
- </main>
- <send>
- <search>
- <pid/>
- </search>
- <reqdata>
- <savedata>
- <formrecseq/>
- <pid/>
- <indd/>
- <cretno/>
- <reqdd/>
- <reqdeptcd/>
- <reqkind/>
- <fsexamflag/>
- <formrecdeptcd/>
- <cnstformrecseq/>
- <carefthactreqtype/>
- <asesconslrid/>
- <asesrecdd/>
- <diagformrecseq/>
- <planvaluformrecseq/>
- <arbtrformrecseq/>
- <endformrecseq/>
- <enddd/>
- <endresncd/>
- <endresnnm/>
- <status/>
- </savedata>
- </reqdata>
- <deldata/>
- <saveflag>
- <reqkind/>
- <status/>
- </saveflag>
- </send>
- <init>
- <comdata>
- <relign>
- <P0157/>
- </relign>
- <reqkind>
- <A0464/>
- </reqkind>
- <fsexamflag>
- <P0021/>
- </fsexamflag>
- </comdata>
- </init>
- <hidden/>
- <source>
- <srchcond/>
- <hngnm/>
- <rrgstno1/>
- <rrgstno2/>
- <autoflag/>
- </source>
- </root>
- </instance>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRZBC00105" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRMRF02001" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRMMR01301" mediatype="application/x-www-form-urlencoded" method="post"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fFormSetting();
- fInit();
- ]]>
- </script>
- <submission id="TRAYA04201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/fthcnst"/>
- <submission id="TXAYA04201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/savedinfo"/>
- <submission id="TXAYA04202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/deldata" resultref="/root/main/savedinfo"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/departmentcodeweb/js/common.js"/>
- <script type="javascript" src="../../../emr/commonweb/js/EMRCommon.js"/>
- <script type="javascript" src="../../../emr/medirecweb/js/MMRCommon.js"/>
- <script type="javascript">
- <![CDATA[
- // form Load시 셋팅값
- function fFormSetting()
- {
- ivw_form.window.javascript.fInitPage(false, false, parseInt(ivw_form.attribute("height")), parseInt(ivw_form.attribute("width")));
-
- // 공통코드
- zbcfGetCodeList(new Array("P0157", "A0464", "P0021"), new Array("/root/init/comdata/relign", "/root/init/comdata/reqkind", "/root/init/comdata/fsexamflag"), true);
- // 빈서식
- //var formcd = "0000000499";
- //ivw_form.window.javascript.fLoadNewForm(formcd, false);
- switch1.selectedIndex = 0;
-
- model.removeNodeset("/root/main/fthcnst/reclist");
- }
-
- // 초기값 셋팅
- function fInit()
- {
-
- //alert(getUserInfo("usernm"));
-
- //상단 환자 정보 가져오기
- model.removeNodeset("/root/main/paminfo");
- model.makeNode("/root/main/paminfo");
-
- var node = getGlobalVariable("paminfo"); // 사용자 세션 정보 제공 함수
- setCSVToNode("/root/main/paminfo", node); ///root/main/paminfo 노드 경로에 paminfo정보 makevalue
-
- //상단 정보 있는지 유무 체크
- if(node != "")
- {
- model.resetInstanceNode("/root/send/search");
- // 환자정보, 진료내역, 의뢰내역
- model.setValue("/root/send/search/pid", model.getValue("/root/main/paminfo/list/pid"));
- fSearch();
- }
-
- model.refresh();
- }
-
- // 환자정보 PopUp
- function fPatPopUp()
- {
- modal("SPAYA05300", "1","150", "150", "SPAYA05300", "/root/source", "/root/send");
-
- if (model.getValue("/root/main/popupendflag") == "ok")
- {
- model.resetInstanceNode("/root/send/search");
- // 환자정보, 진료내역, 의뢰내역
- model.setValue("/root/send/search/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
- // 조회
- fSearch();
-
- model.setFocus("ipt_pid");
- //model.refresh();
-
- }
- model.refresh();
- }
-
- // 조회
- function fSearch()
- {
- model.resetInstanceNode("/root/send/saveflag");
-
- // reqGetFthCnstInfo
- if (submit("TRAYA04201", false) == true)
- {
- model.copyNode("/root/main/patient", "/root/main/fthcnst/patinfo");
- model.resetInstanceNode("/root/send/saveflag");
- ivw_form.src = "../../../emr/medirecweb/xrw/SMMMR00000_Empty.xrw"; //빈서식 로딩
-
- var nodecnt = model.instances(0).selectNodes("/root/main/fthcnst/reclist").length; //영적돌봄이력
-
- var endyn = "N";
- for (var i = 1; i <= nodecnt; i++)
- {
- var enddd = model.getValue("/root/main/fthcnst/reclist[" + i + "]/enddd");
-
- if (enddd == "") //종결일자가 없으면 endyn Y로 셋팅
- {
- endyn = "Y";
- break;
- }
- }
-
- //alert('nodecnt:' + nodecnt);
- //alert('endyn : ' + endyn);
- //alert('enddd : ' + enddd);
-
- // 조회건이 없으면 신규 (영적돌봄이력이 없으면 status i로 저장)
- if (nodecnt == 0)
- {
- model.setValue("/root/send/saveflag/status", "i");
-
- // 의뢰유형 셋팅 1: 간호정보조사지, 2: 타과의뢰, 3:기타의뢰, 4:원목자선정 중 환자관리에서 넘겨받은 값으로 셋팅
- fReqKindSetting();
- }
- else
- {
- // 수정
- if (endyn == "Y")
- {
- model.setValue("/root/send/saveflag/status", "u");
- // 영적돌봄이력이 있으면서 종결되지 않은 건 status u로 셋팅
-
- //grd_list.select(1,1) = true;
- fReqKindSetting();
- // 의뢰유형 셋팅 1: 간호정보조사지, 2: 타과의뢰, 3:기타의뢰, 4:원목자선정 중 환자관리에서 넘겨받은 값으로 셋팅
- }
- else
- {
- // 신규
- // 영적돌봄이력이 있으면서 종결되었을 때 status i로 셋팅
- model.setValue("/root/send/saveflag/status", "i");
- fReqKindSetting();
- // 의뢰유형 셋팅 1: 간호정보조사지, 2: 타과의뢰, 3:기타의뢰, 4:원목자선정 중 환자관리에서 넘겨받은 값으로 셋팅
- }
- }
-
- /*
- ivw_form.src= "../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw";
- ivw_form.window.javascript.fInitPage(false, false, parseInt(ivw_form.attribute("height")), parseInt(ivw_form.attribute("width")));
-
- var pid = model.getValue("/root/main/fthcnst/inptinfo/pid");
- var indd = model.getValue("/root/main/fthcnst/inptinfo/indd");
- var cretno = model.getValue("/root/main/fthcnst/inptinfo/cretno");
- var ioflag = "I";
-
- if (pid != "")
- {
- ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
-
- // 빈서식
- var formcd = "0000000499";
- ivw_form.window.javascript.fLoadNewForm(formcd);
- }
- */
- }
- }
-
-
- // 저장
- function fSave() // C: 신규, U : 수정, D :삭제 M : 기록일시 부제목만 변경
- {
- var status = model.getValue("/root/send/saveflag/status");
- var userid = getUserInfo("userid");
-
- var sPassData =
- "formrecseq" //사정기록번호
- + "▦pid" //등록번호
- + "▦indd" //입원일자
- + "▦cretno" //생성번호
- + "▦reqdd" //의뢰일자
- + "▦reqdeptcd" //의뢰부서
- + "▦reqkind" //의뢰유형
- + "▦fsexamflag" //초재진구분
- + "▦formrecdeptcd" //진료과코드
- + "▦cnstformrecseq" //컨설트기록번호
- + "▦carefthactreqtype" //간호정보지 원목유형
- + "▦asesconslrid" //영적사정원목자
- + "▦asesrecdd" //영적사정기록일
- + "▦diagfrmrecseq" //영적진단 기록번호
- + "▦planvaluformrecseq" //영적계획및 중재 기록번호
- + "▦arbtrformrecseq" //영적중결 기록번호
- + "▦endformrecseq" //영적종결 기록번호
- + "▦enddd" //종결일자
- + "▦endresncd" //종결사유코드
- + "▦endresnnm" //종결사유명
- + "▦stage" //단계
- + "▦status" //상태
- + "▩" ;
- var stage = switch1.selectedIndex; //영적 사정 탭
- //alert("11111"+ status);
- if(status == "u")
- {
- var lrow = grd_list.row; //클릭한 로우
- if (userid != model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/asesconslrid"))
- {
- messageBox("해당 환자의 영적돌봄담당자만 기록지처리를 할 수 있습니다" + "\n\r" + "담당자가", "E004" );
- return;
- }
-
- var enddd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/enddd"); //클릭한 로우의 종결일자
-
- // // 종결인 경우 사정만 신규로 작성 가능
- //alert(enddd);
- // if (enddd != "")
- // {
- // if (stage != 0)
- // {
- // messageBox("종결된 기록지는 변경처리 할 수", "I004");
- // return;
- // }
- //
- // }
-
- var diagformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/diagformrecseq"); //영적진단 기록번호
- var planvaluformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/planvaluformrecseq"); //영적계획및 중재 기록번호
- var arbtrformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/arbtrformrecseq"); //영적중결 기록번호
- var endformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/endformrecseq"); //영적종결 기록번호
- // Iviewer 체크
- if ( !fCheckIviewer() ) return;
- //alert("체크성공");
- var endresncd = "";
- var endresnnm = "";
- // 서식상태 설정
- fDocuStatus();
- //model.setValue("/root/send/reqdata/formrec/status", "U");
- var status = "u";
-
- // 종결인 경우 사정만 신규로 작성 가능
- if (enddd != "")
- {
- if (stage == 0)
- {
- var btn = messageBox("", "S005");
- if (btn == '7')
- {
- //
- var endyn = "N";
- for (var i = 1; i <= getNodesetCount("/root/main/fthcnst/reclist") ; i++)
- {
- enddd = model.getValue("/root/main/fthcnst/reclist[" + i + "]/enddd");
-
- if (enddd == "")
- {
- endyn = "Y";
- }
- }
-
- // 종결안된 것이 있으면
- if (endyn == "Y")
- {
- messageBox("종결처리되지 않은 영적기록지가 있습니다. 신규기록지 작성을 할 수", "I004");
- model.refresh();
- return;
- }
-
-
- var userid = getUserInfo("userid");
- var formrecdeptcd = getUserInfo("dutplcecd");
- var formrecdeptnm = getUserInfo("dutplcenm");
- var formrecusernm = getUserInfo("usernm");
- var formrecdeptcd = getUserInfo("dutplcecd");
- var formrecdd = getCurrentDate();
- var times=getCurrentTime();
- var formrechm=times.substr(0,4);
-
- var pid = model.getValue("/root/main/fthcnst/inptinfo/pid");
- var indd = model.getValue("/root/main/fthcnst/inptinfo/indd");
- var cretno = model.getValue("/root/main/fthcnst/inptinfo/cretno");
- var orddeptcd=model.getValue("/root/main/fthcnst/inptinfo/orddeptcd");
- var formrecdeptcd = model.getValue("/root/main/fthcnst/inptinfo/orddeptcd");
- var orddrid=model.getValue("/root/main/fthcnst/inptinfo/medispclid");
- var ioflag = "I";
-
- ivw_form.window.javascript.fSetFormRec("status", "C");
- ivw_form.window.javascript.fSetFormRec("pid", pid);
- ivw_form.window.javascript.fSetFormRec("orddd", indd); //indd
- ivw_form.window.javascript.fSetFormRec("orddrid", orddrid);
- ivw_form.window.javascript.fSetFormRec("cretno", cretno);
- ivw_form.window.javascript.fSetFormRec("orddeptcd", formrecdeptcd);
- ivw_form.window.javascript.fSetFormRec("formrecdeptcd", formrecdeptcd); // 기록시점의 원무정보 진료과'; 서식 작성한 진료과 orddeptcd 로그인한 사람의 부서 DUTPLCECD
- ivw_form.window.javascript.fSetFormRec("formrecdeptnm", formrecdeptnm);
- ivw_form.window.javascript.fSetFormRec("formrecuserid", userid); //userid
- ivw_form.window.javascript.fSetFormRec("formrecusernm", formrecusernm);
- ivw_form.window.javascript.fSetFormRec("formrecdd", formrecdd); //기록시점의 날짜 현재
- ivw_form.window.javascript.fSetFormRec("formrechm", formrechm); // 몇시 몇분
- ivw_form.window.javascript.fSetFormRec("espiseq", 0);
-
- //ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
-
- if ( !fCheckIviewer() ) return;
-
-
- model.setValue("/root/send/reqdata/formrec/status", "C"); //신규
- status = "i";
-
-
- var diagformrecseq = "0"; //영적진단 기록번호
- var planvaluformrecseq = "0"; //영적계획및 중재 기록번호
- var arbtrformrecseq = "0"; //영적중결 기록번호
- var endformrecseq = "0"; //영적종결 기록번호
- var enddd = ""; //종결일자
- var endresncd = ""; //종결사유코드
- var endresnnm = ""; //종결사유명
-
-
- //alert(status);
- //의뢰유형 및 의뢰일자 셋팅
- model.resetInstanceNode("/root/send/saveflag/reqkind"); //그리드 클릭한 의뢰유형 값 초기화
- model.refresh();
- fReqKindSetting(); //의뢰 유형 셋팅 (그리드 클릭했을 땐 클릭한 그리드의 의뢰유형값이 저장되어 있으므로)
- var reqdd = "";
- var reqkind = model.getValue("/root/send/saveflag/reqkind");
- if (reqkind == "1")
- {
- if (model.getValue("/root/main/fthcnst/inptinfo/nursreqdd") == "")
- {
- messageBox("간호정보조사지 정보가", "I004");
- return;
- }
- reqdd = model.getValue("/root/main/fthcnst/inptinfo/nursreqdd");
- }
- else if (reqkind == "2")
- {
- if (model.getValue("/root/main/fthcnst/inptinfo/reqqreqdd") == "")
- {
- messageBox("타과의뢰 정보가", "I004");
- return;
- }
- reqdd = model.getValue("/root/main/fthcnst/inptinfo/reqqreqdd");
- }
- else if (reqkind == "3")
- {
- if (model.getValue("/root/main/fthcnst/inptinfo/patmreqdd") == "")
- {
- messageBox("기타의뢰 정보가", "I004");
- return;
- }
- reqdd= model.getValue("/root/main/fthcnst/inptinfo/patmreqdd");
- }
- else
- {
- if (model.getValue("/root/main/fthcnst/inptinfo/patmreqdd") == "")
- {
- messageBox("원목자선정 정보가", "I004");
- return;
- }
- reqdd= model.getValue("/root/main/fthcnst/inptinfo/patmreqdd");
- }
- }
- else if(btn == '2')
- {
- return;
- }
-
- // 수정일때
- var reqdd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqdd") //의뢰일자
- var reqkind = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqkind") //의뢰유형
- }
- if (stage == "1"){
- var btn = messageBox("", "Q016");
- if(btn == '7'){
- return;
- }
-
- var reqdd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqdd") //의뢰일자
- var reqkind = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqkind") //의뢰유형
- }
- if (stage == "2"){
- var btn = messageBox("", "Q016");
- if(btn == '7'){
- return;
- }
-
- var reqdd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqdd") //의뢰일자
- var reqkind = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqkind") //의뢰유형
- }
- if (stage == "3"){
- var btn = messageBox("", "Q016");
- if(btn == '7'){
- return;
- }
-
- var reqdd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqdd") //의뢰일자
- var reqkind = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqkind") //의뢰유형
- }
- if (stage == "4"){
- var btn = messageBox("", "Q016");
- if(btn == '7'){
- return;
- }
-
- var enddd = ivw_form.window.javascript.getFormItemValue("0013319");
- if (enddd.reccnts == "")
- {
- messageBox("종결일자를","C001");
- return;
- }
-
- var aa = enddd.reccnts;
- var enddd = aa.setReplaceWord("-", "");
-
- var endresn = ivw_form.window.javascript.getFormItemValue("0016904");
- endresncd = endresn.rectermcd;
- endresnnm = endresn.rectermnm;
-
- var reqdd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqdd") //의뢰일자
- var reqkind = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqkind") //의뢰유형
- }
-
- var CurrentDate = getCurrentDate();
- sPassData = sPassData
- + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/formrecseq") //사정기록번호
- + "▦" + model.getValue("/root/main/fthcnst/inptinfo/pid") //등록번호
- + "▦" + model.getValue("/root/main/fthcnst/inptinfo/indd") //입원일자
- + "▦" + model.getValue("/root/main/fthcnst/inptinfo/cretno") //생성번호
- + "▦" + reqdd //의뢰일자
- + "▦" + model.getValue("/root/main/fthcnst/inptinfo/reqdeptcd") //의뢰부서
- + "▦" + reqkind //의뢰유형
- + "▦" + model.getValue("/root/main/fthcnst/inptinfo/fsexamflag") //초재진구분
- + "▦" + model.getValue("/root/main/fthcnst/inptinfo/orddeptcd") //진료과코드
- + "▦" + model.getValue("/root/main/fthcnst/inptinfo/cnstformrecseq") //컨설트기록번호
- + "▦" + model.getValue("/root/main/fthcnst/inptinfo/carefthactreqtype") //간호정보지 원목유형
- + "▦" + userid //영적사정원목자
- + "▦" + CurrentDate //영적사정기록일
- + "▦" + diagformrecseq //영적진단 기록번호
- + "▦" + planvaluformrecseq //영적계획및 중재 기록번호
- + "▦" + arbtrformrecseq //영적중결 기록번호
- + "▦" + endformrecseq //영적종결 기록번호
- + "▦" + enddd //종결일자
- + "▦" + endresncd //종결사유코드
- + "▦" + endresnnm //종결사유명
- + "▦" + stage //단계
- + "▦" + status //상태
- + "▩" ;
-
- model.removeNodeset("/root/send/reqdata/savedata");
- model.makeNode("/root/send/reqdata/savedata");
- model.setValue("/root/send/reqdata/savedata", sPassData);
- }
-
- // 수정이면서 종결 일자가 없는 것(정상적인 수정인 경우)
- else
- {
- if (stage == "4")
- {
- var enddd = ivw_form.window.javascript.getFormItemValue("0013319");
- if (enddd.reccnts == "")
- {
- messageBox("종결일자를","C001");
- return;
- }
-
-
- var aa = enddd.reccnts;
- var enddd = aa.setReplaceWord("-", "");
-
- var endresn = ivw_form.window.javascript.getFormItemValue("0016904");
- endresncd = endresn.rectermcd;
- endresnnm = endresn.rectermnm;
- }
-
- sPassData = sPassData
- + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/formrecseq") //사정기록번호
- + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/pid") //등록번호
- + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/indd") //입원일자
- + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/cretno") //생성번호
- + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqdd") //의뢰일자
- + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqdeptcd") //의뢰부서
- + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqkind") //의뢰유형
- + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/fsexamflag") //초재진구분
- + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/formrecdeptcd") //진료과코드
- + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/cnstformrecseq") //컨설트기록번호
- + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/carefthactreqtype") //간호정보지 원목유형
- + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/asesconslrid") //영적사정원목자
- + "▦" + model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/asesrecdd") //영적사정기록일
- + "▦" + diagformrecseq //영적진단 기록번호
- + "▦" + planvaluformrecseq //영적계획및 중재 기록번호
- + "▦" + arbtrformrecseq //영적중결 기록번호
- + "▦" + endformrecseq //영적종결 기록번호
- + "▦" + enddd //종결일자
- + "▦" + endresncd //종결사유코드
- + "▦" + endresnnm //종결사유명
- + "▦" + stage //단계
- + "▦" + status //상태
- + "▩" ;
-
- model.removeNodeset("/root/send/reqdata/savedata");
- model.makeNode("/root/send/reqdata/savedata");
- model.setValue("/root/send/reqdata/savedata", sPassData);
- }
- }
-
- else if(status == "" || status == "i")
- {
- if (switch1.selectedIndex != "0")
- {
- messageBox("신규 기록지는 영적사정기록지부터", "C001");
- return;
- }
-
- // 의뢰유형 체크 및 의뢰일자 셋팅
- // 1: 간호정보조사지, 2: 타과의뢰, 3:기타의뢰, 4:원목자선정
- var reqdd = "";
- var reqkind = model.getValue("/root/send/saveflag/reqkind");
- if (reqkind == "1")
- {
- if (model.getValue("/root/main/fthcnst/inptinfo/nursreqdd") == "")
- {
- messageBox("간호정보조사지 정보가", "I004");
- return;
- }
- reqdd = model.getValue("/root/main/fthcnst/inptinfo/nursreqdd");
- }
- else if (reqkind == "2")
- {
- if (model.getValue("/root/main/fthcnst/inptinfo/reqqreqdd") == "")
- {
- messageBox("타과의뢰 정보가", "I004");
- return;
- }
- reqdd = model.getValue("/root/main/fthcnst/inptinfo/reqqreqdd");
- }
- else if (reqkind == "3")
- {
- if (model.getValue("/root/main/fthcnst/inptinfo/patmreqdd") == "")
- {
- messageBox("기타의뢰 정보가", "I004");
- return;
- }
- reqdd= model.getValue("/root/main/fthcnst/inptinfo/patmreqdd");
- }
- else
- {
- if (model.getValue("/root/main/fthcnst/inptinfo/patmreqdd") == "")
- {
- messageBox("원목자선정 정보가", "I004");
- return;
- }
- reqdd= model.getValue("/root/main/fthcnst/inptinfo/patmreqdd");
- }
- //===========================================================================================================
- // 서식 데이터를 가져오기
- //===========================================================================================================
- if ( !fCheckIviewer() ) return;
- //===========================================================================================================
-
- model.setValue("/root/send/reqdata/formrec/status", "C"); //신규저장의미 status C
-
- var CurrentDate = getCurrentDate();
-
- // 저장
- model.resetInstanceNode("/root/send/reqdata/savedata");
-
- var pid = model.getValue("/root/main/fthcnst/inptinfo/pid");
- var indd = model.getValue("/root/main/fthcnst/inptinfo/indd");
- var cretno = model.getValue("/root/main/fthcnst/inptinfo/cretno");
-
- var reqdeptcd = model.getValue("/root/main/fthcnst/inptinfo/reqdeptcd");
- var fsexamflag = model.getValue("/root/main/fthcnst/inptinfo/fsexamflag");
- var formrecdeptcd = model.getValue("/root/main/fthcnst/inptinfo/orddeptcd");
- var cnstformrecseq = model.getValue("/root/main/fthcnst/inptinfo/cnstformrecseq");
- var carefthactreqtype = model.getValue("/root/main/fthcnst/inptinfo/carefthactreqtype");
- //var carefthactreqtype = "";
- var asesconslrid = userid;
- var asesrecdd = CurrentDate;
- var status = "i";
- var enddd = "";
- var endresncd = "";
- var endresnnm = "";
-
- if (stage == "4")
- {
- var enddd = ivw_form.window.javascript.getFormItemValue("0013319");
- if (enddd.reccnts == "")
- {
- messageBox("종결일자를","C001");
- return;
- }
-
- var aa = enddd.reccnts;
- var enddd = aa.setReplaceWord("-", "");
- var endresn = ivw_form.window.javascript.getFormItemValue("0016904");
- endresncd = endresn.rectermcd;
- endresnnm = endresn.rectermnm;
- }
-
- sPassData = sPassData
- + "0" //사정기록번호
- + "▦" + pid //등록번호
- + "▦" + indd //입원일자
- + "▦" + cretno //생성번호
- + "▦" + reqdd //의뢰일자
- + "▦" + reqdeptcd //의뢰부서
- + "▦" + reqkind //의뢰유형
- + "▦" + fsexamflag //초재진구분
- + "▦" + formrecdeptcd //진료과코드
- + "▦" + cnstformrecseq //컨설트기록번호
- + "▦" + carefthactreqtype //간호정보지 원목유형
- + "▦" + asesconslrid //영적사정원목자
- + "▦" + asesrecdd //영적사정기록일
- + "▦" + "0" //영적진단 기록번호
- + "▦" + "0" //영적계획및 중재 기록번호
- + "▦" + "0" //영적중결 기록번호
- + "▦" + "0" //영적종결 기록번호
- + "▦" + enddd //종결일자
- + "▦" + endresncd //종결사유코드
- + "▦" + endresnnm //종결사유명
- + "▦" + stage //단계
- + "▦" + status //상태
- + "▩" ;
-
- // alert(sPassData);
- model.removeNodeset("/root/send/reqdata/savedata");
- model.makeNode("/root/send/reqdata/savedata");
- model.setValue("/root/send/reqdata/savedata", sPassData);
- }
- //alert("YYYYYYYYY");
- //alert(model.getValue("/root/send/reqdata"));
- if (submit("TXAYA04201", false) == true)
- {
- //ivw_form.src = "../../../emr/medirecweb/xrw/SMMMR00000_Empty.xrw";
- messageBox("저장이", "I002");
-
- fSearch();
- }
-
- }
-
- // 저장시 필수체크 여부
- function fCheckPatmDate()
- {
- var status = model.getValue("/root/send/saveflag/status");
- var userid = getUserInfo("userid");
- if (model.getValue("/root/send/saveflag/reqkind") == "") {
- messageBox("의뢰유형을 ","C001");
- model.setFocus("rdo_reqkind");
- return false;
- }
-
- if (model.getValue("/root/main/patient/pid") == "") {
- messageBox("등록번호를 ","C001");
- model.setFocus("ipt_pid");
- return false;
- }
-
- if (ivw_form.src != "../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw")
- {
- messageBox("저장할 기록지를 ","C002");
- return false;
- }
-
- return true;
- }
-
- // Iviewer 체크
- function fCheckIviewer()
- {
- //alert("successflag1111");
- var successflag = "";
- ivw_form.window.javascript.gSubmitSaveFlag = false;
- setParameter("chkdeptpresave", "N");
- successflag = ivw_form.window.javascript.fClickSave("N");
-
- //alert("successflag"+successflag);
- if(!successflag)
- {
- //messageBox("저장되지", "E007");
- return false;
- }
-
- model.removeNodeset("/root/send/reqdata/recitem");
- model.removeNodeset("/root/send/reqdata/formrec");
- //model.makeNode("/root/send/reqdata/recitem");
- model.makeNode("/root/send/reqdata/formrec");
- copyNodeset("/root/send/reqdata/formrec", "/root/send/saverecinfo/formrec" ,"replace" , model, ivw_form.model);
- model.makeValue("/root/send/reqdata/recitem", ivw_form.model.getValue("/root/send/saverecinfo/recitem"));
-
- return true;
- }
-
- // 서식 상태(신규, 수정)
- function fDocuStatus()
- {
- var lrow = grd_list.row;
-
- var formrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/formrecseq");
- var diagformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/diagformrecseq");
- var planvaluformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/planvaluformrecseq");
- var arbtrformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/arbtrformrecseq");
- var endformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/endformrecseq");
-
- var ind = switch1.selectedIndex; // 탭 클릭 순서
-
- if (ind == "0")
- {
- model.setValue("/root/send/reqdata/formrec/status", "U");
- }
- else if(ind == "1")
- {
- if (diagformrecseq != "" && diagformrecseq != "0")
- {
- model.setValue("/root/send/reqdata/formrec/status", "U");
- }
- else
- {
- model.setValue("/root/send/reqdata/formrec/status", "C");
- }
- }
- else if (ind == "2")
- {
- if (planvaluformrecseq != "" && planvaluformrecseq != "0")
- {
- model.setValue("/root/send/reqdata/formrec/status", "U");
- }
- else
- {
- model.setValue("/root/send/reqdata/formrec/status", "C");
- }
- }
- else if (ind == "3")
- {
- if (arbtrformrecseq != "" && arbtrformrecseq != "0")
- {
- model.setValue("/root/send/reqdata/formrec/status", "U");
- }
- else
- {
- model.setValue("/root/send/reqdata/formrec/status", "C");
- }
- }
- else if (ind == "4")
- {
- if (endformrecseq != "" && endformrecseq != "0")
- {
- model.setValue("/root/send/reqdata/formrec/status", "U");
- grd_list.row = 0;
- }
- else
- {
- model.setValue("/root/send/reqdata/formrec/status", "C");
- grd_list.row = 0;
- }
- }
- }
-
- // 삭제
- function fDelete()
- {
- if (grd_list.rows <= 1) return;
- if (grd_list.row < 1) return;
-
- lrow = grd_list.row;
-
- var lrow = grd_list.row;
-
- var userid = getUserInfo("userid");
-
- var enddd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/enddd"); //종결일자
-
- if (enddd != "")
- {
- messageBox("종결된 기록지는 삭제할 수", "I004");
- return;
- }
- if (userid != model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/asesconslrid"))
- {
- messageBox("해당 환자의 영적돌봄담당자만 기록지 처리를 할 수 있습니다" + "\n\r" + "담당자가", "E004" );
- return;
- }
-
- var btn = messageBox("영적사정/영적진단/영적계획및평가/영적중재 기록이 있는 경우, 기록된 모든 영적사정기록지가 삭제처리 됩니다." + "\n\r" + "선택한 환자의 영적돌봄기록을", "Q001");
- if (btn == '6')
- {
- model.resetInstanceNode("/root/send/deldata");
-
- model.copyNode("/root/send/deldata", "/root/main/fthcnst/reclist[" + lrow + "]");
- model.setValue("/root/send/deldata/status", "d");
-
- if (submit("TXAYA04202", false) == true)
- {
- //ivw_form.src = "../../../emr/medirecweb/xrw/SMMMR00000_Empty.xrw";
- //model.resetInstanceNode("/root/send/saveflag/status");
-
- fSearch();
- }
- }
- }
-
- // 그리드 선택
- function fGridSelect()
- {
- //alert("bbb");
- var lrow = grd_list.row;
- //alert(lrow);
-
- //2008-11-09 영적돌봄기록이력 선택 없이 영적사정 버튼 선택시 미종결 기록 존재하면 메시지 호출
- if(lrow < 1){
- var endyn = "N";
- for (var i = 1; i <= getNodesetCount("/root/main/fthcnst/reclist") ; i++)
- {
- enddd = model.getValue("/root/main/fthcnst/reclist[" + i + "]/enddd");
-
- if (enddd == "")
- {
- endyn = "Y";
- }
- }
-
- // 종결안된 것이 있으면
- if (endyn == "Y")
- {
- messageBox("종결처리되지 않은 영적기록지가 있습니다. 신규기록지 작성을 할 수", "I004");
- model.refresh();
- return;
- }
- }
-
- ivw_form.src= "../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw";
- ivw_form.window.javascript.fInitPage(false, false, parseInt(ivw_form.attribute("height")), parseInt(ivw_form.attribute("width")));
-
- model.makeValue("/root/send/saveflag/reqkind", model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/reqkind"));
- //alert("1="+model.getValue("/root/send/saveflag/status"));
- model.setValue("/root/send/saveflag/status", "u");
-
- var formrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/formrecseq");
- var diagformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/diagformrecseq");
- var planvaluformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/planvaluformrecseq");
- var arbtrformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/arbtrformrecseq");
- var endformrecseq = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/endformrecseq");
-
- var pid = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/pid");
- var indd = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/indd");
- var cretno = model.getValue("/root/main/fthcnst/reclist[" + lrow + "]/cretno");
- var ioflag = "I";
-
- var ind = switch1.selectedIndex;
- //alert("formrecseq="+formrecseq);
- if (ind == "0")
- {
- ivw_form.window.javascript.fLoadRecForm(formrecseq, false);
- sStatusIndd = "U";
- }
- else if(ind == "1") //영적 사정클릭시
- {
- //alert(ind);
- //alert(diagformrecseq);
- //alert(diagformrecseq);
- if (diagformrecseq != "" && diagformrecseq != "0")
- {
- //alert(formrecseq);
- ivw_form.window.javascript.fLoadRecForm(diagformrecseq, false);
- sStatusIndd = "U"; //값이 존재 할 때 수정 플래그 U
- }
- else
- {
- ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
-
- // 빈서식
- var formcd = "0000001552";
- ivw_form.window.javascript.fLoadNewForm(formcd, false);
- sStatusIndd = "C";
- }
- }
- else if (ind == "2") //영적 진단 클릭시
- {
- if (planvaluformrecseq != "" && planvaluformrecseq != "0")
- {
- ivw_form.window.javascript.fLoadRecForm(planvaluformrecseq, false);
- sStatusIndd = "U";
- }
- else
- {
- ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
-
- // 빈서식
- var formcd = "0000000627";
- ivw_form.window.javascript.fLoadNewForm(formcd, false);
- sStatusIndd = "C";
- }
- }
- else if (ind == "3") //영적 계획 및 평가 클릭시
- {
- if (arbtrformrecseq != "" && arbtrformrecseq != "0")
- {
- ivw_form.window.javascript.fLoadRecForm(arbtrformrecseq, false);
- sStatusIndd = "U";
- }
- else
- {
- ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
- // 빈서식
- var formcd = "0000001550";
- ivw_form.window.javascript.fLoadNewForm(formcd, false);
- sStatusIndd = "C";
- }
- }
- else if (ind == "4") //영적 중재 클릭시
- {
- if (endformrecseq != "" && endformrecseq != "0")
- {
- ivw_form.window.javascript.fLoadRecForm(endformrecseq, false);
- sStatusIndd = "U";
- }
- else
- {
- ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
- sStatusIndd = "C";
-
- // 빈서식
- var formcd = "0000002908";
- ivw_form.window.javascript.fLoadNewForm(formcd, false);
- }
- }
- }
- // 해당서식 보여주기
- function fEMRView()
- {
- //if (grd_list.rows <= 1)
- //switch1.selectedIndex = 0;
- //return;
-
- var lrow = grd_list.row;
- var ind = switch1.selectedIndex;
-
- var status = model.getValue("/root/send/saveflag/status");
-
- //alert("2222"+status);
- if (status == "u")
- {
- fGridSelect();
- }
- else
- {
- if (ind != "0")
- {
- btn_form.selected = true;
- switch1.selectedIndex = 0;
- //return;
- }
- ivw_form.src= "../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw";
- ivw_form.window.javascript.fInitPage(false, false, parseInt(ivw_form.attribute("height")), parseInt(ivw_form.attribute("width")));
-
- var endyn = "N";
- for (var i = 1; i <= getNodesetCount("/root/main/fthcnst/reclist") ; i++)
- {
- enddd = model.getValue("/root/main/fthcnst/reclist[" + i + "]/enddd");
-
- if (enddd == "")
- {
- endyn = "Y";
- //break;
- }
- }
- // 종결안된 것이 있으면
- if (endyn == "Y")
- //if (false)
- {
- messageBox("종결처리되지 않은 영적기록지가 있습니다. 신규기록지 작성을 할 수", "I004");
- model.refresh();
- return;
- }
-
- var lrow = grd_list.row;
- var ind = switch1.selectedIndex;
-
-
- //그리드선택안했을때
- if (grd_list.rows <= 1)
- {
- if(endyn == "N")
- {
- // 빈서식
- if (ind == "0")
- {
- ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
- var formcd = "0000000499";
-
- // 의뢰유형 셋팅
- fReqKindSetting();
- }
- else
- {
- return;
- }
- }
- }
-
-
- //alert("dd");
- var pid = model.getValue("/root/main/fthcnst/inptinfo/pid");
- var indd = model.getValue("/root/main/fthcnst/inptinfo/indd");
- var cretno = model.getValue("/root/main/fthcnst/inptinfo/cretno");
- var ioflag = "I";
-
- // 재원환자인 경우만 신규저장 가능
- if (pid == "")
- {
- messageBox("재원환자가 아닌 경우 신규기록지를 작성 할 수", "I004");
- return;
- }
- //alert("ee");
- ivw_form.window.javascript.fSetPamInfo(pid, indd, cretno, ioflag);
- //alert(ind);
- // 빈서식
- if (ind == "0")
- {
- var formcd = "0000000499";
-
- // 의뢰유형 셋팅
- fReqKindSetting();
- //alert(formcd);
- }
-
- else if (ind == "1")
- {
- var formcd = "0000001552";
-
- }
- else if (ind == "2")
- {
- var formcd = "0000000627";
- //alert(formcd);
- }
- else if (ind == "3")
- {
- var formcd = "0000001550";
- //alert(formcd);
- }
- else if (ind == "4")
- {
- var formcd = "0000002908";
- //alert(formcd);
- }
-
- //alert(formcd);
- ivw_form.window.javascript.fLoadNewForm(formcd, false);
-
-
- if (ind == "0")
- {
- //fITEMVAL();
- //var temp = new ITEMVAL();
- //temp.rectermcd = "";
- //temp.rectermnm = "";
- //temp.reccnts = indd;
-
- //ivw_form.window.javascript.setFormItemValue("0000824", temp, false);
- }
-
- }
- model.refresh();
- }
-
- // 의뢰유형 셋팅
- function fReqKindSetting()
- {
- // 1: 간호정보조사지, 2: 타과의뢰, 3:기타의뢰, 4:원목자선정
- var nursereqdd = model.getValue("/root/main/fthcnst/inptinfo/nursreqdd");
- var reqqreqdd = model.getValue("/root/main/fthcnst/inptinfo/reqqreqdd");
- var patmreqdd = model.getValue("/root/main/fthcnst/inptinfo/patmreqdd");
- var actflag = model.getValue("/root/main/fthcnst/inptinfo/actflag");
-
- if (reqqreqdd != "")
- {
- model.makeValue("/root/send/saveflag/reqkind", "2");
- }
- else
- {
- if (nursereqdd != "")
- {
- model.makeValue("/root/send/saveflag/reqkind", "1");
- }
- else
- {
- if (actflag == "4")
- {
- model.makeValue("/root/send/saveflag/reqkind", "3");
- }
- else
- {
- if (actflag == "5")
- {
- model.makeValue("/root/send/saveflag/reqkind", "4");
- }
- }
- }
- }
- }
-
- // 초기화
- function fAllClear()
- {
- btn_form.selected = true;
- switch1.selectedIndex = 0;
-
- model.resetInstanceNode("/root/main/patient");
- model.resetInstanceNode("/root/main/fthcnst/patinfo");
- model.resetInstanceNode("/root/main/fthcnst/inptinfo");
- model.resetInstanceNode("/root/send/saveflag");
- model.resetInstanceNode("/root/send/reqdata");
- model.removeNodeset("/root/main/fthcnst/reclist");
-
- ivw_form.src = "../../../emr/medirecweb/xrw/SMMMR00000_Empty.xrw";
-
- model.refresh();
-
- }
-
- //영적돌봄기록지 서식(영적사정)
- var sStatusIndd = "C";
- function fITEMVAL()
- {
- if (sStatusIndd == "C")
- {
- var itemVal = new ITEMVAL();
- var tmp = model.getValue("/root/main/fthcnst/inptinfo/indd"); //freetext
- itemVal.reccnts = tmp.toDate().getDateFormat("YYYY-MM-DD");
- ivw_form.ivw_base.window.javascript.setFormItemValue ("0000824", itemVal, true);
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <script type="javascript" ev:event="onloadcomplete">
- <![CDATA[
- var ind = switch1.selectedIndex;
-
- if(ind == 0)
- {
- fITEMVAL();
- }
- ]]>
- </script>
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:147px; height:14px; ">영적돌봄기록</caption>
- </group>
- <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
- <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
- </group>
- <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
- <group id="group8" style="left:5px; top:240px; width:450px; height:115px; ">
- <line id="line2" class="line_1" style="x1:0px; y1:25px; x2:448px; y2:25px; "/>
- <caption id="caption4" class="tit_2" style="left:5px; top:10px; width:95px; height:13px; ">환자재원정보</caption>
- <caption id="caption5" class="cell_1" style="left:-3px; top:34px; width:83px; height:23px; vertical-align:middle; ">입원일</caption>
- <caption id="caption8" class="cell_1" style="left:190px; top:59px; width:78px; height:23px; vertical-align:middle; ">주치의</caption>
- <caption id="caption9" class="cell_1" style="left:190px; top:34px; width:78px; height:23px; vertical-align:middle; ">병동(병실)</caption>
- <line id="line5" class="line_3" style="x1:0px; y1:112px; x2:440px; y2:112px; "/>
- <caption id="caption12" class="cell_1" style="left:-3px; top:59px; width:83px; height:23px; vertical-align:middle; ">진료과</caption>
- <caption id="caption13" class="cell_1" style="left:-3px; top:84px; width:83px; height:23px; vertical-align:middle; ">초재진구분</caption>
- <caption id="caption14" class="cell_1" style="left:190px; top:84px; width:78px; height:23px; vertical-align:middle; ">진단명</caption>
- <output id="opt_indd" ref="/root/main/fthcnst/inptinfo/indd" class="output_fix" navindex="17" format="yyyy-mm-dd" appearance="output" style="left:85px; top:35px; width:100px; height:19px; text-align:center; "/>
- <output id="opt_wardnm" ref="/root/main/fthcnst/inptinfo/wardnm" class="output_fix" navindex="17" appearance="output" style="left:275px; top:35px; width:85px; height:19px; text-align:center; "/>
- <output id="opt_roomcd" ref="/root/main/fthcnst/inptinfo/roomcd" class="output_fix" navindex="17" appearance="output" style="left:365px; top:35px; width:80px; height:19px; text-align:center; "/>
- <output id="opt_orddeptnm" ref="/root/main/fthcnst/inptinfo/orddeptnm" class="output_fix" navindex="17" appearance="output" style="left:85px; top:60px; width:100px; height:19px; "/>
- <output id="opt_medispclnm" ref="/root/main/fthcnst/inptinfo/medispclnm" class="output_fix" navindex="17" appearance="output" style="left:275px; top:60px; width:170px; height:19px; "/>
- <output id="opt_diagnm" ref="/root/main/fthcnst/inptinfo/diagnm" class="output_fix" navindex="17" appearance="output" style="left:275px; top:85px; width:170px; height:19px; "/>
- <select1 id="cmb_fsexamflag" ref="/root/main/fthcnst/inptinfo/fsexamflag" class="combo_default" disabled="true" appearance="minimal" style="left:85px; top:85px; width:100px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/comdata/fsexamflag/P0021">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- </group>
- <group id="group3" style="left:455px; top:0px; width:735px; height:740px; ">
- <switch id="switch1" class="sw_box" style="left:0px; top:25px; width:720px; height:680px; border-style:solid; ">
- <case id="case1" selected="true"/>
- <case id="case2"/>
- <case id="case3"/>
- <case id="case4"/>
- <case id="case5"/>
- </switch>
- <group id="group9" style="left:0px; top:708px; width:420px; height:25px; background-color:transparent; border-color:#c0c0c0; ">
- <caption id="caption16" class="cell_1" style="left:5px; top:2px; width:65px; height:23px; vertical-align:middle; ">의뢰유형</caption>
- <shape id="roundrect4" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:72px; top:4px; width:338px; height:21px; background-color:transparent; border-color:#7cbbdd; border-style:solid; "/>
- <select1 id="rdo_reqkind" ref="/root/send/saveflag/reqkind" disabled="true" overflow="visible" appearance="full" cellspacing="6" cols="4" rows="1" style="left:80px; top:6px; width:325px; height:15px; border-style:none; ">
- <choices>
- <itemset nodeset="/root/init/comdata/reqkind/A0464">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- </group>
- <button id="btn_delete" class="btn5_letter2" style="left:675px; top:710px; width:42px; height:19px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fDelete();
- model.refresh();
- ]]>
- </script>
- </button>
- <iviewer id="ivw_form" src="../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw" style="left:5px; top:35px; width:705px; height:665px; "/>
- <button id="btn_form" class="btn_sw" group="tab" selected="true" style="left:0px; top:0px; width:69px; height:22px; ">
- <caption>영적사정</caption>
- <toggle case="case1" ev:event="onclick"/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fEMRView();
- ]]>
- </script>
- </button>
- <button id="btn_diag" class="btn_sw" group="tab" style="left:70px; top:0px; width:69px; height:22px; ">
- <caption>영적진단</caption>
- <!--<toggle case="case2" ev:event="onclick"/> -->
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- switch1.selectedIndex = 1;
- fEMRView();
- ]]>
- </script>
- </button>
- <button id="btn_plan" class="btn_sw" group="tab" style="left:140px; top:0px; width:114px; height:22px; ">
- <caption>영적계획및평가</caption>
- <!-- <toggle case="case3" ev:event="onclick"/>-->
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- switch1.selectedIndex = 2;
- fEMRView();
- ]]>
- </script>
- </button>
- <button id="btn_arbt" class="btn_sw" group="tab" style="left:255px; top:0px; width:89px; height:22px; ">
- <caption>영적중재</caption>
- <!-- <toggle case="case4" ev:event="onclick"/> -->
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- switch1.selectedIndex = 3;
- fEMRView();
- ]]>
- </script>
- </button>
- <button id="btn_end" class="btn_sw" group="tab" style="left:345px; top:0px; width:89px; height:22px; ">
- <caption>종결</caption>
- <!-- <toggle case="case5" ev:event="onclick"/>-->
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- switch1.selectedIndex = 4;
- fEMRView();
- ]]>
- </script>
- </button>
- <button id="btn_tempsave" class="btn5_letter2" style="left:630px; top:710px; width:42px; height:19px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( !fCheckPatmDate() ) return; //필수 저장여부 체크
-
- fSave();
- //fInit();
- //fSearch();
- model.refresh();
- //grd_list.row = 1;
- ]]>
- </script>
- </button>
- </group>
- <group id="group4" style="left:5px; top:360px; width:450px; height:380px; ">
- <caption id="caption3" class="tit_2" style="left:5px; top:10px; width:121px; height:14px; ">영적돌봄기록이력</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:448px; y2:25px; "/>
- <button id="btn_grdsize" class="btn2_letter3" style="left:390px; top:4px; width:53px; height:19px; ">
- <caption>펼치기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if( btn_grdsize.attribute("text") == "펼치기"){
-
- btn_grdsize.attribute("text") = "줄이기";
- grd_list.attribute("width") = parseInt(grd_list.attribute("width")) + parseInt(switch1.attribute("width") ) ;
- group4.attribute("width") = parseInt(group4.attribute("width")) + parseInt(switch1.attribute("width") ) ;
-
- group3.attribute("height") = 350;
- line1.attribute("x2") = grd_list.attribute("width");
- switch1.refresh();
-
- ivw_form.model.refresh();
-
- }
- else {
- btn_grdsize.attribute("text") ="펼치기";
-
- grd_list.attribute("width") = parseInt(grd_list.attribute("width")) - parseInt(switch1.attribute("width")) ;
- group4.attribute("width") = parseInt(group4.attribute("width")) - parseInt(switch1.attribute("width") ) ;
-
- group3.attribute("height") = 740;
- line1.attribute("x2") = grd_list.attribute("width");
-
-
- ivw_form.model.refresh();
-
- model.refresh();
-
-
- }
- ]]>
- </script>
- </button>
- <datagrid id="grd_list" nodeset="/root/main/fthcnst/reclist" autoresize="true" caption="입원일^퇴원일^진단명^영적사정기록자^영적사정기록일^의뢰유형^의뢰일자^회신일자^원목종결일자^원목종결사유" colsep="^" colwidth="80, 80, 150, 104, 100, 100, 80, 80, 80, 200" frozencols="1" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:30px; width:445px; height:345px; ">
- <col ref="indd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="dschdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="diagnm"/>
- <col ref="asesconslrnm"/>
- <col ref="asesrecdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col disabled="true" ref="reqkind" type="combo">
- <choices>
- <itemset nodeset="/root/init/comdata/reqkind/A0464">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="reqdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="repldd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="enddd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="endresnnm"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if (grd_list.rows <= 1) return;
- if (grd_list.row < 1) return;
-
- if(grd_list.isCell(event.target) && grd_list.mouseRow >= grd_list.fixedrows)
- {
- //fBiztrgtClick();
- }
- else
- {
- return;
- }
- fGridSelect();
- model.refresh();
-
- ]]>
- </script>
- </datagrid>
- </group>
- <group id="group6" style="left:5px; top:5px; width:450px; height:235px; ">
- <line id="line22" class="line_3" style="x1:1px; y1:230px; x2:441px; y2:230px; "/>
- <output id="ipt_mpphontel" ref="/root/main/patient/mpphontel" class="output_fix" appearance="output" style="left:320px; top:105px; width:125px; height:19px; "/>
- <caption id="caption10" class="tit_2" style="left:5px; top:10px; width:95px; height:13px; ">기본사항</caption>
- <line id="line14" class="line_2" style="x1:0px; y1:102px; x2:440px; y2:102px; "/>
- <line id="line3" class="line_2" style="x1:0px; y1:78px; x2:440px; y2:78px; "/>
- <line id="line16" class="line_2" style="x1:0px; y1:53px; x2:440px; y2:53px; "/>
- <line id="line4" class="line_1" style="x1:0px; y1:25px; x2:448px; y2:25px; "/>
- <output id="opt_sex" ref="/root/main/patient/sex" class="output_fix" style="left:320px; top:30px; width:49px; height:19px; text-align:center; "/>
- <output id="opt_age" ref="/root/main/patient/age" class="output_fix" style="left:370px; top:30px; width:75px; height:19px; text-align:center; "/>
- <output id="ipt_hometel" ref="/root/main/patient/hometel" class="output_fix" appearance="output" style="left:103px; top:105px; width:135px; height:19px; "/>
- <caption id="caption40" class="cell_1" style="left:0px; top:129px; width:100px; height:23px; ">우편번호/주소</caption>
- <caption id="caption42" class="cell_1" style="left:245px; top:204px; width:70px; height:23px; ">성당정보</caption>
- <caption id="caption43" class="cell_1" style="left:245px; top:179px; width:70px; height:21px; ">VIP여부</caption>
- <caption id="caption21" class="cell_1" style="left:0px; top:30px; width:100px; height:23px; ">환자번호</caption>
- <caption id="caption22" class="cell_1" style="left:0px; top:104px; width:100px; height:23px; ">전화[자택]</caption>
- <caption id="caption56" class="cell_1" style="left:0px; top:204px; width:100px; height:23px; ">세례명</caption>
- <caption id="caption34" class="cell_1" style="left:245px; top:105px; width:70px; height:23px; ">전화[휴대]</caption>
- <caption id="caption23" class="cell_1" style="left:0px; top:55px; width:100px; height:23px; ">성명[한/영]</caption>
- <caption id="caption57" class="cell_1" style="left:245px; top:30px; width:70px; height:23px; ">성별/나이</caption>
- <caption id="caption35" class="cell_1" style="left:0px; top:80px; width:100px; height:23px; ">주민번호</caption>
- <caption id="caption47" class="cell_1" style="left:245px; top:77px; width:70px; height:23px; ">생년월일</caption>
- <caption id="caption37" class="cell_1" style="left:0px; top:179px; width:100px; height:23px; ">종교</caption>
- <caption id="caption39" class="cell_1" style="left:0px; top:154px; width:100px; height:23px; ">상세(하위)주소</caption>
- <button id="btn_pat" class="icon_search" navindex="5" style="left:220px; top:30px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.resetInstanceNode("/root/source");
- fPatPopUp();
- ]]>
- </script>
- </button>
- <input id="ipt_pid" ref="/root/main/patient/pid" class="input_s_essential" navindex="1" autonext="false" max="10" style="left:103px; top:31px; width:112px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode == "13") {
-
- model.resetInstanceNode("/root/send/search");
- // 환자정보, 진료내역, 의뢰내역
- model.setValue("/root/send/search/pid", ipt_pid.currentText);
-
- // 조회
- fSearch();
-
- model.refresh();
- //grd_list.row = 1;
-
- }
-
- ]]>
- </script>
- </input>
- <input id="ipt_hngnm" ref="/root/main/patient/hngnm" class="input_s_essential" navindex="2" autonext="false" imemode="hangul" style="left:103px; top:56px; width:137px; height:19px; ">
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- if(event.keyCode == "13")
- {
- model.resetInstanceNode("/root/source");
-
- model.setValue("/root/source/srchcond", "2");
- model.setValue("/root/source/hngnm", ipt_hngnm.currentText);
-
- model.setValue("/root/source/autoflag","Y")
-
- fPatPopUp();
- //inputEnterKey("btn_pat", "DOMActivate");
- }
- ]]>
- </script>
- </input>
- <output id="opt_engnm" ref="/root/main/patient/engnm" class="output_fix" appearance="output" style="left:245px; top:56px; width:200px; height:19px; "/>
- <input id="ipt_rrgstno1" ref="/root/main/patient/rrgstno1" class="input_s_essential" navindex="3" autonext="false" format="999999" style="left:103px; top:81px; width:62px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- if(event.keyCode == "13")
- {
- model.resetInstanceNode("/root/source");
-
- model.setValue("/root/source/srchcond", "3");
- model.setValue("/root/source/rrgstno1", ipt_rrgstno1.currentText);
- model.setValue("/root/source/rrgstno2", ipt_rrgstno2.currentText);
- fPatPopUp();
- //inputEnterKey("btn_search", "DOMActivate");
- }
- ]]>
- </script>
- </input>
- <input id="ipt_rrgstno2" ref="/root/main/patient/rrgstno2" class="input_s_essential" navindex="4" autonext="false" format="9999999" style="left:170px; top:82px; width:70px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- if(event.keyCode == "13")
- {
- if (ipt_rrgstno1.currentText != "")
- {
- model.resetInstanceNode("/root/source");
-
- model.setValue("/root/source/srchcond", "3");
- model.setValue("/root/source/rrgstno1", ipt_rrgstno1.currentText);
- model.setValue("/root/source/rrgstno2", ipt_rrgstno2.currentText);
- fPatPopUp();
- //inputEnterKey("btn_search", "DOMActivate");
- }
- }
- ]]>
- </script>
- </input>
- <output id="ipt_brthdd" ref="/root/main/patient/brthdd" class="output_fix" format="yyyy-mm-dd" inputtype="date" appearance="output" style="left:320px; top:82px; width:125px; height:19px; text-align:center; "/>
- <output id="opt_zipcdaddr" ref="/root/main/patient/zipcdaddr" class="output_fix" appearance="output" style="left:170px; top:130px; width:275px; height:19px; "/>
- <output id="opt_detladdr" ref="/root/main/patient/detladdr" class="output_fix" appearance="output" style="left:103px; top:155px; width:342px; height:19px; "/>
- <output id="opt_zipcd2" ref="/root/main/patient/zipcd2" class="output_fix" appearance="output" style="left:137px; top:130px; width:30px; height:19px; text-align:center; "/>
- <output id="opt_zipcd1" ref="/root/main/patient/zipcd1" class="output_fix" appearance="output" style="left:103px; top:130px; width:30px; height:19px; text-align:center; "/>
- <select1 id="cmb_religncd" ref="/root/main/patient/religncd" class="combo_default" disabled="true" appearance="minimal" style="left:103px; top:180px; width:137px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/comdata/relign/P0157">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <select id="chk_vipyn" ref="/root/main/patient/vipyn" disabled="true" overflow="visible" appearance="full" style="left:320px; top:180px; width:41px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>VIP</label>
- <value>Y</value>
- </item>
- </choices>
- </select>
- <output id="opt_baptnm" ref="/root/main/patient/baptnm" class="output_fix" appearance="output" style="left:103px; top:205px; width:137px; height:19px; "/>
- <output id="opt_chchnm" ref="/root/main/patient/chchnm" class="output_fix" appearance="output" style="left:320px; top:205px; width:125px; height:19px; "/>
- <line id="line6" class="line_2" style="x1:0px; y1:127px; x2:440px; y2:127px; "/>
- <line id="line7" class="line_2" style="x1:0px; y1:177px; x2:440px; y2:177px; "/>
- <line id="line8" class="line_2" style="x1:0px; y1:202px; x2:440px; y2:202px; "/>
- <line id="line9" class="line_2" style="x1:0px; y1:152px; x2:440px; y2:152px; "/>
- <button id="btn_clear" class="btn4_letter3" style="left:375px; top:0px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fAllClear();
- ]]>
- </script>
- </button>
- </group>
- </group>
- </xhtml:body>
- </xhtml:html>
|