123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692 |
- /**
- * @desc : Source Node의 갯수를 구한다.
- * @
- * @param : path - node path
- * @return :
- * @authur : 김선태 2007. 5. 8
- * @---------------------------------------------------
- */
- function getNodeSetCnt(path)
- {
- var insXml = model.instances(0);
- var nodeList = insXml.selectNodes(path);
- return nodeList.length;
- }
- /**
- * @desc : Source Node의 child nodelist를 Destination의 nodelist로 append한다.
- *
- * @param : strDest - 도착node path
- * : strSrc - 출발node path
- * @return :
- * @authur : 이상현 2007. 3. 27
- * @---------------------------------------------------
- */
- function addCopyNodeset(strDest, strSrc, mode, destModel, srcModel) {
- if( destModel == null || destModel =="" )
- destModel = document.models.item(0);
-
- if( srcModel == null || srcModel =="" )
- srcModel = document.models.item(0);
-
- var srcNodeList = srcModel.instances(0).selectNodes(strSrc);
- var srcNode;
-
- var pDestNode = destModel.instances.item(0).selectSingleNode(strDest).parentNode;
-
- if( mode == "replace" || mode == null ) {
- destModel.removeNodeset(strDest);
- while( srcNode = srcNodeList.nextNode() ) {
- pDestNode.appendChild(srcNode.cloneNode(true));
- }
- }
-
- else if( mode == "after" ) {
- while( srcNode = srcNodeList.nextNode() ) {
- pDestNode.appendChild(srcNode.cloneNode(true));
- }
- }
-
- else if( mode == "before" ) {
- var destNode;
- for( var i = srcNodeList.length - 1; i >= 0; i-- ) {
- destNode = destModel.instances.item(0).selectSingleNode(strDest + "[1]");
- pDestNode.insertBefore(srcNodeList.item(i).cloneNode(true), destNode);
- }
- }
- }
- /**
- * @desc : 사용자의 권한을 체크하여 버튼셋팅.
- * btn_r 조회버튼, btn_x 저장 및 수정 버튼, btn_p : 출력버튼
- * @
- * @param :
- * @return :
- * @authur : 김선태 2007. 5. 8
- * @---------------------------------------------------
- */
- function fchkAuth()
- {
-
- for(var i=0; i<= document.controls.length-1 ; i++){
- if(document.controls.item(i).elementName == "xforms:button"){
- if(document.controls.item(i).attribute("id").substr(0,6) == "btn_r_"){
- document.controls.item(i).disabled = !checkAuth("R");
- }
-
- if(document.controls.item(i).attribute("id").substr(0,6) == "btn_x_"){
- document.controls.item(i).disabled = !checkAuth("X");
- }
-
- if(document.controls.item(i).attribute("id").substr(0,6) == "btn_p_"){
- document.controls.item(i).disabled = !checkAuth("P");
- }
-
- }
- }
- }
- /**
- * @desc : 폼초기화
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fFormInit()
- {
- btn_chrtlist.dispatch("onclick");
- //공통코드 가져오기...
- //P0021:초재진구분코드, F:병원초진, R:재진, D:과초진, S:상병초진, 4:타과경유(초진인데 재진료수납)
- //M0392:챠트미대출사유코드
- //M0412:과보관사유코드
- //M0424:챠트상태코드
- zbcfGetCodeList(
- new Array("P0021","M0392","M0412","M0424"),
- new Array("/root/init/P0021","/root/init/M0392","/root/init/M0412","/root/init/M0424"));
- //대출코드 불러오기
- model.makeValue("/root/send/reqdata/ioflag", "O");
- submit("TRMRC01305");
-
- // 대출용도, 대출과, 차트과, 차트담당자, 보관장소
- model.makeValue("/root/send/reqdata/ioflag" , "O");
- model.makeValue("/root/send/reqdata/useyn" , "");
- model.makeValue("/root/send/reqdata/allwardyn", "");
- model.refresh();
- submit("TRMRC00100");
- }
- /**
- * @desc : 선택된 챠트정보를 상위에 디스플레이 한다.
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fDisplayChrtInfo(gridObj){
- if (gridObj.row < 1){
- return;
- }
-
- var ref = gridObj.nodeset;
- var row = gridObj.row;
-
- var pid = model.getValue(ref + "[" + row +"]/pid");
- var pnm = model.getValue(ref + "[" + row +"]/pnm");
- var orddeptcd = model.getValue(ref + "[" + row +"]/orddeptcd");
- var lastorddd = model.getValue(ref + "[" + row +"]/lastorddd");
- var bcno = model.getValue(ref + "[" + row +"]/bcno");
- var chrtrem = model.getValue(ref + "[" + row +"]/chrtrem");
- var fstrgstdt = model.getValue(ref + "[" + row +"]/fstrgstdt");
- var chrtstat = model.getValue(ref + "[" + row +"]/chrtstat");
- var lendyn = model.getValue(ref + "[" + row +"]/lendyn");
- var ioflag = model.getValue(ref + "[" + row +"]/ioflag");
- var medirecno = model.getValue(ref + "[" + row +"]/medirecno");
- var orddeptabbr = model.getValue(ref + "[" + row +"]/orddeptabbr");
-
- model.makeValue("/root/main/chrtinfo/pid" , pid);
- model.makeValue("/root/main/chrtinfo/pnm" , pnm);
- model.makeValue("/root/main/chrtinfo/orddeptcd" , orddeptcd);
- model.makeValue("/root/main/chrtinfo/lastorddd" , lastorddd);
- model.makeValue("/root/main/chrtinfo/bcno" , bcno);
- model.makeValue("/root/main/chrtinfo/chrtrem" , chrtrem);
- model.makeValue("/root/main/chrtinfo/fstrgstdt" , fstrgstdt);
- model.makeValue("/root/main/chrtinfo/chrtstat" , chrtstat);
- model.makeValue("/root/main/chrtinfo/lendyn" , lendyn);
- model.makeValue("/root/main/chrtinfo/ioflag" , ioflag);
- model.makeValue("/root/main/chrtinfo/medirecno" , medirecno);
- model.makeValue("/root/main/chrtinfo/orddeptabbr", orddeptabbr);
-
- model.refresh();
-
- model.makeValue("/root/send/reqdata/medirecno", medirecno);
- model.makeValue("/root/send/reqdata/pid" , pid);
- // 챠트분실이력조회
- submit("TRMRC01401");
- // 챠트대출이력조회
- submit("TRMRC00170");
- }
- function fDisplayChrtInfoI(gridObj){
- if (gridObj.row < 1){
- return;
- }
-
- var ref = gridObj.nodeset;
- var row = gridObj.row;
-
- var pid = model.getValue(ref + "[" + row +"]/pid");
- var pnm = model.getValue(ref + "[" + row +"]/pnm");
- var dschdeptcd = model.getValue(ref + "[" + row +"]/dschdeptcd");
- var dschdd = model.getValue(ref + "[" + row +"]/dschdd");
- var bcno = model.getValue(ref + "[" + row +"]/bcno");
- var chrtrem = model.getValue(ref + "[" + row +"]/chrtrem");
- var fstrgstdt = model.getValue(ref + "[" + row +"]/fstrgstdt");
- var lendyn = model.getValue(ref + "[" + row +"]/lendyn");
- var chrtstat = model.getValue(ref + "[" + row +"]/chrtstat");
- var ioflag = model.getValue(ref + "[" + row +"]/ioflag");
- var medirecno = model.getValue(ref + "[" + row +"]/medirecno");
- var dschdeptnm = model.getValue(ref + "[" + row +"]/dschdeptnm");
-
- model.makeValue("/root/main/chrtinfo/pid" , pid);
- model.makeValue("/root/main/chrtinfo/pnm" , pnm);
- model.makeValue("/root/main/chrtinfo/dschdeptcd", dschdeptcd);
- model.makeValue("/root/main/chrtinfo/dschdd" , dschdd);
- model.makeValue("/root/main/chrtinfo/bcno" , bcno);
- model.makeValue("/root/main/chrtinfo/chrtrem" , chrtrem);
- model.makeValue("/root/main/chrtinfo/fstrgstdt" , fstrgstdt);
- model.makeValue("/root/main/chrtinfo/lendyn" , lendyn);
- model.makeValue("/root/main/chrtinfo/chrtstat" , chrtstat);
- model.makeValue("/root/main/chrtinfo/ioflag" , ioflag);
- model.makeValue("/root/main/chrtinfo/medirecno" , medirecno);
- model.makeValue("/root/main/chrtinfo/dschdeptnm", dschdeptnm);
-
- model.refresh();
-
- model.makeValue("/root/send/reqdata/medirecno", medirecno);
- model.makeValue("/root/send/reqdata/pid" , pid);
- // 챠트분실이력조회
- submit("TRMRC01401");
- // 챠트대출이력조회
- submit("TRMRC02702");
- }
- /**
- * @desc : 챠트정보를 초기화한다.
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fClearChrtInfo(){
- model.makeValue("/root/main/chrtinfo/pid" , "");
- model.makeValue("/root/main/chrtinfo/pnm" , "");
- model.makeValue("/root/main/chrtinfo/medirecno" , "");
- model.makeValue("/root/main/chrtinfo/orddeptcd" , "");
- model.makeValue("/root/main/chrtinfo/bcno" , "");
- model.makeValue("/root/main/chrtinfo/chrtrem" , "");
- model.makeValue("/root/main/chrtinfo/chrtstat" , "");
- model.makeValue("/root/main/chrtinfo/lendyn" , "");
- model.makeValue("/root/main/chrtinfo/lastorddd" , "");
- model.makeValue("/root/main/chrtinfo/fstrgstdt" , "");
- model.makeValue("/root/main/chrtinfo/dschdeptcd" , "");
- model.makeValue("/root/main/chrtinfo/dschdd" , "");
- model.makeValue("/root/main/chrtinfo/orddeptabbr", "");
- model.makeValue("/root/main/chrtinfo/dschdeptnm" , "");
-
- model.refresh();
- }
- /**
- * @desc : 챠트정보를 등록한다.
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fSaveChrtInfo(){
-
- var medirecno = model.getValue("/root/main/chrtinfo/medirecno");
- if(medirecno != ""){
- messageBox("차트이력이 선택되어있습니다.\n신규버튼을 눌러 다시 작성 해 주십시요" , "I999")
- return;
- }
- var orddeptcd = model.getValue("/root/main/chrtinfo/orddeptcd");
- var medirecno = model.getValue("/root/main/chrtlist[orddeptcd = "+ orddeptcd +"]/orddeptcd");
- if (medirecno != ""){
- messageBox("이미 등록된 차트과입니다.\n신규버튼을 눌러 다시 작성 해 주십시요" , "I999")
- return;
- }
-
-
- // if(medirecno == ""){
- // model.setValue("/root/main/chrtinfo/medirecno","0");
- // }
- submit("TXMRC01401");
- }
- /**
- * @desc : 챠트정보를 수정한다.
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fUpdateChrtInfo(){
-
- var medirecno = model.getValue("/root/main/chrtinfo/medirecno");
- if(medirecno == ""){
- messageBox("선택된 차트이력이 ", "I004")
- return;
- }
- submit("TXMRC01401");
- }
- /**
- * @desc : 챠트정보를 삭제한다.
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fDeleteChrtInfo(ioflag){
- var medirecno = model.getValue("/root/main/chrtinfo/medirecno");
- if(medirecno == ""){
- messageBox("선택된 차트이력이 ", "I004")
- return;
- } else {
- if(messageBox("선택된 차트이력을 ", "Q001") == "7"){
- return;
- }
- }
-
- // 차트대출이력을 조회한다. 카운트가 0 인 경우만 삭제한다.
- if (ioflag == "O") {
- submit("TRMRC00170");
- } else {
- submit("TRMRC02702");
- }
- var cnt = getNodeSetCnt("/root/main/chrtlendlist");
- if (cnt == 0) {
- submit("TXMRC01402");
- // 삭제후 챠트정보 초기화한다.
- fClearChrtInfo();
- } else {
- messageBox("선택된 차트이력의 대출이력이 있어서 삭제 ", "E001")
- return;
- }
- }
- /**
- * @desc : 환자등록번호 조회 팝업
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fGetPid(refPid, refPnm)
- {
- //조회건수가 1건일 경우 팝업창을 바로 닫는다.
- model.setValue("/root/hidden/tmp/pidpopupinfo/checkfnexam", "1");
- model.setValue("/root/hidden/tmp/pidpopupinfo/autoflag", "N");
- if( model.getValue("/root/hidden/tmp/pidpopupinfo/srchcond") == '' ){
- model.setValue("/root/hidden/tmp/pidpopupinfo/srchcond", '2');
- }
-
- modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/hidden/tmp/pidpopupinfo", "/root/send");
- model.resetInstanceNode("/root/source");
- //환자번호 copy
- var popupendflag = model.getValue("/root/main/popupendflag");
-
- if (popupendflag == "ok")
- {
- model.setValue(refPid, model.getValue("/root/main/patinfo/patinfolist/pid"));
- if (refPnm != null || refPnm != "") {
- model.setValue(refPnm, model.getValue("/root/main/patinfo/patinfolist/hngnm"));
- }
- model.refresh();
- }
- }
- /**
- * @desc : 선택된 챠트정보를 상위에 디스플레이 한다.
- * @
- * @param : gridObj - 그리드 컨트롤
- * @return :
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fDisplayLendList(gridObj){
- if (isDataCell() == false){
- return;
- }
-
- if (gridObj.row < 1){
- return;
- }
-
- var ref = gridObj.nodeset;
- var row = gridObj.row;
-
- var pid = model.getValue(ref + "[" + row +"]/pid");
- var chrtseqno = model.getValue(ref + "[" + row +"]/chrtseqno");
- var appdeptcd = model.getValue(ref + "[" + row +"]/appdeptcd");
- var lendmanid = model.getValue(ref + "[" + row +"]/lendmanid");
- var appmanid = model.getValue(ref + "[" + row +"]/appmanid");
- var cntctelno = model.getValue(ref + "[" + row +"]/cntctelno");
- var appdt = model.getValue(ref + "[" + row +"]/appdt");
- var fstacptprndt = model.getValue(ref + "[" + row +"]/fstacptprndt");
- var rendschedt = model.getValue(ref + "[" + row +"]/rendschedt");
- var renddt = model.getValue(ref + "[" + row +"]/renddt");
- var rtndt = model.getValue(ref + "[" + row +"]/rtndt");
- var delyn = model.getValue(ref + "[" + row +"]/delyn");
- var rendcd = model.getValue(ref + "[" + row +"]/rendcd");
- var rendresn = model.getValue(ref + "[" + row +"]/rendresn");
- var unrendcd = model.getValue(ref + "[" + row +"]/unrendcd");
- var unrendresn = model.getValue(ref + "[" + row +"]/unrendresn");
- var deptkeepcd = model.getValue(ref + "[" + row +"]/deptkeepcd");
- var deptkeepresn = model.getValue(ref + "[" + row +"]/deptkeepresn");
- var unrtnresn = model.getValue(ref + "[" + row +"]/unrtnresn");
- var msgcnts = model.getValue(ref + "[" + row +"]/msgcnts");
- var roomcd = model.getValue(ref + "[" + row +"]/roomcd");
- var fsexamflag = model.getValue(ref + "[" + row +"]/fsexamflag");
- var chrtdeptcd = model.getValue(ref + "[" + row +"]/chrtdeptcd");
- var lendman = model.getValue(ref + "[" + row +"]/lendman");
- var appman = model.getValue(ref + "[" + row +"]/appman");
- var rtnschedd = model.getValue(ref + "[" + row +"]/rtnschedd");
- var rendbcflag = model.getValue(ref + "[" + row +"]/rendbcflag");
- var rtnbcflag = model.getValue(ref + "[" + row +"]/rtnbcflag");
-
- model.makeValue("/root/main/chrtlendinfo/pid" , pid);
- model.makeValue("/root/main/chrtlendinfo/chrtseqno" , chrtseqno);
- model.makeValue("/root/main/chrtlendinfo/appdeptcd" , appdeptcd);
- model.makeValue("/root/main/chrtlendinfo/lendmanid" , lendmanid);
- model.makeValue("/root/main/chrtlendinfo/appmanid" , appmanid);
- model.makeValue("/root/main/chrtlendinfo/cntctelno" , cntctelno);
- model.makeValue("/root/main/chrtlendinfo/appdt" , appdt);
- model.makeValue("/root/main/chrtlendinfo/appdd" , appdt.substring(0,8));
- model.makeValue("/root/main/chrtlendinfo/apptm" , appdt.substring(8,14));
- model.makeValue("/root/main/chrtlendinfo/fstacptprndt", fstacptprndt);
- model.makeValue("/root/main/chrtlendinfo/rendschedd" , rendschedt.substring(0,8));
- model.makeValue("/root/main/chrtlendinfo/rendschetm" , rendschedt.substring(8,12));
- model.makeValue("/root/main/chrtlendinfo/renddt" , renddt);
- model.makeValue("/root/main/chrtlendinfo/renddd" , renddt.substring(0,8));
- model.makeValue("/root/main/chrtlendinfo/rendtm" , renddt.substring(8,14));
- model.makeValue("/root/main/chrtlendinfo/rtndt" , rtndt);
- model.makeValue("/root/main/chrtlendinfo/rtndd" , rtndt.substring(0,8));
- model.makeValue("/root/main/chrtlendinfo/rtntm" , rtndt.substring(8,14));
- model.makeValue("/root/main/chrtlendinfo/delyn" , delyn);
- model.makeValue("/root/main/chrtlendinfo/rendcd" , rendcd);
- model.makeValue("/root/main/chrtlendinfo/rendresn" , rendresn);
- model.makeValue("/root/main/chrtlendinfo/unrendcd" , unrendcd);
- model.makeValue("/root/main/chrtlendinfo/unrendresn" , unrendresn);
- model.makeValue("/root/main/chrtlendinfo/deptkeepcd" , deptkeepcd);
- model.makeValue("/root/main/chrtlendinfo/deptkeepresn", deptkeepresn);
- model.makeValue("/root/main/chrtlendinfo/unrtnresn" , unrtnresn);
- model.makeValue("/root/main/chrtlendinfo/msgcnts" , msgcnts);
- model.makeValue("/root/main/chrtlendinfo/roomcd" , roomcd);
- model.makeValue("/root/main/chrtlendinfo/fsexamflag" , fsexamflag);
- model.makeValue("/root/main/chrtlendinfo/chrtdeptcd" , chrtdeptcd);
- model.makeValue("/root/main/chrtlendinfo/lendman" , lendman);
- model.makeValue("/root/main/chrtlendinfo/appman" , appman);
- model.makeValue("/root/main/chrtlendinfo/rtnschedd" , rtnschedd);
- model.makeValue("/root/main/chrtlendinfo/rendbcflag" , rendbcflag);
- model.makeValue("/root/main/chrtlendinfo/rtnbcflag" , rtnbcflag);
- model.refresh();
-
-
-
-
- }
- /**
- * @desc : 챠트상태를 수정한다.
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.06.11
- * @---------------------------------------------------
- */
- function fUpdateChrtStat(){
-
- var medirecno = model.getValue("/root/main/chrtinfo/medirecno");
- if(medirecno == ""){
- messageBox("선택된 차트이력이 ", "I004")
- return;
- }
- model.removeNodeset("/root/main/chrtstatlist");
- submit("TXMRC01403");
- }
- /**
- * @desc : 대출자/반납자 조회
- * @
- * @param : refUserid - 대출자 ID, refUserNm - 대출자명
- * @return :
- * @authur : 이윤정 2008.07.21
- * @---------------------------------------------------
- */
- function fGetUserid(refUserid, refUserNm)
- {
- model.removenode("/root/hidden/tmp/tempuserinfo/list");
- model.reset("/root/hidden/tmp/tempuserinfo");
- var user = model.getValue(refUserid);
- var flag = "userid";
-
- if(isNaN(user)){
- flag = "usernm";
- }
-
- model.setValue("/root/hidden/tmp/userpopupinfo/param", "_OneS");
- model.setValue("/root/hidden/tmp/userpopupinfo/flag", flag);
- model.setValue("/root/hidden/tmp/userpopupinfo/searchitem", user);
-
- modal("SPZSU10103", "", "200", "200", "SPZSU10103","/root/hidden/tmp/userpopupinfo","/root/main/temp");
-
- var iParam = getParameter("SPZSU10103_");
- setCSVToNode("/root/hidden/tmp/tempuserinfo", iParam);
- clearParameter("SPZSU10103_");
-
- model.refresh();
- //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
- if( getNodesetCount("/root/hidden/tmp/tempuserinfo/list") > 0 ){
-
- var userid = model.getValue("/root/hidden/tmp/tempuserinfo/list/userid");
- var usernm = model.getValue("/root/hidden/tmp/tempuserinfo/list/usernm");
- model.makeValue(refUserid, userid);
- if (refUserNm != null)
- {
- model.makeValue(refUserNm, usernm);
- }
- model.refresh();
- }
- }
- /**
- * @desc : 등록된 사용자 번호인지 체킹한다..
- * @
- * @param : iptObj - 사용자 ID 입력 컨트롤 (userid)
- * @return : posdeptcd - 사용자 부서코드
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fCheckUserid(iptObj)
- {
- setInputNodeCurText();
- // 사용자 번호 체크
- if(iptObj.currentText.length > 0 ){
- // 사용자 조회
- model.removenode("/root/hidden/tmp/tempuserinfo/list");
- model.reset("/root/hidden/tmp/tempuserinfo");
-
- model.setValue("/root/hidden/tmp/userpopupinfo/param", "_OneS");
- model.setValue("/root/hidden/tmp/userpopupinfo/flag", "userid");
- model.setValue("/root/hidden/tmp/userpopupinfo/searchitem", iptObj.currentText);
-
- modal("SPZSU10103", "", "200", "200", "SPZSU10103","/root/hidden/tmp/userpopupinfo","/root/main/temp");
-
- var iParam = getParameter("SPZSU10103_");
- setCSVToNode("/root/hidden/tmp/tempuserinfo", iParam);
- clearParameter("SPZSU10103_");
- //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
- if( getNodesetCount("/root/hidden/tmp/tempuserinfo/list") > 0 ){
-
- var userid = model.getValue("/root/hidden/tmp/tempuserinfo/list/userid");
- var posdeptcd = model.getValue("/root/hidden/tmp/tempuserinfo/list/posdeptcd");
- iptObj.value = userid;
- model.refresh();
- return posdeptcd;
-
- //fSearch();
- }else{
- model.resetInstanceNode("/root/hidden/tmp/tempuserinfo/list");
- messageBox("없는 사용자 번호 입니다.", "E999", "");
- model.refresh();
- }
-
- }else{
- messageBox("사용자 번호를 정확히", "C001");
- }
- return "";
- }
- /**
- * @desc : 등록된 환자번호인지 체킹한다..
- * @
- * @param : iptObj - 환자번호 입력 컨트롤 (pid)
- * @return :
- * @authur : 이은영 2008.09.17
- * @---------------------------------------------------
- */
- function fGetPidNo(iptObj, ref)
- {
- var chkyn = model.getValue(ref);
- if (chkyn == "Y") {
- if (iptObj.currentText.length > 0) {
- var pid = iptObj.currentText;
- pid = getCretCheckNo(pid, getUserInfo("dutplceinstcd"));
- model.makeValue(iptObj.attribute("ref"), pid);
- iptObj.refresh();
- }
- }
- }
- /**
- * @desc : 등록된 환자번호인지 체킹한다..
- * @
- * @param : iptObj - 환자번호 입력 컨트롤 (pid)
- * @return : pnm - 환자명
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fCheckPid(iptObj, refPnm)
- {
- model.makeValue("/root/send/req/srchcond", "1");
- model.makeValue("/root/send/req/pid", iptObj.currentText);
-
- //환자등록번호 체크
- if(iptObj.currentText.length > 0 ){
-
- model.resetInstanceNode("/root/main/result/patinfo");
- model.makeNode("/root/main/result/patinfo");
-
- if(submit("TRPMC02500", "", "/root/send/req", "/root/main/result/patinfo")){
- //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
- if( getNodesetCount("/root/main/result/patinfo/patinfolist") > 0 ){
- model.copyNode("/root/main/patinfo", "/root/main/result/patinfo");
- //* 2009.04.07. 이중번호 메세지 ( 14257937 박용석 -> 13275912 신옥순 )
- var sBindPid = model.getValue("/root/main/result/patinfo/patinfolist/bindpid");
- if( sBindPid != '-' && sBindPid != '' && sBindPid != ' ' ){
- //합번된 등록번호 메세지 처리
- var sPid = model.getValue("/root/main/result/patinfo/patinfolist/pid");
- var sHngnm = model.getValue("/root/main/result/patinfo/patinfolist/hngnm");
- var retValue = messageBox(sPid + " (" + sHngnm + ") 환자의 등록번호가 [ " + sBindPid + " ] 로 합번 되었습니다. 합번된 등록번호로 재조회 하시겠습니까?", "Q999", "");
- if( retValue == '6' ){
- model.makeValue(iptObj.attribute("ref"), sBindPid);
- iptObj.refresh();
- fCheckPid(iptObj, refPnm);
- return "";
- }
- }
- //*/
- var pid = model.getValue("/root/main/result/patinfo/patinfolist/pid");
- var pnm = model.getValue("/root/main/result/patinfo/patinfolist/hngnm");
- if (refPnm != null)
- {
- model.makeValue(refPnm, pnm);
- }
- return pnm;
- }else{
- model.resetInstanceNode("/root/main/patinfo/patinfolist");
- messageBox("없는 환자 번호 입니다.", "E999", "");
- model.refresh();
- return "";
- }
- }
-
- }else{
- messageBox("환자등록번호를 정확히", "C001");
- return "";
- }
- }
|