123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SPPMC04200_진료의뢰서내역입력.xrw
- * 설 명 : 진료의뢰서내역
- * 설 계 자 :
- * 작 성 자 :
- * 작 성 일 :
- * 수정이력 :
- * 기 타 :
- -->
- <?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>
- <h_cnst>
- <cnst/>
- </h_cnst>
- </main>
- <send>
- <updatedata>
- <datalist/>
- </updatedata>
- <rcv/>
- </send>
- <init>
- <orddeptcd>
- <orddeptcdlist>
- <cd/>
- <nm/>
- <deptengabbr/>
- </orddeptcdlist>
- </orddeptcd>
- </init>
- <init_com>
- <P0310list>
- <P0310>
- <cdnm/>
- <cdid/>
- </P0310>
- </P0310list>
- </init_com>
- <hidden>
- <session/>
- <h_cnst/>
- <select_cnst>
- <cnst/>
- </select_cnst>
- <rsv/>
- </hidden>
- <cnst_input>
- <cnst_pid/>
- <cnst_orddeptcd/>
- <cnst_insuflag/>
- <cnst_ordreqkind/>
- <cnst_reqformhospnm/>
- <cnst_reqformdrnm/>
- <cnst_remfact/>
- <cnst_todd/>
- <cnst_fromdd/>
- <cnst_histstat/>
- <cnst_seqno/>
- </cnst_input>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
-
- fGetUserInfosSampling();
- //공통코드
- zbcfGetCodeList( new Array("P0310"),
- new Array("/root/init_com/P0310list" //진료의뢰서종류
- ) );
-
- //진료과코드 진료의사ID 조회
- pamGetDeptCDDrIDList();
-
- //SPPMC04100_PARM : pid▦insukind▦strSend▦strRcv▦
-
- //환자번호가 넘어오면, 해당환자의 진료의뢰서내역 조회
- //환자번호가 넘어오지 않으면, 환자번호가 없는 신규환자이다.
-
- if (checkOpener())
- {
- opener.javascript.setParameter("SPPMC04100_RTN","");
-
- var SPPMC04100_PARM = opener.javascript.getParameter("SPPMC04100_PARM");
-
- var array_parm = SPPMC04100_PARM.split("▦");
-
- gPID = array_parm[0];
- strSend = array_parm[1];
- strRcv = array_parm[2];
-
- var SPPMC04100_PARM1 = opener.javascript.getParameter("SPPMC04100_PARM1");
-
- var array_parm1 = SPPMC04100_PARM1.split("▦");
- sOrdDeptCD = array_parm1[0];
- sOrdReqKind = array_parm1[1];
- sInsuFlag = array_parm1[2];
- etcOrdFlag = array_parm1[3];
-
- if( etcOrdFlag == 'H' ){
- // model.setValue("/root/main/h_cnst/cnst/cnst_ordreqkind", '3'); //의뢰
- sOrdReqKind = "3";
- }else if( sOrdReqKind == '3' ){
- // model.setValue("/root/main/h_cnst/cnst/cnst_ordreqkind", '1'); //진료의뢰서
- sOrdReqKind = "1";
- }
-
-
- if( sInsuFlag == '11' || sInsuFlag == '21' || sInsuFlag == '22'){
- // model.setValue("/root/main/h_cnst/cnst/cnst_insuflag", sInsuFlag.substr(0,1));
- sInsuFlag = sInsuFlag.substr(0,1);
- }
- opener.javascript.setParameter("SPPMC04100_PARM","");
- opener.javascript.setParameter("SPPMC04100_PARM1","");
-
- model.setValue("/root/cnst_input/cnst_pid", gPID);
- model.setValue("/root/cnst_input/cnst_orddeptcd", sOrdDeptCD);
- model.setValue("/root/cnst_input/cnst_insuflag", sInsuFlag);
- model.setValue("/root/cnst_input/cnst_ordreqkind", sOrdReqKind);
- model.setValue("/root/cnst_input/cnst_todd", "99991231");
- model.setValue("/root/cnst_input/cnst_histstat", "Y");
- model.setValue("/root/cnst_input/cnst_fromdd", getCurrentDate());
- model.setValue("/root/cnst_input/cnst_seqno", "0");
- model.setValue("/root/cnst_input/cnst_reqformhospnm", "-");
- model.setValue("/root/cnst_input/cnst_reqformdrnm", "-");
-
- //model.refresh();
- sSearch();
- }
- model.refresh();
- ]]>
- </script>
- <submission id="TRPAMCOM01" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/session" replace="instance" resultref="/root/init"/>
- <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/tmp"/>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRPAO04201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/cnst_input" resultref="/root/main"/>
- <submission id="TXPAO04202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/cnst_input" resultref="/root/hidden/rsv"/>
- </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/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
- <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
- <script type="javascript" src="../../../pam/opatmngtweb/js/PMOCOM.js"/>
- <script type="javascript">
- <![CDATA[
- var gPID, strSend, strRcv, sOrdDeptCD, sOrdReqKind, sInsuFlag, etcOrdFlag;
-
- function sDefault() {
- var pid = model.getValue("/root/cnst_input/cnst_pid");
-
- model.resetInstanceNode("/root/cnst_input");
-
- model.setValue("/root/cnst_input/cnst_pid", pid);
- model.setValue("/root/cnst_input/cnst_todd", "99991231");
- model.setValue("/root/cnst_input/cnst_histstat", "Y");
- model.setValue("/root/cnst_input/cnst_fromdd", getCurrentDate());
- model.setValue("/root/cnst_input/cnst_seqno", "0");
- model.setValue("/root/cnst_input/cnst_reqformhospnm", "-");
- model.setValue("/root/cnst_input/cnst_reqformdrnm", "-");
-
- model.refresh();
- }
-
- function sSearch() {
- submit("TRPAO04201");
- }
- function sDelete() {
- if (model.getValue("/root/cnst_input/cnst_pid") == "") {
- messageBox("환자번호가 없습니다. 창을 닫은 후 다시 실행하십시오.", "I999", "");
- return;
- }
-
- if (model.getValue("/root/cnst_input/cnst_orddeptcd") == "") {
- messageBox("진료과가 없습니다. 진료과를 선택하십시오.", "I999", "");
- return;
- }
- if (model.getValue("/root/cnst_input/cnst_insuflag") == "") {
- messageBox("보험종류가 없습니다. 보험종류를 선택하십시오.", "I999", "");
- return;
- }
- if (model.getValue("/root/cnst_input/cnst_seqno") == "0") {
- messageBox("삭제할 의뢰서 내역을 선택하십시오.", "I999", "");
- return;
- }
-
- var rtn = messageBox("[" + model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + model.getValue("/root/cnst_input/cnst_orddeptcd") + "' ]/nm") + "]의 의뢰서를 삭제하시겠습니까?", "Q999");
- if(rtn == "7"){ //아니오
- return;
- }
- model.makeValue("/root/cnst_input/cnst_statflag", "D");
-
- submit("TXPAO04202");
-
- sSearch();
-
- grd_ordreqfrm.rebuild();
- sDefault();
- model.setFocus("btn_confirm");
- }
-
- function sSave(flag) {
- if (model.getValue("/root/cnst_input/cnst_pid") == "") {
- messageBox("환자번호가 없습니다. 창을 닫은 후 다시 실행하십시오.", "I999", "");
- return;
- }
-
- if (model.getValue("/root/cnst_input/cnst_orddeptcd") == "") {
- messageBox("진료과가 없습니다. 진료과를 선택하십시오.", "I999", "");
- return;
- }
- if (model.getValue("/root/cnst_input/cnst_insuflag") == "") {
- messageBox("보험종류가 없습니다. 보험종류를 선택하십시오.", "I999", "");
- return;
- }
- if (model.getValue("/root/cnst_input/cnst_ordreqkind") == "") {
- messageBox("의뢰서종류가 없습니다. 의뢰서종류를 선택하십시오.", "I999", "");
- return;
- }
-
- var sCount = getNodesetCount("/root/main/h_cnst/cnst");
- model.makeValue("/root/cnst_input/cnst_statflag", "I");
- for( var i = 1; i <= sCount; i++ ){
- if(model.getValue("/root/main/h_cnst/cnst[" + i + "]/cnst_orddeptcd") == model.getValue("/root/cnst_input/cnst_orddeptcd")){
- if(model.getValue("/root/main/h_cnst/cnst[" + i + "]/cnst_insuflag") == model.getValue("/root/cnst_input/cnst_insuflag")){
- var rtn = messageBox("[" + model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + model.getValue("/root/cnst_input/cnst_orddeptcd") + "' ]/nm") + "]로 등록된 진료의뢰서가 있습니다. 수정하시겠습니까?", "Q999");
- if(rtn == "7"){ //아니오
- return;
- }
- model.setValue("/root/cnst_input/cnst_statflag", "U");
- }
- }
- }
- if (model.getValue("/root/cnst_input/cnst_statflag") == "I") {
- var rtn = messageBox("[" + model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + model.getValue("/root/cnst_input/cnst_orddeptcd") + "' ]/nm") + "]의 의뢰서를 등록하시겠습니까?", "Q999");
- if(rtn == "7"){ //아니오
- return;
- }
- model.setValue("/root/cnst_input/cnst_todd", "99991231");
- model.setValue("/root/cnst_input/cnst_histstat", "Y");
- model.setValue("/root/cnst_input/cnst_fromdd", getCurrentDate());
- }
- // if (model.getValue("/root/cnst_input/cnst_seqno") == "0") {
- // model.makeValue("/root/cnst_input/cnst_statflag", "I");
- //
- // var rtn = messageBox("["+model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + model.getValue("/root/cnst_input/cnst_orddeptcd") + "' ]/nm") + "] 의뢰서를 저장 하시겠습니까? ", "Q999");
- // if(rtn == "7"){ //아니오
- // return;
- // }
-
- // } else {
- // model.makeValue("/root/cnst_input/cnst_statflag", "U");
- // var rtn = messageBox("["+model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + model.getValue("/root/cnst_input/cnst_orddeptcd") + "' ]/nm") + "] 의뢰서를 [수정] 하시겠습니까? ", "Q999");
- // if(rtn == "7"){ //아니오
- // return;
- // }
- // }
- submit("TXPAO04202");
-
- sSearch();
-
- grd_ordreqfrm.rebuild();
-
- sDefault();
-
- model.setFocus("btn_confirm");
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="710" pageheight="400" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
- <group id="group3" scroll="auto" style="left:0px; top:0px; width:685px; height:365px; ">
- <line id="line3" class="line_2" style="x1:0px; y1:52px; x2:685px; y2:52px; "/>
- <datagrid id="grd_ordreqfrm" nodeset="/root/main/h_cnst/cnst" caption="상태^등록번호^진료과^보험종류^의뢰서종류^종료일자^일련번호^기관코드^이력상태^등록일자^의뢰병원명^의뢰의사명^참고사항^최초등록자ID^최초등록일시^최종수정자ID^최종수정일시" colsep="^" colwidth="46, 66, 112, 56, 85, 85, 64, 68, 62, 76, 120, 80, 200, 100, 100, 100, 100" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:87px; width:685px; height:277px; ">
- <col ref="cnst_stat" visibility="hidden"/>
- <col ref="cnst_pid" visibility="hidden"/>
- <col disabled="true" ref="cnst_orddeptcd" type="combo" visibility="visible">
- <choices>
- <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </col>
- <col disabled="true" ref="cnst_insuflag" type="combo" visibility="visible" style="text-align:center; ">
- <choices>
- <item>
- <label>보험</label>
- <value>1</value>
- </item>
- <item>
- <label>보호</label>
- <value>2</value>
- </item>
- </choices>
- </col>
- <col disabled="true" ref="cnst_ordreqkind" type="combo" visibility="visible">
- <choices>
- <itemset nodeset="/root/init_com/P0310list/P0310">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="cnst_todd" type="output" visibility="hidden" format="yyyy-mm-dd"/>
- <col ref="cnst_seqno" visibility="hidden"/>
- <col ref="cnst_instcd" visibility="hidden"/>
- <col ref="cnst_histstat" visibility="hidden"/>
- <col ref="cnst_fromdd" type="output" visibility="visible" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="cnst_reqformhospnm" type="input" visibility="visible"/>
- <col ref="cnst_reqformdrnm" type="input" visibility="visible"/>
- <col ref="cnst_remfact" type="input" visibility="visible"/>
- <col ref="cnst_fstrgstrid"/>
- <col ref="cnst_fstrgstdt" format="yyyy-mm-dd hh:nn"/>
- <col ref="cnst_lastupdtrid" visibility="hidden"/>
- <col ref="cnst_lastupdtdt" visibility="hidden"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if (isDataCell() == true) {
- var srow = grd_ordreqfrm.row;
- if (srow <= 0 ) {
- srow = 1;
- }
- model.copyNode("/root/cnst_input", "/root/main/h_cnst/cnst["+ srow +"]");
- model.refresh();
- }
- ]]>
- </script>
- </datagrid>
- <line id="line1" class="line_1" style="x1:0px; y1:82px; x2:685px; y2:82px; "/>
- <caption id="caption1" class="tit_2" style="left:5px; top:10px; width:135px; height:13px; ">진료의뢰서 내역</caption>
- <button id="btn_addrow" class="btn2_letter4" style="left:620px; top:5px; width:64px; height:19px; ">
- <caption>새로입력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- sDefault();
- ]]>
- </script>
- </button>
- <select1 id="cmb_orddeptcd" ref="/root/cnst_input/cnst_orddeptcd" class="combo_default" navindex="1" appearance="minimal" style="left:228px; top:31px; width:125px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- ]]>
- </script>
- </select1>
- <caption id="caption4" class="cell_1" style="left:160px; top:30px; width:65px; height:23px; vertical-align:middle; ">진료과</caption>
- <caption id="caption13" class="cell_1" style="left:0px; top:30px; width:70px; height:23px; vertical-align:middle; ">환자번호</caption>
- <line id="line2" class="line_1" style="x1:0px; y1:25px; x2:685px; y2:25px; "/>
- <caption id="caption3" class="cell_1" style="left:0px; top:54px; width:70px; height:23px; vertical-align:middle; ">의뢰병원명</caption>
- <caption id="caption6" class="cell_1" style="left:228px; top:54px; width:72px; height:23px; vertical-align:middle; ">의뢰의사명</caption>
- <input id="ipt_pid" ref="/root/cnst_input/cnst_pid" disabled="true" style="left:73px; top:31px; width:83px; height:19px; "/>
- <caption id="caption2" class="cell_1" style="left:357px; top:30px; width:58px; height:23px; vertical-align:middle; ">보험종류</caption>
- <select1 id="combo1" ref="/root/cnst_input/cnst_insuflag" class="combo_default" navindex="2" appearance="minimal" style="left:418px; top:31px; width:85px; height:19px; ">
- <choices>
- <item>
- <label>건강보험</label>
- <value>1</value>
- </item>
- <item>
- <label>의료급여</label>
- <value>2</value>
- </item>
- </choices>
- </select1>
- <select1 id="combo2" ref="/root/cnst_input/cnst_ordreqkind" class="combo_default" navindex="3" appearance="minimal" style="left:581px; top:31px; width:104px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init_com/P0310list/P0310">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption5" class="cell_1" style="left:507px; top:30px; width:71px; height:23px; vertical-align:middle; ">의뢰서종류</caption>
- <input id="input1" ref="/root/cnst_input/cnst_reqformhospnm" navindex="4" style="left:73px; top:56px; width:151px; height:19px; "/>
- <caption id="caption7" class="cell_1" style="left:396px; top:54px; width:58px; height:23px; vertical-align:middle; ">참고사항</caption>
- <input id="input2" ref="/root/cnst_input/cnst_reqformdrnm" navindex="5" style="left:303px; top:56px; width:89px; height:19px; "/>
- <input id="input3" ref="/root/cnst_input/cnst_remfact" navindex="6" style="left:457px; top:56px; width:228px; height:19px; "/>
- <line id="line4" class="line_3" style="x1:0px; y1:77px; x2:685px; y2:77px; "/>
- </group>
- <group id="group1" scroll="auto" style="left:0px; top:364px; width:685px; height:27px; ">
- <button id="btn_confirm" class="btn4_letter2" style="left:629px; top:5px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- if (checkOpener())
- {
- opener.javascript.setParameter("SPPMC04100_RTN","Y");
-
- if (strRcv != null && strRcv != "" && strRcv != " " && strRcv != "-") {
-
- var cur_row = grd_ordreqfrm.row;
- if( cur_row > 0 ){
- //디비에 입력되지 않은 데이터는 그리드에서만 삭제한다.
- if( model.getValue("/root/main/h_cnst/cnst["+ cur_row + "]/cnst_seqno") == '0' ){
- grd_ordreqfrm.deleteItem( cur_row );
- }
- }
-
- //--var nodeCnt = parseInt(getNodesetCount("/root/hidden/h_cnst/cnst/cnst_orddeptcd")) + 1;
- //alert(nodeCnt);
- //--model.makeNode("/root/hidden/h_cnst/cnst[" + nodeCnt + "]");
- //--copyNodeType("/root/hidden/h_cnst/cnst[" + nodeCnt + "]", "/root/main/h_cnst/cnst", "replace");
- copyNodeType("/root/hidden/h_cnst", "/root/main/h_cnst", "replace");
-
- //alert( instance1.selectNodesXml("/root/main/h_cnst/cnst"));
- //alert( instance1.selectNodesXml("/root/hidden/h_cnst/cnst[" + nodeCnt + "]"));
-
- //--copyNodesetType(strRcv, "/root/hidden/h_cnst", "replace", parent.model, model);
- copyNodesetType("/root/main/h_cnst", "/root/hidden/h_cnst", "replace", parent.model, model);
-
- }
- window.close();
- }
- ]]>
- </script>
- </button>
- <button id="btn_cancel" class="btn4_letter2" style="left:571px; top:5px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- sSave();
-
- ]]>
- </script>
- </button>
- <line id="line88" class="line_6" style="x1:0px; y1:0px; x2:370px; y2:0px; "/>
- <button id="button2" class="btn4_letter2" style="left:513px; top:5px; width:56px; height:22px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- sDelete();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|