123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[function fInitialize()
- {
- lf_mmbfGetDeptCodeComboList(ds_init_orddept, "D");
- //sysf_trace(ds_init_orddept.saveXML());
- frmf_addComboItem("combo6"); //부서콤보 Item '전체'추가
-
- appf_getCodeList([{dsNm: "ds_init_insukindlist_P0008", cdGrpId: "P0008"}
- , {dsNm: "ds_init_suppkindlist_P0010", cdGrpId: "P0010"}], true);
-
-
-
- ds_main.setColumn(0,"orddeptcd", opener.frmf_getParameter("SPMMR05500_orddeptcd"));
- var formcd = opener.frmf_getParameter("SPMMR05500_formcd");
-
- if(formcd != "0000001457")//수술확인서
- {
- grd_oplist.visible = false;
- caption2.visible = false;
- line2.visible = false;
- bool2.visible = false;
-
- grd_oplist.position2.top = 0;
- btn_confirm.position2.top = 336;
- btn_cncl.position2.top = 336;
-
- //this.parent.position.width = 690;
- this.parent.position.height = 410;//440;
- }
-
- ds_main.setColumn(0,"amtyn", "");
-
- if(formcd == "0000001457" || //수술확인서
- formcd == "0000002792" || //상급병실확인서 (2009.07.27. 추가)
- formcd == "0000001300" || //입퇴원확인서(원무용)
- formcd == "0000001283" || //입퇴원확인서(진료용)
- formcd == "1100011101" || //입원사실확인서(입원중)
- formcd == "1100012297") //진단서
-
- {
- // knuh_20110324_박성호(입원사실확인서(입원중) 추가)
- if(formcd == "0000001300" || formcd == "1100011101")
- {
- ds_main.setColumn(0,"orddeptcd", "-");
- }
- ds_main.setColumn(0,"ordtype", "I");
-
- rdo_ordtype.enable = false;
- }
- else if(formcd == "0000001312" || //외래진료확인서
- formcd == "0000002639" || //통원치료확인서
- formcd == "0000002588") //통원치료확인서(영문)
- {
- if(formcd == "0000001312")
- {
- ds_main.setColumn(0,"orddeptcd", "-");
- }
- ds_main.setColumn(0,"ordtype", "O");
- rdo_ordtype.enable = false;
- ds_main.setColumn(0,"amtyn", "Y"); // 2011-01-19 경북대 최원돈 금액 조회 포함 여부 : 설정
- }
-
- //2012/03/29 Start
- ds_send_patinfo.setColumn(0,"daykijun","0");
- //2012/03/29 End
-
- fGetPatHist();
- }
- /**
- * @desc : 환자 수진이력 조회
- * @id :
- * @event :
- * @return : void
- * @authur : 이상현
- */
- function fGetPatHist(){
- dsf_setDefaultVal(ds_send_patinfo, "orddeptcd:-,orddrid:-");
- //2009-08-06 오후 5:40:21 강지훈 수정 : nopay Y : 진료부도제외 N : 진료부도 포함
- var nopay = opener.frmf_getParameter("SPMMR05500_nopay");
- var pid = opener.frmf_getParameter("SPMMR05500_pid");
- var orddeptcd = ds_main.getColumn(0,"orddeptcd");
- var ordtype = ds_main.getColumn(0,"ordtype");
-
- ds_send_patinfo.setColumn(0,"pid",pid);
- ds_send_patinfo.setColumn(0,"orddeptcd",orddeptcd);
- ds_send_patinfo.setColumn(0,"ordtype",ordtype);
- ds_send_patinfo.setColumn(0,"nopay",nopay);
-
- // 2011-01-19 경북대 최원돈 조회기간 및 금액 조회 포함 여부
- ds_send_patinfo.setColumn(0,"ordddfr", ds_main.getColumn(0,"ordddfr"));
- ds_send_patinfo.setColumn(0,"ordddto", ds_main.getColumn(0,"ordddto"));
- ds_send_patinfo.setColumn(0,"amtyn", ds_main.getColumn(0,"amtyn"));
- var oParam = {};
- oParam.id = "TRMMR05501";
- oParam.service = "medirecapp.ExtnMediRec";
- oParam.method = "reqGetPatHistList";
- oParam.inds = "req=ds_send_patinfo";
- oParam.outds = "ds_main_pathistlist=pathistlist";
- oParam.async = true;
- oParam.callback = "cf_TRMMR05501";
- tranf_submit(oParam);
- }
- function cf_TRMMR05501(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- dsf_setDefaultVal(ds_main_pathistlist, "chk:N");
- }
- /**
- * @group :
- * @ver :
- * @by : 이상현
- * @modify : 2008.07.22
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자 수진이력 선택시 이벤트
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSelectPatInfo(){
- var formcd = opener.frmf_getParameter("SPMMR05500_formcd");
- var rowno = ds_main_pathistlist.rowposition;
-
- var pid = ds_main_pathistlist.getColumn(rowno, "pid");
- var cretno = ds_main_pathistlist.getColumn(rowno, "cretno");
- var orddd = ds_main_pathistlist.getColumn(rowno, "orddd");
- var ordtype = ds_main_pathistlist.getColumn(rowno, "ordtype");
- var orddeptcd = ds_main_pathistlist.getColumn(rowno, "orddeptcd");
- var orddeptnm = ds_main_pathistlist.getColumn(rowno, "orddeptnm");
- var tabtype;
-
- if(!utlf_isNull(ds_main_pathistlist.getColumnInfo("tabtype"))){
- tabtype = ds_main_pathistlist.getColumn(rowno, "tabtype");
- }
- var dschdd = ds_main_pathistlist.getColumn(rowno, "dschdd");
- var hngnm = ds_main_pathistlist.getColumn(rowno, "hngnm");
-
- // knuh_20110324_박성호(입원사실확인서(입원중) 추가)
- if(formcd == "0000001300" || formcd == "0000001283" || formcd == "1100011101"){ //입퇴원확인서, 입원사실확인서
- ds_main_pathistlist.filter("chk == 'Y'");
- var msg = "";
- for(var i = 0; i < ds_main_pathistlist.rowcount; i++){
- var indd = ds_main_pathistlist.getColumn(i,"orddd");
- indd = indd.toDate().getDateFormat("YYYY/MM/DD");
-
- var dschdd = ds_main_pathistlist.getColumn(i,"dschdd");
- if(dschdd != "재원중"){
- dschdd = dschdd.toDate().getDateFormat("YYYY/MM/DD");
- }
-
- var orddeptnm = ds_main_pathistlist.getColumn(i,"orddeptnm");
- if(i == 0){
- msg += "[" + orddeptnm + "] " + indd + " - " + dschdd;
-
- }else{
- msg += "\n[" + orddeptnm + "] " + indd + " - " + dschdd;
-
- }
- }
- msg += "\n\n상기환자는 위 기간동안 입원치료 하였음을 확인합니다.";
- opener.frmf_setParameter("SPMMR05500_useyn", "Y");
- opener.frmf_setParameter("SPMMR05500_msg" , msg);
- ds_main_pathistlist.filter("");
- close();
-
- }else if(formcd == "0000001312" || formcd == "0000002639"){ //외래진료확인서, 통원치료 확인서
- ds_main_pathistlist.filter("chk == 'Y'");
- var msg = "";
- //2012/04/12 Start
- var chk= ds_send_patinfo.getColumn(0,"daykijun");
- if(chk=="0"){ //수진일 기준
-
- msg += "[수납금액 기준]" + "\n\n\n";
- }else if(chk=="1"){ // 실시일 기준
- msg += "[실시금액 기준]" + "\n\n\n";
- }
- //2012/04/12 End
-
- for(var i = 0; i < ds_main_pathistlist.rowcount; i++){
- var orddd = ds_main_pathistlist.getColumn(i,"orddd");
- orddd = orddd.toDate().getDateFormat("YYYY/MM/DD");
-
- //2013/02/15 Start 덤프 환자인 경우는 목록에서 안보여 주도록 수정(김무조 파트장님과 통화로 협의)
- if(ds_main_pathistlist.getColumn(i,"tranflagyn") == "Y"){
- continue;
- }
- //2013/02/15 End
-
- //KNUH 2011-04-29 최원돈 수진정보 조회 시 DSC/CHEMO 환자일 경우
- //외래수진정보(수진일자, 금액, 검사일자) 중 금액 또는 검사일자가 있으면 증명서 복사입력 시
- //수진일자를 NULL(' ')로 입력하고, 나머지는 그대로 입력되도록 기능 추가
- if(ds_main_pathistlist.getColumn(i,"tranflagyn") == "Y")
- {
- orddd = " ";
- }
- var orddeptnm = ds_main_pathistlist.getColumn(i,"orddeptnm");
-
- if(i == 0){
- msg += "[" + orddeptnm + "] " + orddd;
- }else{
- msg += "\n[" + orddeptnm + "] " + orddd;
-
- }
- //2012/04/12 Start 실시금액 기준
- if(chk=="0"){ //수진일 기준 금액표시
- var ls_issamt = ds_main_pathistlist.getColumn(i,"issamt");
- if (!utlf_isNull(ls_issamt) && ls_issamt != "0"){
- msg += " (금액 : " + fGetaddCommas(ls_issamt) + "원)";
- }
- }else if(chk=="1"){ // 실시일 기준 금액표시
- var ls_silsiamt = ds_main_pathistlist.getColumn(i,"silsiamt");
- if (!utlf_isNull(ls_silsiamt) && ls_silsiamt != "0"){
- msg += " (금액 : " + fGetaddCommas(ls_silsiamt) + "원)";
- }
- }
- /* 2012/04/12 주석처리
- // 2011-01-19 경대병원 최원돈 통원치료확인서 금액추가
- var ls_issamt = item.selectSingleNode("issamt").text;
-
- if ( ls_issamt != ""
- && ls_issamt != "0")
- {
- msg += " (금액 : " + fGetaddCommas(item.selectSingleNode("issamt").text) + "원)";
- }
- */
- // 2012/04/12 End
-
-
- // 2011-03-29 경대병원 최원돈 검사일자 추가
- var ls_testdd = ds_main_pathistlist.getColumn(i,"testdd");
-
- if (!utlf_isNull(ls_testdd))
- {
- msg += " (시행일자 : " + ls_testdd + ")";
- }
- }
- opener.frmf_setParameter("SPMMR05500_useyn", "Y");
-
- opener.frmf_setParameter("SPMMR05500_msg", msg);
-
- ds_main_pathistlist.filter("");
- close();
-
- }else if(formcd == "0000002588"){ //통원치료 확인서(영문)
- ds_main_pathistlist.filter("chk == 'Y'");
- var msg = "";
-
- for(var i = 0; i < ds_main_pathistlist.rowcount; i++){
- var orddd = ds_main_pathistlist.getColumn(i,"orddd");
- orddd = orddd.toDate().getDateFormat("YYYY/MM/DD");
- //KNUH 2011-04-29 최원돈 수진정보 조회 시 DSC/CHEMO 환자일 경우
- //외래수진정보(수진일자, 금액, 검사일자) 중 금액 또는 검사일자가 있으면 증명서 복사입력 시
- //수진일자를 NULL(' ')로 입력하고, 나머지는 그대로 입력되도록 기능 추가
- if(ds_main_pathistlist.getColumn(i,"tranflagyn") == "Y")
- {
- orddd = " ";
- }
- var orddeptcd = ds_main_pathistlist.getColumn(i,"orddeptcd");
-
- // 영문 부서명 가져오기
- var orddeptnm = ds_main_pathistlist.getColumn(i,"orddeptnm");
- dsf_makeValue(ds_send_deptcd,"deptcd", "string", orddeptcd);
- var oParam = {};
- oParam.id = "TRMRF01217";
- oParam.service = "formmngtapp.FormIfMngt";
- oParam.method = "reqGetDeptEngNmByDeptcd";
- oParam.inds = "req=ds_send_deptcd";
- oParam.outds = "ds_main_deptinfo=deptinfo";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF01217";
- tranf_submit(oParam);
-
- orddeptnm = ds_main_deptinfo.getColumn(0,"deptengnm");
-
- if(i == 0){
- msg += "[" + orddeptnm + "] " + orddd;
- }else{
- msg += "\n[" + orddeptnm + "] " + orddd;
-
- }
- // 2011-01-19 경대병원 최원돈 통원치료확인서 금액추가
- var ls_issamt = ds_main_pathistlist.getColumn(i,"issamt");
-
- if (!utlf_isNull(ls_issamt)
- && ls_issamt != "0")
- {
- msg += " (Amount : " + fGetaddCommas(ls_issamt) + "KW)";
- }
- // 2011-03-29 경대병원 최원돈 검사일자 추가
- var ls_testdd = ds_main_pathistlist.getColumn(i,"testdd");
-
- if (!utlf_isNull(ls_testdd))
- {
- msg += " (The exam date : " + ls_testdd + ")";
- }
- }
- opener.frmf_setParameter("SPMMR05500_useyn", "Y");
- opener.frmf_setParameter("SPMMR05500_msg" , msg);
- ds_main_pathistlist.filter("");
- close();
- }else if(formcd == "0000002792"){ //상급병실확인서 (2009.07.27. 추가)
- ds_main_pathistlist.filter("chk == 'Y'");
- var msg = "";
-
- for(var i = 0; i < ds_main_pathistlist.rowcount; i++){
- var indd = ds_main_pathistlist.getColumn(i,"orddd");
- indd = indd.toDate().getDateFormat("YYYY-MM-DD");
-
- var dschdd = ds_main_pathistlist.getColumn(i,"dschdd");
- if(dschdd != "재원중"){
- dschdd = dschdd.toDate().getDateFormat("YYYY-MM-DD");
- }
-
- var orddeptnm = ds_main_pathistlist.getColumn(i,"orddeptnm");
- if(i == 0){
- msg += indd + " ~ " + dschdd;
- }
-
- opener.frmf_setParameter("SPMMR05500_pid" , ds_main_pathistlist.getColumn(i,"pid"));
- opener.frmf_setParameter("SPMMR05500_indd" , ds_main_pathistlist.getColumn(i,"orddd"));
- opener.frmf_setParameter("SPMMR05500_cretno" , ds_main_pathistlist.getColumn(i,"cretno"));
- }
- opener.frmf_setParameter("SPMMR05500_useyn", "Y");
- opener.frmf_setParameter("SPMMR05500_msg" , msg);
- opener.frmf_setParameter("SPMMR05500_orddeptnm", orddeptnm);
- ds_main_pathistlist.filter("");
- close();
- // knuh_20110324_박성호(출생증명서(입원중) 추가)
- //}else if(formcd == "0000001113"){
- }else if(formcd == "0000001113" || formcd == "1100011102"){
- ds_main_pathistlist.filter("chk == 'Y'");
- var msg = "";
- var len = ds_main_pathistlist.rowcount;
-
- if(len > 1){
- msg = "하나의 경우만 선택해주세요.";
- return;
- }else if(len > 0) {
- opener.frmf_setParameter("SPMMR05500_pid" , ds_main_pathistlist.getColumn(0,"pid"));
- opener.frmf_setParameter("SPMMR05500_indd" , ds_main_pathistlist.getColumn(0,"orddd"));
- opener.frmf_setParameter("SPMMR05500_cretno" , ds_main_pathistlist.getColumn(0,"cretno"));
- }
-
- opener.frmf_setParameter("SPMMR05500_useyn", "Y");
- opener.frmf_setParameter("SPMMR05500_msg" , msg);
-
- opener.fGetForm();
- opener.ds_temp_tempinfo.clearData();
- ds_main_pathistlist.filter("");
- close();
-
- }else if(formcd == "1100012297"){ // 진단서
- ds_main_pathistlist.filter("chk == 'Y'");
- var len = ds_main_pathistlist.rowcount;
-
- if(len > 1){
- sysf_messageBox("하나의 경우만 선택해주세요.", "I");
- return;
- }else if(len > 0) {
- opener.frmf_setParameter("SPMMR05500_indd" , ds_main_pathistlist.getColumn(0,"orddd"));
- opener.frmf_setParameter("SPMMR05500_dschdd" , ds_main_pathistlist.getColumn(0,"dschdd"));
- }
-
- opener.frmf_setParameter("SPMMR05500_useyn", "Y");
- ds_main_pathistlist.filter("");
- close();
- }else{
- opener.frmf_setParameter("SPMMR05500_useyn", "N");
- close();
- }
- }
- /**
- * @desc : 금액표시(정규표현)
- * @return : string
- * @authur : 최원돈
- */
- function fGetaddCommas(ps_value){
- var objRegExp = new RegExp('(-?[0-9]+)([0-9]{3})');
- while(objRegExp.test(ps_value)) {
-
- ps_value = String(ps_value).replace(objRegExp, '$1,$2');
- }
- return ps_value;
- }
- /**
- * @desc : 환자 수술 내역 선택시
- * @id :
- * @event :
- * @return : void
- * @authur : 이상현
- */
- function fSelectOpInfo(){
- var opcnts = "";
- ds_main_pathistlist.filter("chk == 'Y'");
-
- var orddd = ds_main_pathistlist.getcolumn(0,"orddd");
- var dschdd = ds_main_pathistlist.getcolumn(0,"dschdd");
- orddd = orddd.toDate().getDateFormat("YYYY-MM-DD");
- if(dschdd != "재원중"){
- dschdd = dschdd.toDate().getDateFormat("YYYY-MM-DD");
- }
- var opinfo = "[입원일자] : " + orddd + "~" + dschdd;
-
-
- for(var i = 0; i <= ds_main_opinfo.rowposition; i++){
- var checkflag = ds_main_opinfo.getcolumn(i,"checkflag");
- if(checkflag == "Y"){
- var opcnfmdd = ds_grd_oplist.getcolumn(i,"opcnfmdd").toDate().getDateFormat("YYYY-MM-DD");
- var ophngnm = ds_grd_oplist.getcolumn(i,"ophngnm");
- }
-
- if(i == 0){
- opcnts = opcnfmdd + " : " + ophngnm;
- opinfocnts = ">[수술일자] :" + opcnfmdd + " / [수술명] : " + ophngnm;
-
- }else{
- opcnts += "\n" + opcnfmdd + " : " + ophngnm;
- opinfocnts += ">[수술일자] :" + opcnfmdd + " / [수술명] : " + ophngnm;
-
- }
- }
- if(utlf_isNull(opcnts)){
- opener.frmf_setParameter("SPMMR05500_useyn", "N");
- }else{
- opener.frmf_setParameter("SPMMR05500_useyn", "Y");
- opener.frmf_setParameter("SPMMR05500_msg" , opcnts);
- opener.frmf_setParameter("SPMMR05500_opinfo", opinfo + "\n" + opinfocnts);
- }
- ds_main_pathistlist.filter("");
- close();
- }]]></Script>
|