12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name : HIT
- * Job Name :
- * File Name : .xjs
- * Creator :
- * Make Date : 2014-04-24
- *
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2014-04-24 HIT_PAM Converting Program(TF->XP)
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- /*
- 22 11 11
- 32 차상위1종
- 00 00 33 A 차상위2종 정상
- 02 02 34 O 차상위2종 정상(인공신장투석)
- 03 03 35 O 차상위2종 정상(복막관류술)
- 04 04 36 O 차상위2종 정상(장기이식)
- 10 10 37 O 차상위2종 정상(가정간호)
- 11 11 38 O 차상위2종 정상(가정간호등록암)
- 05 05 39 I 차상위2종 개심,개두
- 06 06 40 A 차상위2종 등록암
- 07 07 45 O 차상위2종 산정특례
- 08 08 41 I 차상위2종 입원6세미만
- 09 09 42 I 차상위2종 자연분만
- 14 00 43 I 차상위2종 정신과입원진료
- 17 00 44 A 차상위2종 만성질환
- */
- /* 차상위2종 보조유형 셋팅
- * 전제조건 : 보험유형은 이 함수로 밖에서 변경 한다.
- * Parameter : pBeForeInsuKind - 변경전 보험유형
- * pBeforeSuppKind - 변경전 유형보조
- * pAfterInsuKind - 변경후 보험유형
- * pScndSupTrgtman - 차상위구분(1:차상위1종, 2:차상위2종)
- * pOrdDeptCd - 진료과코드
- * pChronicDiseaseYn - 만성질환여부
- * Return : suppkind - String
- */
- function lf_pmifGetScndSuptrgtSuppkind(pBeForeInsuKind, pBeforeSuppKind, pAfterInsuKind, pScndSupTrgtman, pOrdDeptCd, pChronicDiseaseYn) {
- var log = "pBeForeInsuKind : " + pBeForeInsuKind + "\n" +
- "pBeforeSuppKind : " + pBeforeSuppKind + "\n" +
- "pAfterInsuKind : " + pAfterInsuKind + "\n" +
- "pScndSupTrgtman : " + pScndSupTrgtman + "\n" +
- "pOrdDeptCd : " + pOrdDeptCd + "\n" +
- "pChronicDiseaseYn : " + pChronicDiseaseYn;
- ds_init_orddeptcd.filter("depthardcd = 'NP'");
- var sNPcd = ds_init_orddeptcd.getColumn(0,"cd"); // 정신과
- ds_init_orddeptcd.filter("");
- var result = pBeforeSuppKind; // 최초에는 현재의 보조유형을 설정해 놓는다.
- // 차상위1종
- if (pScndSupTrgtman == "1") {
- if(pAfterInsuKind == "11") {
- result = "32";
- }
- } else if (pScndSupTrgtman == "2") { // 차상위2종
- // 건강보험이고, 보조유형이 차상위2종의 보조유형이 아닐 때
- if(pAfterInsuKind == "11" && parseInt(pBeforeSuppKind) < 32) {
- if (pBeforeSuppKind == "00") { result = "33"; }
- else if (pBeforeSuppKind == "01") { result = "01"; }
- else if (pBeforeSuppKind == "02") { result = "33"; }
- else if (pBeforeSuppKind == "03") { result = "33"; }
- else if (pBeforeSuppKind == "04") { result = "33"; }
- else if (pBeforeSuppKind == "10") { result = "33"; }
- else if (pBeforeSuppKind == "11") { result = "33"; }
- else if (pBeforeSuppKind == "05") { result = "39"; }
- else if (pBeforeSuppKind == "06") { result = "40"; }
- else if (pBeforeSuppKind == "07") { result = "33"; }
- else if (pBeforeSuppKind == "08") { result = "41"; }
- else if (pBeforeSuppKind == "09") { result = "42"; }
- else if (pBeforeSuppKind == "14") { result = "33"; }
- else if (pBeforeSuppKind == "17" && pChronicDiseaseYn == "Y") { result = "44"; }
- else if (pBeforeSuppKind == "17" && pChronicDiseaseYn != "Y") { result = "33"; }
- else {
- sysf_messageBox("파라미터 값이 올바르지 않습니다[1]!!");
- }
- }
- /*
- // 의료급여1종 -> 차상위2종, 보조유형이 차상위2종의 보조유형이 아닐 때
- if(pBeForeInsuKind == "21" && pAfterInsuKind == "11" && parseInt(pBeforeSuppKind) < 32) {
- if (pBeforeSuppKind == "00" && pOrdDeptCd != sNPcd) { result = "33"; }
- else if (pBeforeSuppKind == "01") { result = "01"; }
- else if (pBeforeSuppKind == "02") { result = "33"; }
- else if (pBeforeSuppKind == "03") { result = "33"; }
- else if (pBeforeSuppKind == "04") { result = "33"; }
- else if (pBeforeSuppKind == "10") { result = "33"; }
- else if (pBeforeSuppKind == "11") { result = "33"; }
- else if (pBeforeSuppKind == "05") { result = "39"; }
- else if (pBeforeSuppKind == "06") { result = "40"; }
- else if (pBeforeSuppKind == "08") { result = "41"; }
- else if (pBeforeSuppKind == "09") { result = "42"; }
- else if (pBeforeSuppKind == "14" && pOrdDeptCd == sNPcd) { result = "43"; }
- else if (pBeforeSuppKind == "17" && pChronicDiseaseYn == "Y") { result = "44"; }
- else {
- sysf_messageBox("파라미터 값이 올바르지 않습니다[1]!!");
- }
- }
- // 의료급여2종 -> 차상위2종, 보조유형이 차상위2종의 보조유형이 아닐 때
- if(pBeForeInsuKind == "22" && pAfterInsuKind == "11" && parseInt(pBeforeSuppKind) < 32) {
- if (pBeforeSuppKind == "00" && pOrdDeptCd != sNPcd) { result = "33"; }
- else if (pBeforeSuppKind == "01") { result = "01"; }
- else if (pBeforeSuppKind == "02") { result = "33"; }
- else if (pBeforeSuppKind == "03") { result = "33"; }
- else if (pBeforeSuppKind == "04") { result = "33"; }
- else if (pBeforeSuppKind == "10") { result = "33"; }
- else if (pBeforeSuppKind == "11") { result = "33"; }
- else if (pBeforeSuppKind == "05") { result = "39"; }
- else if (pBeforeSuppKind == "06") { result = "40"; }
- else if (pBeforeSuppKind == "08") { result = "41"; }
- else if (pBeforeSuppKind == "09") { result = "42"; }
- else if (pBeforeSuppKind == "14" && pOrdDeptCd == sNPcd) { result = "43"; }
- else if (pBeforeSuppKind == "17" && pChronicDiseaseYn == "Y") { result = "44"; }
- else {
- sysf_messageBox("파라미터 값이 올바르지 않습니다[1]!!");
- }
- }
- */
- } else {
- // 건강보험이고 차상위1종이 아닐 때
- if(pAfterInsuKind == "11" && parseInt(pBeforeSuppKind) == 32) {
- result = "00";
- }
- /*
- // 의료급여1종이고 차상위1종이 아닐 때
- if(pBeForeInsuKind == "11" && pAfterInsuKind == "21" && parseInt(pBeforeSuppKind) == 32) {
- result = "00";
- }
- // 의료급여2종이고 차상위1종이 아닐 때
- if(pBeForeInsuKind == "11" && pAfterInsuKind == "22" && parseInt(pBeforeSuppKind) == 32) {
- result = "00";
- }
- */
- // 건강보험이고 차상위2종이 아닐 때
- // if(pBeForeInsuKind == "11" && pAfterInsuKind == "11" && parseInt(pBeforeSuppKind) > 32) {
- if(pAfterInsuKind == "11" && parseInt(pBeforeSuppKind) > 32) {
- if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "01") { result = "01"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "39") { result = "05"; }
- else if (pBeforeSuppKind == "40") { result = "06"; }
- else if (pBeforeSuppKind == "41") { result = "08"; }
- else if (pBeforeSuppKind == "42") { result = "09"; }
- else if (pBeforeSuppKind == "43") { result = "00"; }
- else if (pBeforeSuppKind == "44") { result = "00"; }
- else if (pBeforeSuppKind == "45") { result = "00"; }
- else {
- sysf_messageBox("파라미터 값이 올바르지 않습니다[2]!!");
- }
- }
- // 의료급여1종이고 차상위2종이 아닐 때
- // if(pBeForeInsuKind == "11" && pAfterInsuKind == "21" && parseInt(pBeforeSuppKind) > 32) {
- if(pAfterInsuKind == "21" && parseInt(pBeforeSuppKind) > 32) {
- if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "01") { result = "01"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "39") { result = "05"; }
- else if (pBeforeSuppKind == "40") { result = "06"; }
- else if (pBeforeSuppKind == "41") { result = "08"; }
- else if (pBeforeSuppKind == "42") { result = "09"; }
- else if (pBeforeSuppKind == "43" && pOrdDeptCd == sNPcd) { result = "14"; }
- else if (pBeforeSuppKind == "43" && pOrdDeptCd != sNPcd) { result = "00"; }
- else if (pBeforeSuppKind == "44" && pChronicDiseaseYn == "Y") { result = "17"; }
- else if (pBeforeSuppKind == "44" && pChronicDiseaseYn != "Y") { result = "00"; }
- else if (pBeforeSuppKind == "45") { result = "00"; }
- else {
- sysf_messageBox("파라미터 값이 올바르지 않습니다[2]!!");
- }
- }
- // 의료급여2종이고 차상위2종이 아닐 때
- // if(pBeForeInsuKind == "11" && pAfterInsuKind == "22" && parseInt(pBeforeSuppKind) > 32) {
- if(pAfterInsuKind == "22" && parseInt(pBeforeSuppKind) > 32) {
- if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "01") { result = "01"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "33") { result = "00"; }
- else if (pBeforeSuppKind == "39") { result = "05"; }
- else if (pBeforeSuppKind == "40") { result = "06"; }
- else if (pBeforeSuppKind == "41") { result = "08"; }
- else if (pBeforeSuppKind == "42") { result = "09"; }
- else if (pBeforeSuppKind == "43" && pOrdDeptCd == sNPcd) { result = "14"; }
- else if (pBeforeSuppKind == "43" && pOrdDeptCd != sNPcd) { result = "00"; }
- else if (pBeforeSuppKind == "44" && pChronicDiseaseYn == "Y") { result = "17"; }
- else if (pBeforeSuppKind == "44" && pChronicDiseaseYn != "Y") { result = "00"; }
- else if (pBeforeSuppKind == "45") { result = "00"; }
- else {
- sysf_messageBox("파라미터 값이 올바르지 않습니다[2]!!");
- }
- }
- }
- return result;
- }
- /****************************************************************************************
- * Function : lf_pmifPrintBarCode
- * Description : 바코드 출력 함수(DSC, ER간호에서도 사용)
- * Argument : 01.pPid : 등록번호
- * : 02.pIndd : 입원일자
- * : 03.pCretno : 생성번호
- * : 04.pMskind : 주부유형
- * : 05.pHiststat : 이력상태
- * : 06.pSetyn : 프린터설정정보 셋팅여부
- * : 07.pScrid : 프린터설정정보 조회용 화면 아이디
- * : 08.pBarcdRef : 설정정보 xpath
- * : 09.pRoomyn : 병실코드
- * : 10.pIsNEW :
- * : 10.pAfrsYn : 업무여부
- * return type : String - dataset name
- * Creator : PAM
- ****************************************************************************************/
- function lf_pmifPrintBarCode(pPid, pIndd, pCretno, pMskind, pHiststat, pSetyn, pScrid, pBarcdRef, pRoomyn, pIsNEW, pErvisityn, pPrintTest)
- {
- // 1. 공통[시작] - 2009.05.25
- dsf_createDs("ds_hidden_h_receipt_receipt", [{col:"pid"},
- {col:"hngnm"},
- {col:"hngnm2"},
- {col:"sex"},
- {col:"age"},
- {col:"religncd"},
- {col:"rrgstno"},
- {col:"orddeptcd"},
- {col:"orddeptnm"},
- {col:"specordyn"},
- {col:"medispclid"},
- {col:"wardcd"},
- {col:"wardcd2"},
- {col:"roomcd"},
- {col:"indd"},
- {col:"barcode"},
- {col:"newprintflag"},
- {col:"babyyn"},
- {col:"btype"},
- {col:"rfidyn"},
- {col:"rfidcardid1"},
- {col:"deptplce"}]);
-
- dsf_createDs("ds_send_data17", [{col:"pid"},
- {col:"indd"},
- {col:"cretno"},
- {col:"mskind"},
- {col:"histstat"},
- {col:"ioflag"},
- {col:"ervisityn"},
- {col:"ipaddr"}]);
-
- ds_send_data17.addRow();
-
- dsf_createDs("ds_send_data60", [{col:"pid"},
- {col:"usernm"},
- {col:"gubun"},
- {col:"cardid1"},
- {col:"indd"}]);
-
- ds_send_data60.addRow();
-
- var objExtCommon = new ExtCommon();
-
- ds_send_data17.setColumn(0, "pid", pPid);
- ds_send_data17.setColumn(0, "indd", pIndd);
- ds_send_data17.setColumn(0, "cretno", pCretno);
- ds_send_data17.setColumn(0, "mskind", pMskind);
- ds_send_data17.setColumn(0, "histstat", pHiststat);
- ds_send_data17.setColumn(0, "ioflag", "");
- ds_send_data17.setColumn(0, "ervisityn", pErvisityn);
- ds_send_data17.setColumn(0, "ipaddr", objExtCommon.getIPAddress());//app.clientIp);
-
- var oParam = {};
- oParam.id = "TRPMI00115";
- oParam.service = "ipatmngtapp.InRgst";
- oParam.method = "reqGetInRgstCardIss";
- oParam.inds = "req=ds_send_data17";
- oParam.outds = "ds_hidden_h_receipt_receipt=receipt";
- oParam.async = false;
- //oParam.callback = "cf_TRPMI00115";
- tranf_submit(oParam);
-
- if( utlf_isNull(ds_hidden_h_receipt_receipt.getColumnInfo("wardcd2")) ){
- ds_hidden_h_receipt_receipt.addColumn("wardcd2", "string");
- }
- if( utlf_isNull(ds_hidden_h_receipt_receipt.getColumnInfo("babyyn")) ){
- ds_hidden_h_receipt_receipt.addColumn("babyyn", "string");
- }
-
- if (utlf_isNull(pRoomyn)) {
- pRoomyn = "N";
- }
- // OCX 버전 로딩 구분
- if (utlf_isNull(pIsNEW)) {
- pIsNEW = "";
- } else {
- pIsNEW = "NEW"
- }
-
- var inpt_pid = ds_hidden_h_receipt_receipt.getColumn(0, "pid");
- var rfidyn = ds_hidden_h_receipt_receipt.getColumn(0, "rfidyn");
- if (utlf_isNull(inpt_pid) || inpt_pid == " ") {
- sysf_messageBox("입원 환자가 아닙니다.! 환자 팔찌를 발행할 수 없습니다.","E999","");
- return false;
-
- // RFID 출력 시
- // } else if (rfidyn == 'Y') {
- //
- // var hngnm2 = ds_hidden_h_receipt_receipt.getColumn(0, "hngnm2");
- //
- // var btype = ds_hidden_h_receipt_receipt.getColumn(0, "btype");
- //
- // //경북대 병원 성별표시 한글로 바꿈
- // var sex = ds_hidden_h_receipt_receipt.getColumn(0, "sex");
- // if( sex == 'M' ){
- // sex = '남';
- // }else{
- // sex = '여';
- // }
- //
- // var age = ds_hidden_h_receipt_receipt.getColumn(0, "age") + "세";
- //
- // var rrgstno = ds_hidden_h_receipt_receipt.getColumn(0, "rrgstno").substr(0,2) + "."
- // + ds_hidden_h_receipt_receipt.getColumn(0, "rrgstno").substr(2,2) + "."
- // + ds_hidden_h_receipt_receipt.getColumn(0, "rrgstno").substr(4,2);
- //
- // var wardcd = ds_hidden_h_receipt_receipt.getColumn(0, "wardcd");
- //
- // var roomcd = ds_hidden_h_receipt_receipt.getColumn(0, "roomcd");
- //
- // var deptplce = ds_hidden_h_receipt_receipt.getColumn(0, "deptplce");
- //
- // var cardid1 = ds_hidden_h_receipt_receipt.getColumn(0, "rfidcardid1");
- //
- // var param = inpt_pid + "|" + hngnm2 + "|" + btype + "|" + sex + "|" + age + "|" + rrgstno + "|" + wardcd + " " + roomcd + "호 (" + deptplce + ")|" + cardid1;
- //
- // //alert(param);
- //
- // try{
- //
- // // 1. RFID 출력
- // var activeObj = new ActiveXObject("WScript.Shell");
- // activeObj.CurrentDirectory = "C:/Program Files/himed/components/OneTech";
- // var fileName = "RfidLabelPrt.exe " + param;
- // activeObj.Run(fileName);
- //
- // // 2. RFID 데이터 저장
- // dsf_createDs("ds_send_data60", [{col:"pid"},
- // {col:"usernm"},
- // {col:"gubun"},
- // {col:"cardid1"},
- // {col:"indd"}]);
- //
- // ds_send_data60.addRow();
- //
- // ds_send_data60.setColumn(0, "pid", inpt_pid);
- // ds_send_data60.setColumn(0, "usernm", hngnm2);
- // ds_send_data60.setColumn(0, "gubun", "P");
- // ds_send_data60.setColumn(0, "cardid1", cardid1);
- // ds_send_data60.setColumn(0, "indd", ds_hidden_h_receipt_receipt.getColumn(0, "indd"));
- //
- // var oParam = {};
- // oParam.id = "TXPMC06606";
- // oParam.service = "pamcomnapp.RFID";
- // oParam.method = "reqInsPatRFIDInfo";
- // oParam.inds = "req=ds_send_data60";
- // oParam.outds = "";
- // oParam.async = false;
- // //oParam.callback = "cf_TRPMI00115";
- //
- // tranf_submit(oParam);
- //
- // }catch(e){
- //
- // alert("RFID 카드 등록오류입니다. \r\n동일현상 반복 시 전산실로 문의하십시오.");
- // }
- //
- // return;
-
- // 기존환자팔찌 출력 시
- } else {
- // var sRrgstno = model.getValue("/root/hidden/h_receipt/receipt/rrgstno").substr(0,6) + "-"
- // + model.getValue("/root/hidden/h_receipt/receipt/rrgstno").substr(6,1) + "******";
- var sRrgstno = utlf_transNullToEmpty(ds_hidden_h_receipt_receipt.getColumn(0, "rrgstno")).substr(0,2) + "."
- + utlf_transNullToEmpty(ds_hidden_h_receipt_receipt.getColumn(0, "rrgstno")).substr(2,2) + "."
- + utlf_transNullToEmpty(ds_hidden_h_receipt_receipt.getColumn(0, "rrgstno")).substr(4,2);
- ds_hidden_h_receipt_receipt.setColumn(0, "rrgstno",sRrgstno);
- //경북대 병원 성별표시 한글로 바꿈
- var sSex = ds_hidden_h_receipt_receipt.getColumn(0, "sex");
- if( sSex == 'M' ){
- sSex = '남';
- }else{
- sSex = '여';
- }
- ds_hidden_h_receipt_receipt.setColumn(0, "sex", sSex);
-
- // 전실신청정보 있을 경우에는 전실대상 병동을 표시
- var inptWard = ds_hidden_h_receipt_receipt.getColumn(0, "wardcd");
- var cdcrWard = ds_hidden_h_receipt_receipt.getColumn(0, "wardcd2");
-
- if (inptWard != cdcrWard && !utlf_isNull(cdcrWard)) {
- ds_hidden_h_receipt_receipt.setColumn(0, "wardcd", cdcrWard);
- }
- var sIndd = utlf_transNullToEmpty(ds_hidden_h_receipt_receipt.getColumn(0, "indd"));
- sIndd = sIndd.substr(0, 4) + "-" + sIndd.substr(4,2) + "-" + sIndd.substr(6,2);
- ds_hidden_h_receipt_receipt.setColumn(0, "indd", sIndd);
-
- //2010-09-14 이동식 추가 - 경북대병원 환자팔지 렉스포트로 출력
- //2008.10.14 Rexpert 출력전 클리어 - 최병진
- //childObj.window.javascript.fCloseReport();
- //var sPrinter;
- //var trayno;
-
- // 2009.06.19 - local에 설정된 파일을 우선시 한다.
- // print1:입원약정서, print2:입원환자카드, print3:선택신청, print4:환자팔찌
- /*
- var printInfo = pmifGetPrintSetting("print4");
- if (printInfo.length == 2) {
- sPrinter = printInfo[0];
- trayno = printInfo[1];
- } else {
- // 2008.09.21 입원약정서 출력용 프린터 이름 조회 - 최병진
- sPrinter = model.getValue("/root/hidden/printers/card_printer");
- if (isNull(sPrinter)) {
- sPrinter = "true";
- }
- // 2009년 03월 20일, JHP, 트레이정보를 받아서 넣는다.
- trayno = model.getValue("/root/hidden/pam/printer/value");
- }
- */
-
- //공통코드 P0045에서 프린터 명칭과 트레이 호출 - 입원환자팔찌 프린터
- fGetPrintName();
-
- // 프린터정보
- var print_name = "";
-
- // 트레이정보
- var print_tray = "";
-
- var resultFlag = "";
-
- // // 신형팔찌는 소아체크 없음
- // if (pBarcdRef == 'N') {
- //
- // print_name = getGlobalVariable("SPPAO00100_P0045_12_nm","p"); // SLP-T400
- // print_tray = getGlobalVariable("SPPAO00100_P0045_12_tray","p");
- //
- // // 기존팔찌
- // } else {
-
- // 6세미만 체크
- if (ds_hidden_h_receipt_receipt.getColumn(0, "age") < 6) {
-
- resultFlag = sysf_messageBox("6세미만 환자입니다!!! \r\n\r\n소아용팔찌를 출력", "S006", "\r\n성인용팔찌를 출력|\r\n출력을 취소");
-
- // 취소한 경우
- if (resultFlag == "2") {
- return;
- }
- }
-
- // 환자팔찌 설정 값(참고용) 변경시 SPPAO00100 수정필요
- // P0045_8 : HC100 구형 프린터(성인용)
- // P0045_11 : HC101 구형 프린터(소아용)
- // P0045_12 : SLP-T400 신형 프린터(성인용)
- // P0045_13 : SLP-T400 신형 프린터(소아용)
- // model.getValue("/root/hidden/h_receipt/receipt/newprintflag") == "Y" : 성인 신형 / 소아 신형
- // model.getValue("/root/hidden/h_receipt/receipt/newprintflag") == "A" : 성인 신형 / 소아 구형
- // model.getValue("/root/hidden/h_receipt/receipt/newprintflag") == "B" : 성인 구형 / 소아 신형
- // model.getValue("/root/hidden/h_receipt/receipt/newprintflag") == "N" : 성인 구형 / 소아 구형
-
- // 출력PC별 장비가 달라 IP로 해당 장비 구분하도록 수정(원무공통코드 PK060) by 조중래 20140404
-
- // 소아용
- if (resultFlag == "6") {
-
- // 신형 프린터 설정
- if (ds_hidden_h_receipt_receipt.getColumn(0, "newprintflag") == "Y" || ds_hidden_h_receipt_receipt.getColumn(0, "newprintflag") == "B") {
- print_name = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_13_nm", "p")); // SLP-T401
- print_tray = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_13_tray", "p"));
-
- // 구형 프린터 설정
- } else {
- print_name = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_11_nm", "p")); // HC101
- print_tray = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_11_tray", "p"));
- }
-
- ds_hidden_h_receipt_receipt.setColumn(0, "babyyn", "Y"); // 소아용
-
- // 성인용
- } else {
-
- // 신형 프린터 설정
- if (ds_hidden_h_receipt_receipt.getColumn(0, "newprintflag") == "Y" || ds_hidden_h_receipt_receipt.getColumn(0, "newprintflag") == "A") {
- print_name = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_12_nm", "p")); // SLP-T400
- print_tray = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_12_tray", "p"));
-
- // 구형 프린터 설정
- } else {
- print_name = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_8_nm", "p")); // HC100
- print_tray = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_8_tray", "p"));
- }
-
- ds_hidden_h_receipt_receipt.setColumn(0, "babyyn", "N"); // 성인용
- }
- // }
- // 호출끝
-
- // 프린터 드라이버 종류에 따라서 렉스퍼트 동적으로 호출(용지가 다르기때문임)
- // HC-100 : 구형팔찌(성인용) - Zebra 제품
- // HC-101 : 구형팔찌(소아용) - Zebra 제품
- // SLP-T400 : 신형팔찌(성인용) - Bixolon 제품
- // SLP-T401 : 신형팔찌(소아용) - Bixolon 제품
-
-
- //sysf_messageBox(pPrintTest);
- //sysf_messageBox(print_name);
-
-
- // 신형팔찌용 렉스퍼트
- if (print_name == 'SLP-T400' || print_name == 'SLP-T401') {
- var objDOM = rptf_createDOM(); // DOM 객체 설정
- rptf_setNodeListToDOM(objDOM, "/root/hidden/h_receipt/receipt", ds_hidden_h_receipt_receipt); // 데이터셋 1
- var objParam = new Object();
- objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
-
- var option = "open=1;save=1;directprint=1;printdialog=0;print=1;zoom=0;";
- var prnopt = "offsety=1;printername="+print_name;
-
-
- if(pPrintTest == 'Y')
- {
- //sysf_messageBox("111");
- rptf_exeReportPreview30(["RPPMI03203"],[objParam], option, prnopt);
- }
- else
- {
- //sysf_messageBox("222");
- rptf_exeReportPreview30(["RPPMI03202"],[objParam], option, prnopt);
-
- if (rfidyn == "Y") {
- ds_send_data60.setColumn(0, "pid", pPid);
- ds_send_data60.setColumn(0, "usernm", ds_hidden_h_receipt_receipt.getColumn(0, "hngnm2"));
- ds_send_data60.setColumn(0, "gubun", "P");
- ds_send_data60.setColumn(0, "cardid1", ds_hidden_h_receipt_receipt.getColumn(0, "rfidcardid1"));
- ds_send_data60.setColumn(0, "indd", pIndd);
- var oParam = {};
- oParam.id = "TXPMC06606";
- oParam.service = "pamcomnapp.RFID";
- oParam.method = "reqInsPatRFIDInfo";
- oParam.inds = "req=ds_send_data60";
- oParam.outds = "";
- oParam.async = false;
- //oParam.callback = "cf_TRPMI00115";
- tranf_submit(oParam);
- }
- }
-
- //exeReportPreview("RPPMI03202", "XMLSTR" , "" , "" , print_name , "", "", "", "", "true", "", "", print_tray);
-
- // 기존팔찌용 렉스퍼트
- } else {
- var objDOM = rptf_createDOM(); // DOM 객체 설정
- rptf_setNodeListToDOM(objDOM, "/root/hidden/h_receipt/receipt", ds_hidden_h_receipt_receipt); // 데이터셋 1
- var objParam = new Object();
- objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
-
- var option = "open=1;save=1;directprint=1;printdialog=0;print=1;zoom=0;";
- var prnopt = "offsety=1;printername="+print_name;
- rptf_exeReportPreview30(["RPPMI03201"],[objParam], option, prnopt);
-
- //exeReportPreview("RPPMI03201", "XMLSTR" , "" , "" , print_name , "", "", "", "", "true", "", "", print_tray);
- }
-
-
- //2010-09-14 이동식 주석처리 - 기존 바코드 출력 로직 주석처리
- // 1. 공통[끝] - 2009.05.25
- /*
- // 출력을 위한 변수 선언
- var sPid = model.getValue("/root/hidden/h_receipt/receipt/pid");
- var sHngnm = model.getValue("/root/hidden/h_receipt/receipt/hngnm");
- var sSex = model.getValue("/root/hidden/h_receipt/receipt/sex");
- var sAge = model.getValue("/root/hidden/h_receipt/receipt/age");
- var sRoomcd = model.getValue("/root/hidden/h_receipt/receipt/roomcd");
-
-
- var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo";
- var sSndMsg = "";
- var portOpenTF = ""; // 포트연결 성공여부
- var esc = String.fromCharCode(27);
- var sPrntKind = "1";
- var sCommKind = "02";
- var sCommPort = "1";
- var sDataBit = "8";
- var sStopBit = "1";
- var sBaudRate = "9600";
- var sParity = "n";
- var iLeft = 0;
- var iTop = 0;
- if (pSetyn == "Y") {
- fGetBarCodeInfo(pScrid); //입원등록 기본
- sPrntKind = model.getvalue(barcdRef + "/prntkind");
- sCommKind = model.getValue(barcdRef + "/commkind");
- iLeft = model.getValue(barcdRef + "/blank/left");
- iTop = model.getValue(barcdRef + "/blank/top");
- sCommPort = model.getvalue(barcdRef + "/comm02/comm");
- sDataBit = model.getvalue(barcdRef + "/comm02/databit");
- sStopBit = model.getvalue(barcdRef + "/comm02/stopbit");
- sBaudRate = model.getvalue(barcdRef + "/comm02/baudrate");
- sParity = model.getvalue(barcdRef + "/comm02/parity");
- if(iLeft == "" || iLeft == "-"){
- iLeft = 0;
- }
- if(iTop == "" || iTop == "-"){
- iTop = 0;
- }
- // 2008.07.02 모듈 로딩
- if (!body.isChild("CommAX")) {
- lzzfMakeBrcdPrntObjHanDo("CommAX", barcdRef, pIsNEW); // 로직안에 셋팅로직이 포함되어 있음
- }
- } else {
- sPrntKind = model.getvalue(pBarcdRef + "/prntkind");
- sCommKind = model.getValue(pBarcdRef + "/commkind");
- iLeft = model.getValue(pBarcdRef + "/blank/left");
- iTop = model.getValue(pBarcdRef + "/blank/top");;
- sCommPort = model.getvalue(pBarcdRef + "/comm02/comm");
- sDataBit = model.getvalue(pBarcdRef + "/comm02/databit");
- sStopBit = model.getvalue(pBarcdRef + "/comm02/stopbit");
- sBaudRate = model.getvalue(pBarcdRef + "/comm02/baudrate");
- sParity = model.getvalue(pBarcdRef + "/comm02/parity");
- }
- if(sCommKind == "02") {
- if (pIsNEW != "NEW") {
- portOpenTF = CommAX.PortOpen("true");
- }
- }
-
- // 프린터 종류별 출력
- // 1. SATO
- if(sPrntKind == "2" || sPrntKind == "6" || sPrntKind == "7") {
- // 시작위치 셋팅 (A1aaaabbbb:출력 용지 규격(aaaa:세로크기_최대 2848, bbbb:가로크기_최대 832))
- sSndMsg += esc + "A" + esc + "A103000500";
- sSndMsg += esc + "V" + (parseInt(iTop)+20) + esc + "H" + (parseInt(iLeft)+40) + esc + "BG" + "02" + "040" + sPid;
- sSndMsg += CommAX.PrtImgOut(parseInt(iTop)+25 , parseInt(iLeft)+360 , sSex + "/" + sAge, 1, 1);
- sSndMsg += CommAX.PrtImgOut(parseInt(iTop)+65 , parseInt(iLeft)+40 , sHngnm, 1, 2);
- // 2009.06.01 - pRoomyn 조건 주석처리
- //if (pRoomyn == "Y") {
- sSndMsg += CommAX.PrtImgOut(parseInt(iTop)+65 , parseInt(iLeft)+340 , sRoomcd, 1, 1);
- //}
- sSndMsg += CommAX.PrtImgOut(parseInt(iTop)+115 , parseInt(iLeft)+40 , sPid, 1, 1);
- sSndMsg += CommAX.PrtImgOut(parseInt(iTop)+145 , parseInt(iLeft)+40 , sRrgstno, 1, 1);
- sSndMsg += CommAX.PrtImgOut(parseInt(iTop)+115 , parseInt(iLeft)+280 , sIndd, 1, 1);
- sSndMsg += esc + "Q1" + esc + "Z";
- CommAX.SendMsg(sSndMsg);
- CommAX.PortOpen("false");
- } else { // Zebra
- if (model.getValue("/root/main/barcdprntsetup/macaddr") == "DEFAULT" || model.getValue("/root/main/barcdprntsetup/macaddr") == "") {
-
- lzzfMakeBrcdPrntObjHanDo("CommAX", "", pIsNEW);
- if (pIsNEW != "NEW") {
- CommAX.CommPort = "1";
- CommAX.Settings = "9600,n,8,1";
- }
- } else {
- if (pIsNEW != "NEW") {
- CommAX.CommPort = sCommPort;
- CommAX.Settings = sBaudRate + "," + sParity + "," + sDataBit + "," + sStopBit;
- }
- }
- if (pIsNEW != "NEW") {
- portOpenTF = CommAX.PortOpen("true");
- }
-
- if (pIsNEW != "NEW") {
- if(portOpenTF == "TRUE") {
- // 2008.07.31 - 주민번호 라인 변경
-
- sSndMsg += "^XA^LH" + (parseInt(iLeft) + 20) + "," + (parseInt(iTop) + 20); // 출력시작
- sSndMsg += "^FO" + (parseInt(iLeft) + 10) + "," + (parseInt(iTop) + 05) + "^BC400,40,N,N,N^FD" + sPid + "^FS"; // 바코드(등록번호)
- sSndMsg += "^CFE40,40" + "^FO" + (parseInt(iLeft) + 340) + "," + (parseInt(iTop) + 10) + "^FD" + sSex + "/" + sAge + "^FS"; // 성별,나이
- sSndMsg += CommAX.PrtImgOut(parseInt(iLeft) + 10, parseInt(iTop) + 50, sHngnm, 1, 2); // 환자명 - 가로시작위치, 세로시작위치, 출력할문자열, 1,1 (비율:X, Y)
- sSndMsg += CommAX.HanImageData();
- // 2009.06.01 - pRoomyn 조건 주석처리
- //if (pRoomyn == "Y") {
- sSndMsg += "^CFE18,18" + "^FO" + (parseInt(iLeft) + 300) + "," + (parseInt(iTop) + 50) + "^FD" + sRoomcd + "^FS";
- //}
- sSndMsg += "^CFE18,18" + "^FO" + (parseInt(iLeft) + 10) + "," + (parseInt(iTop) + 100) + "^FD" + sPid + "^FS"; // 등록번호
- sSndMsg += "^CFE30,30" + "^FO" + (parseInt(iLeft) + 10) + "," + (parseInt(iTop) + 130) + "^FD" + sRrgstno + "^FS"; // 주민번호
- sSndMsg += "^CFA30,30" + "^FO" + (parseInt(iLeft) + 235) + "," + (parseInt(iTop) + 100) + "^FD" + sIndd + "^FS"; // 입원일자
- sSndMsg += "^PQ1"; // 출력매수
- sSndMsg += "^XZ";
-
- CommAX.SendMessage(sSndMsg); // 출력
-
- CommAX.PortOpen("false"); // 출력종료
-
- } else {
- messageBox("아래 사항을 확인후 재출력해주십시오."
- + " \n 1.프린트설정 화면에서 통신유형을 com 으로 선택한 경우 port 번호 확인"
- + " \n 2.케이블 확인"
- + " \n 3.먼저 출력중인 바코드 확인(모두 출력된 후 재출력하십시오.)", "I", "");
- return;
- }
- } else {
- sSndMsg += "^XA^LH" + (parseInt(iLeft) + 20) + "," + (parseInt(iTop) + 20); // 출력시작
- sSndMsg += "^FO" + (parseInt(iLeft) + 10) + "," + (parseInt(iTop) + 05) + "^BC400,40,N,N,N^FD" + sPid + "^FS"; // 바코드(등록번호)
- sSndMsg += "^CFE40,40" + "^FO" + (parseInt(iLeft) + 340) + "," + (parseInt(iTop) + 10) + "^FD" + sSex + "/" + sAge + "^FS"; // 성별,나이
- sSndMsg += CommAX.PrtImgOut(parseInt(iLeft) + 10, parseInt(iTop) + 50, sHngnm, 1, 2); // 환자명 - 가로시작위치, 세로시작위치, 출력할문자열, 1,1 (비율:X, Y)
- sSndMsg += CommAX.HanImageData();
- // 2009.06.01 - pRoomyn 조건 주석처리
- //if (pRoomyn == "Y") {
- sSndMsg += "^CFE18,18" + "^FO" + (parseInt(iLeft) + 300) + "," + (parseInt(iTop) + 50) + "^FD" + sRoomcd + "^FS";
- //}
- sSndMsg += "^CFE18,18" + "^FO" + (parseInt(iLeft) + 10) + "," + (parseInt(iTop) + 100) + "^FD" + sPid + "^FS"; // 등록번호
- sSndMsg += "^CFE30,30" + "^FO" + (parseInt(iLeft) + 10) + "," + (parseInt(iTop) + 130) + "^FD" + sRrgstno + "^FS"; // 주민번호
- sSndMsg += "^CFA30,30" + "^FO" + (parseInt(iLeft) + 235) + "," + (parseInt(iTop) + 100) + "^FD" + sIndd + "^FS"; // 입원일자
- sSndMsg += "^PQ1"; // 출력매수
- sSndMsg += "^XZ";
-
- CommAX.SendMsg(sSndMsg); // 출력
-
- }
- }
- */
- }
- }
- //maxaddr없는 일반적인 경우, 서버에서 mac를 받아옴
- // 호출 폼에서는 ds_barcdprntsetup 데이터셋을 만들어 둬야 한다
- function fGetBarCodeInfo(scrnid){
- dsf_createDsRow('ds_req', [{ col: 'scrnid', type: 'string', size: 256, val: scrnid }], false);
- ds_barcdprntsetup.clearData();
- ds_barcdprntsetup.addRow();
- var oParam = {};
- oParam.id = "TRLLC90101";
- oParam.service = "diagtestapplib.LisCommon";
- oParam.method = "reqGetSetUpInfo";
- oParam.inds = "scrnid=ds_req";
- oParam.outds = "ds_barcdprntsetup=getSetUpInfo";
- oParam.async = false;
- //oParam.callback = "cf_TRLLC90101";
- tranf_submit(oParam);
- }
- // 입원통지서 출력
- function fPrintInNoti(pid, indd, cretno){
- if(utlf_isNull(pid)){
- alert('환자를 선택 후 출력하십시오.');
- return;
- }
- dsf_createDsRow('ds_req', [
- { col: 'pid', type: 'string', size: 256, val: pid },
- { col: 'indd', type: 'string', size: 256, val: indd },
- { col: 'cretno', type: 'string', size: 256, val: cretno }
- ], false);
- dsf_createDs('ds_result', [
- { col: 'instcd', type: 'STRING', size: 256, val: '' },
- { col: 'indd', type: 'STRING', size: 256, val: '' },
- { col: 'hngnm', type: 'STRING', size: 256, val: '' },
- { col: 'brthdd', type: 'STRING', size: 256, val: '' },
- { col: 'sex', type: 'STRING', size: 256, val: '' },
- { col: 'hometel', type: 'STRING', size: 256, val: '' },
- { col: 'zipcdaddr', type: 'STRING', size: 256, val: '' },
- { col: 'detladdr', type: 'STRING', size: 256, val: '' },
- { col: 'fcstinterm', type: 'STRING', size: 256, val: '' },
- { col: 'inrsrvrem', type: 'STRING', size: 256, val: '' },
- { col: 'hospnm', type: 'STRING', size: 256, val: '' },
- { col: 'hospzipcdaddr', type: 'STRING', size: 256, val: '' },
- { col: 'hospdetladdr', type: 'STRING', size: 256, val: '' },
- { col: 'specwardcd', type: 'STRING', size: 256, val: '' },
- { col: 'specordtype', type: 'STRING', size: 256, val: '' },
- { col: 'rsrvprcsstat', type: 'STRING', size: 256, val: '' }
- ], false);
- var oParam = {};
- oParam.id = "TRPMI00123";
- oParam.service = "ipatmngtapp.InRgst";
- oParam.method = "reqGetInNotiInfo";
- oParam.inds = "req=ds_req";
- oParam.outds = "ds_result=innotiinfo";
- oParam.async = false;
- //oParam.callback = "cf_TRPMI00123";
- tranf_submit(oParam);
-
- var specwardcd = ds_result.getColumn(0, "specwardcd");
-
- var objDOM = rptf_createDOM(); // DOM 객체 설정
- rptf_setNodeListToDOM(objDOM, "root/hidden/innotiinfo/innotiinfo", ds_result);
- var objParam = new Object();
- objParam.xml_data_XML1 = objDOM.documentElement.source;
-
- fGetPrintName();
-
- var printname = sysf_getGlobalVariable('SPPAO00100_P0045_6_nm', 'p');
- // 보호입원 / 행정입원 통지서
- if (!utlf_isNull(specwardcd) && (specwardcd == "C" || specwardcd == "D")) {
- rptf_exeReportPreview30(['RPPMI01205'], [objParam], 'open=1;save=1;directprint=1;printdialog=0;print=1;zoom=0', 'printername=' + printname);
-
- // 그외 통지서 (자의입원:A, 동의입원:B, 응급입원:E)
- } else {
- rptf_exeReportPreview30(['RPPMI01204'], [objParam], 'open=1;save=1;directprint=1;printdialog=0;print=1;zoom=0', 'printername=' + printname);
- }
-
- // 보호입원신청서 출력
- if (specwardcd == "C") {
-
- // 보호입원신청서 출력
- fPerPrintOCR(
- ds_init_prncd.getColumn(ds_init_prncd.findRow('cdseqno', '16'), "hardcd"),
- pid,
- indd,
- cretno,
- "I",
- "O"
- );
-
- } else {
-
- // 자의동의입원신청서 출력
- fPerPrintOCR(
- ds_init_prncd.getColumn(ds_init_prncd.findRow('cdseqno', '15'), "hardcd"),
- pid,
- indd,
- cretno,
- "I",
- "O"
- );
- }
- }
- /****************************************************************************************
- * Function : lf_inDeciPrintlss
- * Description : 입원약정서 출력
- 입원정보inpt 저장된 후 입원약정서 출력하는 함수
- * Argument : 01.vpid : 환자번호
- : 02.vindd : 입원일자
- : 03.vcretno : 생성번호
- : 04.vmskind : 주부유형
- : 05.vorddeptcd : 입원결정과
- : 06.vmedispclid : 전문의ID
- : 07.vdeciflag : 약정서 분류 R : 입원전 결정서 존재시 출력,
- I : 입원결정 후, C : 전과전실시
- : 08.vlang : 출력 언어
- 입원 후 출력시에는 lf_inDeciPrintlss() 사용해야함
- : 09.vordtype : ordtype 구분
- 입원등록시 E, D 인경우는 전과전실 화면에서 출력하도록함
- * return type :
- * Creator : PAM
- ****************************************************************************************/
- function lf_inDeciPrintlss(vpid, vindd, vcretno, vmskind, vorddeptcd, vmedispclid, vdeciflag, vlang, vordtype)
- {
- trace("vordtype ==>"+vordtype)
- if(vordtype == "E" || vordtype == "D") {
- sysf_messageBox("응급/DSC/CHEMO 환자입니다. [전과전실승인]화면에서 출력하십시오.", "I");
- return;
- } else{
- dsf_createDsRow("ds_cond_req",
- [{col:"pid" , val:vpid}
- ,{col:"indd" , val:vindd}
- ,{col:"cretno" , val:vcretno}
- ,{col:"mskind" , val:vmskind}
- ,{col:"orddeptcd" , val:vorddeptcd}
- ,{col:"medispclid" , val:vmedispclid}
- ,{col:"deciflag" , val:vdeciflag}
- ,{col:"rcptflag" , val:vlang}]);
- dsf_createDsRow("ds_data_deciprint",
- [{col:"indd" , val:""}
- ,{col:"inpath" , val:""}
- ,{col:"roomcd" , val:""}
- ,{col:"orddeptcd" , val:""}
- ,{col:"orddept" , val:""}
- ,{col:"orddrid" , val:""}
- ,{col:"specordyn" , val:""}
- ,{col:"pid" , val:""}
- ,{col:"hngnm" , val:""}
- ,{col:"rrgstno" , val:""}
- ,{col:"sex" , val:""}
- ,{col:"age" , val:""}
- ,{col:"religncd" , val:""}
- ,{col:"address" , val:""}
- ,{col:"hometel" , val:""}
- ,{col:"mpphontel" , val:""}
- ,{col:"insukind" , val:""}
- ,{col:"insucd" , val:""}
- ,{col:"insuno" , val:""}
- ,{col:"insdnm" , val:""}
- ,{col:"inschedd" , val:""}
- ,{col:"opschedd" , val:""}
- ,{col:"indirecdrnm" , val:""}
- ,{col:"inrsrvacptdt" , val:""}
- ,{col:"handicapryn1" , val:""}
- ,{col:"handicapryn2" , val:""}
- ,{col:"inrsrvrem" , val:""}
- ,{col:"cnstyn" , val:""}
- ,{col:"rareobstflag" , val:""}
- ,{col:"disregprson3" , val:""}
- ,{col:"ocrtag" , val:""}
- ,{col:"insukindcd" , val:""}
- ,{col:"bedcnt" , val:""}
- ,{col:"wardnm" , val:""}
- ,{col:"rrgstno1" , val:""}
- ,{col:"rrgstno2" , val:""}
- ,{col:"grnternm" , val:""}
- ,{col:"grntertel" , val:""}
- ,{col:"realcd" , val:""}
- ,{col:"zipcdaddr" , val:""}
- ,{col:"detladdr" , val:""}
- ,{col:"grnterrrgstno1" , val:""}
- ,{col:"grnterrrgstno2" , val:""}
- ,{col:"grntermpphontel" , val:""}
- ,{col:"worknm" , val:""}
- ,{col:"worktel" , val:""}
- ,{col:"grnternm1" , val:""}
- ,{col:"grntertel1" , val:""}
- ,{col:"real1" , val:""}
- ,{col:"zipcdaddr1" , val:""}
- ,{col:"detladdr1" , val:""}
- ,{col:"grnterrrgstno11" , val:""}
- ,{col:"grnterrrgstno12" , val:""}
- ,{col:"grntermpphontel1", val:""}
- ,{col:"worknm1" , val:""}
- ,{col:"worktel1" , val:""}
- ,{col:"centcd" , val:""}
- ,{col:"instcd" , val:""}
- ,{col:"hosptel" , val:""}
- ,{col:"expordamt" , val:""}
- ,{col:"diagcd1" , val:""}
- ,{col:"diagcd2" , val:""}
- ,{col:"termhngnm" , val:""}
- ,{col:"cretno" , val:""}
- ,{col:"ocrindd" , val:""}
- ,{col:"ordtype" , val:""}
- ,{col:"age" , val:""}
- ,{col:"roomtype" , val:""}
- ,{col:"birth" , val:""}
- ,{col:"ptbs_zipcd1" , val:""}
- ,{col:"ptbs_zipcd2" , val:""}
- ,{col:"ptbs_zipcdseq" , val:""}
- ,{col:"ptbs_zipcdaddr" , val:""}
- ,{col:"ptbs_detladdr" , val:""}
- ,{col:"realcd1" , val:""}
- ,{col:"zipcd1" , val:""}
- ,{col:"zipcd2" , val:""}
- ,{col:"zipcdseq" , val:""}
- ,{col:"jobposnm" , val:""}
- ,{col:"hshdnm" , val:""}
- ,{col:"possntype" , val:""}
- ,{col:"zipcd11" , val:""}
- ,{col:"zipcd21" , val:""}
- ,{col:"zipcdseq1" , val:""}
- ,{col:"realcd2" , val:""}
- ,{col:"jobposnm1" , val:""}
- ,{col:"hshdnm1" , val:""}
- ,{col:"possntype1" , val:""}
- ,{col:"rorddrid" , val:""}]);
- var objParam = new Object();
- objParam.id = "TRPMI00113";
- objParam.service = "ipatmngtapp.InRgst";
- objParam.method = "reqGetInDeciPrintRef";
- objParam.inds = "req=ds_cond_req";
- objParam.outds = "ds_data_deciprint=deciprint";
- objParam.async = false;
- tranf_submit(objParam);
- var indd = ds_data_deciprint.getColumn(0, "indd");
- if(utlf_isNull(indd) == false) {
- var s_indd = indd.substr(0,4) + "-" +
- indd.substr(4,2) + "-" +
- indd.substr(6,2);
- ds_data_deciprint.setColumn(0, "indd", s_indd);
- }
- var sinschedd = ds_data_deciprint.getColumn(0, "inschedd");
- var sopschedd = ds_data_deciprint.getColumn(0, "opschedd");
- var sinrsrvacptdt = ds_data_deciprint.getColumn(0, "inrsrvacptdt");
- ds_data_deciprint.setColumn(0, "inrsrvacptdt", "");
- if(!utlf_isNull(sinschedd)){
- var s_inschedd = sinschedd.substr(0,4) + "년" + " " + sinschedd.substr(4,2) + "월" + " " + sinschedd.substr(6.2) + "일";
- ds_data_deciprint.setColumn(0, "inschedd", s_inschedd);
- }
- if (!utlf_isNull(sopschedd)) {
- var s_sopschedd = sopschedd.substr(0,4) + "년" + " " + sopschedd.substr(4,2) + "월" + " " + sopschedd.substr(6.2) + "일";
- ds_data_deciprint.setColumn(0, "opschedd", s_sopschedd);
- }
- if (!utlf_isNull(sinrsrvacptdt)) {
- var s_inrsrvacptdt = sinrsrvacptdt.substr(0,4) + "/" +
- sinrsrvacptdt.substr(4,2) + "/" +
- sinrsrvacptdt.substr(6,2) + " " +
- sinrsrvacptdt.substr(8,2) + ":" +
- sinrsrvacptdt.substr(10,2);
- ds_data_deciprint.setColumn(0, "inrsrvacptdt", s_inrsrvacptdt);
- }
- var sNhicRareobstflag = ds_data_deciprint.getColumn(0, "rareobstflag"); // 희귀난치
- var sNhicDisregprson3 = ds_data_deciprint.getColumn(0, "disregprson3"); // 차상위
- if (sNhicRareobstflag == "H") {
- ds_data_deciprint.setColumn(0, "rareobstflag", "희귀난치"); //희귀난치
- } else {
- ds_data_deciprint.setColumn(0, "rareobstflag", ""); //희귀난치
- }
- if (sNhicDisregprson3 == "32") {
- ds_data_deciprint.setColumn(0, "disregprson3", "차상위"); //차상위
- } else {
- ds_data_deciprint.setColumn(0, "disregprson3", ""); //차상위
- }
- ds_data_deciprint.addColumn("dutplceinstcd", "string");
- ds_data_deciprint.setColumn(0, "dutplceinstcd", sysf_getUserInfo("dutplceinstcd"))
- //공통코드 P0045에서 프린터 명칭과 트레이 호출 -입원약정서
- fGetPrintName();
- print_name = sysf_getGlobalVariable("SPPAO00100_P0045_2_nm","p");
- print_tray = sysf_getGlobalVariable("SPPAO00100_P0045_2_tray","p");
- //호출끝
- //입원약정서
- if(print_name == "false"){
- return false;
- }
- var objParam = new Object();
- objParam.xml_data_XML1 = rptf_getXMLString( ds_data_deciprint, "root/hidden/h_deciprint/deciprint");
- var option = "open=1;save=1;directprint=1;printdialog=0;print=1;zoom=1"; //강제출력
- var prtOption = "printername="+print_name; // 프린트 옵션 설정
- // 쿼리에서 orddeptcd, orddrid 코드를 못 가져오는 문제가 발생해서 새로 셋팅 - 2015.01.12
- var rOrddeptcd = ds_data_deciprint.getColumn(0, "orddept");
- ds_data_deciprint.setColumn(0, "orddeptcd", rOrddeptcd);
- var rOrddrid = ds_data_deciprint.getColumn(0, "rorddrid");
- ds_data_deciprint.setColumn(0, "orddrid", rOrddrid);
- //출력 start!!
- var languege = vlang;
- if(languege == 'tm'){
- var objArg = new Object();
- objArg.ds_data_formData = ds_data_deciprint;
- objArg.sFormcd = "1300011830";
- objArg.sFlag = "0";
- frmf_modal("SPPAO03000", "SPPAO03000", objArg, "", 1, "", "", "", "", "title=true, status=true, close=true", null, null, "M");
- } else if(languege == 'eng'){ //영어
- if(print_name != "false"){
- rptf_exeReportPreview30(["RPPMI01204"],[objParam], option, prtOption);
- }
- } else if(languege == 'ru'){ //러시아어
- if(print_name != "false"){
- rptf_exeReportPreview30(["RPPMI01205"],[objParam], option, prtOption);
- }
- } else if(languege == 'cn'){ //중국어
- if(print_name != "false"){
- rptf_exeReportPreview30(["RPPMI01206"],[objParam], option, prtOption);
- }
- } else if(languege == 'tmct'){//기간제 약정서
- var objArg = new Object();
- objArg.ds_data_formData = ds_data_deciprint;
- objArg.sFormcd = "1300011830";
- objArg.sFlag = "1";
- frmf_modal("SPPAO03000", "SPPAO03000", objArg, "", 1, "", "", "", "", "title=true, status=true, close=true", null, null, "M");
- } else{ // 언어선택 없을 경우 defalt 한국어 입원약정서
- if(print_name != "false"){
- rptf_exeReportPreview30(["RPPMI01200"],[objParam], option, prtOption);
- }
- }
- }
- }
- // 상급병실신청 전자서명관리
- function fUpRoomSignMngt(pid, indd, autoflag){
- // 차트번호, 입원일자가 존재하는 경우에만 설정
- if(!utlf_isNull(pid) && !utlf_isNull(indd)){
- frmf_setParameter('SPZHA20101_PARM_PID', pid);
- frmf_setParameter('SPZHA20101_PARM_INDD', indd);
- frmf_setParameter('SPZHA20101_PARM_AUTOFLAG', autoflag);
- }
- // 상급병실신청 서명관리화면 호출
- frmf_modal("SPPMI02800", "SPPMI02800", '', '', '', '', '', '', '', '', null, null, 'M');
- }
- // 입원통지서 수령 확인서
- function fPrintInNotiConfirm(pid, indd, cretno, hngnm){
- if(utlf_isNull(pid)){
- alert('환자를 선택 후 출력하십시오.');
- return;
- }
- var ocrtype = 'O';
- var objExtCommon = new ExtCommon();
- if(ds_init_PK018list.getColumn(ds_init_PK018list.findRow('cdid', objExtCommon.getIPAddress()), 'cdnm') == 'Y'){
- if(sysf_messageBox('입원통지서 수령 확인서', 'Q017') == '6'){
- ocrtype = 'S';
- }
- }
- //구분에 맞춰 폼코드 처리(1:일반약정서 / 2:기간약정서 / 3:개인정보이용동의서 / 12:영상정보처리기기수집/이용동의서 / 13:입원통지서 수령 확인서
- var formcd = ds_init_prncd.getColumn(ds_init_prncd.findRow('cdseqno', '13'), 'hardcd');
- // COR 출력의 경우
- if(ocrtype == 'O'){
- fPerPrintOCR(formcd, pid, indd, cretno, 'I', ocrtype);
- }
- else{
-
- dsf_makeValue(ds_temp_consent, "pid", 'string', pid);
- dsf_makeValue(ds_temp_consent, "orddd", 'string', indd);
- dsf_makeValue(ds_temp_consent, "cretno", 'string', cretno);
- dsf_makeValue(ds_temp_consent, "ordtype", 'string', 'I');
- dsf_makeValue(ds_temp_consent, "flag", 'string', 'N');
- dsf_makeValue(ds_temp_consent, "formcd", 'string', formcd);
- dsf_makeValue(ds_temp_consent, "tag1", 'string', hngnm);
- dsf_makeValue(ds_temp_consent, "tag2", 'string', indd.substr(0, 4));
- dsf_makeValue(ds_temp_consent, "tag3", 'string', indd.substr(4, 2));
- dsf_makeValue(ds_temp_consent, "tag4", 'string', indd.substr(6, 2));
- fPrintOcrConsent(ds_temp_consent);
- }
- }
- //
- /////////////////사용안함//////////////////////////////////
- /**
- * 각종 약정서 및 카드발급등 원격으로 출력할시 프린터 세팅
- * 파라미터정의
- * pPrint : print1 - 입원약정서
- * print2 - 입원환자카드
- * print3 - 선택신청
- * print4 - 환자카드발행
- * * C:\\cmcnuprinter\\printersetting.ini 파일 존재해야하며 내용은 아래와 같음
- * * * ex1)
- * [printers]
- * print1=\\10.20.73.57\aficio2022 --입원약정서
- * print2=\\10.20.73.57\aficio2022 --입원환자카드
- * print3=\\10.20.73.57\aficio2022 --선택신청
- * print4=Zebra P330i Card Printer USB --환자카드발행
- * * [Tray]
- * trayno=1
- * * * * ex2)
- * [printers]
- * print1=입원예정자
- * print2=\\프린터IP\드라이버이름
- * print3=\\127.0.0.1\HP LaserJet 1020
- * * [trayno]
- * print1=1
- * print2=2
- * print3=1
- * * * [printers] 섹션은 프린터 드라이브 명을 입력하며,
- * print1은 입원약정서
- * print2는 입원등록카드
- * print3은 선택진료신청서를
- * 출력하기 위한 프린터 드라이버 이름이다.
- * * [trayno] 는각각의 출력물들에 대해서 프린터의 어떤 용지함으로
- * 출력할 지를 지정하는 정보이다. [printers] 섹션과 마찬가지로,
- * print1은 입원약정서,
- * print2는 입원등록카드,
- * print3은 선택진료신청서를 출력하기 위한 tray(용지함) 번호를 지정한다.
- *
- * @param {[type]} pPrint [description]
- * @return {[type]} [description]
- */
- // this function is prototype. after test, use this one.
- function pmifGetPrintSetting(pPrint) {
- // var resultArray = new Array();
- // var filepath = "C:\\cmcnuprinter\\printer.ini";
- // var isExist = VirtualFile.isExist(filepath);
- // if (isExist) {
- // var vFile = new VirtualFile(filepath, VirtualFile.openRead | VirtualFile.openText);
- // vFile.seek(0, VirtualFile.seekBegin);
- // var bData = new Buffer(vFile.read(vFile.getFileSize()));
- // var str = bData.getText(0);
- // var printerIdx = str.indexOf('printers');
- // var trayIdx = str.indexOf('trayno');
- // var resultArray[0] = str.substr(printerIdx + 9, str.indexOf('\n', printerIdx));
- // var resultArray[1] = str.substr(trayIdx + 7, str.indexOf('\n', trayIdx));
- // vFile.close();
- // }
- // else {
- // // 기존의 출력 모듈을 그대로 따른다.
- // resultArray[0] = false;
- // }
- // return resultArray;
- }
- ]]></Script>
|