[Logging Date Time: 2016-12-21 11:25:54,736] =====================================================================================
SQL Command - Statement Id: [getDeptList] PreparedStatement : [SELECT ' ' as deptcd, 'Áø·á°ú' as deptnm, 0 as clincdeptdispseq, 0 as sort from dual UNION ALL SELECT deptcd, depthngnm as deptnm, clincdeptdispseq, 1 as sort FROM com.zsdddept WHERE instcd = :param0 AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')>=valifromdd AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')<=valitodd AND rcptuseyn = 'Y' ORDER BY clincdeptdispseq ASC]
[Logging Date Time: 2016-12-21 11:25:54,736] =====================================================================================
SQL Command - Statement Id: [getDeptList] PreparedStatement : [SELECT ' ' as deptcd, 'Áø·á°ú' as deptnm, 0 as clincdeptdispseq, 0 as sort from dual UNION ALL SELECT deptcd, depthngnm as deptnm, clincdeptdispseq, 1 as sort FROM com.zsdddept WHERE instcd = :param0 AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')>=valifromdd AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')<=valitodd AND rcptuseyn = 'Y' ORDER BY clincdeptdispseq ASC]
[Logging Date Time: 2016-12-21 11:25:54,895] =====================================================================================
SQL Command - Statement Id: [getDeptList] Parameters: [param0=[instcd,111]]
[Logging Date Time: 2016-12-21 11:25:54,895] =====================================================================================
SQL Command - Statement Id: [getDeptList] Parameters: [param0=[instcd,111]]
[Logging Date Time: 2016-12-21 11:25:54,895] =====================================================================================
SQL Command - Statement Id: [getDeptList] Types: [param0=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:54,895] =====================================================================================
SQL Command - Statement Id: [getDeptList] Types: [param0=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:55,464] =====================================================================================
SQL Command - Statement Id: [getDocList] PreparedStatement : [SELECT ' ' as doctorid, 'Áø·áÀÇ' as doctornm, 1 as sort from dual UNION ALL SELECT b.userid AS doctorid, b.usernm AS doctornm, 2 as sort FROM com.zsumusrd a INNER JOIN com.zsumusrb b ON a.userid = b.userid WHERE a.psnworkyn = 'N' AND a.dutplceinstcd = :param0 AND a.jobkindcd LIKE '03%' AND a.dutplcecd = :param1 AND :param2 BETWEEN a.fromdd AND a.todd AND :param2 BETWEEN b.userfromdd AND b.usertodd ORDER BY sort, doctorid]
[Logging Date Time: 2016-12-21 11:25:55,464] =====================================================================================
SQL Command - Statement Id: [getDocList] PreparedStatement : [SELECT ' ' as doctorid, 'Áø·áÀÇ' as doctornm, 1 as sort from dual UNION ALL SELECT b.userid AS doctorid, b.usernm AS doctornm, 2 as sort FROM com.zsumusrd a INNER JOIN com.zsumusrb b ON a.userid = b.userid WHERE a.psnworkyn = 'N' AND a.dutplceinstcd = :param0 AND a.jobkindcd LIKE '03%' AND a.dutplcecd = :param1 AND :param2 BETWEEN a.fromdd AND a.todd AND :param2 BETWEEN b.userfromdd AND b.usertodd ORDER BY sort, doctorid]
[Logging Date Time: 2016-12-21 11:25:55,464] =====================================================================================
SQL Command - Statement Id: [getDocList] Parameters: [param0=[instcd,111], param1=[orddeptcd, ], param2=[srchdd,20161221]]
[Logging Date Time: 2016-12-21 11:25:55,464] =====================================================================================
SQL Command - Statement Id: [getDocList] Parameters: [param0=[instcd,111], param1=[orddeptcd, ], param2=[srchdd,20161221]]
[Logging Date Time: 2016-12-21 11:25:55,464] =====================================================================================
SQL Command - Statement Id: [getDocList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:55,464] =====================================================================================
SQL Command - Statement Id: [getDocList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:56,887] =====================================================================================
SQL Command - Statement Id: [GET_USER_INFO] PreparedStatement : [select a.userid, a.usernm, b.dutplcecd, dept.depthngnm, dept.deptengabbr, b.jobkindcd, (select cdnm from com.zbcmcode code where code.cdgrupid = 'R0061' and code.cdid = b.jobkindcd and code.valitodd = '99991231') from com.zsumusrb a, com.zsumusrd b, com.zsdddept dept where a.dutinstcd = '111' and a.dutinstcd = b.dutplceinstcd and a.userid = b.userid and a.usertodd = b.todd and dept.instcd = a.dutinstcd and dept.deptcd = b.dutplcecd and dept.valitodd = '99991231' and a.usertodd = '99991231' and b.userid = :param0]
[Logging Date Time: 2016-12-21 11:25:56,887] =====================================================================================
SQL Command - Statement Id: [GET_USER_INFO] PreparedStatement : [select a.userid, a.usernm, b.dutplcecd, dept.depthngnm, dept.deptengabbr, b.jobkindcd, (select cdnm from com.zbcmcode code where code.cdgrupid = 'R0061' and code.cdid = b.jobkindcd and code.valitodd = '99991231') from com.zsumusrb a, com.zsumusrd b, com.zsdddept dept where a.dutinstcd = '111' and a.dutinstcd = b.dutplceinstcd and a.userid = b.userid and a.usertodd = b.todd and dept.instcd = a.dutinstcd and dept.deptcd = b.dutplcecd and dept.valitodd = '99991231' and a.usertodd = '99991231' and b.userid = :param0]
[Logging Date Time: 2016-12-21 11:25:56,887] =====================================================================================
SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104876]]
[Logging Date Time: 2016-12-21 11:25:56,887] =====================================================================================
SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104876]]
[Logging Date Time: 2016-12-21 11:25:56,887] =====================================================================================
SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:56,887] =====================================================================================
SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:57,112] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:25:57,112] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:25:57,114] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:57,114] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:57,114] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:57,114] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:57,574] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] PreparedStatement : [SELECT '1' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD = :param3 union all SELECT '1' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD = :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' UNION ALL SELECT '99' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD != :param3 union all SELECT '99' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD != :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' order by ORDERBY, cretno desc]
[Logging Date Time: 2016-12-21 11:25:57,574] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] PreparedStatement : [SELECT '1' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD = :param3 union all SELECT '1' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD = :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' UNION ALL SELECT '99' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD != :param3 union all SELECT '99' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD != :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' order by ORDERBY, cretno desc]
[Logging Date Time: 2016-12-21 11:25:57,575] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[searchClnDate,20161221], param3=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:57,575] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[searchClnDate,20161221], param3=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:57,575] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:57,575] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:57,751] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:25:57,751] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:25:57,752] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:57,752] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:57,752] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:57,752] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:57,866] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:25:57,866] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:25:57,866] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:57,866] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:57,867] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:57,867] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:57,974] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:25:57,974] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:25:57,975] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:57,975] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:57,975] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:57,975] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:58,088] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] PreparedStatement : [SELECT '1' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD = :param3 union all SELECT '1' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD = :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' UNION ALL SELECT '99' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD != :param3 union all SELECT '99' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD != :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' order by ORDERBY, cretno desc]
[Logging Date Time: 2016-12-21 11:25:58,088] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] PreparedStatement : [SELECT '1' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD = :param3 union all SELECT '1' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD = :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' UNION ALL SELECT '99' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD != :param3 union all SELECT '99' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD != :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' order by ORDERBY, cretno desc]
[Logging Date Time: 2016-12-21 11:25:58,089] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[searchClnDate,20161221], param3=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:58,089] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[searchClnDate,20161221], param3=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:58,089] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:58,089] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:58,304] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:25:58,304] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:25:58,305] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:58,305] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:58,305] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:58,305] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:58,493] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:25:58,493] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:25:58,494] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:58,494] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:25:58,494] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:58,494] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:59,597] =====================================================================================
SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'ÀÓ½ÃÀúÀå', 'ELECTR_CMP', '¼¸í', 'PAPER_OUT', 'Ãâ·Â' , 'CERTIFY_CMP', 'ÀÎÁõ', 'UNFINISHED', '¹ÌÀÛ¼º', 'VERBAL', '±¸µÎ') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
[Logging Date Time: 2016-12-21 11:25:59,597] =====================================================================================
SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'ÀÓ½ÃÀúÀå', 'ELECTR_CMP', '¼¸í', 'PAPER_OUT', 'Ãâ·Â' , 'CERTIFY_CMP', 'ÀÎÁõ', 'UNFINISHED', '¹ÌÀÛ¼º', 'VERBAL', '±¸µÎ') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
[Logging Date Time: 2016-12-21 11:25:59,597] =====================================================================================
SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,1462723], param1=[startDt,20010601], param2=[endDt,20161221]]
[Logging Date Time: 2016-12-21 11:25:59,597] =====================================================================================
SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,1462723], param1=[startDt,20010601], param2=[endDt,20161221]]
[Logging Date Time: 2016-12-21 11:25:59,597] =====================================================================================
SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:25:59,597] =====================================================================================
SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:00,146] =====================================================================================
SQL Command - Statement Id: [getDeptList] PreparedStatement : [SELECT ' ' as deptcd, 'Áø·á°ú' as deptnm, 0 as clincdeptdispseq, 0 as sort from dual UNION ALL SELECT deptcd, depthngnm as deptnm, clincdeptdispseq, 1 as sort FROM com.zsdddept WHERE instcd = :param0 AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')>=valifromdd AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')<=valitodd AND rcptuseyn = 'Y' ORDER BY clincdeptdispseq ASC]
[Logging Date Time: 2016-12-21 11:26:00,146] =====================================================================================
SQL Command - Statement Id: [getDeptList] PreparedStatement : [SELECT ' ' as deptcd, 'Áø·á°ú' as deptnm, 0 as clincdeptdispseq, 0 as sort from dual UNION ALL SELECT deptcd, depthngnm as deptnm, clincdeptdispseq, 1 as sort FROM com.zsdddept WHERE instcd = :param0 AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')>=valifromdd AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')<=valitodd AND rcptuseyn = 'Y' ORDER BY clincdeptdispseq ASC]
[Logging Date Time: 2016-12-21 11:26:00,146] =====================================================================================
SQL Command - Statement Id: [getDeptList] Parameters: [param0=[instcd,111]]
[Logging Date Time: 2016-12-21 11:26:00,146] =====================================================================================
SQL Command - Statement Id: [getDeptList] Parameters: [param0=[instcd,111]]
[Logging Date Time: 2016-12-21 11:26:00,147] =====================================================================================
SQL Command - Statement Id: [getDeptList] Types: [param0=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:00,147] =====================================================================================
SQL Command - Statement Id: [getDeptList] Types: [param0=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:00,321] =====================================================================================
SQL Command - Statement Id: [getDocList] PreparedStatement : [SELECT ' ' as doctorid, 'Áø·áÀÇ' as doctornm, 1 as sort from dual UNION ALL SELECT b.userid AS doctorid, b.usernm AS doctornm, 2 as sort FROM com.zsumusrd a INNER JOIN com.zsumusrb b ON a.userid = b.userid WHERE a.psnworkyn = 'N' AND a.dutplceinstcd = :param0 AND a.jobkindcd LIKE '03%' AND a.dutplcecd = :param1 AND :param2 BETWEEN a.fromdd AND a.todd AND :param2 BETWEEN b.userfromdd AND b.usertodd ORDER BY sort, doctorid]
[Logging Date Time: 2016-12-21 11:26:00,321] =====================================================================================
SQL Command - Statement Id: [getDocList] PreparedStatement : [SELECT ' ' as doctorid, 'Áø·áÀÇ' as doctornm, 1 as sort from dual UNION ALL SELECT b.userid AS doctorid, b.usernm AS doctornm, 2 as sort FROM com.zsumusrd a INNER JOIN com.zsumusrb b ON a.userid = b.userid WHERE a.psnworkyn = 'N' AND a.dutplceinstcd = :param0 AND a.jobkindcd LIKE '03%' AND a.dutplcecd = :param1 AND :param2 BETWEEN a.fromdd AND a.todd AND :param2 BETWEEN b.userfromdd AND b.usertodd ORDER BY sort, doctorid]
[Logging Date Time: 2016-12-21 11:26:00,321] =====================================================================================
SQL Command - Statement Id: [getDocList] Parameters: [param0=[instcd,111], param1=[orddeptcd, ], param2=[srchdd,20161221]]
[Logging Date Time: 2016-12-21 11:26:00,321] =====================================================================================
SQL Command - Statement Id: [getDocList] Parameters: [param0=[instcd,111], param1=[orddeptcd, ], param2=[srchdd,20161221]]
[Logging Date Time: 2016-12-21 11:26:00,322] =====================================================================================
SQL Command - Statement Id: [getDocList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:00,322] =====================================================================================
SQL Command - Statement Id: [getDocList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:00,409] =====================================================================================
SQL Command - Statement Id: [getDocList] PreparedStatement : [SELECT ' ' as doctorid, 'Áø·áÀÇ' as doctornm, 1 as sort from dual UNION ALL SELECT b.userid AS doctorid, b.usernm AS doctornm, 2 as sort FROM com.zsumusrd a INNER JOIN com.zsumusrb b ON a.userid = b.userid WHERE a.psnworkyn = 'N' AND a.dutplceinstcd = :param0 AND a.jobkindcd LIKE '03%' AND a.dutplcecd in ('2040000000', '2040400000') AND :param1 BETWEEN a.fromdd AND a.todd AND :param1 BETWEEN b.userfromdd AND b.usertodd ORDER BY sort, doctorid]
[Logging Date Time: 2016-12-21 11:26:00,409] =====================================================================================
SQL Command - Statement Id: [getDocList] PreparedStatement : [SELECT ' ' as doctorid, 'Áø·áÀÇ' as doctornm, 1 as sort from dual UNION ALL SELECT b.userid AS doctorid, b.usernm AS doctornm, 2 as sort FROM com.zsumusrd a INNER JOIN com.zsumusrb b ON a.userid = b.userid WHERE a.psnworkyn = 'N' AND a.dutplceinstcd = :param0 AND a.jobkindcd LIKE '03%' AND a.dutplcecd in ('2040000000', '2040400000') AND :param1 BETWEEN a.fromdd AND a.todd AND :param1 BETWEEN b.userfromdd AND b.usertodd ORDER BY sort, doctorid]
[Logging Date Time: 2016-12-21 11:26:00,409] =====================================================================================
SQL Command - Statement Id: [getDocList] Parameters: [param0=[instcd,111], param1=[srchdd,20161221]]
[Logging Date Time: 2016-12-21 11:26:00,409] =====================================================================================
SQL Command - Statement Id: [getDocList] Parameters: [param0=[instcd,111], param1=[srchdd,20161221]]
[Logging Date Time: 2016-12-21 11:26:00,409] =====================================================================================
SQL Command - Statement Id: [getDocList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:00,409] =====================================================================================
SQL Command - Statement Id: [getDocList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:34,419] =====================================================================================
SQL Command - Statement Id: [getDeptList] PreparedStatement : [SELECT ' ' as deptcd, 'Áø·á°ú' as deptnm, 0 as clincdeptdispseq, 0 as sort from dual UNION ALL SELECT deptcd, depthngnm as deptnm, clincdeptdispseq, 1 as sort FROM com.zsdddept WHERE instcd = :param0 AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')>=valifromdd AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')<=valitodd AND rcptuseyn = 'Y' ORDER BY clincdeptdispseq ASC]
[Logging Date Time: 2016-12-21 11:26:34,419] =====================================================================================
SQL Command - Statement Id: [getDeptList] PreparedStatement : [SELECT ' ' as deptcd, 'Áø·á°ú' as deptnm, 0 as clincdeptdispseq, 0 as sort from dual UNION ALL SELECT deptcd, depthngnm as deptnm, clincdeptdispseq, 1 as sort FROM com.zsdddept WHERE instcd = :param0 AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')>=valifromdd AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')<=valitodd AND rcptuseyn = 'Y' ORDER BY clincdeptdispseq ASC]
[Logging Date Time: 2016-12-21 11:26:34,470] =====================================================================================
SQL Command - Statement Id: [getDeptList] Parameters: [param0=[instcd,111]]
[Logging Date Time: 2016-12-21 11:26:34,470] =====================================================================================
SQL Command - Statement Id: [getDeptList] Parameters: [param0=[instcd,111]]
[Logging Date Time: 2016-12-21 11:26:34,470] =====================================================================================
SQL Command - Statement Id: [getDeptList] Types: [param0=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:34,470] =====================================================================================
SQL Command - Statement Id: [getDeptList] Types: [param0=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:34,617] =====================================================================================
SQL Command - Statement Id: [getDocList] PreparedStatement : [SELECT ' ' as doctorid, 'Áø·áÀÇ' as doctornm, 1 as sort from dual UNION ALL SELECT b.userid AS doctorid, b.usernm AS doctornm, 2 as sort FROM com.zsumusrd a INNER JOIN com.zsumusrb b ON a.userid = b.userid WHERE a.psnworkyn = 'N' AND a.dutplceinstcd = :param0 AND a.jobkindcd LIKE '03%' AND a.dutplcecd = :param1 AND :param2 BETWEEN a.fromdd AND a.todd AND :param2 BETWEEN b.userfromdd AND b.usertodd ORDER BY sort, doctorid]
[Logging Date Time: 2016-12-21 11:26:34,617] =====================================================================================
SQL Command - Statement Id: [getDocList] PreparedStatement : [SELECT ' ' as doctorid, 'Áø·áÀÇ' as doctornm, 1 as sort from dual UNION ALL SELECT b.userid AS doctorid, b.usernm AS doctornm, 2 as sort FROM com.zsumusrd a INNER JOIN com.zsumusrb b ON a.userid = b.userid WHERE a.psnworkyn = 'N' AND a.dutplceinstcd = :param0 AND a.jobkindcd LIKE '03%' AND a.dutplcecd = :param1 AND :param2 BETWEEN a.fromdd AND a.todd AND :param2 BETWEEN b.userfromdd AND b.usertodd ORDER BY sort, doctorid]
[Logging Date Time: 2016-12-21 11:26:34,617] =====================================================================================
SQL Command - Statement Id: [getDocList] Parameters: [param0=[instcd,111], param1=[orddeptcd, ], param2=[srchdd,20161221]]
[Logging Date Time: 2016-12-21 11:26:34,617] =====================================================================================
SQL Command - Statement Id: [getDocList] Parameters: [param0=[instcd,111], param1=[orddeptcd, ], param2=[srchdd,20161221]]
[Logging Date Time: 2016-12-21 11:26:34,617] =====================================================================================
SQL Command - Statement Id: [getDocList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:34,617] =====================================================================================
SQL Command - Statement Id: [getDocList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,043] =====================================================================================
SQL Command - Statement Id: [GET_USER_INFO] PreparedStatement : [select a.userid, a.usernm, b.dutplcecd, dept.depthngnm, dept.deptengabbr, b.jobkindcd, (select cdnm from com.zbcmcode code where code.cdgrupid = 'R0061' and code.cdid = b.jobkindcd and code.valitodd = '99991231') from com.zsumusrb a, com.zsumusrd b, com.zsdddept dept where a.dutinstcd = '111' and a.dutinstcd = b.dutplceinstcd and a.userid = b.userid and a.usertodd = b.todd and dept.instcd = a.dutinstcd and dept.deptcd = b.dutplcecd and dept.valitodd = '99991231' and a.usertodd = '99991231' and b.userid = :param0]
[Logging Date Time: 2016-12-21 11:26:35,043] =====================================================================================
SQL Command - Statement Id: [GET_USER_INFO] PreparedStatement : [select a.userid, a.usernm, b.dutplcecd, dept.depthngnm, dept.deptengabbr, b.jobkindcd, (select cdnm from com.zbcmcode code where code.cdgrupid = 'R0061' and code.cdid = b.jobkindcd and code.valitodd = '99991231') from com.zsumusrb a, com.zsumusrd b, com.zsdddept dept where a.dutinstcd = '111' and a.dutinstcd = b.dutplceinstcd and a.userid = b.userid and a.usertodd = b.todd and dept.instcd = a.dutinstcd and dept.deptcd = b.dutplcecd and dept.valitodd = '99991231' and a.usertodd = '99991231' and b.userid = :param0]
[Logging Date Time: 2016-12-21 11:26:35,044] =====================================================================================
SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104876]]
[Logging Date Time: 2016-12-21 11:26:35,044] =====================================================================================
SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104876]]
[Logging Date Time: 2016-12-21 11:26:35,044] =====================================================================================
SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,044] =====================================================================================
SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,118] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:26:35,118] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:26:35,119] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,119] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,119] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,119] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,359] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] PreparedStatement : [SELECT '1' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD = :param3 union all SELECT '1' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD = :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' UNION ALL SELECT '99' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD != :param3 union all SELECT '99' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD != :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' order by ORDERBY, cretno desc]
[Logging Date Time: 2016-12-21 11:26:35,359] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] PreparedStatement : [SELECT '1' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD = :param3 union all SELECT '1' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD = :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' UNION ALL SELECT '99' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD != :param3 union all SELECT '99' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD != :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' order by ORDERBY, cretno desc]
[Logging Date Time: 2016-12-21 11:26:35,359] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[searchClnDate,20161221], param3=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,359] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[searchClnDate,20161221], param3=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,359] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,359] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,434] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:26:35,434] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:26:35,434] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,434] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,434] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,434] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,492] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:26:35,492] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:26:35,492] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,492] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,492] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,492] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,542] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:26:35,542] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:26:35,543] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,543] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,543] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,543] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,605] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] PreparedStatement : [SELECT '1' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD = :param3 union all SELECT '1' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD = :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' UNION ALL SELECT '99' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD != :param3 union all SELECT '99' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD != :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' order by ORDERBY, cretno desc]
[Logging Date Time: 2016-12-21 11:26:35,605] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] PreparedStatement : [SELECT '1' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD = :param3 union all SELECT '1' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD = :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' UNION ALL SELECT '99' AS ORDERBY, indd as ClnDate, substr(indd, 1, 4) || '-' || substr(indd, 5, 2) || '-' || substr(indd, 7, 2) as ClnFormatDate, inpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, inpt.cretno, inpt.medispclid as orddrid FROM pam.pmihinpt inpt left outer join com.zsdddept dept on (dept.instcd = inpt.instcd and dept.deptcd = inpt.orddeptcd and dept.valitodd = '99991231') WHERE inpt.instcd = :param0 AND inpt.pid = :param1 AND inpt.indd = :param2 AND inpt.histstat = 'Y' AND inpt.mskind = 'M' AND inpt.ORDDEPTCD != :param3 union all SELECT '99' AS ORDERBY, orddd as ClnDate, substr(orddd, 1, 4) || '-' || substr(orddd, 5, 2) || '-' || substr(orddd, 7, 2) as ClnFormatDate, otpt.ordtype as VisitType, case when ordtype = 'O' then '¿Ü·¡' when ordtype = 'I' then 'ÀÔ¿ø' when ordtype = 'E' then 'ÀÀ±Þ' end as VisitTypeName, dept.deptengabbr as ClnDeptCode, dept.depthngnm as ClnDeptName, dept.deptcd as DeptCd, otpt.cretno, otpt.orddrid as orddrid FROM pam.pmohotpt otpt left outer join com.zsdddept dept on (dept.instcd = otpt.instcd and dept.deptcd = otpt.orddeptcd and dept.valitodd = '99991231') WHERE otpt.instcd = :param0 AND otpt.pid = :param1 AND otpt.orddd = :param2 AND OTPT.ORDDEPTCD != :param3 AND otpt.HISTSTAT IN ('R', 'T') AND otpt.MSKIND = 'M' order by ORDERBY, cretno desc]
[Logging Date Time: 2016-12-21 11:26:35,606] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[searchClnDate,20161221], param3=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,606] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[searchClnDate,20161221], param3=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,606] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,606] =====================================================================================
SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,640] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:26:35,640] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:26:35,640] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,640] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,640] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,640] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,695] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:26:35,695] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, ( ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) ||'******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid='P0008' and cdid =a.insukind) as IO_Insukind, '' as IO_Ward, '' as IO_roomNO, a.orddd as IO_ADdate, a.orddd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.orddd and dept.valifromdd <= a.orddd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.orddd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.orddd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.orddd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, COM.FN_ZS_GETUSERNM(a.orddrid, a.orddd) as IO_MaindrNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '111' as IO_OrderNo, '111' as IO_PrintTime, a.ORDDRID as IO_MaindrId, '' as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_MaindrNm, '111' as IO_OcrCd, a.ORDDRID as IO_InputId, COM.FN_ZS_GETUSERNM(a.ORDDRID, a.orddd) as IO_InputNm, '111' as IO_SignImg FROM pam.pmohotpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.orddd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.orddd = :param2 AND A.HISTSTAT IN ('R', 'T') AND A.MSKIND = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4]
[Logging Date Time: 2016-12-21 11:26:35,695] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,695] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161221], param3=[cretno,1], param4=[orddeptcd,2040000000]]
[Logging Date Time: 2016-12-21 11:26:35,695] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:35,695] =====================================================================================
SQL Command - Statement Id: [getPatientInfoOut] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:36,245] =====================================================================================
SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'ÀÓ½ÃÀúÀå', 'ELECTR_CMP', '¼¸í', 'PAPER_OUT', 'Ãâ·Â' , 'CERTIFY_CMP', 'ÀÎÁõ', 'UNFINISHED', '¹ÌÀÛ¼º', 'VERBAL', '±¸µÎ') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
[Logging Date Time: 2016-12-21 11:26:36,245] =====================================================================================
SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'ÀÓ½ÃÀúÀå', 'ELECTR_CMP', '¼¸í', 'PAPER_OUT', 'Ãâ·Â' , 'CERTIFY_CMP', 'ÀÎÁõ', 'UNFINISHED', '¹ÌÀÛ¼º', 'VERBAL', '±¸µÎ') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
[Logging Date Time: 2016-12-21 11:26:36,245] =====================================================================================
SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,1462723], param1=[startDt,20010601], param2=[endDt,20161221]]
[Logging Date Time: 2016-12-21 11:26:36,245] =====================================================================================
SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,1462723], param1=[startDt,20010601], param2=[endDt,20161221]]
[Logging Date Time: 2016-12-21 11:26:36,245] =====================================================================================
SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:36,245] =====================================================================================
SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:36,461] =====================================================================================
SQL Command - Statement Id: [getDeptList] PreparedStatement : [SELECT ' ' as deptcd, 'Áø·á°ú' as deptnm, 0 as clincdeptdispseq, 0 as sort from dual UNION ALL SELECT deptcd, depthngnm as deptnm, clincdeptdispseq, 1 as sort FROM com.zsdddept WHERE instcd = :param0 AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')>=valifromdd AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')<=valitodd AND rcptuseyn = 'Y' ORDER BY clincdeptdispseq ASC]
[Logging Date Time: 2016-12-21 11:26:36,461] =====================================================================================
SQL Command - Statement Id: [getDeptList] PreparedStatement : [SELECT ' ' as deptcd, 'Áø·á°ú' as deptnm, 0 as clincdeptdispseq, 0 as sort from dual UNION ALL SELECT deptcd, depthngnm as deptnm, clincdeptdispseq, 1 as sort FROM com.zsdddept WHERE instcd = :param0 AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')>=valifromdd AND TO_CHAR(CURRENT_DATE,'YYYYMMDD')<=valitodd AND rcptuseyn = 'Y' ORDER BY clincdeptdispseq ASC]
[Logging Date Time: 2016-12-21 11:26:36,461] =====================================================================================
SQL Command - Statement Id: [getDeptList] Parameters: [param0=[instcd,111]]
[Logging Date Time: 2016-12-21 11:26:36,461] =====================================================================================
SQL Command - Statement Id: [getDeptList] Parameters: [param0=[instcd,111]]
[Logging Date Time: 2016-12-21 11:26:36,461] =====================================================================================
SQL Command - Statement Id: [getDeptList] Types: [param0=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:36,461] =====================================================================================
SQL Command - Statement Id: [getDeptList] Types: [param0=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:36,518] =====================================================================================
SQL Command - Statement Id: [getDocList] PreparedStatement : [SELECT ' ' as doctorid, 'Áø·áÀÇ' as doctornm, 1 as sort from dual UNION ALL SELECT b.userid AS doctorid, b.usernm AS doctornm, 2 as sort FROM com.zsumusrd a INNER JOIN com.zsumusrb b ON a.userid = b.userid WHERE a.psnworkyn = 'N' AND a.dutplceinstcd = :param0 AND a.jobkindcd LIKE '03%' AND a.dutplcecd = :param1 AND :param2 BETWEEN a.fromdd AND a.todd AND :param2 BETWEEN b.userfromdd AND b.usertodd ORDER BY sort, doctorid]
[Logging Date Time: 2016-12-21 11:26:36,518] =====================================================================================
SQL Command - Statement Id: [getDocList] PreparedStatement : [SELECT ' ' as doctorid, 'Áø·áÀÇ' as doctornm, 1 as sort from dual UNION ALL SELECT b.userid AS doctorid, b.usernm AS doctornm, 2 as sort FROM com.zsumusrd a INNER JOIN com.zsumusrb b ON a.userid = b.userid WHERE a.psnworkyn = 'N' AND a.dutplceinstcd = :param0 AND a.jobkindcd LIKE '03%' AND a.dutplcecd = :param1 AND :param2 BETWEEN a.fromdd AND a.todd AND :param2 BETWEEN b.userfromdd AND b.usertodd ORDER BY sort, doctorid]
[Logging Date Time: 2016-12-21 11:26:36,518] =====================================================================================
SQL Command - Statement Id: [getDocList] Parameters: [param0=[instcd,111], param1=[orddeptcd, ], param2=[srchdd,20161221]]
[Logging Date Time: 2016-12-21 11:26:36,518] =====================================================================================
SQL Command - Statement Id: [getDocList] Parameters: [param0=[instcd,111], param1=[orddeptcd, ], param2=[srchdd,20161221]]
[Logging Date Time: 2016-12-21 11:26:36,518] =====================================================================================
SQL Command - Statement Id: [getDocList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:36,518] =====================================================================================
SQL Command - Statement Id: [getDocList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:36,547] =====================================================================================
SQL Command - Statement Id: [getDocList] PreparedStatement : [SELECT ' ' as doctorid, 'Áø·áÀÇ' as doctornm, 1 as sort from dual UNION ALL SELECT b.userid AS doctorid, b.usernm AS doctornm, 2 as sort FROM com.zsumusrd a INNER JOIN com.zsumusrb b ON a.userid = b.userid WHERE a.psnworkyn = 'N' AND a.dutplceinstcd = :param0 AND a.jobkindcd LIKE '03%' AND a.dutplcecd in ('2040000000', '2040400000') AND :param1 BETWEEN a.fromdd AND a.todd AND :param1 BETWEEN b.userfromdd AND b.usertodd ORDER BY sort, doctorid]
[Logging Date Time: 2016-12-21 11:26:36,547] =====================================================================================
SQL Command - Statement Id: [getDocList] PreparedStatement : [SELECT ' ' as doctorid, 'Áø·áÀÇ' as doctornm, 1 as sort from dual UNION ALL SELECT b.userid AS doctorid, b.usernm AS doctornm, 2 as sort FROM com.zsumusrd a INNER JOIN com.zsumusrb b ON a.userid = b.userid WHERE a.psnworkyn = 'N' AND a.dutplceinstcd = :param0 AND a.jobkindcd LIKE '03%' AND a.dutplcecd in ('2040000000', '2040400000') AND :param1 BETWEEN a.fromdd AND a.todd AND :param1 BETWEEN b.userfromdd AND b.usertodd ORDER BY sort, doctorid]
[Logging Date Time: 2016-12-21 11:26:36,547] =====================================================================================
SQL Command - Statement Id: [getDocList] Parameters: [param0=[instcd,111], param1=[srchdd,20161221]]
[Logging Date Time: 2016-12-21 11:26:36,547] =====================================================================================
SQL Command - Statement Id: [getDocList] Parameters: [param0=[instcd,111], param1=[srchdd,20161221]]
[Logging Date Time: 2016-12-21 11:26:36,547] =====================================================================================
SQL Command - Statement Id: [getDocList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:36,547] =====================================================================================
SQL Command - Statement Id: [getDocList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:40,396] =====================================================================================
SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
[Logging Date Time: 2016-12-21 11:26:40,396] =====================================================================================
SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
[Logging Date Time: 2016-12-21 11:26:40,397] =====================================================================================
SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161127], param3=[cretno,1], param4=[orddeptcd,2280000000]]
[Logging Date Time: 2016-12-21 11:26:40,397] =====================================================================================
SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,1462723], param2=[orddd,20161127], param3=[cretno,1], param4=[orddeptcd,2280000000]]
[Logging Date Time: 2016-12-21 11:26:40,397] =====================================================================================
SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:40,397] =====================================================================================
SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:40,648] =====================================================================================
SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
[Logging Date Time: 2016-12-21 11:26:40,648] =====================================================================================
SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
[Logging Date Time: 2016-12-21 11:26:40,648] =====================================================================================
SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104876]]
[Logging Date Time: 2016-12-21 11:26:40,648] =====================================================================================
SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104876]]
[Logging Date Time: 2016-12-21 11:26:40,648] =====================================================================================
SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:40,648] =====================================================================================
SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
[Logging Date Time: 2016-12-21 11:26:40,953] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
[Logging Date Time: 2016-12-21 11:26:40,953] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
[Logging Date Time: 2016-12-21 11:26:40,954] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,5267]]
[Logging Date Time: 2016-12-21 11:26:40,954] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,5267]]
[Logging Date Time: 2016-12-21 11:26:40,954] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
[Logging Date Time: 2016-12-21 11:26:40,954] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
[Logging Date Time: 2016-12-21 11:26:45,700] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
[Logging Date Time: 2016-12-21 11:26:45,700] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
[Logging Date Time: 2016-12-21 11:26:45,700] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,5267]]
[Logging Date Time: 2016-12-21 11:26:45,700] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,5267]]
[Logging Date Time: 2016-12-21 11:26:45,701] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
[Logging Date Time: 2016-12-21 11:26:45,701] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
[Logging Date Time: 2016-12-21 11:26:45,751] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
[Logging Date Time: 2016-12-21 11:26:45,751] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
[Logging Date Time: 2016-12-21 11:26:45,751] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,5267]]
[Logging Date Time: 2016-12-21 11:26:45,751] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,5267]]
[Logging Date Time: 2016-12-21 11:26:45,751] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
[Logging Date Time: 2016-12-21 11:26:45,751] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
[Logging Date Time: 2016-12-21 11:26:47,687] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
[Logging Date Time: 2016-12-21 11:26:47,687] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
[Logging Date Time: 2016-12-21 11:26:47,687] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,5267]]
[Logging Date Time: 2016-12-21 11:26:47,687] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,5267]]
[Logging Date Time: 2016-12-21 11:26:47,687] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
[Logging Date Time: 2016-12-21 11:26:47,687] =====================================================================================
SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
[Logging Date Time: 2016-12-21 11:26:47,961] =====================================================================================
SQL Command - CLIP.eForm SaveTempData param : clnDept[104876]patientCode[1462723]clnDeptCode[2280000000]formRid[1494]formCd[1300010252]consentMstRid[5267]rewriteConsentMstRid[0]deviceType[WIN]vistType[E]hosType[111]clnDate[20161127]ward[ER]roomcd[ER]orderNo[0]orderName[¸íÄ¡ ÅëÁõ]orderCd[R1012.000.00]ocrCode[2016112701638]cretno[1]createUserName[¹ÚÁ¾ÈÆ]modifyUserName[¹ÚÁ¾ÈÆ]deviceIdentNo[16-101-33]mainDrId[107854]dataXml[ | | |
| | |
| | |
| | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | |
| | | | | | |
| | | |
| | | | |
|
| |
| |
| | | | |
]formXml[ | | |
| | |
| | |
| | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | |
| | | | | | |
| | | |
| | | | |
|
| |
| |
| | | | |
]