123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMLLP00700_특수검사의뢰서조회.xrw
- * 설 명 : 특수검사의뢰서조회
- * 설 계 자 : (주)에이씨케이 - 윤재한
- * 작 성 자 : (주)에이씨케이 -
- * 작 성 일 : 2007.08.27
- * 수정이력 :
- * 기 타 :
- -->
- <?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>
- <getspcltestlist>
- <chk/>
- <spcltestno/>
- <pid/>
- <patnm/>
- <sexage/>
- <brthdate/>
- <reqdr/>
- <orddeptnm/>
- <wardroom/>
- <tclsnm/>
- <spcnm/>
- <reqfrmcd/>
- <rrgstno/>
- <spcacptdt/>
- <reqcnts/>
- <descrslt/>
- <termhngnm/>
- <usernm/>
- <medispcdt/>
- <tclscd/>
- <spccd/>
- <deptengabbr/>
- <rack/>
- </getspcltestlist>
- <detltestlist>
- </detltestlist>
- <rsltlist>
- <rslt/>
- <cf/>
- </rsltlist>
- </main>
- <send>
- <codeflag/>
- <refflag/>
- <acptsdd/>
- <acptedd/>
- <spcltestgrup/>
- <seqsno/>
- <seqeno/>
- <worksdd/>
- <workedd/>
- <tclscdlist/>
- <tclsnmlist/>
- <tclscd/>
- <spccd/>
- <userdeptflagcd/>
- <pid/>
- <instcd/>
- </send>
- <init>
- </init>
- <hidden>
- <ref>
- <acptsdd/>
- <acptedd/>
- <spcltestgrup/>
- <seqsno/>
- <seqeno/>
- <worksdd/>
- <workedd/>
- <tclscdlist>
- <tclscdlist/>
- <tclsnmlist/>
- <tclscdlist2/>
- <testgrup/>
- </tclscdlist>
- </ref>
- <report/>
- </hidden>
- <temp>
- <slide/>
- <ip/>
- </temp>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fSetInit();
- ]]>
- </script>
- <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/LB0901"/>
- <submission id="TRLRP00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/spcltestlist"/>
- <submission id="TRLLF90401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/testgrupdetl"/>
- <submission id="TRLRP00702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/detltestlist"/>
- <submission id="TRLRP00703" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/rsltlist"/>
- <submission id="TRLRP00704" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/temp/"/>
- </model>
- <script type="javascript">
- <![CDATA[
-
- //초기화
- function fSetInit(ref) {
- if(ref != 2) {
- var today = getCurrentDate();
-
- model.setValue("/root/hidden/ref/acptsdd", today);
- model.setValue("/root/hidden/ref/acptedd", today);
- model.setValue("/root/hidden/ref/spcltestgrup", "00");
- model.setValue("/root/hidden/ref/seqsno", "");
- model.setValue("/root/hidden/ref/seqeno", "");
- model.setValue("/root/hidden/ref/worksdd", today);
- model.setValue("/root/hidden/ref/workedd", today);
- model.setValue("/root/hidden/ref/tclscdlist/tclsnmlist", "");
-
- model.removeNodeset("/root/main/getspcltestlist");
- model.removeNodeset("/root/init/LB0005");
- model.removeNodeset("/root/hidden/report");
-
- grd_spcltestlist.fixedcellcheckbox(0, 1) = true;
- model.toggle("spcltestno");
- btn_spcltestno.selected = true;
- }
- model.removeNodeset("root/init");
-
- model.setValue("/root/send/codeflag", "0005|0000|0103|0124|"); //0005 : 의뢰서 서식, 0000 : 유저 과플래그 조회, 0103 : 사용자별검사그룹
- model.makeValue("/root/send/basecdid", "spcl"); //0005 : 의뢰서 서식, 0000 : 유저 과플래그 조회, 0103 : 사용자별검사그룹
-
- submit("TRLZZ00101");
-
- model.refresh();
- }
-
- //조회
- function fGetSpclTestList() {
- model.removeNodeset("/root/main/getspcltestlist");
-
- if(btn_spcltestno.selected) {
- model.setValue("/root/send/acptsdd", model.getValue("/root/hidden/ref/acptsdd"));
- model.setValue("/root/send/acptedd", model.getValue("/root/hidden/ref/acptedd"));
- model.setValue("/root/send/spcltestgrup", model.getValue("/root/hidden/ref/spcltestgrup"));
- model.setValue("/root/send/seqsno", model.getValue("/root/hidden/ref/seqsno"));
- model.setValue("/root/send/seqeno", model.getValue("/root/hidden/ref/seqeno"));
- model.setValue("/root/send/userdeptflagcd", model.getValue("/root/init/LB0000/nm"));
- model.setValue("/root/send/refflag", "1");
- } else if(btn_testitem.selected) {
- model.setValue("/root/send/worksdd", model.getValue("/root/hidden/ref/worksdd"));
- model.setValue("/root/send/workedd", model.getValue("/root/hidden/ref/workedd"));
- model.setValue("/root/send/tclscdlist", model.getValue("/root/hidden/ref/tclscdlist/tclscdlist"));
- model.setValue("/root/send/userdeptflagcd", model.getValue("/root/init/LB0000/nm"));
- model.setValue("/root/send/refflag", "2");
- }
-
- submit("TRLRP00701");
- }
-
- //검사그룹조회
- function fSelectTestGrup(){
- model.makeValue("/root/send/testgrupnm", cmb_testitem.label);
- submit("TRLLF90401" ,false);
-
-
- fSetPopUpTclscdList();
- }
-
- function fSetPopUpTclscdList(){
- var count = getNodesetCount("/root/main/testgrupdetl");
- if(count > 0){
-
- var sendtclsnm = model.getValue("/root/main/testgrupdetl[1]/tclsnm");
- var sendtclscd = model.getValue("/root/main/testgrupdetl[1]/tclscd");
- var sendtclscd2 = model.getValue("/root/main/testgrupdetl[1]/tclscd");
-
-
- // 검사그룹 상세 목록 없을때
- if(sendtclsnm == ""){
- model.setValue("/root/hidden/tclscdlist/tclscdlist", "");
- model.setValue("/root/hidden/tclscdlist/tclsnmlist", "");
-
- }else{ // 검사그룹 상세 목록 있을때
- for(i=2; i<= count; i++){
- sendtclsnm = sendtclsnm + ", " + model.getValue("/root/main/testgrupdetl["+i+"]/tclsnm");
- //sendtclscd = sendtclscd + "▦" + model.getValue("/root/main/testgrupdetl["+i+"]/tclscd");
- sendtclscd = sendtclscd + "','" + model.getValue("/root/main/testgrupdetl["+i+"]/tclscd");
- sendtclscd2 = sendtclscd2 + "▦" + model.getValue("/root/main/testgrupdetl["+i+"]/tclscd");
- }
- model.setValue("/root/hidden/ref/tclscdlist/tclsnmlist", sendtclsnm);
- model.setValue("/root/hidden/ref/tclscdlist/tclscdlist", "'" + sendtclscd + "'");
- model.setValue("/root/hidden/ref/tclscdlist/tclscdlist2", sendtclscd2);
-
- }
- model.refresh();
- }
- }
-
- //출력
- function fPrint(){
- var find = null;
-
- model.removeNodeset("/root/hidden/report");
- model.makeNode("/root/hidden/report");
-
- for(i=1; i < grd_spcltestlist.rows; i++) {
- model.removeNodeset("/root/main/rslt");
- model.removeNodeset("/root/main/cf");
-
- find = grd_spcltestlist.findRow("Y", i, 1, true);
-
- if(find < 0 ) {
- break;
- }
-
- //골수 결과
- if(model.getValue("/root/main/getspcltestlist["+find+"]/reqcnts/reqfrminfo/inptitem01/initial") == "Initial") {
- model.setValue("/root/main/getspcltestlist["+find+"]/reqcnts/reqfrminfo/inptitem01/initial", "Initial");
- } else if(model.getValue("/root/main/getspcltestlist["+find+"]/reqcnts/reqfrminfo/inptitem01/fu") == "F/U") {
- model.setValue("/root/main/getspcltestlist["+find+"]/reqcnts/reqfrminfo/inptitem01/initial", "F/U");
- } else if(model.getValue("/root/main/getspcltestlist["+find+"]/reqcnts/reqfrminfo/inptitem01/others") == "Others") {
- model.setValue("/root/main/getspcltestlist["+find+"]/reqcnts/reqfrminfo/inptitem01/initial", "Others");
- }
-
- copyNodeListType("/root/hidden/report", "/root/main/getspcltestlist["+ find +"]", "after");
-
- var report = getNodesetCount("/root/hidden/report/getspcltestlist");
-
-
- model.setValue("/root/send/pid", model.getValue("/root/main/getspcltestlist["+ find +"]/pid"));
- model.makeValue("/root/send/bcno", model.getValue("/root/main/getspcltestlist["+ find +"]/bcno"));
- model.setValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
- //model.setValue("/root/send/instcd", "012");
-
- submit("TRLRP00703");
-
- //CBC 검사결과
- model.makeNode("/root/hidden/report/getspcltestlist["+ report +"]/rbc/tcls");
- model.makeNode("/root/hidden/report/getspcltestlist["+ report +"]/rbc/rslt");
- model.makeNode("/root/hidden/report/getspcltestlist["+ report +"]/rbc/tcls2");
- model.makeNode("/root/hidden/report/getspcltestlist["+ report +"]/rbc/rslt2");
-
- var count = getNodesetCount("/root/main/rslt");
- var tclslist = "";
- var rsltlist = "";
- var tclslist2 = "";
- var rsltlist2 = "";
- var tcls = "";
- var lastreptdt = 0;
-
- for(j = 1; j <= count; j++) {
- tcls = model.getValue("/root/main/rslt["+ j +"]/tclscd");
- if(tcls.substr(3, 3) != "105") {
- tclslist = tclslist + model.getValue("/root/main/rslt["+ j +"]/tclsnm") + "\n";
- rsltlist = rsltlist + model.getValue("/root/main/rslt["+ j +"]/reptrslt") + "\n";
- } else if(tcls.substr(3, 3) == "105") {
- tclslist2 = tclslist2 + model.getValue("/root/main/rslt["+ j +"]/tclsnm") + "\n";
- rsltlist2 = rsltlist2 + model.getValue("/root/main/rslt["+ j +"]/reptrslt") + "\n";
- }
- lastreptdt = Math.max(lastreptdt, parseInt(model.getValue("/root/main/rslt["+ j +"]/lastreptdt"))); //결과 보고일은 가장 최근 일자
- }
-
- model.setValue("/root/hidden/report/getspcltestlist["+ report +"]/rbc/tcls", tclslist);
- model.setValue("/root/hidden/report/getspcltestlist["+ report +"]/rbc/rslt", rsltlist);
- model.setValue("/root/hidden/report/getspcltestlist["+ report +"]/rbc/tcls2", tclslist2);
- model.setValue("/root/hidden/report/getspcltestlist["+ report +"]/rbc/rslt2", rsltlist2);
- model.makeNode("/root/hidden/report/getspcltestlist["+ report +"]/rbc/tm");
- model.setValue("/root/hidden/report/getspcltestlist["+ report +"]/rbc/tm", lastreptdt);
-
- //CF 검사결과
- /* model.makeNode("/root/hidden/report/getspcltestlist["+ report +"]/rbc/ptno");
- model.makeNode("/root/hidden/report/getspcltestlist["+ report +"]/rbc/inter");
- model.makeNode("/root/hidden/report/getspcltestlist["+ report +"]/rbc/readdd");
- model.makeNode("/root/hidden/report/getspcltestlist["+ report +"]/rbc/drnm");
-
- var count = getNodesetCount("/root/main/cf");
- var ptno = "";
- var inter = "";
- var readdd = "";
- var drnm = "";
-
- for(j = 1; j <= count; j++) {
- ptno = ptno + model.getValue("/root/main/cf["+ j +"]/dispptno") + "\n";
- inter = inter + model.getValue("/root/main/cf["+ j +"]/inter") + "\n";
- readdd = readdd + model.getValue("/root/main/cf["+ j +"]/readdd") + "\n";
- drnm = drnm + model.getValue("/root/main/cf["+ j +"]/readdrnm") + "\n";
- }
-
- model.setValue("/root/hidden/report/getspcltestlist["+ report +"]/rbc/ptno", ptno);
- model.setValue("/root/hidden/report/getspcltestlist["+ report +"]/rbc/inter", inter);
- model.setValue("/root/hidden/report/getspcltestlist["+ report +"]/rbc/readdd", readdd);
- model.setValue("/root/hidden/report/getspcltestlist["+ report +"]/rbc/drnm", drnm);*/
-
-
- var count = getNodesetCount("/root/main/cf");
- var ptno = "";
- var inter = "";
- var readdd = "";
- var drnm = "";
-
- for(j = 1; j <= count; j++) {
- model.makeNode("/root/hidden/report/getspcltestlist["+ report +"]/cf["+ j +"]");
-
- copyNodeType("/root/hidden/report/getspcltestlist["+ report +"]/cf["+ j +"]", "/root/main/cf["+ j +"]");
- }
-
- //model.setValue("/root/send/tclscd", model.getValue("/root/main/getspcltestlist["+ find +"]/tclscd"));
- model.setValue("/root/send/spccd", model.getValue("/root/main/getspcltestlist["+ find +"]/spccd"));
- model.makeValue("/root/send/prcpgenrflag", model.getValue("/root/main/getspcltestlist["+ find +"]/prcpgenrflag"));
- model.makeValue("/root/send/bcno", model.getValue("/root/main/getspcltestlist["+ find +"]/bcno"));
-
- submit("TRLRP00702");
-
- model.makeValue("/root/hidden/report/getspcltestlist["+ report +"]/termengnm", model.getValue("/root/main/detltestlist/termengnm"));
- model.makeValue("/root/hidden/report/getspcltestlist["+ report +"]/sepotel", model.getvalue("/root/init/LB0124/etc03")); // 세포유전 전화번호
-
- //검사명
- //model.makeNode("/root/hidden/report/getspcltestlist["+ report +"]/tclsnm");
-
- //var count = getNodesetCount("/root/main/detltestlist");
- //var testlist = "";
-
- //for(j = 1; j <= count; j++) {
- // testlist = testlist + model.getValue("/root/main/detltestlist["+j+"]/tclsnm") + "\n";
- //}
-
- // model.setValue("/root/hidden/report/getspcltestlist["+ report +"]/tclsnm", testlist);
-
- i = find;
- }
-
- var flag = model.getValue("/root/hidden/report/getspcltestlist/reqfrmcd");
-
- /* switch(flag) {
- case "01" :
- exeReportPreview("RPLRP00100", "XMLSTR", "/root/hidden/report"); //골수검사의뢰서
- break;
- case "02" :
- exeReportPreview("RPLRP00200", "XMLSTR", "/root/hidden/report"); //분자생물학부의뢰서
- break;
- case "03" :
- exeReportPreview("RPLRP00300", "XMLSTR", "/root/hidden/report"); //산전검사의뢰서
- break;
- case "04" :
- exeReportPreview("RPLRP00400", "XMLSTR", "/root/hidden/report"); //세포유전학검사의뢰서
- break;
- case "05" :
- exeReportPreview("RPLRP00500", "XMLSTR", "/root/hidden/report"); //장기이식의뢰서
- break;
- case "06" :
- exeReportPreview("RPLRP00600", "XMLSTR", "/root/hidden/report"); //TDM 의뢰서
- break;
- }*/
-
- // if(flag == "01") {
-
- if(flag == "13"){
- exeReportPreview("RPLRP92000", "XMLSTR", "/root/hidden/report"); //13_아산병원유전자검사의뢰서
- }
- else if(flag == "01"){
- exeReportPreview("RPLRP90100", "XMLSTR", "/root/hidden/report"); //01_골수검사의뢰서
- }
- else if(flag == "02"){
- exeReportPreview("RPLRR90200", "XMLSTR", "/root/hidden/report"); //02_분자생물학부의뢰서
- }
- else if(flag == "03"){
- exeReportPreview("RPLRR90300", "XMLSTR", "/root/hidden/report"); //03_산전검사의뢰서
- }
- else if(flag == "04"){
- exeReportPreview("RPLRR90400", "XMLSTR", "/root/hidden/report"); //04_세포유전학검사의뢰서
- }
- else if(flag == "05"){
- exeReportPreview("RPLRP90500", "XMLSTR", "/root/hidden/report"); //05_장기이식검사의뢰서
- }
- else if(flag == "06"){
- exeReportPreview("RPLRP90600", "XMLSTR", "/root/hidden/report"); //06_TDM의뢰서
- }
- else if(flag == "09"){
- exeReportPreview("RPLRR91300", "XMLSTR", "/root/hidden/report"); //09_염색체검사의뢰서
- }
- else if(flag == "11"){
- exeReportPreview("RPLRP91900", "XMLSTR", "/root/hidden/report"); //11_AMH 검사의뢰서
- }
- else if(flag == "12"){
- exeReportPreview("RPLRP92100", "XMLSTR", "/root/hidden/report"); //12_서울대유전자검사의뢰서
- }
- else if(flag == "14"){
- exeReportPreview("RPLRP92200", "XMLSTR", "/root/hidden/report"); //14_삼성서울병원유전자검사의뢰서
- }
- else if(flag == "15"){
- exeReportPreview("RPLRP91800", "XMLSTR", "/root/hidden/report"); //15_기생충항체검사의뢰서
- }
- else if(flag == "16"){
- exeReportPreview("RPLRP92300", "XMLSTR", "/root/hidden/report"); //16_삼성서울병원 약물의뢰서
- }
- else if(flag == "17"){
- exeReportPreview("RPLRP92400", "XMLSTR", "/root/hidden/report"); //17_말라리아검사의뢰서
- }
- else{
- exeReportPreview("RPLRP00100", "XMLSTR", "/root/hidden/report"); //10_PB M의뢰서
- }
- /* }
-
- if(flag == "02") {
- exeReportPreview("RPLRP00200", "XMLSTR", "/root/hidden/report"); //분자생물학부의뢰서
- }
-
- if(flag == "03") {
- exeReportPreview("RPLRP00300", "XMLSTR", "/root/hidden/report"); //산전검사의뢰서
- }
-
- if(flag == "04") {
- exeReportPreview("RPLRP00400", "XMLSTR", "/root/hidden/report"); //세포유전학검사의뢰서
- }
-
- if(flag == "05") {
- exeReportPreview("RPLRP00500", "XMLSTR", "/root/hidden/report"); //장기이식의뢰서
- }
-
- if(flag == "06") {
- exeReportPreview("RPLRP00600", "XMLSTR", "/root/hidden/report"); //TDM 의뢰서
- }*/
- }
- function fListPrint(){
- model.removeNodeset("/root/hidden/report");
- model.makeNode("/root/hidden/report");
-
- // model.makeValue("/root/hidden/report/no","");
- // model.makeValue("/root/hidden/report/spcltestno","");
- // model.makeValue("/root/hidden/report/pid","");
- // model.makeValue("/root/hidden/report/patnm","");
- // model.makeValue("/root/hidden/report/sexage","");
- // model.makeValue("/root/hidden/report/brthdate","");
- // model.makeValue("/root/hidden/report/reqdr","");
- // model.makeValue("/root/hidden/report/orddeptnm","");
- // model.makeValue("/root/hidden/report/wardroom","");
- // model.makeValue("/root/hidden/report/tclsnm","");
- // model.makeValue("/root/hidden/report/spcnm","");
-
- /*
- model.setValue("/root/send/deptgbn", model.getValue("/root/hidden/ref/deptgbn"));
- model.setValue("/root/send/deptL", model.getValue("/root/hidden/ref/deptL"));
- model.setValue("/root/send/deptM", model.getValue("/root/hidden/ref/deptM"));
- model.setValue("/root/send/worklistdd", model.getValue("/root/hidden/ref/worklistdd"));
- model.setValue("/root/send/worklisttodd", model.getValue("/root/hidden/ref/worklisttodd"));
- model.setValue("/root/send/worklistsno", model.getValue("/root/hidden/ref/worklistsno"));
- model.setValue("/root/send/worklisteno", model.getValue("/root/hidden/ref/worklisteno"));
-
- // 검사항목 cd, nm
- model.setValue("/root/send/tclscdlist", model.getValue("/root/hidden/ref/tclscdlist/tclscdlist"));
- model.setValue("/root/send/tclsnmlist", model.getValue("/root/hidden/ref/tclscdlist/tclsnmlist"));
- */
- //var bcno = "''";
- var bcno = "";
- count = 0;
- for(i = 1; i <= getNodesetCount("/root/main/getspcltestlist"); i++) {
- var find = grd_spcltestlist.findRow("Y", i, 1, true, true);
- bcno = model.getValue("/root/main/getspcltestlist[" + i + "]/bcno");
- if(find < 0) {
- break;
- }else{
- //bcno = bcno + ",'" + model.getValue("/root/main/worklistdetl["+ find +"]/bcno") + "'";
- if( bcno == model.getValue("/root/main/getspcltestlist[" + find + "]/bcno")){
- ++count;
- model.makeValue("/root/hidden/report["+ count +"]/no", count);
- model.makeValue("/root/hidden/report["+ count +"]/spcltestno",model.getValue("/root/main/getspcltestlist["+ i +"]/spcltestno"));
- model.makeValue("/root/hidden/report["+ count +"]/pid",model.getValue("/root/main/getspcltestlist["+ i +"]/pid"));
- model.makeValue("/root/hidden/report["+ count +"]/patnm",model.getValue("/root/main/getspcltestlist["+ i +"]/patnm"));
- model.makeValue("/root/hidden/report["+ count +"]/sexage",model.getValue("/root/main/getspcltestlist["+ i +"]/sexage"));
- model.makeValue("/root/hidden/report["+ count +"]/brthdate",model.getValue("/root/main/getspcltestlist["+ i +"]/brthdate"));
- model.makeValue("/root/hidden/report["+ count +"]/reqdr",model.getValue("/root/main/getspcltestlist["+ i +"]/reqdr"));
- model.makeValue("/root/hidden/report["+ count +"]/orddeptnm",model.getValue("/root/main/getspcltestlist["+ i +"]/orddeptnm"));
- model.makeValue("/root/hidden/report["+ count +"]/wardroom",model.getValue("/root/main/getspcltestlist["+ i +"]/wardroom"));
- model.makeValue("/root/hidden/report["+ count +"]/tclsnm",model.getValue("/root/main/getspcltestlist["+ i +"]/tclsprntnm"));
- model.makeValue("/root/hidden/report["+ count +"]/spcnm",model.getValue("/root/main/getspcltestlist["+ i +"]/spcnm"));
- model.makeValue("/root/hidden/report["+ count +"]/rack",model.getValue("/root/main/getspcltestlist["+ i +"]/rack"));
- }
- else{}
-
- // i = find;
- //// alert(bcno);
- // count++;
- }
- }
-
- if(count < 1){
- messageBox("출력할", "E013");
- return;
- }
-
- //model.makeValue("/root/send/bcno", bcno);
-
-
-
- //copyNodeListType("/root/hidden/report", "/root/main/worklistdetl");
- //var count = getNodesetCount("/root/hidden/report/worklistdetl");
-
- // for(i = 1; i <= count; i++) {
- // var spc = grd_worklistdetl.labelMatrix(i, 9);
- // var length = spc.length;
- // model.setValue("/root/hidden/report/worklistdetl["+ i +"]/spccd", spc.substr(6, length));
- // }
-
- exeReportPreview("RPLRP00500", "XMLSTR");
- }
-
-
- function fSlidePrint(){
- model.removeNodeset("/root/temp/slide");
- model.removeNodeset("/root/temp/ip");
- var pidno = "";
- var spcltestno = "";
-
- var count = 0;
-
- for(i = 1 ; i < grd_spcltestlist.rows ; i++){
- var chk = model.getValue("/root/main/getspcltestlist["+i+"]/chk");
- if(chk == "Y"){
- pidno = model.getValue("/root/main/getspcltestlist["+i+"]/pid");
- spcltestno = model.getValue("/root/main/getspcltestlist["+i+"]/spcltestno");
- count ++;
- }
- if(count > 1){
- alert("슬라이드 출력은 한개만 가능 합니다.");
- return;
- }
- }
- model.makeValue("/root/send/slidegbn", "1");
- model.makeValue("/root/send/pidno", pidno);
- model.makeValue("/root/send/spcltestno", spcltestno);
- submit("TRLRP00704");
-
- var slideprnt = getNodesetCount("/root/temp/slide");
-
- if(slideprnt > 0){
- sSlidBcIP = model.getValue("/root/temp/ip/slideip");
- sSlidBcPort = model.getValue("/root/temp/ip/slideport");
-
- //----------------------------------------
- if (sSlidBcIP == "" || sSlidBcIP == "-") {
- messageBox("슬라이드 라벨지 장비의 IP주소가 없습니다. 병원별 환경설정에서 ", "C001");
- return false;
- }
- //--------------------------------------------
- if (sSlidBcPort == "" || sSlidBcPort == "-"){
- messageBox("슬라이드 라벨지 장비의 Port번호가 없습니다. 병원별 환경설정에서 ", "C001");
- return false;
- }
- //-------------------------------------
- socket.connect(sSlidBcIP, sSlidBcPort);
- }
- }
-
-
- function fEXESlidePrint(){
- var iMaxRowCnt = 0;
- var sSlidNode = "/root/temp/slide";
- //--------------------------------------
- iMaxRowCnt = getNodesetCount(sSlidNode);
-
- for (var iRowNo=1; iRowNo <= iMaxRowCnt; iRowNo++) {
-
-
- for(var i = 1 ; i <= model.getValue(sSlidNode+"["+iRowNo+"]/prntcnt") ; i++){
-
- var patnm= getNameInitial(model.getValue(sSlidNode+"["+iRowNo+"]/patnm"))
- var etc1 = model.getValue(sSlidNode+"["+iRowNo+"]/etc1");
- if(etc1 == ""){
- etc1 = "-";
- }
- sSendMsg = "S▦"; //슬라이드구분
- sSendMsg += model.getValue(sSlidNode+"["+iRowNo+"]/spclno") + "▦"; // 특수검사연번호
- sSendMsg += patnm + "▦"; // 환자명
- sSendMsg += etc1 + "▦";
- sSendMsg += model.getValue(sSlidNode+"["+iRowNo+"]/workdd") + "▦"; // 접수일시
- sSendMsg += model.getValue(sSlidNode+"["+iRowNo+"]/etc2") + "▦";
- sSendMsg += model.getValue(sSlidNode+"["+iRowNo+"]/hospnm") + "▩"; // 병원명
-
- //sSendMsg += "▩";
- socket.sendString(sSendMsg);
- }
- }
- socket.close();
- }
-
-
- function fBlockPrint(){
- model.removeNodeset("/root/temp/slide");
- model.removeNodeset("/root/temp/ip");
- var pidno = "";
- var spcltestno = "";
-
- var count = 0;
-
- for(i = 1 ; i < grd_spcltestlist.rows ; i++){
- var chk = model.getValue("/root/main/getspcltestlist["+i+"]/chk");
- if(chk == "Y"){
- pidno = model.getValue("/root/main/getspcltestlist["+i+"]/pid");
- spcltestno = model.getValue("/root/main/getspcltestlist["+i+"]/spcltestno");
- count ++;
- }
- if(count > 1){
- alert("블럭 출력은 한개만 가능 합니다.");
- return;
- }
- }
- model.makeValue("/root/send/slidegbn", "2");
- model.makeValue("/root/send/pidno", pidno);
- model.makeValue("/root/send/spcltestno", spcltestno);
- submit("TRLRP00704");
-
-
- var slideprnt = getNodesetCount("/root/temp/slide");
-
- if(slideprnt > 0){
- sSlidBcIP = model.getValue("/root/temp/ip/casetip");
- sSlidBcPort = model.getValue("/root/temp/ip/casetport");
-
- //----------------------------------------
- if (sSlidBcIP == "" || sSlidBcIP == "-") {
- messageBox("슬라이드 라벨지 장비의 IP주소가 없습니다. 병원별 환경설정에서 ", "C001");
- return false;
- }
- //--------------------------------------------
- if (sSlidBcPort == "" || sSlidBcPort == "-"){
- messageBox("슬라이드 라벨지 장비의 Port번호가 없습니다. 병원별 환경설정에서 ", "C001");
- return false;
- }
- //-------------------------------------
- socket2.connect(sSlidBcIP, sSlidBcPort);
- }
- }
-
- function fEXEBlockPrint(){
-
- var iMaxRowCnt = 0;
- var sSlidNode = "/root/temp/slide";
- //--------------------------------------
- iMaxRowCnt = getNodesetCount(sSlidNode);
-
- for (var iRowNo=1; iRowNo <= iMaxRowCnt; iRowNo++) {
-
- var patnm= getNameInitial(model.getValue(sSlidNode+"["+iRowNo+"]/patnm"))
- var etcvalue = model.getValue(sSlidNode+"["+iRowNo+"]/etc");
- var etcMark = "";
- if(etcvalue.indexOf("C") == -1){
- etcMark = "1";
- }
- else{
- etcMark = "2";
- }
-
-
- sSendMsg = "C▦"; //카세트구분
- sSendMsg += model.getValue(sSlidNode+"["+iRowNo+"]/spclno") + "▦"; // 특수검사연번호
- sSendMsg += etcMark + "▦"; //후퍼
- sSendMsg += model.getValue(sSlidNode+"["+iRowNo+"]/etc") + "▦";
- sSendMsg += patnm + "▩"; // 환자명
-
- //sSendMsg += "▩";
- socket2.sendString(sSendMsg);
- }
- socket2.close();
- }
-
-
-
- function getNameInitial(nameStr){
- //받은 이름 문자열을 스페이스바로 분리
- var part = nameStr.split(' ');
-
- var str = "";
- var nameChr = "";
- var chr;
- var cnt = 3;
-
- //영문이름을 위한 대문자 변환
- nameStr = nameStr.toUpperCase();
- //스페이스로 구분되어 있는 이름(영문)의 경우 첫단어와 마지막 단어의 이니셜만 처리
- if(part.length>1){
- if(part[0].length == 0) part[0] = " ";
- if(part[part.length-1].length == 0) part[part.length-1] = " ";
- nameChr = part[0].substr(0,1) + "." + part[part.length-1].substr(0,1);
- }
- else{
- nameChr = part[0];
- }
-
- //변환할 값이 0보다 큰지 확인
- if(nameChr.length < cnt) cnt = nameChr.length;
- if(cnt <= 0) return str;
-
- //영문일 때를 위해 대문자로 변환
- nameChr = nameChr.toUpperCase();
-
- for(i=0;i<cnt;i++){
- chr = nameChr.substr(i,1).charCodeAt(0);
- if(chr<128) str = str + nameChr.substr(i,1);
- else{
- switch(nameChr.substr(i,1)){
- case "박":
- str = str + "P";
- break;
- case "김":
- str = str + "K";
- break;
- case "이":
- if(i==0) str = str + "L";
- else str = str + "I";
- break;
- default :
- if(chr>=44032 && chr<45208) str = str + "G";
- else if(chr>=45208 && chr<45796) str = str + "N";
- else if(chr>=45796 && chr<46972) str = str + "D";
- else if(chr>=46972 && chr<47560) str = str + "R";
- else if(chr>=47560 && chr<48148) str = str + "M";
- else if(chr>=48148 && chr<49324) str = str + "B";
- else if(chr>=49324 && chr<50500) str = str + "S";
- else if(chr>=50500 && chr<50556) str = str + "A";
- else if(chr>=50556 && chr<50612) str = str + "Y";
- else if(chr>=50612 && chr<50668) str = str + "E";
- else if(chr>=50668 && chr<50724) str = str + "Y";
- else if(chr>=50724 && chr<50752) str = str + "O";
- else if(chr>=50752 && chr<50808) str = str + "W";
- else if(chr>=50808 && chr<50836) str = str + "O";
- else if(chr>=50836 && chr<50864) str = str + "Y";
- else if(chr>=50864 && chr<50892) str = str + "U";
- else if(chr>=50892 && chr<50976) str = str + "W";
- else if(chr>=50976 && chr<51004) str = str + "Y";
- else if(chr>=51004 && chr<51032) str = str + "E";
- else if(chr>=51032 && chr<51060) str = str + "U";
- else if(chr>=51060 && chr<51088) str = str + "I";
- else if(chr>=51088 && chr<52264) str = str + "J";
- else if(chr>=52264 && chr<52852) str = str + "C";
- else if(chr>=52852 && chr<53440) str = str + "K";
- else if(chr>=53440 && chr<54028) str = str + "T";
- else if(chr>=54028 && chr<54616) str = str + "P";
- else if(chr>=54616 && chr<55203) str = str + "H";
- else str = str + " ";
- break;
- }
- }
- }
-
- return str;
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
- <line id="line1" class="line_1" style="x1:0px; y1:102px; x2:1194px; y2:102px; "/>
- <caption id="caption1" class="tit_2" style="left:5px; top:87px; width:139px; height:13px; ">특수검사의뢰 리스트</caption>
- <button id="btn_spcltestno" class="btn_sw" group="ㅅtab" style="left:0px; top:10px; width:100px; height:22px; color:#000000; ">
- <caption>특수검사번호별</caption>
- <toggle case="spcltestno" ev:event="DOMActivate"/>
- </button>
- <button id="btn_testitem" class="btn_sw" group="ㅅtab" style="left:99px; top:10px; width:100px; height:22px; color:#000000; ">
- <caption>검사항목별</caption>
- <toggle case="testitem" ev:event="DOMActivate"/>
- </button>
- <switch id="switch1" class="sw_box" style="left:0px; top:30px; width:1195px; height:47px; ">
- <case id="spcltestno" selected="true">
- <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:5px; top:5px; width:1183px; height:35px; "/>
- <caption id="caption5" class="search_name" style="left:20px; top:14px; width:99px; height:17px; ">접수일자 :</caption>
- <caption id="caption8" class="search_name" style="left:315px; top:14px; width:112px; height:17px; ">의뢰서 서식 :</caption>
- <caption id="caption9" class="search_name" style="left:560px; top:14px; width:92px; height:17px; ">일련번호 :</caption>
- <button id="btn_ref" class="btn1_letter2" style="left:1117px; top:12px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetSpclTestList();
- ]]>
- </script>
- </button>
- <line id="line3" class="line_4" style="x1:1102px; y1:11px; x2:1102px; y2:33px; "/>
- <input id="acptsdd" ref="/root/hidden/ref/acptsdd" class="input_search" inputtype="date" style="left:110px; top:13px; width:85px; height:19px; "/>
- <input id="acptedd" ref="/root/hidden/ref/acptedd" class="input_search" inputtype="date" style="left:215px; top:13px; width:85px; height:19px; "/>
- <caption id="caption10" class="search_no_b" style="left:200px; top:15px; width:15px; height:20px; ">~</caption>
- <select1 id="cmb_spcltestgrup" ref="/root/hidden/ref/spcltestgrup" class="combo_s_essential" appearance="minimal" style="left:430px; top:13px; width:110px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/LB0005">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption11" class="search_no_b" style="left:738px; top:15px; width:15px; height:17px; ">~</caption>
- <input id="seqsno" ref="/root/hidden/ref/seqsno" class="input_search" style="left:650px; top:13px; width:85px; height:19px; "/>
- <input id="seqeno" ref="/root/hidden/ref/seqeno" class="input_search" style="left:755px; top:13px; width:85px; height:19px; "/>
- </case>
- <case id="testitem">
- <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:5px; top:5px; width:1183px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <button id="button1" class="btn1_letter2" style="left:1117px; top:12px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetSpclTestList();
- ]]>
- </script>
- </button>
- <line id="line4" class="line_4" style="x1:1102px; y1:11px; x2:1102px; y2:33px; "/>
- <caption id="caption12" class="search_no_b" style="left:200px; top:15px; width:15px; height:20px; ">~</caption>
- <caption id="caption13" class="search_name" style="left:20px; top:14px; width:89px; height:17px; ">작업일자 :</caption>
- <input id="worksdd" ref="/root/hidden/ref/worksdd" class="input_search" inputtype="date" style="left:110px; top:13px; width:85px; height:19px; "/>
- <input id="workedd" ref="/root/hidden/ref/workedd" class="input_search" inputtype="date" style="left:215px; top:13px; width:85px; height:19px; "/>
- <caption id="caption14" class="search_name" style="left:315px; top:14px; width:89px; height:17px; ">검사항목 :</caption>
- <img id="img1" class="icon_search" style="left:947px; top:15px; width:16px; height:16px; ">
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- modal("SMLLF90400", 200, 300, 200, "", "/root/hidden/ref/tclscdlist/testgrup", "/root/hidden/tclscdlist/testgrup");
- ]]>
- </script>
- </img>
- <input id="ipt_tclscdlist" ref="/root/hidden/ref/tclscdlist/tclsnmlist" class="input_s_essential" style="left:546px; top:13px; width:396px; height:19px; "/>
- <select1 id="cmb_testitem" ref="/root/hidden/ref/tclscdlist/testgrup" class="combo_search" appearance="minimal" style="left:407px; top:13px; width:136px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/LB0103">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fSelectTestGrup();
- ]]>
- </script>
- </select1>
- </case>
- </switch>
- <datagrid id="grd_spcltestlist" nodeset="/root/main/getspcltestlist" caption="^접수일시^특수검사번호^등록번호^성명^성별/나이^생년월일^의뢰의사^진료과^병동/병실^검사명^검체명^의뢰서양식코드^주민등록번호^접수일자^의뢰내용^서술결과^상병명^전문의^전문일시" colsep="^" colwidth="40, 120, 130, 80, 80, 60, 80, 78, 78, 98, 200, 150, 0, 0, 0, 0, 0, 0, 0" dataheight="23" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:107px; width:1194px; height:621px; ">
- <col checkvalue="Y,N" ref="chk" type="checkbox"/>
- <col ref="spcacptdt" format="yyyy-mm-dd hh:nn"/>
- <col ref="spcltestno"/>
- <col ref="pid"/>
- <col ref="patnm"/>
- <col ref="sexage" style="text-align:center; "/>
- <col ref="brthdate" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="reqdr"/>
- <col ref="orddeptnm"/>
- <col ref="wardroom"/>
- <col ref="tclsnm"/>
- <col ref="spcnm"/>
- <col ref="reqfrmcd"/>
- <col ref="rrgstno"/>
- <col ref="reqcnts"/>
- <col ref="descrslt"/>
- <col ref="termhngnm"/>
- <col ref="usernm"/>
- <col ref="medispcdt"/>
- </datagrid>
- <datagrid id="grd_print" nodeset="/root/hidden/report" visibility="hidden" caption="NO^특수검사번호^등록번호^성명^성별/나이^생년월일^의뢰의사^진료과^병동/병실^검사명^검체명" colsep="^" colwidth="100, 100, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:365px; top:185px; width:645px; height:150px; ">
- <col ref="no"/>
- <col ref="spcltestno"/>
- <col ref="pid"/>
- <col ref="patnm"/>
- <col ref="sexage" style="text-align:center; "/>
- <col ref="brthdate" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="reqdr"/>
- <col ref="orddeptnm"/>
- <col ref="wardroom"/>
- <col ref="tclsnm"/>
- <col ref="spcnm"/>
- <col ref="reqfrmcd"/>
- <col ref="rrgstno"/>
- <col ref="spcacptdt"/>
- <col ref="reqcnts"/>
- <col ref="descrslt"/>
- <col ref="termhngnm"/>
- <col ref="usernm"/>
- <col ref="medispcdt"/>
- </datagrid>
- <object id="socket" clsid="{81e9de7e-90be-4958-bbda-ac731c05aba8}" visibility="hidden" style="left:320px; top:5px; width:35px; height:30px; ">
- <!-- 소켓 받은 메시지 이벤트 -->
- <script type="javascript" ev:event="OnReceive(nDataLength, szID)">
- <![CDATA[
- ]]>
- </script>
- <!-- 소켓 에러 이벤트 -->
- <script type="javascript" ev:event="OnError(lError, szMsg)">
- <![CDATA[
- alert("Error code = " + lError+"\nError Message : "+szMsg);
- socket.close(); // 소켓 닫기
- isConnected = false; // 접속 여부 false
- ]]>
- </script>
- <!-- 소켓 연결 이벤트 -->
- <script type="javascript" ev:event="OnConnect(szID)">
- <![CDATA[
- fEXESlidePrint();
- ]]>
- </script>
- <!-- 소켓 close 이벤트 -->
- <script type="javascript" ev:event="OnClose(szID)">
- <![CDATA[
- isConnected = false; // 접속 여부 false
- ]]>
- </script>
- </object>
- <object id="socket2" clsid="{81e9de7e-90be-4958-bbda-ac731c05aba8}" visibility="hidden" style="left:355px; top:5px; width:35px; height:30px; ">
- <!-- 소켓 받은 메시지 이벤트 -->
- <script type="javascript" ev:event="OnReceive(nDataLength, szID)">
- <![CDATA[
- ]]>
- </script>
- <!-- 소켓 에러 이벤트 -->
- <script type="javascript" ev:event="OnError(lError, szMsg)">
- <![CDATA[
- alert("Error code = " + lError+"\nError Message : "+szMsg);
- socket.close(); // 소켓 닫기
- //isConnected = false; // 접속 여부 false
- ]]>
- </script>
- <!-- 소켓 연결 이벤트 -->
- <script type="javascript" ev:event="OnConnect(szID)">
- <![CDATA[
- fEXEBlockPrint();
- ]]>
- </script>
- <!-- 소켓 close 이벤트
- <script ev:event="OnClose(szID)" type="javascript">
- <![CDATA[
- isConnected = false; // 접속 여부 false
- ]]>
- </script>
- -->
- </object>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
- <line id="line2" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:26px; "/>
- <button id="btn_print" class="btn6_letter2" style="left:0px; top:5px; width:56px; height:22px; ">
- <caption>출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fPrint();
- ]]>
- </script>
- </button>
- <button id="btn_init" class="btn4_letter3" style="left:1127px; top:5px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSetInit();
- ]]>
- </script>
- </button>
- <button id="button2" class="btn6_letter5" style="left:59px; top:5px; width:92px; height:22px; ">
- <caption>리스트출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fListPrint();
- ]]>
- </script>
- </button>
- <button id="button3" class="btn6_letter5" style="left:154px; top:5px; width:92px; height:22px; ">
- <caption>Slide출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSlidePrint();
- ]]>
- </script>
- </button>
- <button id="button4" class="btn6_letter5" style="left:249px; top:5px; width:92px; height:22px; ">
- <caption>Block출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fBlockPrint();
- ]]>
- </script>
- </button>
- </group>
- <group id="group2" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">특수검사의뢰서조회</caption>
- </group>
- </xhtml:body>
- </xhtml:html>
|