123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419 |
- <?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>Untitle</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <patinfo>
- <pid/>
- <sna/>
- <hngnm/>
- <roomcd/>
- <reqdeptnm/>
- <requsernm/>
- <prcpflag/>
- <recvdeptnm/>
- <recvusernm/>
- </patinfo>
- <cnstinfo>
- <cnstkind>3</cnstkind>
- <cnstseqno/>
- <cretno/>
- <formrecseq/>
- <formcd>0000000769</formcd>
- <cnststat/>
- <reqdd/>
- <reqhm/>
- <chosflag/>
- <orddd/>
- <eryn>N</eryn>
- <reqdeptcd/>
- <requserid/>
- <cnstcnts1/>
- <cnstcnts2/>
- <cnstcnts3/>
- <cnstflag>3</cnstflag>
- <recvdeptcd>3240000000</recvdeptcd>
- <cnstcnts30/>
- <prcpcd/>
- <prcpdd/>
- <prcpno/>
- <prcphistno/>
- </cnstinfo>
- </main>
- <send>
- <srchinfo/>
- </send>
- <hidden>
- <item>
- <cnstkind/>
- <cnstseqno/>
- </item>
- <cnststatinfo>
- <cnststat/>
- </cnststatinfo>
- </hidden>
- <paminfo>
- </paminfo>
- <temp>
- <testinfo>
- <testcd/>
- <testnm/>
- </testinfo>
- <cnstinfo>
- </cnstinfo>
- <popupdata>
- <ioflag/>
- </popupdata>
- </temp>
- </root>
- </instance>
- <script type="javascript">
- <![CDATA[
-
- function finit(){
- if(fCnstType()){
- model.toggle("case2");
- model.toggle("case4");
- fSetPatinfo();
- //btn_cnst.disabled = true;
- }else{
- model.toggle("case1");
- var pamInfoCvs = getGlobalVariable("paminfo");
-
- if(!isNull(pamInfoCvs)){ //cvs가 null이 아닌 경우에만 처리함.
-
- /*
- if(ioflag == "O" || ioflag == "S"){
- messageBox("외래환자는 [임상약동학의뢰]를","E001");
- btn_cancel.dispatch("DOMActivate");
- }
- */
- model.removeNodeSet ("/root/paminfo/list" ); //상단화면 정보 초기화
- setCSVToNode ("/root/paminfo", pamInfoCvs );
-
- model.setValue("/root/main/patinfo/pid",model.getValue("/root/paminfo/list/pid"));
- var sna = model.getValue("/root/paminfo/list/sex") +"/"+ model.getValue("/root/paminfo/list/age");
- model.setValue("/root/main/patinfo/sna", sna);
- model.setValue("/root/main/patinfo/hngnm", model.getValue("/root/paminfo/list/hngnm"));
- model.setValue("/root/main/patinfo/roomcd", model.getValue("/root/paminfo/list/roomcd"));
- model.setValue("/root/main/patinfo/reqdeptnm", getUserInfo("dutplcenm"));
- model.setValue("/root/main/cnstinfo/reqdeptcd", getUserInfo("dutplcecd"));
- model.setValue("/root/main/patinfo/requsernm", getUserName());
- model.setValue("/root/main/cnstinfo/requserid", getUserId());
- var prcpflag ="";
- var ioflag = model.getValue("/root/paminfo/list/ioflag");
- if(ioflag == "O" || ioflag == "S"){
- prcpflag = "외래";
- model.setValue("/root/main/cnstinfo/orddd", model.getValue("/root/paminfo/list/orddd"));
- }else {
- prcpflag = "입원";
- model.setValue("/root/main/cnstinfo/orddd", model.getValue("/root/paminfo/list/indd"));
- }
- if(model.getValue("/root/paminfo/list/fsexamflag") == "F"){
- prcpflag += "/초진";
- }else if(model.getValue("/root/paminfo/list/fsexamflag") =="R"){
- prcpflag += "/재진";
- }
- model.setValue("/root/main/patinfo/prcpflag", prcpflag);
-
- model.setValue("/root/main/cnstinfo/chosflag", model.getValue("/root/paminfo/list/ioflag"));
- model.setValue("/root/main/cnstinfo/cretno", model.getValue("/root/paminfo/list/cretno"));
-
- //2008-11-01 진료와연동처리 추가 Start
- if (model.getValue("/root/temp/cnstinfo/prcpcd") != "" ) {
- model.setValue("/root/main/cnstinfo/prcpcd", model.getValue("/root/temp/cnstinfo/prcpcd")); //처방코드
- model.setValue("/root/main/cnstinfo/cnstcnts30", model.getValue("/root/temp/cnstinfo/prcpcd")); //처방코드
- if (model.getValue("/root/temp/cnstinfo/prcpnm") != "" ) {
- model.setValue("/root/main/cnstinfo/cnstcnts1", model.getValue("/root/temp/cnstinfo/prcpnm")); //의뢰약물 - 처방명칭
- }
- }
- if (model.getValue("/root/temp/cnstinfo/prcpdd") != "" ) {
- model.setValue("/root/main/cnstinfo/prcpdd", model.getValue("/root/temp/cnstinfo/prcpdd")); //처방일자
- }
- // if (model.getValue("/root/temp/cnstinfo/prcpno") != "" ) {
- // model.setValue(/root/main/cnstinfo/prcpno", model.getValue("/root/temp/cnstinfo/prcpno")); //처방번호
- // }
- // if (model.getValue("/root/temp/cnstinfo/prcphistno") != "" ) {
- // model.setValue("/root/main/cnstinfo/prcphistno", model.getValue("/root/temp/cnstinfo/prcphistno")); //처방이력번호
- // }
- //2008-11-01 진료와연동처리 추가 End
-
- }else{
- var msg = messageBox("환자를 ", "C002");
- return false;
- }
- }
- model.refresh();
- }
- function fCnstType(){
- if(model.getValue("/root/temp/cnstinfo/formrecseq") == ""){
- return false;
- }else return true;
- }
-
- function fSetPatinfo(){
-
- model.setValue("/root/main/patinfo/pid", model.getValue("/root/temp/cnstinfo/pid"));
- model.setValue("/root/main/patinfo/hngnm", model.getValue("/root/temp/cnstinfo/pidnm"));
- model.setValue("/root/main/patinfo/reqdeptnm", model.getValue("/root/temp/cnstinfo/reqdeptnm"));
- model.setValue("/root/main/patinfo/requsernm", model.getValue("/root/temp/cnstinfo/requsernm"));
- model.setValue("/root/main/patinfo/recvdeptnm", model.getValue("/root/temp/cnstinfo/recvdeptnm"));
- model.setValue("/root/main/patinfo/recvusernm", model.getValue("/root/temp/cnstinfo/recvusernm"));
-
- model.copyNode("/root/send/srchinfo", "/root/temp/cnstinfo");
- submit("TRADC61701");
-
- if(model.getValue("/root/main/cnstinfo/cnststat") >= 20) {
- btn_cnstcancel.visible = false;
- btn_cnstcancel.refresh();
- }
- }
-
- // 현재시간 구하기 : 시간 분
- function astgetCurrentTime()
- {
- var sDate = getNewDate();
-
- rtnTime = (( sDate.getHours() > 9 ) ? sDate.getHours() : "0" + sDate.getHours());
- rtnTime = rtnTime.toString() + (( sDate.getMinutes() > 9 ) ? sDate.getMinutes() : "0" + sDate.getMinutes());
-
- return rtnTime;
- }
-
-
- function fSaveCnst(){
- if(model.getValue("/root/main/patinfo/pid") != ""){
- model.makeNode("/root/main/cnstinfo/pid");
- model.setValue("/root/main/cnstinfo/pid", model.getValue("/root/main/patinfo/pid"));
-
- submit("TXADC61701");
-
- model.refresh();
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- finit();
- ]]>
- </script>
- <submission id="TXADC61701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cnstinfo" replace="instance" resultref="/root/hidden/item"/>
- <submission id="TRADC61701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/main"/>
- <submission id="TXADC61702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/hidden"/>
- <submission id="TRADC62202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cnstinfo" replace="instance" resultref="/root/hidden/cnststatinfo"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- </xhtml:head>
- <xhtml:body pagewidth="490" pageheight="370" guideline="1,469;2,360;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
- <group id="group1" style="left:0px; top:0px; width:470px; height:330px; ">
- <line id="line1" class="line_1" style="x1:0px; y1:135px; x2:470px; y2:135px; "/>
- <caption id="caption1" class="tit_2" style="left:5px; top:120px; width:105px; height:13px; ">의뢰요청 내용</caption>
- <caption id="caption2" class="cell_1" style="left:0px; top:140px; width:130px; height:23px; ">의뢰약물</caption>
- <caption id="caption7" class="cell_1" style="left:0px; top:165px; width:130px; height:23px; ">약동학 자문의뢰 이유</caption>
- <caption id="caption8" class="cell_1" style="left:0px; top:223px; width:130px; height:23px; ">전달사항</caption>
- <line id="line2" class="line_2" style="x1:0px; y1:163px; x2:470fpx; y2:163px; "/>
- <line id="line5" class="line_2" style="x1:0px; y1:220px; x2:470px; y2:220px; "/>
- <line id="line6" class="line_6" style="x1:0px; y1:325px; x2:470px; y2:325px; "/>
- <button id="button1" class="icon_search" style="left:450px; top:145px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var ioflag = model.getValue("/root/main/cnstinfo/chosflag");
- if(ioflag != ""){
- model.makeValue("/root/temp/popupdata/ioflag", ioflag);
- }
- modal("SPADB63000",0,200,200,"SPADB63000","/root/temp/popupdata","/root/hidden/receiveref");
- testcd = model.getValue("/root/temp/testinfo/testcd");
- testnm = model.getValue("/root/temp/testinfo/testnm");
- model.setValue("/root/main/cnstinfo/cnstcnts30",testcd); //TDM기준정보 코드
- model.setValue("/root/main/cnstinfo/cnstcnts1",testnm); //TDM기준정보 명칭
- model.refresh();
- ]]>
- </script>
- </button>
- <input id="ipt_cnstcnts1" ref="/root/main/cnstinfo/cnstcnts1" class="input_essential" editable="false" maxlength="33" style="left:135px; top:142px; width:310px; height:19px; ">
- <script type="javascript" ev:event="onmaxlength">
- <![CDATA[
- messageBox("입력가능한 글자수를", "E003");
- ]]>
- </script>
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- messageBox("돋보기 클릭하여 의뢰약물을 선택하시기 바랍니다", "C");
- ]]>
- </script>
- </input>
- <select id="chk_cnstcnts2" ref="/root/main/cnstinfo/cnstcnts2" overflow="visible" appearance="full" cols="2" rows="3" style="left:135px; top:165px; width:335px; height:55px; border-style:none; ">
- <choices>
- <item>
- <label>적정용량 확인</label>
- <value>1</value>
- </item>
- <item>
- <label>독성의심</label>
- <value>2</value>
- </item>
- <item>
- <label>기대이하의 약효</label>
- <value>3</value>
- </item>
- <item>
- <label>상호작용약물 추가/중단</label>
- <value>4</value>
- </item>
- <item>
- <label>입원시 초기 농도 확인</label>
- <value>5</value>
- </item>
- <item>
- <label>중단 후 감소된 농도확인</label>
- <value>6</value>
- </item>
- </choices>
- </select>
- <textarea id="tar_cnstcnts3" ref="/root/main/cnstinfo/cnstcnts3" scroll="autohscroll" editable="true" imemode="alpha" maxlength="33" style="left:135px; top:223px; width:335px; height:102px; ">
- <script type="javascript" ev:event="onmaxlength">
- <![CDATA[
- messageBox("입력가능한 글자수를", "E003");
- ]]>
- </script>
- </textarea>
- <input id="input1" ref="/root/main/cnstinfo/cnstcnts30" visibility="hidden" style="left:40px; top:195px; width:75px; height:15px; "/>
- <switch id="switch1" class="sw_no_border" style="left:0px; top:0px; width:470px; height:120px; ">
- <case id="case1" selected="true">
- <shape id="roundrect2" class="roundrect_search" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:470px; height:115px; "/>
- <output id="output1" ref="/root/main/patinfo/sna" class="output_search" style="left:350px; top:35px; width:110px; height:19px; "/>
- <output id="output2" ref="/root/main/patinfo/requsernm" class="output_search" style="left:105px; top:85px; width:110px; height:19px; "/>
- <output id="output3" ref="/root/main/patinfo/hngnm" class="output_search" style="left:350px; top:60px; width:110px; height:19px; "/>
- <caption id="caption3" class="search_name" style="left:10px; top:35px; width:90px; height:17px; ">병실 :</caption>
- <output id="output4" ref="/root/main/patinfo/pid" class="output_search" style="left:350px; top:10px; width:110px; height:19px; "/>
- <caption id="caption4" class="search_name" style="left:10px; top:60px; width:90px; height:17px; ">진료과 :</caption>
- <caption id="caption5" class="search_name" style="left:10px; top:85px; width:90px; height:17px; ">처방의사 :</caption>
- <caption id="caption6" class="search_name" style="left:10px; top:10px; width:90px; height:17px; ">처방구분 :</caption>
- <output id="output5" ref="/root/main/patinfo/reqdeptnm" class="output_search" style="left:105px; top:60px; width:110px; height:19px; "/>
- <output id="output6" ref="/root/main/patinfo/prcpflag" class="output_search" style="left:105px; top:10px; width:110px; height:19px; "/>
- <output id="output7" ref="/root/main/patinfo/roomcd" class="output_search" style="left:105px; top:35px; width:110px; height:19px; "/>
- <caption id="caption16" class="search_name" style="left:250px; top:10px; width:90px; height:17px; ">등록번호 :</caption>
- <caption id="caption17" class="search_name" style="left:250px; top:35px; width:95px; height:17px; ">성별/나이 :</caption>
- <caption id="caption18" class="search_name" style="left:250px; top:60px; width:90px; height:17px; ">이름 :</caption>
- </case>
- <case id="case2">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:470px; height:115px; "/>
- <output id="output8" ref="/root/temp/cnstinfo/recvdeptnm" class="output_search" style="left:105px; top:60px; width:110px; height:19px; "/>
- <output id="output9" ref="/root/temp/cnstinfo/reqdeptnm" class="output_search" style="left:105px; top:10px; width:110px; height:19px; "/>
- <output id="output10" ref="/root/temp/cnstinfo/requsernm" class="output_search" style="left:105px; top:35px; width:110px; height:19px; "/>
- <caption id="caption9" class="search_name" style="left:10px; top:35px; width:90px; height:17px; ">의뢰자 :</caption>
- <caption id="caption10" class="search_name" style="left:10px; top:60px; width:90px; height:17px; ">수신부서 :</caption>
- <caption id="caption11" class="search_name" style="left:10px; top:85px; width:90px; height:17px; ">수신자 :</caption>
- <caption id="caption12" class="search_name" style="left:10px; top:10px; width:90px; height:17px; ">의뢰부서 :</caption>
- <output id="output11" ref="/root/temp/cnstinfo/recvusernm" class="output_search" style="left:105px; top:85px; width:110px; height:19px; "/>
- <output id="output12" ref="/root/temp/cnstinfo/pid" class="output_search" style="left:350px; top:10px; width:110px; height:19px; "/>
- <caption id="caption13" class="search_name" style="left:250px; top:10px; width:90px; height:17px; ">등록번호 :</caption>
- <caption id="caption14" class="search_name" style="left:250px; top:35px; width:95px; height:17px; ">이름 :</caption>
- <output id="output13" ref="/root/temp/cnstinfo/pidnm" class="output_search" style="left:350px; top:35px; width:110px; height:19px; "/>
- </case>
- </switch>
- </group>
- <switch id="switch2" class="sw_no_border" style="left:0px; top:330px; width:470px; height:30px; ">
- <case id="case3" selected="true">
- <button id="btn_cnst" class="btn4_letter2" style="left:350px; top:5px; width:56px; height:22px; ">
- <caption>의뢰</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var ioflag = model.getValue("/root/paminfo/list/ioflag");
- var orddd = model.getValue("/root/paminfo/list/orddd");
- if(ioflag == "O" || ioflag == "S"){
- if(orddd != getCurrentDate()) {
- messageBox("당일 진료환자만 의뢰","I006");
- return;
- }
- }
- if(ipt_cnstcnts1.value.getTrim() == ""){ messageBox(caption2.value+" 은(는)","I003"); return; } //의뢰약물 필수 입력항목
- if(chk_cnstcnts2.value.getTrim() == ""){ messageBox(caption7.value+" 은(는)","I003"); return; } //2010-01-25 TDM자문의뢰- 의뢰이유 : 필수입력항목 입력후 다음단계로 넘어가도록 처리
-
- if ( messageBox("의뢰내용을","Q002")==6 ){
- model.setValue("/root/main/cnstinfo/cnststat", "12");
- model.setValue("/root/main/cnstinfo/reqdd", getCurrentDate());
- model.setValue("/root/main/cnstinfo/reqhm", astgetCurrentTime());
-
- //2008-11-01 진료창 연결시점에는 처방코드를 가져오나 Consult창으로 의뢰할경우는 처방코드가 안들어감. 선택된의뢰약물로 처방코드 대체
- if ( model.getValue("/root/main/cnstinfo/cnstcnts30") !="" && model.getValue("/root/main/cnstinfo/prcpcd") =="" ){
- model.setValue("/root/main/cnstinfo/prcpcd",model.getValue("/root/main/cnstinfo/cnstcnts30"));
- }
-
- fSaveCnst();
-
- // //2008-11-01 의뢰후 진료처방으로 Return Start -- 진료오류발생되어 임시 막기.
- var tdm_tpn_key = model.getValue("/root/hidden/item/cnstkind") + model.getValue("/root/hidden/item/cnstseqno");
- opener.model.removeNodeset("/root/hidden/reqfrminfo/reqno");
- opener.model.makeValue ( "/root/hidden/reqfrminfo/reqno" , tdm_tpn_key );
- // //2008-11-01 의뢰후 진료처방으로 Return End
-
- model.close();
- }
- ]]>
- </script>
- </button>
- <button id="btn_cancel" class="btn4_letter2" style="left:410px; top:5px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.close();
- ]]>
- </script>
- </button>
- <button id="button6" class="btn4_letter2" visibility="hidden" style="left:110px; top:5px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.setValue("/root/main/cnstinfo/cnststat", "11");
- fSaveCnst();
- ]]>
- </script>
- </button>
- </case>
- <case id="case4">
- <button id="btn_cnstcancel" class="btn4_letter4" style="left:327px; top:5px; width:80px; height:22px; ">
- <caption>의뢰취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(submit("TRADC62202")){
- var cnststat = model.getValue("/root/hidden/cnststatinfo/cnststat");
- if(cnststat == "22"){
- messageBox("[회신] 의뢰를 취소할 수","I004");
- }else if(cnststat == "21"){
- messageBox("[임시회신] 의뢰를 취소할 수","I004");
- }else if(cnststat == "20"){
- messageBox("[의뢰확정] 의뢰를 취소할 수","I004");
- }else if(messageBox("의뢰를","Q007") == 6){
- model.setValue("/root/send/srchinfo/cnststat", "04");
- model.makeValue("/root/send/srchinfo/cnstkind", "3"); //2009-12-21 의뢰취소는 컨설트 구분 추가
- if(submit("TXADC61702")){
- messageBox("요청하신 작업이","I001");
- window.close();
- }
- }
- }
- ]]>
- </script>
- </button>
- <button id="btn_cancel1" class="btn4_letter2" style="left:410px; top:5px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.close();
- ]]>
- </script>
- </button>
- </case>
- </switch>
- </xhtml:body>
- </xhtml:html>
|