123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * @(#)SPPIZ01800_수혈심사.xrw
- * 수정이력
- * - 2009.04.10 / 최초작성 / 정선영
- -->
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>
- <bloodpat>
- <gridbloodpat>
- <orddeptnm/>
- <roomcd/>
- <pid/>
- <pnm/>
- <indd/>
- <dschdd/>
- <diagcd/>
- <ioflag/>
- <cretno/>
- <orddeptcd/>
- <orddrid/>
- <mskind/>
- <sex/>
- <age/>
- <prsnno/>
- </gridbloodpat>
- </bloodpat>
- <bloodlist>
- <bloodsummary>
- <gridbloodsummary>
- <execdt/>
- <tnsstrdt/>
- <prcpcd/>
- <prcpnm/>
- <cnt/>
- <filter/>
- <irr/>
- <hb/>
- <hct/>
- <plt/>
- <pt/>
- <ptt/>
- <judgeyn/>
- <transresn/>
- <transresntext/>
- <rem/>
- <blodno/>
- <blodbarcd/>
- </gridbloodsummary>
- </bloodsummary>
- <bloodsummary2>
- <grdbloodsummary2>
- <prcpcd/>
- <prcpnm/>
- <cnt/>
- </grdbloodsummary2>
- </bloodsummary2>
- <blooddetail>
- <gridblooddetail>
- <execdt/>
- <prcpcd/>
- <blodno/>
- <blodbarcd/>
- <prcpnm/>
- <resn/>
- </gridblooddetail>
- </blooddetail>
- </bloodlist>
- <patinfo>
- <patinfolist/>
- </patinfo>
- </main>
- <init>
- <combodata>
- <judgrid/>
- <wardcd/>
- <orddeptcd/>
- <orddrid>
- <orddridlist/>
- </orddrid>
- <ward/>
- </combodata>
- <P0470list>
- <P0470>
- <cdid/>
- <cdnm/>
- </P0470>
- </P0470list>
- <P0479list>
- <P0479>
- <cdid/>
- <cdnm/>
- </P0479>
- </P0479list>
- </init>
- <send>
- <fromdd/>
- <todd/>
- <judgrid/>
- <wardcd/>
- <orddeptcd/>
- <orddrid/>
- <pid/>
- <pnm/>
- <sexage/>
- <blood/>
- <termflag/>
- <ioflag/>
- <bloodgb/>
- <labrsltflag/>
- </send>
- <hidden>
- <sppmc02500>
- <cond>
- <srchcond/>
- <pid/>
- <hngnm/>
- <rrgstno1/>
- <rrgstno2/>
- </cond>
- </sppmc02500>
- </hidden>
- <sendsummary>
- <pid/>
- <pnm/>
- <orddd/>
- <cretno/>
- <ioflag/>
- <fromdd/>
- <todd/>
- <termflag/>
- <mskind/>
- <sex/>
- <age/>
- <prsnno/>
- <labrsltflag/>
- <bloodgb/>
- </sendsummary>
- <source>
- <srchcond/>
- <pid/>
- <hngnm/>
- <rrgstno1/>
- <rrgstno2/>
- </source>
- <send_opener>
- <pid/>
- </send_opener>
- <senditem>
- <list/>
- </senditem>
- <sendtochild>
- </sendtochild>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- // 날짜지정
- var curDate = getCurrentDate();
- var fromDate = curDate.toDate().getAddDate(-7,"D").getDateFormat();
- model.setValue("/root/send/fromdd",fromDate);
- model.setValue("/root/send/todd",curDate);
-
- // 수혈심사 조회 기초자료 조회
- submit("TRPIZ01801");
-
- // 공통코드조회
- // ---------------------------------------------------------------
- // 공통코드를 조회한다.
- // (ZBC001.js) com.ZBCMCODE 에서 기초코드 값 Get
- // ---------------------------------------------------------------
- zbcfGetCodeList(
- new Array("P0470" // 혈액성분
- ,"P0479" //수혈사유
- ),
- new Array("/root/init/P0470list"
- ,"/root/init/P0479list"
- ));
-
- if (checkOpener()) {
- var pid = model.getValue("/root/send_opener/pid");
- if (pid != "") {
- model.setValue("/root/send/pid", model.getValue("/root/send_opener/pid"));
- model.setValue("/root/send/pnm", model.getValue("/root/send_opener/pnm"));
- model.setValue("/root/send/sexage", model.getValue("/root/send_opener/sex") + "/" + model.getValue("/root/send_opener/age"));
- //환자정보셋팅
-
- //조회
- var controlObj = document.controls("btn_search");
- controlObj.dispatch("onclick");
-
- model.refresh();
- }
- }
-
- model.refresh();
- ]]>
- </script>
- <submission id="TRPIZ01801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/combodata"/>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRPIZ01802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/bloodpat"/>
- <submission id="TRPIZ01803" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/sendsummary" resultref="/root/main/bloodlist"/>
- <submission id="TRPMC02500" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/source" resultref="/root/main/patinfo"/>
- <submission id="TRPIZ01804" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/combodata/orddrid"/>
- <submission id="TXPIZ01803" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/senditem"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/numericHelper.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/basiccodeweb/js/ZBC001.js"/>
- </xhtml:head>
- <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <caption id="caption11" class="tit_1" style="left:0px; top:0px; width:260px; height:14px; vertical-align:middle; ">수혈심사</caption>
- <object id="tfexcel" clsid="{fe8d1001-6a9d-424d-ae2a-301493bb12da}" visibility="hidden" style="left:950px; top:55px; width:180px; height:35px; "/>
- <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
- <group id="group2" style="left:0px; top:10px; width:1194px; height:59px; vertical-align:top; background-color:#fffbf2; border-color:#ffd799; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:59px; "/>
- <line id="line13" style="x1:1113px; y1:31px; x2:1113px; y2:53px; border-color:#ffe4bb; border-left-style:solid; "/>
- <caption id="caption1" class="search_name" style="left:700px; top:9px; width:86px; height:17px; ">진료과 :</caption>
- <caption id="caption3" class="search_name" style="left:15px; top:9px; width:96px; height:17px; ">불출일자 :</caption>
- <caption id="caption4" class="search_name" style="left:500px; top:33px; width:86px; height:17px; ">병동 :</caption>
- <caption id="caption9" class="search_name" style="left:314px; top:9px; width:86px; height:17px; ">심사자 :</caption>
- <caption id="caption14" class="search_name" style="left:920px; top:33px; width:86px; height:17px; ">혈액성분 :</caption>
- <button id="btn_search" class="btn1_letter2" style="left:1128px; top:31px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.resetInstanceNode("/root/main/bloodpat/gridbloodpat");
- model.resetInstanceNode("/root/main/bloodlist/bloodsummary/gridbloodsummary");
- model.resetInstanceNode("/root/main/bloodlist/bloodsummary2/grdbloodsummary2");
- model.resetInstanceNode("/root/main/bloodlist/blooddetail/gridblooddetail");
-
- model.refresh();
-
- //혈액성분은 코드가 아닌 텍스트로 조회
- if(model.getValue("/root/send/blood") != "") {
- model.setValue("/root/send/bloodgb", cmb_bloodgb.item(cmb_bloodgb.focusIndex).label);
- } else {
- model.setValue("/root/send/bloodgb", "");
- }
-
- submit("TRPIZ01802");
- ]]>
- </script>
- </button>
- <caption id="caption2" class="search_name" style="left:15px; top:33px; width:96px; height:17px; ">환자번호 : :</caption>
- <input id="ipt_pid" ref="/root/send/pid" class="input_default" style="left:104px; top:32px; width:85px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode == "13") {
- vcheck_pid = ipt_pid.currentText;
- //환자정보 초기화
- model.setValue("/root/send/pid", "");
- model.setValue("/root/send/pnm", "");
- model.setValue("/root/send/sexage", "");
-
- model.refresh();
-
- //환자번호 null체크
- if (vcheck_pid == null || vcheck_pid == "" || vcheck_pid == " " || vcheck_pid == "-") {
- messageBox("환자등록번호가 입력되지","E007");
- return;
- }
-
- //환자번호 조건으로 인적정보 조회
- model.setValue("/root/source/srchcond", "1");
- model.setValue("/root/source/pid", vcheck_pid);
- model.resetInstanceNode("/root/main/patinfo/patinfolist");
-
- //환자등록번호 체크
- if(submit("TRPMC02500")){
- var vcheck_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
-
- if (vcheck_pid == null || vcheck_pid == "" || vcheck_pid == " " || vcheck_pid == "-") {
- //조회내역 체크
- messageBox("존재하지 않는 등록번호","E008");//E008=입니다
- model.setFocus("ipt_pid");
- model.refresh();
- return;
- }else{
- var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
- var srch_hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
- var srcn_sex = model.getValue("/root/main/patinfo/patinfolist/sex");
- var srcn_age = model.getValue("/root/main/patinfo/patinfolist/age");
-
- model.removeNodeset("/root/main/patinfo/patinfolist"); // patinfolist가 제거됨 (resetInstanceNode의 경우 값은 지우고 노드는 남아있음)
- model.makeNode("/root/main/patinfo/patinfolist"); // SPPMC02500_환자조회 팝업을 다시 조회할 경우를 위해 다시 노드를 추가함
- model.setValue("/root/send/pid", srch_pid);
- model.setValue("/root/send/pnm", srch_hngnm);
- model.setValue("/root/send/sexage", srcn_sex + "/" + srcn_age);
-
- model.refresh();
- return;
- }
- }
- else {
- messageBox("존재하지 않는 등록번호","E008");//E008=입니다
- fInitialize();
- model.setFocus("ipt_pid");
- model.refresh();
- return;
- }
- }
- ]]>
- </script>
- </input>
- <caption id="caption5" class="search_name" style="left:920px; top:10px; width:86px; height:17px; ">진료의사 :</caption>
- <output id="opt_sexage" ref="/root/send/sexage" class="output_search" style="left:259px; top:32px; width:50px; height:19px; text-align:center; "/>
- <input id="ipt_fromdd" ref="/root/send/fromdd" class="input_search" inputtype="date" format="yyyy-mm-dd" style="left:104px; top:8px; width:85px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- ]]>
- </script>
- </input>
- <input id="ipt_todd" ref="/root/send/todd" class="input_search" inputtype="date" format="yyyy-mm-dd" style="left:192px; top:8px; width:85px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- ]]>
- </script>
- </input>
- <select1 id="cmb_judgrid" ref="/root/send/judgrid" class="combo_search" appearance="minimal" style="left:391px; top:8px; width:90px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/combodata/judgrid/judgridlist">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </select1>
- <select1 id="cmb_wardcd" ref="/root/send/wardcd" class="combo_search" disabled="false" appearance="minimal" style="left:564px; top:32px; width:124px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/combodata/wardcd/wardcdlist">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </select1>
- <select1 id="cmb_orddeptcd" ref="/root/send/orddeptcd" class="combo_search" appearance="minimal" style="left:777px; top:8px; width:120px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- ]]>
- </script>
- <choices>
- <itemset nodeset="/root/init/combodata/orddeptcd/orddeptcdlist">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- //진료과에 해당하는 의사만 조회
- submit("TRPIZ01804");
- ]]>
- </script>
- </select1>
- <select1 id="cmb_orddrid" ref="/root/send/orddrid" class="combo_search" appearance="minimal" style="left:1010px; top:8px; width:90px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- ]]>
- </script>
- <choices>
- <itemset nodeset="/root/init/combodata/orddrid/orddridlist">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </select1>
- <output id="opt_patnm" ref="/root/send/pnm" class="output_search" style="left:192px; top:32px; width:65px; height:19px; text-align:center; "/>
- <button id="btn_srchpid" class="icon_search" style="left:314px; top:32px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var ipt_pid = model.getValue("/root/send/pid");
-
- if (ipt_pid) {
- model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
- model.setValue("/root/hidden/sppmc02500/cond/pid", ipt_pid);
- }
- else {
- model.resetInstanceNode("/root/hidden/sppmc02500/cond");
- }
-
- modal("SPPMC02500", 1,150, 150, "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send");
-
- var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
- var srch_hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
- var srcn_sex = model.getValue("/root/main/patinfo/patinfolist/sex");
- if(srcn_sex=="M") {
- srcn_sex = "남";
- } else {
- srcn_sex = "여";
- }
- var srcn_age = model.getValue("/root/main/patinfo/patinfolist/age");
- if (srch_pid) { // SPPMC02500_환자조회 화면에서 조회한 경우임
- model.removeNodeset("/root/main/patinfo/patinfolist"); // patinfolist가 제거됨 (resetInstanceNode의 경우 값은 지우고 노드는 남아있음)
- model.makeNode("/root/main/patinfo/patinfolist"); // SPPMC02500_환자조회 팝업을 다시 조회할 경우를 위해 다시 노드를 추가함
- model.setValue("/root/send/pid", srch_pid);
- model.setValue("/root/send/pnm", srch_hngnm);
- model.setValue("/root/send/sexage", srcn_sex + "/" + srcn_age);
- }
-
- model.refresh();
- ]]>
- </script>
- </button>
- <select id="chk_termflag" ref="/root/send/termflag" overflow="visible" appearance="full" style="left:342px; top:33px; width:130px; height:15px; border-style:none; ">
- <choices>
- <item>
- <label>재원기간 전체</label>
- <value>01</value>
- </item>
- </choices>
- </select>
- <caption id="caption8" class="search_name" style="left:500px; top:9px; width:112px; height:17px; ">외래입원구분 :</caption>
- <select1 id="combo1" ref="/root/send/ioflag" class="combo_search" appearance="minimal" style="left:616px; top:8px; width:72px; height:19px; ">
- <choices>
- <item>
- <label/>
- <value/>
- </item>
- <item>
- <label>외래</label>
- <value>O</value>
- </item>
- <item>
- <label>입원</label>
- <value>I</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- if(model.getValue("/root/send/ioflag") == "I") {
- cmb_wardcd.disabled = false;
- } else {
- cmb_wardcd.disabled = true;
- }
- ]]>
- </script>
- </select1>
- <select1 id="cmb_bloodgb" ref="/root/send/blood" class="combo_search" appearance="minimal" style="left:1010px; top:32px; width:90px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/P0470list/P0470">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- </group>
- <line id="line12" class="line_1" style="x1:0px; y1:94px; x2:675px; y2:94px; "/>
- <caption id="caption32" class="tit_2" style="left:5px; top:79px; width:105px; height:14px; ">수혈대상자</caption>
- <line id="line1" class="line_1" style="x1:690px; y1:94px; x2:1194px; y2:94px; "/>
- <caption id="caption6" class="tit_2" style="left:690px; top:79px; width:105px; height:13px; ">SUMMARY</caption>
- <line id="line2" class="line_1" style="x1:0px; y1:311px; x2:1194px; y2:311px; "/>
- <caption id="caption7" class="tit_2" style="left:5px; top:296px; width:105px; height:13px; ">수혈내역</caption>
- <button id="btn_EnvSetup" class="btn2_letter6" visibility="visible" _auth="P" style="left:995px; top:289px; width:86px; height:19px; ">
- <caption>상세정보확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var execdt = grd_blooddetail.valueMatrix(grd_blooddetail.row,grd_blooddetail.colRef("execdt"));
- var prcpcd = grd_blooddetail.valueMatrix(grd_blooddetail.row,grd_blooddetail.colRef("prcpcd"));
-
- var node = "/root/main/bloodlist/blooddetail/gridblooddetail";
- var getCount = getNodesetCount(node);
- var copyrow = 1;
-
- model.removeNodeset("/root/sendtochild");
-
- //수혈개별처방Loop를 돌면서 불출일시와 처방코드가 같은 수혈처방을 골라내 팝업화면으로 보낸다.
- for(i=1; i<= getCount; i++) {
- var loop_execdt = model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ i +"]/execdt");
- var loop_prcpcd = model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ i +"]/prcpcd");
-
- if (execdt == loop_execdt && prcpcd == loop_prcpcd) {
- model.makeValue("/root/sendtochild/gridblooddetail["+ copyrow +"]/prcpcd", model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ i +"]/prcpcd"));
- model.makeValue("/root/sendtochild/gridblooddetail["+ copyrow +"]/prcpnm", model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ i +"]/prcpnm"));
- model.makeValue("/root/sendtochild/gridblooddetail["+ copyrow +"]/blodno", model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ i +"]/blodno"));
- model.makeValue("/root/sendtochild/gridblooddetail["+ copyrow +"]/resn", model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ i +"]/resn"));
-
- copyrow++;
- }
- }
-
- window.load("../../../pam/insucomweb/xrw/SPPIZ01801_수혈상세조회.xrw", "modeless", "pop", "", "/root/sendtochild", "/root/main/blooddetail");
- ]]>
- </script>
- </button>
- <button id="button1" class="btn2_letter6" visibility="visible" _auth="P" style="left:907px; top:289px; width:86px; height:19px; ">
- <caption>통합결과조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var patid = model.getValue("/root/sendsummary/pid");
-
- if (patid != "") {
- model.makevalue("/root/hidden/smaer00800/cond/srchdate1", model.getValue("/root/sendsummary/orddd"));
- model.makevalue("/root/hidden/smaer00800/cond/srchdate2", getCurrentDate());
- model.makevalue("/root/hidden/smaer00800/cond/srchpid", model.getValue("/root/sendsummary/pid"));
- model.makevalue("/root/hidden/smaer00800/cond/wardcd", "");
- model.makevalue("/root/hidden/smaer00800/cond/roomcd", "");
- model.makevalue("/root/hidden/smaer00800/cond/listflag", "P");
- model.makevalue("/root/hidden/smaer00800/cond/deptcd", model.getValue("/root/sendsummary/orddeptcd"));
- model.makevalue("/root/hidden/smaer00800/cond/drid", model.getValue("/root/sendsummary/orddrid"));
- model.makevalue("/root/hidden/smaer00800/cond/chkcheck", "");
- model.makevalue("/root/hidden/smaer00800/cond/chkcheck1", "A");
- model.makevalue("/root/hidden/smaer00800/cond/chkcheck2", "B");
- model.makevalue("/root/hidden/smaer00800/cond/chkcheck3", "C");
- model.makevalue("/root/hidden/smaer00800/cond/chkcheck4", "D");
- model.makevalue("/root/hidden/smaer00800/cond/chkcheck5", "E");
- model.makevalue("/root/hidden/smaer00800/cond/chkcheck6", "F");
- model.makevalue("/root/hidden/smaer00800/cond/chkcheck7", "G");
- model.makevalue("/root/hidden/smaer00800/cond/chkcheck8", "");
- model.makevalue("/root/hidden/smaer00800/cond/tabflag", "");
- model.makevalue("/root/hidden/smaer00800/cond/mdlcd", "");
- model.makevalue("/root/hidden/smaer00800/cond/examgubun", "");
-
- open("SMAER00800" ,"", "10", "10", "SMAER00800", "/root/hidden/smaer00800/cond", "/root/send/data/singdata", "", "");
- }
- ]]>
- </script>
- </button>
- <datagrid id="grd_bloodpat" nodeset="/root/main/bloodpat/gridbloodpat" class="datagrid2" caption="과^병실^등록번호^환자명^입원일^퇴원일^주상병^외래입원구분^생성번호^진료과^진료의^주부유형" colsep="^" colwidth="90, 60, 80, 80, 90, 90, 153, 100, 100, 100, 100, 100" dataheight="25" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:99px; width:675px; height:180px; ">
- <col ref="orddeptnm" style="text-align:center; "/>
- <col ref="roomcd" style="text-align:center; "/>
- <col ref="pid" style="text-align:center; "/>
- <col ref="pnm" style="text-align:center; "/>
- <col ref="indd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="dschdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="diagcd"/>
- <col ref="ioflag" visibility="hidden"/>
- <col ref="cretno" visibility="hidden"/>
- <col ref="orddeptcd" visibility="hidden"/>
- <col ref="orddrid" visibility="hidden"/>
- <col ref="mskind" visibility="hidden"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- ]]>
- </script>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- var cur_row = grd_bloodpat.row;
-
- var pid = grd_bloodpat.textmatrix(cur_row,grd_bloodpat.colRef("pid"));
- var pnm = grd_bloodpat.textmatrix(cur_row,grd_bloodpat.colRef("pnm"));
- var orddd = grd_bloodpat.textmatrix(cur_row,grd_bloodpat.colRef("indd"));
- var cretno = grd_bloodpat.textmatrix(cur_row,grd_bloodpat.colRef("cretno"));
- var ioflag = grd_bloodpat.textmatrix(cur_row,grd_bloodpat.colRef("ioflag"));
- var mskind = grd_bloodpat.textmatrix(cur_row,grd_bloodpat.colRef("mskind"));
- model.setValue("/root/sendsummary/pid", pid);
- model.setValue("/root/sendsummary/pnm", pnm);
- model.setValue("/root/sendsummary/orddd", orddd);
- model.setValue("/root/sendsummary/cretno", cretno);
- model.setValue("/root/sendsummary/ioflag", ioflag);
- model.setValue("/root/sendsummary/mskind", mskind);
-
- model.setValue("/root/sendsummary/sex", model.getValue("/root/main/bloodpat/gridbloodpat["+ grd_bloodpat.row +"]/sex"));
- model.setValue("/root/sendsummary/age", model.getValue("/root/main/bloodpat/gridbloodpat["+ grd_bloodpat.row +"]/age"));
- model.setValue("/root/sendsummary/prsnno", model.getValue("/root/main/bloodpat/gridbloodpat["+ grd_bloodpat.row +"]/prsnno"));
-
- model.setValue("/root/sendsummary/fromdd", model.getValue("/root/send/fromdd"));
- model.setValue("/root/sendsummary/todd", model.getValue("/root/send/todd"));
- model.setValue("/root/sendsummary/labrsltflag", model.getValue("/root/send/labrsltflag"));
- model.setValue("/root/sendsummary/termflag", model.getValue("/root/send/termflag"));
- model.setValue("/root/sendsummary/bloodgb", model.getValue("/root/send/bloodgb"));
-
- if (submit("TRPIZ01803")) {
- //수혈개별처방을 가지고 있는 노드
- var node = "/root/main/bloodlist/blooddetail/gridblooddetail";
- //노드갯수
- var getCount = getNodesetCount(node);
- //SUMMARY 그리드 인스턴스 노드의 추가 열
- var addRow = 1;
- //수혈처방 합산수량 변수
- var bloodCnt = 0;
- //Loop돌때 이전 처방을 가지고 있는 변수
- var pre_prcpcd = ""
-
- model.removeNodeset("/root/main/bloodlist/bloodsummary2/grdbloodsummary2");
- //수혈개별처방Loop를 돌면서 처방코드로 수량 합산한다.
- for(i=1; i<= getCount; i++) {
- var prcpcd = model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ i +"]/prcpcd");
-
- //이전 처방과 다른 처방을 받으면 SUMMARY 그리드 인스턴스에 추가.
- if (pre_prcpcd != "" && prcpcd != pre_prcpcd) {
- model.makeValue("/root/main/bloodlist/bloodsummary2/grdbloodsummary2["+ addRow +"]/prcpcd", model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ (i-1) +"]/prcpcd"));
- model.makeValue("/root/main/bloodlist/bloodsummary2/grdbloodsummary2["+ addRow +"]/prcpnm", model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ (i-1) +"]/prcpnm"));
- model.makeValue("/root/main/bloodlist/bloodsummary2/grdbloodsummary2["+ addRow +"]/cnt", bloodCnt);
- //변수 초기화
- bloodCnt = 0;
- //SUMMARY 그리드 다음 인스턴스 추가할 열
- addRow++;
- }
- //수혈처방 수량 카운트
- bloodCnt++;
- //현재 Loop에서 받은 처방코드 보관. 다음 Loop시 처방코드와 비교용.
- pre_prcpcd = prcpcd;
- }
- //마지막에 계산된 처방은 위의 for loop안에서 처리 못하므로 다 끝나고 SUMMARY 그리드 인스턴스에 추가
- model.makeValue("/root/main/bloodlist/bloodsummary2/grdbloodsummary2["+ addRow +"]/prcpcd", model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ (i-1) +"]/prcpcd"));
- model.makeValue("/root/main/bloodlist/bloodsummary2/grdbloodsummary2["+ addRow +"]/prcpnm", model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ (i-1) +"]/prcpnm"));
- model.makeValue("/root/main/bloodlist/bloodsummary2/grdbloodsummary2["+ addRow +"]/cnt", bloodCnt);
- }
-
- model.refresh();
- ]]>
- </script>
- </datagrid>
- <button id="button2" class="btn2_letter4" visibility="visible" _auth="P" style="left:841px; top:289px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if (grd_blooddetail.rows > 1) {
- var fileName = window.fileDialog("save", "", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- // if (fileName != "") {
- // grd_blooddetail.saveExcel(fileName, "sheetname:;colhiddenextend:false;rowhiddenextend:false;", true, true, "", "", true);
- // }
- var pid = model.getValue("/root/main/bloodpat/gridbloodpat["+ grd_bloodpat.row +"]/pid");
- var pnm = model.getValue("/root/main/bloodpat/gridbloodpat["+ grd_bloodpat.row +"]/pnm");
- var orddeptcd = model.getValue("/root/main/bloodpat/gridbloodpat["+ grd_bloodpat.row +"]/orddeptnm");
- var indd = model.getValue("/root/main/bloodpat/gridbloodpat["+ grd_bloodpat.row +"]/indd");
-
- tfexcel.launchnewinstance(0);
- tfexcel.createworkbook();
-
- tfexcel.addsheet(1, "수혈내역");
- tfexcel.cellvalue(1,1) = pid + " " + pnm + " " + orddeptcd + " " + indd
- for(var col=1 ; col <= grd_blooddetail.cols ; col++) {
- for( var row=1 ; row <= grd_blooddetail.rows ; row++ ) {
- tfexcel.cellvalue(row+1,col) = grd_blooddetail.valuematrix(row-1,col-1);
- tfexcel.colwidth(col) = 11;
- }
- }
-
- // border line
- tfexcel.setbordercolor(2,1,grd_blooddetail.rows+1,grd_blooddetail.cols-1,window.rgb(0,0,0));
- // 헤더 바탕색 주기
- tfexcel.cellbgcolor(2,1,grd_blooddetail.fixedrows+1,grd_blooddetail.cols-1)=window.rgb(192,192,192);
-
- tfexcel.save(fileName);
- tfexcel.close();
-
- } else {
- messageBox("엑셀저장할 수혈내역이", "I004"); ///엑셀저장할 수혈내역이 없습니다.
- }
- ]]>
- </script>
- </button>
- <datagrid id="grd_blooddetail" nodeset="/root/main/bloodlist/bloodsummary/gridbloodsummary" caption="불출일시^투여일시^처방코드^처방명칭^수량^Filter^Irr^관련 검사 결과^관련 검사 결과^관련 검사 결과^관련 검사 결과^관련 검사 결과^심사여부^수혈사유확인^비고/출혈양상입력|불출일시^투여일시^처방코드^처방명칭^수량^Filter^Irr^Hb
(g/dl)^Hct
(%)^PLT
^PT
(%)^PTT
(sec)^심사여부^수혈사유확인^비고/출혈양상입력|불출일시^투여일시^처방코드^처방명칭^수량^Filter^Irr^Hb
(g/dl)^Hct
(%)^PLT
^PT
(%)^PTT
(sec)^심사여부^수혈사유확인^비고/출혈양상입력" colsep="^" colwidth="120, 105, 70, 170, 40, 40, 40, 45, 45, 45, 45, 45, 60, 120, 172" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" selectionmode="free" tooltip="true" style="left:0px; top:316px; width:1195px; height:425px; font-size:10pt; ">
- <col ref="execdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
- <col ref="tnsstrdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
- <col ref="prcpcd" style="text-align:center; "/>
- <col ref="prcpnm"/>
- <col ref="cnt" style="text-align:right; "/>
- <col ref="filter" type="combo" style="text-align:center; ">
- <choices>
- <item>
- <label/>
- <value/>
- </item>
- <item>
- <label>Y</label>
- <value>Y</value>
- </item>
- </choices>
- </col>
- <col ref="irr" type="combo" style="text-align:center; ">
- <choices>
- <item>
- <label/>
- <value/>
- </item>
- <item>
- <label>Y</label>
- <value>Y</value>
- </item>
- </choices>
- </col>
- <col ref="hb" style="text-align:right; "/>
- <col ref="hct" style="text-align:right; "/>
- <col ref="plt" style="text-align:right; "/>
- <col ref="pt" style="text-align:right; "/>
- <col ref="ptt" style="text-align:right; "/>
- <col ref="judgeyn" type="combo" style="text-align:center; ">
- <choices>
- <item>
- <label/>
- <value>-</value>
- </item>
- <item>
- <label>Y</label>
- <value>Y</value>
- </item>
- </choices>
- </col>
- <col ref="transresn" type="combo">
- <choices>
- <itemset nodeset="/root/init/P0479list/P0479">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="rem" type="input"/>
- <script type="javascript" ev:event="oncopy">
- <![CDATA[
- // 클립보드의 data 를 얻어온다
- var data = window.clipBoardData;
- // datagrid 에 선택된 셀을 얻어온다
- var selected = grd_blooddetail.selectedCells;
- var excelData = "";
- var miniCol = selected.item(i).col;
- var miniRow = selected.item(i).row;
- var maxCol = selected.item(i).col;
- var maxRow = selected.item(i).row;
-
- var cell;
- // col의 최대 최소 값을 구한다
- for(var i=1; i<selected.length; i++) {
- cell = selected.item(i);
- // 최대 col 겁색
- if( cell.col > maxCol ) maxCol = cell.col;
- // 최소 col 겁색
- if (cell.col < miniCol ) miniCol = cell.col;
- // 최대 row 검색
- if( cell.row > maxRow ) maxRow = cell.row;
- // 최소 row 검색
- if (cell.row < miniRow ) miniRow = cell.row;
- }
-
- // cell Data 를 클립보드에 excel 형태로 집어넣음
- for(var k=miniRow; k<=maxRow; k++) {
- for(var j=miniCol; j<=maxCol; j++) {
- var data = grd_blooddetail.valueMatrix(k,j);
- excelData += data;
- if( j != maxCol)
- excelData += "\t";
- }
-
- if( k != maxRow)
- excelData += "\n";
- }
-
- // 클립보드 데이터 변경
- window.clipBoardData = excelData;
- ]]>
- </script>
- <script type="javascript" ev:event="onpaste">
- <![CDATA[
- // 선택된 Cell을 얻어온다.
- var cells = grd_blooddetail.selectedCells;
- // 클립보드의 data를 얻어온다.
- var data = window.clipBoardData;
-
- var gridrow = grd_blooddetail.row;
- var gridcol = grd_blooddetail.col;
-
- var oldrow = gridrow;
- var oldcol = gridcol;
-
- if(cells.length == 1) {
- // 엔터 구분자를 기분으로 클립보드에 있던 데이터를 쪼갠다.
- var row = data.split("\r\n");
-
- for(i=0; i<row.length; i++)
- {
- gridcol = oldcol;
- var col = row[i].split("\t");
- for(j=0; j<col.length; j++)
- {
- if(col[j] != "")
- {
- grd_blooddetail.valuematrix(gridrow, gridcol) = col[j];
- }
-
- gridcol++;
- }
- grd_blooddetail.rowstatus(gridrow) = 2;
- gridrow++;
- }
- } else {
- // 엔터 구분자를 기분으로 클립보드에 있던 데이터를 쪼갠다.
- var row = data.split("\r\n");
- // column 단위로 데이터를 쪼갠다. 복사는 한줄만 가능하다.
- var col = row[0].split("\t");
-
- var cell;
- var miniCol = cells.item(i).col;
- var miniRow = cells.item(i).row;
- var maxCol = cells.item(i).col;
- var maxRow = cells.item(i).row;
-
- // col의 최대 최소 값을 구한다
- for(var i=1; i<cells.length; i++) {
- cell = cells.item(i);
- // 최대 col 겁색
- if( cell.col > maxCol ) maxCol = cell.col;
- // 최소 col 겁색
- if (cell.col < miniCol ) miniCol = cell.col;
- // 최대 row 검색
- if( cell.row > maxRow ) maxRow = cell.row;
- // 최소 row 검색
- if (cell.row < miniRow ) miniRow = cell.row;
- }
-
- // 선택된 Cell 갯수만큼 Loop 돈다.
- for(var k=0;k<cells.length;k++) {
- // Paste는 row단위로 이루어지므로 row가 바뀔때만 처리하도록 한다.
- if(k==0 || oldrow != cells.item(k).row) {
- gridcol = miniCol
- for(j=0; j<col.length; j++)
- {
- grd_blooddetail.valuematrix(cells.item(k).row, gridcol) = col[j];
-
- gridcol++;
- }
-
- grd_blooddetail.rowstatus(cells.item(k).row) = 2;
- oldrow = cells.item(k).row
- }
- }
- }
- ]]>
- </script>
- </datagrid>
- <button id="btn_save" class="btn5_letter3" disabled="false" style="left:1138px; top:289px; width:53px; height:19px; ">
- <caption>저 장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var row = grd_bloodpat.row;
- var insert_row = 1;
-
- //수혈내역Loop
- for(var i = 1; i < grd_blooddetail.rows; i++) {
- var rowstatus = grd_blooddetail.rowstatus(grd_blooddetail.fixedRows+(i-1));
-
- //rowstatus = "수정"
- if(rowstatus == 2) {
- var execdt = grd_blooddetail.valueMatrix(grd_blooddetail.fixedRows+(i-1),grd_blooddetail.colRef("execdt"));
- var prcpcd = grd_blooddetail.valueMatrix(grd_blooddetail.fixedRows+(i-1),grd_blooddetail.colRef("prcpcd"));
-
- //수혈개별처방node
- var node = "/root/main/bloodlist/blooddetail/gridblooddetail";
- var getCount = getNodesetCount(node);
-
- //수혈개별처방Loop돌면서 불출일시와 처방코드가 같은 처방 골라낸다.
- for(j=1; j<= getCount; j++) {
- var loop_execdt = model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ j +"]/execdt");
- var loop_prcpcd = model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ j +"]/prcpcd");
-
- if (execdt == loop_execdt && prcpcd == loop_prcpcd) {
- //수혈대상자의 pid
- model.makeValue("/root/senditem/list["+ insert_row +"]/pid", model.getValue("/root/main/bloodpat/gridbloodpat["+ row +"]/pid"));
-
- //수혈개별처방의 혈액번호,혈액바코드번호
- model.makeValue("/root/senditem/list["+ insert_row +"]/blodno", model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ j +"]/blodno"));
- model.makeValue("/root/senditem/list["+ insert_row +"]/blodbarcd", model.getValue("/root/main/bloodlist/blooddetail/gridblooddetail["+ j +"]/blodbarcd"));
-
- //수혈내역
- model.makeValue("/root/senditem/list["+ insert_row +"]/execdt", model.getValue("/root/main/bloodlist/bloodsummary/gridbloodsummary["+ i +"]/execdt"));
- model.makeValue("/root/senditem/list["+ insert_row +"]/prcpcd", model.getValue("/root/main/bloodlist/bloodsummary/gridbloodsummary["+ i +"]/prcpcd"));
- model.makeValue("/root/senditem/list["+ insert_row +"]/prcpnm", model.getValue("/root/main/bloodlist/bloodsummary/gridbloodsummary["+ i +"]/prcpnm"));
- model.makeValue("/root/senditem/list["+ insert_row +"]/judgeyn", model.getValue("/root/main/bloodlist/bloodsummary/gridbloodsummary["+ i +"]/judgeyn"));
- model.makeValue("/root/senditem/list["+ insert_row +"]/transresn", model.getValue("/root/main/bloodlist/bloodsummary/gridbloodsummary["+ i +"]/transresn"));
- model.makeValue("/root/senditem/list["+ insert_row +"]/rem", model.getValue("/root/main/bloodlist/bloodsummary/gridbloodsummary["+ i +"]/rem"));
-
- insert_row++;
- }
- }
- }
- }
-
- if(submit("TXPIZ01803")) {
- submit("TRPIZ01803");
- }
- ]]>
- </script>
- </button>
- <select id="checkbox1" ref="/root/send/labrsltflag" overflow="visible" appearance="full" style="left:765px; top:291px; width:73px; height:15px; border-style:none; ">
- <choices>
- <item>
- <label>결과조회</label>
- <value>01</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- grd_bloodpat.dispatch("ondblclick");
- ]]>
- </script>
- </select>
- <datagrid id="grd_summary" nodeset="/root/main/bloodlist/bloodsummary2/grdbloodsummary2" class="datagrid2" caption="처방코드^처방명칭^수량 소계" colsep="^" colwidth="110, 300, 70" dataheight="25" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:690px; top:99px; width:504px; height:180px; ">
- <col ref="prcpcd" style="text-align:center; "/>
- <col ref="prcpnm"/>
- <col ref="cnt" style="text-align:center; "/>
- </datagrid>
- <button id="button3" class="btn2_letter3" visibility="visible" _auth="P" style="left:1083px; top:289px; width:53px; height:19px; ">
- <caption>출 력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- exeReportPreview("RPPIZ01801", "XMLSTR", "","", "false","","","","","false");
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|