123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?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>
- <cond>
- <pid/>
- <testdd/>
- <hngnm/>
- <inptpath/>
- <inptpathflag/>
- </cond>
- <patinfo>
- <patinfolist/>
- </patinfo>
- <patbaseinfo>
- <patbaseinfo>
- <status/>
- <chekflag/>
- <pid/>
- <testdd/>
- <inptpath/>
- <inptpathflag/>
- <testitemcd/>
- <testitemnm/>
- <testrsltcnts/>
- <unitnm/>
- <exchval/>
- </patbaseinfo>
- </patbaseinfo>
- <patbasehistinfo>
- <patbasehistinfo/>
- </patbasehistinfo>
- </main>
- <send>
- <reqdata/>
- <savedata/>
- </send>
- <hidden/>
- <temp>
- <patbaseinfo/>
- </temp>
- <init/>
- </root>
- </instance>
- <submission id="TRMMO15801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/patbaseinfo"/>
- <submission id="TXMMO15801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/patbaseinfo"/>
- <submission id="TRMMO15802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/patbasehistinfo"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize_SPMMO15800();
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- /*
- * 화면 초기화
- * opener화면에서 등록번호(pid), 환자명(hngnm), 입력화면ID(inptpath), 입력화면구분(inptpathflag)를 얻는다.
- *
- */
- function fInitialize_SPMMO15800() {
- model.removeNodeset("/root/main/patbaseinfo/patbaseinfo");
- model.removeNodeset("/root/main/patbasehistinfo/patbasehistinfo");
-
- model.setValue("/root/main/cond/testdd" , getCurrentDate());
- if(checkOpener()){
- var pid = opener.javascript.getParameter("SPMMO15800_pid");
- var hngnm = opener.javascript.getParameter("SPMMO15800_hngnm");
- var inptpath = opener.javascript.getParameter("SPMMO15800_inptpath");
- var inptpathflag = opener.javascript.getParameter("SPMMO15800_inptpathflag");
-
- if(inptpath == ""){ //입력화면ID가 없는 경우, opener의 화면ID로
- inptpath = opener.javascript.getScreenID();
- }
-
- if(inptpathflag == ""){
- inptpathflag = "P"; //입력화면구분이 없는 경우, default는 프로그램
- }
-
- model.setValue("/root/main/cond/pid" , pid);
- model.setValue("/root/main/cond/hngnm", hngnm);
- model.setValue("/root/main/cond/inptpath", inptpath);
- model.setValue("/root/main/cond/inptpathflag", inptpathflag);
-
- fReqGetPatBaseClincInfo(pid, getCurrentDate(), inptpath, inptpathflag); //환자기초임상정보 조회
-
- model.refresh();
- }
- }
-
- /**
- * 환자 기초임상정보 조회
- * @param
- * pid 등록번호
- * testdd 검사일자
- * inptpath 화면ID, 서식코드
- * inptpathflag 화면경로구분(P:프로그램, D:서식)
- * testitemcds검사항목코드
- * setflag SET구분, useflag사용구분(default설정)
- */
- function fReqGetPatBaseClincInfo(pid, testdd, inptpath, inptpathflag, testitemcds){
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid", pid);
- model.makeValue("/root/send/reqdata/testdd", testdd);
- model.makeValue("/root/send/reqdata/inptpath", inptpath);
- model.makeValue("/root/send/reqdata/inptpathflag", inptpathflag);
- model.makeValue("/root/send/reqdata/testitemcds", testitemcds);
- if(submit("TRMMO15801")){
- model.copyNode("/root/temp/patbaseinfo", "/root/main/patbaseinfo");
- }
- }
-
- /**
- * 두 node를 동일여부를 비교함(selectNodes
- * @param
- * node1,2 : 비교할 node path
- * skipnode1,2 : 비교에서 제외할 nodename
- */
- function fCompareEqualNode(desnode, srcnode, skipnode1, skipnode2){
- var node = instance1.selectSingleNode(desnode);
- var node2 = instance1.selectSingleNode(srcnode);
- var nodeList = node.childNodes;
- var nodeList2 = node2.childNodes;
- while(childNode = nodeList.nextNode()){
- childNode2 = nodeList2.nextNode();
- if(childNode.nodeName == skipnode1 || childNode.nodeName == skipnode2){ //처리구분에 관련된 node는 비교대상에서 열외
- continue;
- }
- if(childNode.NodeValue != childNode2.NodeValue){
- return false; //값이 다른 경우 false
- }
- }
- return true; //값이 같은 경우 true
- }
-
- /**
- * 환자 기초임상이력 정보 조회
- * @param
- * pid : 등록번호
- * testitemcd : 검사항목코드
- */
- function fReqGetPatBaseClincHistInfo(pid, testitemcd){
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid", pid);
- model.makeValue("/root/send/reqdata/testitemcd", testitemcd);
- if(submit("TRMMO15802")){
- }
- }
-
- //환자 등록번호를 통한 환자 이름 가져오기
- /*
- function fPatSrch(s_val, flag){
- if(flag == "1"){
- model.makeValue("/root/temp/pid", s_val);
- } else if(flag == "2"){
- model.makeValue("/root/temp/hngnm", s_val);
- }
- model.makeValue("/root/temp/srchcond", flag);
- model.makeValue("/root/temp/autoflag","Y"); // 1건인경우 자동으로닫힘
-
- model.resetInstanceNode("/root/main/patinfo/patinfolist");
- modal("SPPMC02500", 1,10, 10, "SPPMC02500", "/root/temp", "/root/send");
-
- model.refresh();
- }*/
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body class="radio_search" scroll="auto" pagewidth="588" onBlur="window.focus()" pageheight="630" guideline="1,8;2,599;2,645;1,580;1,588;2,630;" style="margin-left:0; margin-top:0; margin-right:0; margin-bottom:0; ">
- <shape id="roundrect5" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:8px; top:2px; width:572px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
- <line id="line1" class="line_1" style="x1:8px; y1:64px; x2:580px; y2:64px; "/>
- <caption id="caption5" class="tit_2" style="left:8px; top:50px; width:100px; height:13px; ">기초임상정보</caption>
- <datagrid id="grd_patbaseinfo" nodeset="/root/main/patbaseinfo/patbaseinfo" caption="설정^status^status2^검사항목^단위^임상정보" colsep="^" colwidth="30, 0, 0, 86, 73, 73" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:9px; top:70px; width:265px; height:529px; ">
- <col checkvalue="Y,N" ref="checkflag" type="checkbox"/>
- <col ref="status" type="combo" visibility="hidden">
- <choices>
- <item>
- <label>SET추가</label>
- <value>i</value>
- </item>
- <item>
- <label>SET취소</label>
- <value>d</value>
- </item>
- </choices>
- </col>
- <col ref="status2" type="combo" visibility="hidden">
- <choices>
- <item>
- <label>임상정보수정</label>
- <value>u</value>
- </item>
- </choices>
- </col>
- <col ref="testitemnm"/>
- <col ref="unitnm"/>
- <col ref="testrsltcnts" type="input"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var currow = grd_patbaseinfo.row;
- var curcol = grd_patbaseinfo.col;
- if(curcol == grd_patbaseinfo.colRef("checkflag")){
- var nodelist = model.instance1.selectNodes("/root/main/patbaseinfo/patbaseinfo[checkflag='Y']/checkflag");
- if(nodelist.length > 3){
- messageBox("기초 임상정보는 3개 이상 설정", "E001");
- grd_patbaseinfo.valueMatrix(currow, curcol) = "N";
- grd_patbaseinfo.refresh();
- return;
- }
-
- var node1 = "/root/main/patbaseinfo/patbaseinfo[" + currow + "]";
- var node2 = "/root/temp/patbaseinfo/patbaseinfo[" + currow + "]";
-
- if(fCompareEqualNode(node1, node2, "status", "status2")==false){ //변경된 값이 다른 경우
- if(grd_patbaseinfo.valueMatrix(currow, curcol)=="Y"){ //기초 임상정보가 신규로 선택된 경우
- model.setValue("/root/main/patbaseinfo/patbaseinfo[" + currow + "]/status", "i");
-
- }else if(grd_patbaseinfo.valueMatrix(currow, curcol)=="N"){ //기초 임상정보가 해제된 경우
- model.setValue("/root/main/patbaseinfo/patbaseinfo[" + currow + "]/status", "d");
- }
- }else{
- model.setValue("/root/main/patbaseinfo/patbaseinfo[" + currow + "]/status", "");
- }
- }
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- var currow = grd_patbaseinfo.row;
- var curcol = grd_patbaseinfo.col;
- if(curcol == grd_patbaseinfo.colRef("testrsltcnts")){
- var node1 = "/root/main/patbaseinfo/patbaseinfo[" + currow + "]";
- var node2 = "/root/temp/patbaseinfo/patbaseinfo[" + currow + "]";
-
- if(fCompareEqualNode(node1, node2, "status", "status2")==false){ //변경된 값이 다른 경우
- model.setValue("/root/main/patbaseinfo/patbaseinfo[" + currow + "]/status2", "u");
- }else{
- model.setValue("/root/main/patbaseinfo/patbaseinfo[" + currow + "]/status2", "");
- }
- }
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- if(isDataCell()){
- var pid = model.getValue("/root/main/patbaseinfo/patbaseinfo[" + grd_patbaseinfo.row + "]/pid");
- var testitemcd = model.getValue("/root/main/patbaseinfo/patbaseinfo[" + grd_patbaseinfo.row + "]/testitemcd");
- fReqGetPatBaseClincHistInfo(pid, testitemcd);
- }
- ]]>
- </script>
- </datagrid>
- <button id="button1" class="btn1_letter2" style="left:513px; top:12px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var pid = model.getValue("/root/main/cond/pid");
- var testdd = model.getValue("/root/main/cond/testdd");
- var inptpath = model.getValue("/root/main/cond/inptpath");
- var inptpathflag = model.getValue("/root/main/cond/inptpathflag");
- fReqGetPatBaseClincInfo(pid, testdd, inptpath, inptpathflag);
- ]]>
- </script>
- </button>
- <caption id="cap_hngnm" class="search_name" style="left:229px; top:14px; width:91px; height:17px; ">성 명</caption>
- <input id="ipt_pid" ref="/root/main/cond/pid" style="left:91px; top:12px; width:92px; height:19px; ">
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- model.setValue("/root/main/cond/pid", "");
- model.setValue("/root/main/cond/hngnm", "");
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- inputEnterKey("btn_patsrch", "DOMActivate");
- ]]>
- </script>
- </input>
- <input id="ipt_hngnm" ref="/root/main/cond/hngnm" disabled="false" style="left:309px; top:12px; width:100px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- inputEnterKey("btn_patsrch", "DOMActivate");
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- model.setValue("/root/main/cond/pid", "");
- model.setValue("/root/main/cond/hngnm", "");
- model.refresh();
- ]]>
- </script>
- </input>
- <caption id="cap_pid" class="search_name" style="left:11px; top:14px; width:91px; height:17px; ">등록번호</caption>
- <button id="btn_patsrch" class="icon_search" style="left:413px; top:13px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var pid = model.getValue("/root/main/cond/pid");
- var hngnm = model.getValue("/root/main/cond/hngnm");
- if(pid =="" && hngnm !=""){
- //fPatSrch(hngnm, "2");
-
- } else if(pid !="" && hngnm == ""){
- //fPatSrch(pid, "1");
-
- } else {
- modal("SPPMC02500");
-
- }
- model.setValue("/root/main/cond/pid" , model.getValue("/root/main/patinfo/patinfolist/pid"));
- model.setValue("/root/main/cond/hngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
- model.refresh();
- ]]>
- </script>
- </button>
- <line id="line3" style="x1:498px; y1:7px; x2:498px; y2:36px; border-color:#ffe4bb; border-left-style:solid; "/>
- <datagrid id="datagrid1" nodeset="/root/main/patbasehistinfo/patbasehistinfo" caption="검사일자^검사항목^단위^임상정보" colsep="^" colwidth="81, 76, 71, 73" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:276px; top:70px; width:304px; height:528px; ">
- <col ref="testdd" type="output" format="yyyy-mm-dd"/>
- <col ref="testitemnm"/>
- <col ref="unitnm"/>
- <col ref="testrsltcnts"/>
- </datagrid>
- <button id="button4" class="btn4_letter2" style="left:464px; top:603px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.copyNode("/root/send/savedata", "/root/main/patbaseinfo");
- if(submit("TXMMO15801")){
- }
- ]]>
- </script>
- </button>
- <button id="button2" class="btn4_letter2" style="left:522px; top:603px; width:56px; height:22px; ">
- <caption>종료</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|