123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490 |
- /*
-
- Item확장명설정(수액)_SJH(SPMNR06001_SJH.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var sViewFlag = "None";
- var sControlFlag = "N";
- var flag = "1";
- /**
- * @group :
- * @ver : 2008.07.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function finit(){
-
- // 간호하드코딩 테이블 조회_20090415(ByJA)
- var pCode = "'S02'"; // 조회할 CdGrupID 코드정보
- var pDate = getCurrentDate(); //조회기준일자
- fGetNursHardCdInfo(pCode, pDate);
-
- fSettingRecItem("init");
- model.removenodeSet("/root/main/iteminfo/itemlist");
- model.removeNodeset("/root/main/druginfo/druglist");
- model.removeNodeset("/root/main/prcpdateinfo/prcpdatelist");
- model.removeNodeset("/root/main/prcpdetlinfo/prcpdetllist");
- var sParamMsgItem = "";
- var sParamFalg = "";
- var sParamItemCd = "";
- var sParamMsgItemList = "";
- var sParamListInfo = "";
- var sParamInfo = "";
-
- //사용구분 1: 약, 2: 일반검사, 3: 응급검사
- model.setValue("/root/cond/useflag", "1");
- //약품정보 조회값 초기 세팅
- model.setValue("/root/cond/drugtype", "ALL");
- //조회구분 초기 세팅
- model.setValue("/root/cond/srchtype", "ALL");
- model.setValue("/root/cond/srchtext", "");
-
- //처방내역 입력시 입력 정보 설정
- rdo_prcpinsflag.value = "1";
-
- //약,주사 기록 마스터 정보 조회
- //fSrchData();
-
-
- //FlowSheet에서 Item을 바로 등록하기 위함.
- var sPopupParam = opener.javascript.getParameter("SPMNR06001_Param");
- if( sPopupParam != "" ) sViewFlag = sPopupParam;
- if( getArrayData(sViewFlag,1,0) == "Flow" ){
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/lnkbizcd", getArrayData(sViewFlag,1,7));
- if(submit("TRMNR06003_SJH", false)){
- fMakeItemSelect();
- }
- }else{
- sParamMsgItem = opener.javascript.getParameter("SPMNR06000_ParamFlag");
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/lnkbizcd", getArrayData(sParamMsgItem,1,6));
- if(submit("TRMNR06003_SJH", false)){
- fMakeNoneItemSelect(getArrayData(sParamMsgItem,1,1));
- }
- }
-
- if( sViewFlag == "None" ){
- sParamMsgItem = opener.javascript.getParameter("SPMNR06000_ParamFlag");
- model.setValue("/root/cond/pid", getArrayData(sParamMsgItem,1,3));
- model.setValue("/root/cond/orddd", getArrayData(sParamMsgItem,1,4));
- model.setValue("/root/cond/cretno", getArrayData(sParamMsgItem,1,5));
- }else{
- sParamMsgItem = opener.javascript.getParameter("SPMNR06001_Param");
- model.setValue("/root/cond/pid", getArrayData(sParamMsgItem,1,3));
- model.setValue("/root/cond/orddd", getArrayData(sParamMsgItem,1,4));
- model.setValue("/root/cond/cretno", getArrayData(sParamMsgItem,1,5));
- model.setValue("/root/cond/ordtype", getArrayData(sParamMsgItem,1,6));
- }
-
- model.removeNodeset("/root/send");
- model.makeNode("/root/send");
- model.copyNode("/root/send", "/root/cond");
-
- submit("TRMNR06001_SJH", false);
-
- sParamFalg = getArrayData(sParamMsgItem,1,0);
- sParamItemCd = getArrayData(sParamMsgItem,1,1);
-
- //약/주사 또는 Fluid 아이템 선택에 따른 설정 변경
- fCtrlView(sParamItemCd);
- //화면에 Item 명 세팅
- if(sParamFalg == "duplextitem"){
- sParamMsgItemList = opener.javascript.getParameter("SPMNR06000_Param");
- sParamListInfo = sParamMsgItemList.split("▩");
-
- for(var i = 1 ; i < sParamListInfo.length-1 ; i++){
- sParamInfo = sParamListInfo[i].split("▦");
- model.makeValue("/root/main/iteminfo/itemlist["+i+"]/itemnm", sParamInfo[1]);
- model.makeValue("/root/main/iteminfo/itemlist["+i+"]/chngitemnm", sParamInfo[2]);
- }
-
- }else if(sParamFalg == "dupllocitem"){
- sParamMsgItemList = opener.javascript.getParameter("SPMNR06000_Param");
- sParamListInfo = sParamMsgItemList.split("▩");
- for(var i = 1 ; i < sParamListInfo.length-1 ; i++){
- sParamInfo = sParamListInfo[i].split("▦");
- model.makeValue("/root/main/iteminfo/itemlist["+i+"]/itemnm", sParamInfo[1]);
- model.makeValue("/root/main/iteminfo/itemlist["+i+"]/chngitemnm", sParamInfo[2]);
- }
-
- }
-
- model.refresh();
- model.setFocus("ipt_chngitemnm");
- }
- /**
- * @group :
- * @ver : 2008.07.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 입력 정보 Item 전체 조회 화면으로 보냄
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveExtNm(){
- var sChkVal = true;
-
- //특정화면에서 호출하지 않고 Item 전체 조회 화면에서 Open했을 경우 처리
- if( sViewFlag == "None" ){
- if(model.getValue("/root/main/chngitemnm").getTrim() == ""){
- var msg = messageBox(caption2.value + " 입력없이 등록하시겠습니까?","Q");
- if(msg == "6"){
- opener.javascript.setParameter("SPMNR06000_RtrnParam", "&empty");
- window.close();
- }else{
- return;
- }
- }else{
- for(var i = 1 ; i <= getNodesetCount("/root/main/iteminfo/itemlist") ; i++){
- if( model.getValue("/root/main/chngitemnm") == model.getValue("/root/main/iteminfo/itemlist["+i+"]/chngitemnm") ){
- sChkVal = false;
- }
- }
-
- if(sChkVal == false){
- messageBox("중복 정보가 존재합니다. 다시 입력하십시요","I");
- ipt_chngitemnm.value = "";
- model.setFocus("ipt_chngitemnm");
- return;
- }else{
- opener.javascript.setParameter("SPMNR06000_RtrnParam",model.getValue("/root/main/chngitemnm") + "▦" + model.getValue("/root/main/recfluidunit") +"▩");
- window.close();
- }
- }
- }
- //특정화면에서 호출할 경우 처리
- else{
- if( rdo_itemlist.value == "" ){
- messageBox("기록 항목 유형이 선택되지 않았습니다.", "E");
- model.setFocus("rdo_itemlist");
- return;
- }
-
- if(model.getValue("/root/main/chngitemnm").getTrim() == ""){
- messageBox("기록 항목 입력값이 없어 등록 할 수 없습니다.", "E");
- model.setFocus("ipt_chngitemnm");
- return;
- }
-
- var sSateData = "status▦pid▦orddd▦cretno▦itemfromdt▦itemtodt▦refseq▦itemcd▦patseqno▦recflag▦prcpyn▦grupcd▦ordtype▦carerecseqno▦itemorigincd▦chngitemnm▦supsetno▦recfluidunit▩";
- var sItemCd = rdo_itemlist.value;
- var sRecFlag = model.getValue("/root/init/fluiditeminfo/fluiditemlist[itemcd='"+sItemCd+"']/recflag");
-
- var recnm;
- var recvol;
- var recvolunit;
- var recfluidunit;
-
- if(flag == "1") {
-
- for(var i = grd_recitemlist.fixedRows; i < grd_recitemlist.rows; i++) {
- recnm = grd_recitemlist.valueMatrix(i, grd_recitemlist.colRef("recnm"));
- recvol = grd_recitemlist.valueMatrix(i, grd_recitemlist.colRef("recvol"));
- recvolunit = grd_recitemlist.valueMatrix(i, grd_recitemlist.colRef("recvolunit"));
- recfluidunit = grd_recitemlist.valueMatrix(i, grd_recitemlist.colRef("recfluidunit"));
-
- sSateData += "i" + "▦"
- + model.getValue("/root/cond/pid") + "▦"
- + model.getValue("/root/cond/orddd") + "▦"
- + model.getValue("/root/cond/cretno") + "▦"
- + getCurrentDate()+getCurrentTime() + "▦"
- + "99991231235959" + "▦"
- + 0 + "▦"
- + sItemCd + "▦"
- + "" + "▦"
- + sRecFlag + "▦"
- + "N" + "▦"
- + 1 + "▦"
- + model.getValue("/root/cond/ordtype") + "▦"
- + "" + "▦"
- + "04" + "▦"
- + recnm + " " + recvol + recvolunit + "▦"
- + "" + "▦"
- + recfluidunit + "▩";
- }
- } else {
- sSateData += "i" + "▦"
- + model.getValue("/root/cond/pid") + "▦"
- + model.getValue("/root/cond/orddd") + "▦"
- + model.getValue("/root/cond/cretno") + "▦"
- + getCurrentDate()+getCurrentTime() + "▦"
- + "99991231235959" + "▦"
- + 0 + "▦"
- + sItemCd + "▦"
- + "" + "▦"
- + sRecFlag + "▦"
- + "N" + "▦"
- + 1 + "▦"
- + model.getValue("/root/cond/ordtype") + "▦"
- + "" + "▦"
- + "04" + "▦"
- + ipt_chngitemnm.value + "▦"
- + "" + "▦"
- + model.getValue("/root/main/recfluidunit") + "▩";
- }
-
- model.removenode("/root/send");
- model.makeValue("/root/send/patitemlist", sSateData);
-
- if(submit("TXMNR06001_SJH", false)){
- opener.javascript.setParameter("SPMNR06000_ReturnSaveInfo", "Refresh");
- }
-
- window.close();
- }
- }
- /**
- * @group :
- * @ver : 2010.03.05
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 약, 주사 기록약품마스터 정보 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchData(){
-
- if( ipt_srchtext.value.getTrim().length< 1 ){
- ipt_srchtext.value = "";
- }
- //얌품정보 리스트 초기화
- //model.removenodeset("/root/main/druginfo");
-
- model.removenodeset("/root/send");
- model.makeNode("/root/send");
- model.copyNode("/root/send", "/root/cond");
- submit("TRMNR10501", false);
- }
- /**
- * @group :
- * @ver : 2010.03.06
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자 처방 정보 상세 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchPrcpDetlInfo(pRow){
- if( pRow == "" || pRow < 1 ) return;
- model.removenodeset("/root/send");
- model.makeValue("/root/send/pid", model.getValue("/root/cond/pid"));
- model.makeValue("/root/send/orddd", model.getValue("/root/cond/orddd"));
- model.makeValue("/root/send/cretno", model.getValue("/root/cond/cretno"));
- model.makeValue("/root/send/prcphopedd", grd_prcpdatelist.valueMatrix(pRow, grd_prcpdatelist.colRef("prcphopedd")));
- model.makeValue("/root/send/prcpkindcd", grd_prcpdatelist.valueMatrix(pRow, grd_prcpdatelist.colRef("prcpkindcd")));
-
- submit("TRMNR06002_SJH", false);
- }
- /**
- * @group :
- * @ver : 2010.03.06
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 기록 항목 설정 리스트에 기록정보 입력
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingRecItem(pFlag, pRecRow, pSelRow, pSubFlag){
- if( pFlag == "" ) return;
- var sInsRow = "";
- var sMsg = "";
- var sRecNm = "";
- var sRecVol = "";
- var sRecUnit = "";
-
- switch(pFlag){
- case "prcpdetllist":
- if( pRecRow < 1 ){
- grd_recitemlist.addRow();
- sInsRow = grd_recitemlist.rows - grd_recitemlist.fixedRows;
- }else{
- grd_recitemlist.insertRow(pRecRow, "below");
- sInsRow = pRecRow+1;
- }
-
- if( pSelRow < 1 ) return;
-
- if( grd_prcpdetllist.valueMatrix(pSelRow, grd_recitemlist.colRef("recyn")) == "Y" ){
- sMsg = messageBox("Alias 정보가 존재합니다. Alias 정보로 추가를 하시겠습니까?", "Q000");
- }
-
- if( sMsg == "6" ){
- sRecNm = grd_prcpdetllist.valueMatrix(pSelRow, grd_prcpdetllist.colRef("recnm"));
- sRecVol = grd_prcpdetllist.valueMatrix(pSelRow, grd_prcpdetllist.colRef("prcpvol"));
- sRecUnit = grd_prcpdetllist.valueMatrix(pSelRow, grd_prcpdetllist.colRef("prcpvolunitflag"));
- }else{
- if( rdo_prcpinsflag.value == "1" ){
- sRecNm = grd_prcpdetllist.valueMatrix(pSelRow, grd_prcpdetllist.colRef("prcpcd"));
- }else{
- sRecNm = grd_prcpdetllist.valueMatrix(pSelRow, grd_prcpdetllist.colRef("prcpnm"));
- }
- sRecVol = grd_prcpdetllist.valueMatrix(pSelRow, grd_prcpdetllist.colRef("prcpvol"));
- sRecUnit = grd_prcpdetllist.valueMatrix(pSelRow, grd_prcpdetllist.colRef("prcpvolunitflag"));
- }
-
- grd_recitemlist.valueMatrix(sInsRow, grd_recitemlist.colRef("recnm")) = sRecNm;
- grd_recitemlist.valueMatrix(sInsRow, grd_recitemlist.colRef("recvol")) = sRecVol;
- grd_recitemlist.valueMatrix(sInsRow, grd_recitemlist.colRef("recvolunit")) = sRecUnit;
-
- break;
- case "druglist":
- if( pRecRow < 1 ){
- grd_recitemlist.addRow();
- sInsRow = grd_recitemlist.rows - grd_recitemlist.fixedRows;
- }else{
- grd_recitemlist.insertRow(pRecRow, "below");
- sInsRow = pRecRow+1;
- }
-
- grd_recitemlist.valueMatrix(sInsRow, grd_recitemlist.colRef("recnm")) = grd_druglist.valueMatrix(pSelRow, grd_druglist.colRef("recnm"));
- grd_recitemlist.valueMatrix(sInsRow, grd_recitemlist.colRef("recvol")) = grd_druglist.valueMatrix(pSelRow, grd_druglist.colRef("recvol"));
- grd_recitemlist.valueMatrix(sInsRow, grd_recitemlist.colRef("recvolunit")) = grd_druglist.valueMatrix(pSelRow, grd_druglist.colRef("recunit"));
- grd_recitemlist.valueMatrix(sInsRow, grd_recitemlist.colRef("recfluidunit")) = grd_druglist.valueMatrix(pSelRow, grd_druglist.colRef("recfluidunit"));
- break;
- case "textadd":
- if( pRecRow < 1 ){
- grd_recitemlist.addRow();
- }else{
- grd_recitemlist.insertRow(pRecRow, "above");
- }
- break;
- case "textdel":
- grd_recitemlist.deleteRow(pRecRow);
- break;
- case "init":
- model.removeNodeset(grd_recitemlist.attribute("nodeset"));
- grd_recitemlist.refresh();
- break;
- }
-
- btn_refresh.dispatch("DOMActivate");
- }
- /**
- * @group :
- * @ver : 2010.03.06
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 기록 항목 설정 리스트에 기록정보 입력
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMakeRecItemNm(){
- var sSettingNm = "";
- if( grd_recitemlist.rows < 1 ) return;
-
- for( var i = grd_recitemlist.fixedRows ; i <= grd_recitemlist.rows ; i++ ){
- if( grd_recitemlist.valueMatrix(i, grd_recitemlist.colRef("recnm")) != "" ){
- if( sSettingNm == "" ){
- sSettingNm += grd_recitemlist.valueMatrix(i, grd_recitemlist.colRef("recnm")) + " "
- + grd_recitemlist.valueMatrix(i, grd_recitemlist.colRef("recvol"))
- + grd_recitemlist.valueMatrix(i, grd_recitemlist.colRef("recvolunit"));
- }else{
- sSettingNm += " , ";
- sSettingNm += grd_recitemlist.valueMatrix(i, grd_recitemlist.colRef("recnm")) + " "
- + grd_recitemlist.valueMatrix(i, grd_recitemlist.colRef("recvol"))
- + grd_recitemlist.valueMatrix(i, grd_recitemlist.colRef("recvolunit"));
- }
- }
- }
-
- return sSettingNm;
- }
- /**
- * @group :
- * @ver : 2010.03.26
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 약/주사 선택 Radio Button 생성
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMakeItemSelect(){
- if( getNodesetCount("/root/init/fluiditeminfo/fluiditemlist") > 0 ){
- rdo_itemlist.attribute("cols") = getNodesetCount("/root/init/fluiditeminfo/fluiditemlist");
- rdo_itemlist.visible = true;
- }
- }
- /**
- * @group :
- * @ver : 2010.06.01
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 약/주사 선택 Radio Button 생성(아이템 전체조회 화면에서 Open 했을 경우)
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMakeNoneItemSelect(pItemcd){
- if( getNodesetCount("/root/init/fluiditeminfo/fluiditemlist") > 0 ){
- rdo_itemlist.choices.itemset.attribute("nodeset") = "/root/init/fluiditeminfo/fluiditemlist[itemcd='"+pItemcd+"']";
- rdo_itemlist.value = pItemcd;
- rdo_itemlist.visible = true;
- }
- }
- /**
- * @group :
- * @ver : 2010.06.01
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 약/주사 또는 Fluid 아이템 선택에 따른 설정 변경
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCtrlView(pFlag){
- //Stype 정보로 화면 Control 설정
- if( "01" == model.getValue("/root/init/fluiditeminfo/fluiditemlist[itemcd ='"+pFlag+"']/style") ){
- sControlFlag = "Y";
- }
-
- if( "Y" == sControlFlag ){
- caption6.visible = true;
- cmb_recunit.visible = true;
- chk_autosetflag.visible = true;
- }
- }
|