eFormServer.iBATIS.log_2016-12-08 263 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. [Logging Date Time: 2016-12-08 14:16:17,425] =====================================================================================
  2. 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]
  3. [Logging Date Time: 2016-12-08 14:16:17,457] =====================================================================================
  4. SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,1491042], param1=[startDt,20010601], param2=[endDt,20161208]]
  5. [Logging Date Time: 2016-12-08 14:16:17,457] =====================================================================================
  6. SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,1491042], param1=[startDt,20010601], param2=[endDt,20161208]]
  7. [Logging Date Time: 2016-12-08 14:16:17,457] =====================================================================================
  8. SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  9. [Logging Date Time: 2016-12-08 14:16:17,457] =====================================================================================
  10. SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  11. [Logging Date Time: 2016-12-08 14:16:24,240] =====================================================================================
  12. SQL Command - Statement Id: [getInPatList] PreparedStatement : [SELECT distinct ptbs.pid AS pid, substr(inpt.indd,1,4) || '/' || substr(inpt.indd,5,2) || '/' || substr(inpt.indd,7,2) AS indd, inpt.indd AS orddd, inpt.cretno AS cretno, inpt.seqno AS seqno, inpt.instcd AS instcd, ptbs.hngnm AS hngnm, (select code.cdnm from com.zbcmcode code where code.cdgrupid = 'P0021' and code.valifromdd <= inpt.indd and code.valitodd >= inpt.indd and code.cdid = inpt.fsexamflag) AS fsexamflag, /*+ index_desc(icdr IX_PMIHICDR_03) */ icdr.orddeptcd AS orddeptcd, icdr.medispclid AS doctorid, TO_DATE('20161208') - TO_DATE(inpt.indd) AS hd, TRIM(ptbs.sex || '/' || LPAD(FLOOR(COM.FN_ZZ_GETAGE_EMR2('000000','0000000','20161208', 'B', ptbs.brthdd) / 12), 2, 0) || 'y' || LPAD(MOD(COM.FN_ZZ_GETAGE_EMR2('000000','0000000','20161208', 'B', ptbs.brthdd), 12), 2, 0) || 'm') AS sa, dept.depthngnm AS deptnm, dept.DEPTENGABBR AS deptengabbr, NVL((SELECT usernm FROM com.zsumusrb WHERE userid = icdr.medispclid AND userfromdd <= :param0 AND usertodd >= :param0 ), '-') AS doctornm, (SELECT term.termengnm FROM emr.mmohdiag diag, emr.mrtmterm term WHERE diag.diagcd = term.termcd AND diag.instcd = term.instcd AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.pid = inpt.pid AND diag.orddd = inpt.indd AND diag.cretno = inpt.cretno AND diag.orddeptcd = icdr.orddeptcd AND diag.instcd = inpt.instcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND ROWNUM = 1) AS diagnm, CASE inpt.indschacptstat WHEN 'D' THEN '퇴원' WHEN 'T' THEN '가퇴원' ELSE (CASE inpt.dschnotiyn WHEN 'Y' THEN '퇴원통보' ELSE (CASE inpt.dschdclrtyn WHEN 'Y' THEN '퇴원예고' ELSE '-' END) END) END AS dschnoti, icdr.roomcd AS roomcd, CASE WHEN (SELECT COUNT(instcd) FROM emr.mmrhcnstinfo WHERE pid = inpt.pid AND orddd = inpt.indd AND cretno = inpt.cretno AND reqdd = :param0 AND chosflag IN ('I','E') AND cnstflag IN ('1','2') AND ROWNUM = 1) > 0 THEN 'Y' ELSE 'N' END AS cnst, icdr.ordtype AS ordtype, (SELECT z.cdnm FROM com.zbcmcode z WHERE inpt.insukind = z.cdid AND z.cdgrupid = 'P0008' AND inpt.indd BETWEEN z.valifromdd AND z.valitodd) AS bostyle, 'N' AS elbulbodstat, 'N' AS ordtm FROM pam.pmihinpt inpt, pam.pmihicdr icdr, com.zsdddept dept, pam.pmcmptbs ptbs WHERE inpt.histstat = 'Y' AND inpt.mskind = 'M' AND icdr.ordtype IN ('I', 'D') AND inpt.instcd = :param1 AND inpt.pid = icdr.pid AND inpt.pid = icdr.pid AND inpt.indd = icdr.indd AND inpt.cretno = icdr.cretno AND inpt.instcd = icdr.instcd AND inpt.histstat = icdr.histstat AND icdr.fromdd <= :param0 AND icdr.todd >= :param0 AND icdr.pid = ptbs.pid AND icdr.instcd = ptbs.instcd AND icdr.instcd = dept.instcd AND icdr.orddeptcd = dept.deptcd AND dept.orddeptflag = 'D' AND dept.orduseyn = 'Y' AND dept.valifromdd <= :param0 AND dept.valitodd >= :param0 AND icdr.wardcd = :param2 AND icdr.indschacptstat IN ('A', 'D', 'T') order by roomcd, hngnm]
  13. [Logging Date Time: 2016-12-08 14:16:24,240] =====================================================================================
  14. SQL Command - Statement Id: [getInPatList] PreparedStatement : [SELECT distinct ptbs.pid AS pid, substr(inpt.indd,1,4) || '/' || substr(inpt.indd,5,2) || '/' || substr(inpt.indd,7,2) AS indd, inpt.indd AS orddd, inpt.cretno AS cretno, inpt.seqno AS seqno, inpt.instcd AS instcd, ptbs.hngnm AS hngnm, (select code.cdnm from com.zbcmcode code where code.cdgrupid = 'P0021' and code.valifromdd <= inpt.indd and code.valitodd >= inpt.indd and code.cdid = inpt.fsexamflag) AS fsexamflag, /*+ index_desc(icdr IX_PMIHICDR_03) */ icdr.orddeptcd AS orddeptcd, icdr.medispclid AS doctorid, TO_DATE('20161208') - TO_DATE(inpt.indd) AS hd, TRIM(ptbs.sex || '/' || LPAD(FLOOR(COM.FN_ZZ_GETAGE_EMR2('000000','0000000','20161208', 'B', ptbs.brthdd) / 12), 2, 0) || 'y' || LPAD(MOD(COM.FN_ZZ_GETAGE_EMR2('000000','0000000','20161208', 'B', ptbs.brthdd), 12), 2, 0) || 'm') AS sa, dept.depthngnm AS deptnm, dept.DEPTENGABBR AS deptengabbr, NVL((SELECT usernm FROM com.zsumusrb WHERE userid = icdr.medispclid AND userfromdd <= :param0 AND usertodd >= :param0 ), '-') AS doctornm, (SELECT term.termengnm FROM emr.mmohdiag diag, emr.mrtmterm term WHERE diag.diagcd = term.termcd AND diag.instcd = term.instcd AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.pid = inpt.pid AND diag.orddd = inpt.indd AND diag.cretno = inpt.cretno AND diag.orddeptcd = icdr.orddeptcd AND diag.instcd = inpt.instcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND ROWNUM = 1) AS diagnm, CASE inpt.indschacptstat WHEN 'D' THEN '퇴원' WHEN 'T' THEN '가퇴원' ELSE (CASE inpt.dschnotiyn WHEN 'Y' THEN '퇴원통보' ELSE (CASE inpt.dschdclrtyn WHEN 'Y' THEN '퇴원예고' ELSE '-' END) END) END AS dschnoti, icdr.roomcd AS roomcd, CASE WHEN (SELECT COUNT(instcd) FROM emr.mmrhcnstinfo WHERE pid = inpt.pid AND orddd = inpt.indd AND cretno = inpt.cretno AND reqdd = :param0 AND chosflag IN ('I','E') AND cnstflag IN ('1','2') AND ROWNUM = 1) > 0 THEN 'Y' ELSE 'N' END AS cnst, icdr.ordtype AS ordtype, (SELECT z.cdnm FROM com.zbcmcode z WHERE inpt.insukind = z.cdid AND z.cdgrupid = 'P0008' AND inpt.indd BETWEEN z.valifromdd AND z.valitodd) AS bostyle, 'N' AS elbulbodstat, 'N' AS ordtm FROM pam.pmihinpt inpt, pam.pmihicdr icdr, com.zsdddept dept, pam.pmcmptbs ptbs WHERE inpt.histstat = 'Y' AND inpt.mskind = 'M' AND icdr.ordtype IN ('I', 'D') AND inpt.instcd = :param1 AND inpt.pid = icdr.pid AND inpt.pid = icdr.pid AND inpt.indd = icdr.indd AND inpt.cretno = icdr.cretno AND inpt.instcd = icdr.instcd AND inpt.histstat = icdr.histstat AND icdr.fromdd <= :param0 AND icdr.todd >= :param0 AND icdr.pid = ptbs.pid AND icdr.instcd = ptbs.instcd AND icdr.instcd = dept.instcd AND icdr.orddeptcd = dept.deptcd AND dept.orddeptflag = 'D' AND dept.orduseyn = 'Y' AND dept.valifromdd <= :param0 AND dept.valitodd >= :param0 AND icdr.wardcd = :param2 AND icdr.indschacptstat IN ('A', 'D', 'T') order by roomcd, hngnm]
  15. [Logging Date Time: 2016-12-08 14:16:24,241] =====================================================================================
  16. SQL Command - Statement Id: [getInPatList] Parameters: [param0=[srchdd,20161208], param1=[instcd,111], param2=[wardcd,3041703000]]
  17. [Logging Date Time: 2016-12-08 14:16:24,241] =====================================================================================
  18. SQL Command - Statement Id: [getInPatList] Parameters: [param0=[srchdd,20161208], param1=[instcd,111], param2=[wardcd,3041703000]]
  19. [Logging Date Time: 2016-12-08 14:16:24,241] =====================================================================================
  20. SQL Command - Statement Id: [getInPatList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  21. [Logging Date Time: 2016-12-08 14:16:24,241] =====================================================================================
  22. SQL Command - Statement Id: [getInPatList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  23. [Logging Date Time: 2016-12-08 14:16:34,693] =====================================================================================
  24. SQL Command - Statement Id: [getInPatList] PreparedStatement : [SELECT distinct ptbs.pid AS pid, substr(inpt.indd,1,4) || '/' || substr(inpt.indd,5,2) || '/' || substr(inpt.indd,7,2) AS indd, inpt.indd AS orddd, inpt.cretno AS cretno, inpt.seqno AS seqno, inpt.instcd AS instcd, ptbs.hngnm AS hngnm, (select code.cdnm from com.zbcmcode code where code.cdgrupid = 'P0021' and code.valifromdd <= inpt.indd and code.valitodd >= inpt.indd and code.cdid = inpt.fsexamflag) AS fsexamflag, /*+ index_desc(icdr IX_PMIHICDR_03) */ icdr.orddeptcd AS orddeptcd, icdr.medispclid AS doctorid, TO_DATE('20161208') - TO_DATE(inpt.indd) AS hd, TRIM(ptbs.sex || '/' || LPAD(FLOOR(COM.FN_ZZ_GETAGE_EMR2('000000','0000000','20161208', 'B', ptbs.brthdd) / 12), 2, 0) || 'y' || LPAD(MOD(COM.FN_ZZ_GETAGE_EMR2('000000','0000000','20161208', 'B', ptbs.brthdd), 12), 2, 0) || 'm') AS sa, dept.depthngnm AS deptnm, dept.DEPTENGABBR AS deptengabbr, NVL((SELECT usernm FROM com.zsumusrb WHERE userid = icdr.medispclid AND userfromdd <= :param0 AND usertodd >= :param0 ), '-') AS doctornm, (SELECT term.termengnm FROM emr.mmohdiag diag, emr.mrtmterm term WHERE diag.diagcd = term.termcd AND diag.instcd = term.instcd AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.pid = inpt.pid AND diag.orddd = inpt.indd AND diag.cretno = inpt.cretno AND diag.orddeptcd = icdr.orddeptcd AND diag.instcd = inpt.instcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND ROWNUM = 1) AS diagnm, CASE inpt.indschacptstat WHEN 'D' THEN '퇴원' WHEN 'T' THEN '가퇴원' ELSE (CASE inpt.dschnotiyn WHEN 'Y' THEN '퇴원통보' ELSE (CASE inpt.dschdclrtyn WHEN 'Y' THEN '퇴원예고' ELSE '-' END) END) END AS dschnoti, icdr.roomcd AS roomcd, CASE WHEN (SELECT COUNT(instcd) FROM emr.mmrhcnstinfo WHERE pid = inpt.pid AND orddd = inpt.indd AND cretno = inpt.cretno AND reqdd = :param0 AND chosflag IN ('I','E') AND cnstflag IN ('1','2') AND ROWNUM = 1) > 0 THEN 'Y' ELSE 'N' END AS cnst, icdr.ordtype AS ordtype, (SELECT z.cdnm FROM com.zbcmcode z WHERE inpt.insukind = z.cdid AND z.cdgrupid = 'P0008' AND inpt.indd BETWEEN z.valifromdd AND z.valitodd) AS bostyle, 'N' AS elbulbodstat, 'N' AS ordtm FROM pam.pmihinpt inpt, pam.pmihicdr icdr, com.zsdddept dept, pam.pmcmptbs ptbs WHERE inpt.histstat = 'Y' AND inpt.mskind = 'M' AND icdr.ordtype IN ('I', 'D') AND inpt.instcd = :param1 AND inpt.pid = icdr.pid AND inpt.pid = icdr.pid AND inpt.indd = icdr.indd AND inpt.cretno = icdr.cretno AND inpt.instcd = icdr.instcd AND inpt.histstat = icdr.histstat AND icdr.fromdd <= :param0 AND icdr.todd >= :param0 AND icdr.pid = ptbs.pid AND icdr.instcd = ptbs.instcd AND icdr.instcd = dept.instcd AND icdr.orddeptcd = dept.deptcd AND dept.orddeptflag = 'D' AND dept.orduseyn = 'Y' AND dept.valifromdd <= :param0 AND dept.valitodd >= :param0 AND icdr.wardcd = :param2 AND icdr.indschacptstat IN ('A', 'D', 'T') order by roomcd, hngnm]
  25. [Logging Date Time: 2016-12-08 14:16:34,693] =====================================================================================
  26. SQL Command - Statement Id: [getInPatList] PreparedStatement : [SELECT distinct ptbs.pid AS pid, substr(inpt.indd,1,4) || '/' || substr(inpt.indd,5,2) || '/' || substr(inpt.indd,7,2) AS indd, inpt.indd AS orddd, inpt.cretno AS cretno, inpt.seqno AS seqno, inpt.instcd AS instcd, ptbs.hngnm AS hngnm, (select code.cdnm from com.zbcmcode code where code.cdgrupid = 'P0021' and code.valifromdd <= inpt.indd and code.valitodd >= inpt.indd and code.cdid = inpt.fsexamflag) AS fsexamflag, /*+ index_desc(icdr IX_PMIHICDR_03) */ icdr.orddeptcd AS orddeptcd, icdr.medispclid AS doctorid, TO_DATE('20161208') - TO_DATE(inpt.indd) AS hd, TRIM(ptbs.sex || '/' || LPAD(FLOOR(COM.FN_ZZ_GETAGE_EMR2('000000','0000000','20161208', 'B', ptbs.brthdd) / 12), 2, 0) || 'y' || LPAD(MOD(COM.FN_ZZ_GETAGE_EMR2('000000','0000000','20161208', 'B', ptbs.brthdd), 12), 2, 0) || 'm') AS sa, dept.depthngnm AS deptnm, dept.DEPTENGABBR AS deptengabbr, NVL((SELECT usernm FROM com.zsumusrb WHERE userid = icdr.medispclid AND userfromdd <= :param0 AND usertodd >= :param0 ), '-') AS doctornm, (SELECT term.termengnm FROM emr.mmohdiag diag, emr.mrtmterm term WHERE diag.diagcd = term.termcd AND diag.instcd = term.instcd AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.pid = inpt.pid AND diag.orddd = inpt.indd AND diag.cretno = inpt.cretno AND diag.orddeptcd = icdr.orddeptcd AND diag.instcd = inpt.instcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND ROWNUM = 1) AS diagnm, CASE inpt.indschacptstat WHEN 'D' THEN '퇴원' WHEN 'T' THEN '가퇴원' ELSE (CASE inpt.dschnotiyn WHEN 'Y' THEN '퇴원통보' ELSE (CASE inpt.dschdclrtyn WHEN 'Y' THEN '퇴원예고' ELSE '-' END) END) END AS dschnoti, icdr.roomcd AS roomcd, CASE WHEN (SELECT COUNT(instcd) FROM emr.mmrhcnstinfo WHERE pid = inpt.pid AND orddd = inpt.indd AND cretno = inpt.cretno AND reqdd = :param0 AND chosflag IN ('I','E') AND cnstflag IN ('1','2') AND ROWNUM = 1) > 0 THEN 'Y' ELSE 'N' END AS cnst, icdr.ordtype AS ordtype, (SELECT z.cdnm FROM com.zbcmcode z WHERE inpt.insukind = z.cdid AND z.cdgrupid = 'P0008' AND inpt.indd BETWEEN z.valifromdd AND z.valitodd) AS bostyle, 'N' AS elbulbodstat, 'N' AS ordtm FROM pam.pmihinpt inpt, pam.pmihicdr icdr, com.zsdddept dept, pam.pmcmptbs ptbs WHERE inpt.histstat = 'Y' AND inpt.mskind = 'M' AND icdr.ordtype IN ('I', 'D') AND inpt.instcd = :param1 AND inpt.pid = icdr.pid AND inpt.pid = icdr.pid AND inpt.indd = icdr.indd AND inpt.cretno = icdr.cretno AND inpt.instcd = icdr.instcd AND inpt.histstat = icdr.histstat AND icdr.fromdd <= :param0 AND icdr.todd >= :param0 AND icdr.pid = ptbs.pid AND icdr.instcd = ptbs.instcd AND icdr.instcd = dept.instcd AND icdr.orddeptcd = dept.deptcd AND dept.orddeptflag = 'D' AND dept.orduseyn = 'Y' AND dept.valifromdd <= :param0 AND dept.valitodd >= :param0 AND icdr.wardcd = :param2 AND icdr.indschacptstat IN ('A', 'D', 'T') order by roomcd, hngnm]
  27. [Logging Date Time: 2016-12-08 14:16:34,694] =====================================================================================
  28. SQL Command - Statement Id: [getInPatList] Parameters: [param0=[srchdd,20161208], param1=[instcd,111], param2=[wardcd,3040300000]]
  29. [Logging Date Time: 2016-12-08 14:16:34,694] =====================================================================================
  30. SQL Command - Statement Id: [getInPatList] Parameters: [param0=[srchdd,20161208], param1=[instcd,111], param2=[wardcd,3040300000]]
  31. [Logging Date Time: 2016-12-08 14:16:34,695] =====================================================================================
  32. SQL Command - Statement Id: [getInPatList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  33. [Logging Date Time: 2016-12-08 14:16:34,695] =====================================================================================
  34. SQL Command - Statement Id: [getInPatList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  35. [Logging Date Time: 2016-12-08 14:16:41,086] =====================================================================================
  36. 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]
  37. [Logging Date Time: 2016-12-08 14:16:41,086] =====================================================================================
  38. 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]
  39. [Logging Date Time: 2016-12-08 14:16:41,086] =====================================================================================
  40. SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
  41. [Logging Date Time: 2016-12-08 14:16:41,086] =====================================================================================
  42. SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
  43. [Logging Date Time: 2016-12-08 14:16:41,086] =====================================================================================
  44. SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
  45. [Logging Date Time: 2016-12-08 14:16:41,086] =====================================================================================
  46. SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
  47. [Logging Date Time: 2016-12-08 14:16:41,139] =====================================================================================
  48. 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]
  49. [Logging Date Time: 2016-12-08 14:16:41,139] =====================================================================================
  50. 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]
  51. [Logging Date Time: 2016-12-08 14:16:41,140] =====================================================================================
  52. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  53. [Logging Date Time: 2016-12-08 14:16:41,140] =====================================================================================
  54. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  55. [Logging Date Time: 2016-12-08 14:16:41,140] =====================================================================================
  56. 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]]
  57. [Logging Date Time: 2016-12-08 14:16:41,140] =====================================================================================
  58. 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]]
  59. [Logging Date Time: 2016-12-08 14:16:41,236] =====================================================================================
  60. 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]
  61. [Logging Date Time: 2016-12-08 14:16:41,236] =====================================================================================
  62. 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]
  63. [Logging Date Time: 2016-12-08 14:16:41,237] =====================================================================================
  64. SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[searchClnDate,20161024], param3=[orddeptcd,2110000000]]
  65. [Logging Date Time: 2016-12-08 14:16:41,237] =====================================================================================
  66. SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[searchClnDate,20161024], param3=[orddeptcd,2110000000]]
  67. [Logging Date Time: 2016-12-08 14:16:41,237] =====================================================================================
  68. 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]]
  69. [Logging Date Time: 2016-12-08 14:16:41,237] =====================================================================================
  70. 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]]
  71. [Logging Date Time: 2016-12-08 14:16:41,331] =====================================================================================
  72. 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]
  73. [Logging Date Time: 2016-12-08 14:16:41,331] =====================================================================================
  74. 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]
  75. [Logging Date Time: 2016-12-08 14:16:41,332] =====================================================================================
  76. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  77. [Logging Date Time: 2016-12-08 14:16:41,332] =====================================================================================
  78. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  79. [Logging Date Time: 2016-12-08 14:16:41,332] =====================================================================================
  80. 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]]
  81. [Logging Date Time: 2016-12-08 14:16:41,332] =====================================================================================
  82. 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]]
  83. [Logging Date Time: 2016-12-08 14:16:41,434] =====================================================================================
  84. 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]
  85. [Logging Date Time: 2016-12-08 14:16:41,434] =====================================================================================
  86. 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]
  87. [Logging Date Time: 2016-12-08 14:16:41,435] =====================================================================================
  88. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  89. [Logging Date Time: 2016-12-08 14:16:41,435] =====================================================================================
  90. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  91. [Logging Date Time: 2016-12-08 14:16:41,435] =====================================================================================
  92. 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]]
  93. [Logging Date Time: 2016-12-08 14:16:41,435] =====================================================================================
  94. 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]]
  95. [Logging Date Time: 2016-12-08 14:16:41,569] =====================================================================================
  96. 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]
  97. [Logging Date Time: 2016-12-08 14:16:41,569] =====================================================================================
  98. 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]
  99. [Logging Date Time: 2016-12-08 14:16:41,569] =====================================================================================
  100. SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
  101. [Logging Date Time: 2016-12-08 14:16:41,569] =====================================================================================
  102. SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
  103. [Logging Date Time: 2016-12-08 14:16:41,569] =====================================================================================
  104. SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  105. [Logging Date Time: 2016-12-08 14:16:41,569] =====================================================================================
  106. SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  107. [Logging Date Time: 2016-12-08 14:16:41,710] =====================================================================================
  108. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  109. [Logging Date Time: 2016-12-08 14:16:41,710] =====================================================================================
  110. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  111. [Logging Date Time: 2016-12-08 14:16:41,711] =====================================================================================
  112. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  113. [Logging Date Time: 2016-12-08 14:16:41,711] =====================================================================================
  114. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  115. [Logging Date Time: 2016-12-08 14:16:41,711] =====================================================================================
  116. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  117. [Logging Date Time: 2016-12-08 14:16:41,711] =====================================================================================
  118. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  119. [Logging Date Time: 2016-12-08 14:16:41,754] =====================================================================================
  120. 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']
  121. [Logging Date Time: 2016-12-08 14:16:41,754] =====================================================================================
  122. 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']
  123. [Logging Date Time: 2016-12-08 14:16:41,755] =====================================================================================
  124. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
  125. [Logging Date Time: 2016-12-08 14:16:41,755] =====================================================================================
  126. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
  127. [Logging Date Time: 2016-12-08 14:16:41,755] =====================================================================================
  128. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  129. [Logging Date Time: 2016-12-08 14:16:41,755] =====================================================================================
  130. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  131. [Logging Date Time: 2016-12-08 14:16:46,620] =====================================================================================
  132. 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]
  133. [Logging Date Time: 2016-12-08 14:16:46,620] =====================================================================================
  134. 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]
  135. [Logging Date Time: 2016-12-08 14:16:46,620] =====================================================================================
  136. SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
  137. [Logging Date Time: 2016-12-08 14:16:46,620] =====================================================================================
  138. SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
  139. [Logging Date Time: 2016-12-08 14:16:46,620] =====================================================================================
  140. SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
  141. [Logging Date Time: 2016-12-08 14:16:46,620] =====================================================================================
  142. SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
  143. [Logging Date Time: 2016-12-08 14:16:46,673] =====================================================================================
  144. 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]
  145. [Logging Date Time: 2016-12-08 14:16:46,673] =====================================================================================
  146. 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]
  147. [Logging Date Time: 2016-12-08 14:16:46,674] =====================================================================================
  148. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  149. [Logging Date Time: 2016-12-08 14:16:46,674] =====================================================================================
  150. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  151. [Logging Date Time: 2016-12-08 14:16:46,674] =====================================================================================
  152. 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]]
  153. [Logging Date Time: 2016-12-08 14:16:46,674] =====================================================================================
  154. 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]]
  155. [Logging Date Time: 2016-12-08 14:16:46,784] =====================================================================================
  156. 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]
  157. [Logging Date Time: 2016-12-08 14:16:46,784] =====================================================================================
  158. 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]
  159. [Logging Date Time: 2016-12-08 14:16:46,784] =====================================================================================
  160. SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
  161. [Logging Date Time: 2016-12-08 14:16:46,784] =====================================================================================
  162. SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
  163. [Logging Date Time: 2016-12-08 14:16:46,784] =====================================================================================
  164. SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  165. [Logging Date Time: 2016-12-08 14:16:46,784] =====================================================================================
  166. SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  167. [Logging Date Time: 2016-12-08 14:16:46,878] =====================================================================================
  168. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  169. [Logging Date Time: 2016-12-08 14:16:46,878] =====================================================================================
  170. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  171. [Logging Date Time: 2016-12-08 14:16:46,879] =====================================================================================
  172. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  173. [Logging Date Time: 2016-12-08 14:16:46,879] =====================================================================================
  174. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  175. [Logging Date Time: 2016-12-08 14:16:46,879] =====================================================================================
  176. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  177. [Logging Date Time: 2016-12-08 14:16:46,879] =====================================================================================
  178. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  179. [Logging Date Time: 2016-12-08 14:16:46,905] =====================================================================================
  180. 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']
  181. [Logging Date Time: 2016-12-08 14:16:46,905] =====================================================================================
  182. 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']
  183. [Logging Date Time: 2016-12-08 14:16:46,905] =====================================================================================
  184. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
  185. [Logging Date Time: 2016-12-08 14:16:46,905] =====================================================================================
  186. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
  187. [Logging Date Time: 2016-12-08 14:16:46,905] =====================================================================================
  188. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  189. [Logging Date Time: 2016-12-08 14:16:46,905] =====================================================================================
  190. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  191. [Logging Date Time: 2016-12-08 14:16:56,420] =====================================================================================
  192. 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]
  193. [Logging Date Time: 2016-12-08 14:16:56,420] =====================================================================================
  194. 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]
  195. [Logging Date Time: 2016-12-08 14:16:56,420] =====================================================================================
  196. SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
  197. [Logging Date Time: 2016-12-08 14:16:56,420] =====================================================================================
  198. SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
  199. [Logging Date Time: 2016-12-08 14:16:56,420] =====================================================================================
  200. SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
  201. [Logging Date Time: 2016-12-08 14:16:56,420] =====================================================================================
  202. SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
  203. [Logging Date Time: 2016-12-08 14:16:56,475] =====================================================================================
  204. 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]
  205. [Logging Date Time: 2016-12-08 14:16:56,475] =====================================================================================
  206. 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]
  207. [Logging Date Time: 2016-12-08 14:16:56,476] =====================================================================================
  208. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  209. [Logging Date Time: 2016-12-08 14:16:56,476] =====================================================================================
  210. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  211. [Logging Date Time: 2016-12-08 14:16:56,476] =====================================================================================
  212. 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]]
  213. [Logging Date Time: 2016-12-08 14:16:56,476] =====================================================================================
  214. 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]]
  215. [Logging Date Time: 2016-12-08 14:16:56,591] =====================================================================================
  216. 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]
  217. [Logging Date Time: 2016-12-08 14:16:56,591] =====================================================================================
  218. 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]
  219. [Logging Date Time: 2016-12-08 14:16:56,591] =====================================================================================
  220. SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
  221. [Logging Date Time: 2016-12-08 14:16:56,591] =====================================================================================
  222. SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
  223. [Logging Date Time: 2016-12-08 14:16:56,591] =====================================================================================
  224. SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  225. [Logging Date Time: 2016-12-08 14:16:56,591] =====================================================================================
  226. SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  227. [Logging Date Time: 2016-12-08 14:16:56,735] =====================================================================================
  228. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  229. [Logging Date Time: 2016-12-08 14:16:56,735] =====================================================================================
  230. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  231. [Logging Date Time: 2016-12-08 14:16:56,735] =====================================================================================
  232. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  233. [Logging Date Time: 2016-12-08 14:16:56,735] =====================================================================================
  234. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  235. [Logging Date Time: 2016-12-08 14:16:56,735] =====================================================================================
  236. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  237. [Logging Date Time: 2016-12-08 14:16:56,735] =====================================================================================
  238. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  239. [Logging Date Time: 2016-12-08 14:16:56,761] =====================================================================================
  240. 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']
  241. [Logging Date Time: 2016-12-08 14:16:56,761] =====================================================================================
  242. 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']
  243. [Logging Date Time: 2016-12-08 14:16:56,762] =====================================================================================
  244. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
  245. [Logging Date Time: 2016-12-08 14:16:56,762] =====================================================================================
  246. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
  247. [Logging Date Time: 2016-12-08 14:16:56,762] =====================================================================================
  248. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  249. [Logging Date Time: 2016-12-08 14:16:56,762] =====================================================================================
  250. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  251. [Logging Date Time: 2016-12-08 14:17:08,889] =====================================================================================
  252. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  253. [Logging Date Time: 2016-12-08 14:17:08,889] =====================================================================================
  254. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  255. [Logging Date Time: 2016-12-08 14:17:08,889] =====================================================================================
  256. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  257. [Logging Date Time: 2016-12-08 14:17:08,889] =====================================================================================
  258. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  259. [Logging Date Time: 2016-12-08 14:17:08,889] =====================================================================================
  260. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  261. [Logging Date Time: 2016-12-08 14:17:08,889] =====================================================================================
  262. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  263. [Logging Date Time: 2016-12-08 14:17:08,917] =====================================================================================
  264. 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']
  265. [Logging Date Time: 2016-12-08 14:17:08,917] =====================================================================================
  266. 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']
  267. [Logging Date Time: 2016-12-08 14:17:08,918] =====================================================================================
  268. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
  269. [Logging Date Time: 2016-12-08 14:17:08,918] =====================================================================================
  270. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
  271. [Logging Date Time: 2016-12-08 14:17:08,918] =====================================================================================
  272. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  273. [Logging Date Time: 2016-12-08 14:17:08,918] =====================================================================================
  274. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  275. [Logging Date Time: 2016-12-08 14:17:11,719] =====================================================================================
  276. SQL Command - Statement Id: [GET_CATEGORY_FOR_DROPDOWN] PreparedStatement : [SELECT CATEGORY_TYPE, CATEGORY_ID, CATEGORY_NAME FROM EFORM_CATEGORY WHERE USE_YN = 'Y' AND P_CATEGORY_RID = '1']
  277. [Logging Date Time: 2016-12-08 14:17:11,719] =====================================================================================
  278. SQL Command - Statement Id: [GET_CATEGORY_FOR_DROPDOWN] PreparedStatement : [SELECT CATEGORY_TYPE, CATEGORY_ID, CATEGORY_NAME FROM EFORM_CATEGORY WHERE USE_YN = 'Y' AND P_CATEGORY_RID = '1']
  279. [Logging Date Time: 2016-12-08 14:17:11,843] =====================================================================================
  280. SQL Command - Statement Id: [GET_CATEGORY_FOR_DROPDOWN] PreparedStatement : [SELECT CATEGORY_TYPE, CATEGORY_ID, CATEGORY_NAME FROM EFORM_CATEGORY WHERE USE_YN = 'Y' AND P_CATEGORY_RID = (SELECT CATEGORY_RID FROM EFORM_CATEGORY WHERE CATEGORY_ID = :param0 )]
  281. [Logging Date Time: 2016-12-08 14:17:11,843] =====================================================================================
  282. SQL Command - Statement Id: [GET_CATEGORY_FOR_DROPDOWN] PreparedStatement : [SELECT CATEGORY_TYPE, CATEGORY_ID, CATEGORY_NAME FROM EFORM_CATEGORY WHERE USE_YN = 'Y' AND P_CATEGORY_RID = (SELECT CATEGORY_RID FROM EFORM_CATEGORY WHERE CATEGORY_ID = :param0 )]
  283. [Logging Date Time: 2016-12-08 14:17:11,843] =====================================================================================
  284. SQL Command - Statement Id: [GET_CATEGORY_FOR_DROPDOWN] Parameters: [param0=[category_id,1CB1B494-1EF0-48BD-84D6-4965A54E6AEA]]
  285. [Logging Date Time: 2016-12-08 14:17:11,843] =====================================================================================
  286. SQL Command - Statement Id: [GET_CATEGORY_FOR_DROPDOWN] Parameters: [param0=[category_id,1CB1B494-1EF0-48BD-84D6-4965A54E6AEA]]
  287. [Logging Date Time: 2016-12-08 14:17:11,843] =====================================================================================
  288. SQL Command - Statement Id: [GET_CATEGORY_FOR_DROPDOWN] Types: [param0=[AnsiString, System.String]]
  289. [Logging Date Time: 2016-12-08 14:17:11,843] =====================================================================================
  290. SQL Command - Statement Id: [GET_CATEGORY_FOR_DROPDOWN] Types: [param0=[AnsiString, System.String]]
  291. [Logging Date Time: 2016-12-08 14:17:12,489] =====================================================================================
  292. SQL Command - Statement Id: [GET_CONSENT_BY_SEARCH_LIST] PreparedStatement : [SELECT F.FORM_CD, F.FORM_GUID, F.FORM_NAME, F.FULL_CATEGORY_NAME, F.FORM_RID, F.PRNTCNT, F.PRINT_ONLY, F.OCRTAGPRNTYN FROM (SELECT F.FORM_CD, F.FORM_GUID, F.FORM_NAME, N.FULL_CATEGORY_NAME AS FULL_CATEGORY_NAME, F.FORM_RID, F.PRNTCNT, F.PRINT_ONLY, F.OCRTAGPRNTYN FROM V_EFORM_FORMDOC F, ( SELECT CATEGORY_RID, LEVEL FROM EFORM_CATEGORY START WITH CATEGORY_RID = (SELECT CATEGORY_RID FROM EFORM_CATEGORY WHERE CATEGORY_ID = :param0 ) CONNECT BY P_CATEGORY_RID = PRIOR CATEGORY_RID ) C, ( SELECT CATEGORY_RID,CATEGORY_NAME, LTRIM (SYS_CONNECT_BY_PATH (CATEGORY_NAME, '>'), '>') AS FULL_CATEGORY_NAME, LEVEL FROM EFORM_CATEGORY START WITH CATEGORY_RID = '1' CONNECT BY P_CATEGORY_RID = PRIOR CATEGORY_RID ) N WHERE F.CATEGORY_RID = C.CATEGORY_RID AND C.CATEGORY_RID = N.CATEGORY_RID AND (REPLACE(UPPER(F.FORM_NAME),' ','') LIKE REPLACE(UPPER( :param1 ),' ','') OR UPPER(F.FORM_CD) LIKE UPPER( :param1 )) ) F ORDER BY F.FORM_NAME]
  293. [Logging Date Time: 2016-12-08 14:17:12,489] =====================================================================================
  294. SQL Command - Statement Id: [GET_CONSENT_BY_SEARCH_LIST] PreparedStatement : [SELECT F.FORM_CD, F.FORM_GUID, F.FORM_NAME, F.FULL_CATEGORY_NAME, F.FORM_RID, F.PRNTCNT, F.PRINT_ONLY, F.OCRTAGPRNTYN FROM (SELECT F.FORM_CD, F.FORM_GUID, F.FORM_NAME, N.FULL_CATEGORY_NAME AS FULL_CATEGORY_NAME, F.FORM_RID, F.PRNTCNT, F.PRINT_ONLY, F.OCRTAGPRNTYN FROM V_EFORM_FORMDOC F, ( SELECT CATEGORY_RID, LEVEL FROM EFORM_CATEGORY START WITH CATEGORY_RID = (SELECT CATEGORY_RID FROM EFORM_CATEGORY WHERE CATEGORY_ID = :param0 ) CONNECT BY P_CATEGORY_RID = PRIOR CATEGORY_RID ) C, ( SELECT CATEGORY_RID,CATEGORY_NAME, LTRIM (SYS_CONNECT_BY_PATH (CATEGORY_NAME, '>'), '>') AS FULL_CATEGORY_NAME, LEVEL FROM EFORM_CATEGORY START WITH CATEGORY_RID = '1' CONNECT BY P_CATEGORY_RID = PRIOR CATEGORY_RID ) N WHERE F.CATEGORY_RID = C.CATEGORY_RID AND C.CATEGORY_RID = N.CATEGORY_RID AND (REPLACE(UPPER(F.FORM_NAME),' ','') LIKE REPLACE(UPPER( :param1 ),' ','') OR UPPER(F.FORM_CD) LIKE UPPER( :param1 )) ) F ORDER BY F.FORM_NAME]
  295. [Logging Date Time: 2016-12-08 14:17:12,490] =====================================================================================
  296. SQL Command - Statement Id: [GET_CONSENT_BY_SEARCH_LIST] Parameters: [param0=[category_id,1CB1B494-1EF0-48BD-84D6-4965A54E6AEA], param1=[key_word,%%%%]]
  297. [Logging Date Time: 2016-12-08 14:17:12,490] =====================================================================================
  298. SQL Command - Statement Id: [GET_CONSENT_BY_SEARCH_LIST] Parameters: [param0=[category_id,1CB1B494-1EF0-48BD-84D6-4965A54E6AEA], param1=[key_word,%%%%]]
  299. [Logging Date Time: 2016-12-08 14:17:12,490] =====================================================================================
  300. SQL Command - Statement Id: [GET_CONSENT_BY_SEARCH_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String]]
  301. [Logging Date Time: 2016-12-08 14:17:12,490] =====================================================================================
  302. SQL Command - Statement Id: [GET_CONSENT_BY_SEARCH_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String]]
  303. [Logging Date Time: 2016-12-08 14:17:14,206] =====================================================================================
  304. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  305. [Logging Date Time: 2016-12-08 14:17:14,206] =====================================================================================
  306. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  307. [Logging Date Time: 2016-12-08 14:17:14,207] =====================================================================================
  308. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  309. [Logging Date Time: 2016-12-08 14:17:14,207] =====================================================================================
  310. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  311. [Logging Date Time: 2016-12-08 14:17:14,207] =====================================================================================
  312. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  313. [Logging Date Time: 2016-12-08 14:17:14,207] =====================================================================================
  314. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  315. [Logging Date Time: 2016-12-08 14:17:14,265] =====================================================================================
  316. SQL Command - Statement Id: [getOcrTag] PreparedStatement : [SELECT to_char(sysdate,'YYYYMMDD') || SUBSTR(LPAD((EMR.SQ_MRFMOCRP_01.NEXTVAL), 10, '0'), 6, 5) AS ocrtag FROM dual]
  317. [Logging Date Time: 2016-12-08 14:17:14,265] =====================================================================================
  318. SQL Command - Statement Id: [getOcrTag] PreparedStatement : [SELECT to_char(sysdate,'YYYYMMDD') || SUBSTR(LPAD((EMR.SQ_MRFMOCRP_01.NEXTVAL), 10, '0'), 6, 5) AS ocrtag FROM dual]
  319. [Logging Date Time: 2016-12-08 14:17:14,305] =====================================================================================
  320. 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']
  321. [Logging Date Time: 2016-12-08 14:17:14,305] =====================================================================================
  322. 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']
  323. [Logging Date Time: 2016-12-08 14:17:14,306] =====================================================================================
  324. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,-1]]
  325. [Logging Date Time: 2016-12-08 14:17:14,306] =====================================================================================
  326. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,-1]]
  327. [Logging Date Time: 2016-12-08 14:17:14,306] =====================================================================================
  328. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  329. [Logging Date Time: 2016-12-08 14:17:14,306] =====================================================================================
  330. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  331. [Logging Date Time: 2016-12-08 14:17:18,215] =====================================================================================
  332. 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]
  333. [Logging Date Time: 2016-12-08 14:17:18,215] =====================================================================================
  334. 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]
  335. [Logging Date Time: 2016-12-08 14:17:18,216] =====================================================================================
  336. SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
  337. [Logging Date Time: 2016-12-08 14:17:18,216] =====================================================================================
  338. SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
  339. [Logging Date Time: 2016-12-08 14:17:18,216] =====================================================================================
  340. SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  341. [Logging Date Time: 2016-12-08 14:17:18,216] =====================================================================================
  342. SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  343. [Logging Date Time: 2016-12-08 14:17:18,307] =====================================================================================
  344. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  345. [Logging Date Time: 2016-12-08 14:17:18,307] =====================================================================================
  346. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  347. [Logging Date Time: 2016-12-08 14:17:18,308] =====================================================================================
  348. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  349. [Logging Date Time: 2016-12-08 14:17:18,308] =====================================================================================
  350. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  351. [Logging Date Time: 2016-12-08 14:17:18,308] =====================================================================================
  352. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  353. [Logging Date Time: 2016-12-08 14:17:18,308] =====================================================================================
  354. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  355. [Logging Date Time: 2016-12-08 14:17:18,333] =====================================================================================
  356. 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']
  357. [Logging Date Time: 2016-12-08 14:17:18,333] =====================================================================================
  358. 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']
  359. [Logging Date Time: 2016-12-08 14:17:18,333] =====================================================================================
  360. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
  361. [Logging Date Time: 2016-12-08 14:17:18,333] =====================================================================================
  362. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
  363. [Logging Date Time: 2016-12-08 14:17:18,333] =====================================================================================
  364. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  365. [Logging Date Time: 2016-12-08 14:17:18,333] =====================================================================================
  366. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  367. [Logging Date Time: 2016-12-08 14:18:03,348] =====================================================================================
  368. 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]
  369. [Logging Date Time: 2016-12-08 14:18:03,348] =====================================================================================
  370. 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]
  371. [Logging Date Time: 2016-12-08 14:18:03,348] =====================================================================================
  372. SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
  373. [Logging Date Time: 2016-12-08 14:18:03,348] =====================================================================================
  374. SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
  375. [Logging Date Time: 2016-12-08 14:18:03,348] =====================================================================================
  376. SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
  377. [Logging Date Time: 2016-12-08 14:18:03,348] =====================================================================================
  378. SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
  379. [Logging Date Time: 2016-12-08 14:18:03,399] =====================================================================================
  380. 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]
  381. [Logging Date Time: 2016-12-08 14:18:03,399] =====================================================================================
  382. 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]
  383. [Logging Date Time: 2016-12-08 14:18:03,400] =====================================================================================
  384. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[orddd,20161018], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  385. [Logging Date Time: 2016-12-08 14:18:03,400] =====================================================================================
  386. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[orddd,20161018], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  387. [Logging Date Time: 2016-12-08 14:18:03,401] =====================================================================================
  388. 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]]
  389. [Logging Date Time: 2016-12-08 14:18:03,401] =====================================================================================
  390. 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]]
  391. [Logging Date Time: 2016-12-08 14:18:03,615] =====================================================================================
  392. 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]
  393. [Logging Date Time: 2016-12-08 14:18:03,615] =====================================================================================
  394. 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]
  395. [Logging Date Time: 2016-12-08 14:18:03,617] =====================================================================================
  396. SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[searchClnDate,20161018], param3=[orddeptcd,2110000000]]
  397. [Logging Date Time: 2016-12-08 14:18:03,617] =====================================================================================
  398. SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[searchClnDate,20161018], param3=[orddeptcd,2110000000]]
  399. [Logging Date Time: 2016-12-08 14:18:03,617] =====================================================================================
  400. 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]]
  401. [Logging Date Time: 2016-12-08 14:18:03,617] =====================================================================================
  402. 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]]
  403. [Logging Date Time: 2016-12-08 14:18:03,772] =====================================================================================
  404. 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]
  405. [Logging Date Time: 2016-12-08 14:18:03,772] =====================================================================================
  406. 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]
  407. [Logging Date Time: 2016-12-08 14:18:03,773] =====================================================================================
  408. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[orddd,20161018], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  409. [Logging Date Time: 2016-12-08 14:18:03,773] =====================================================================================
  410. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[orddd,20161018], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  411. [Logging Date Time: 2016-12-08 14:18:03,773] =====================================================================================
  412. 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]]
  413. [Logging Date Time: 2016-12-08 14:18:03,773] =====================================================================================
  414. 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]]
  415. [Logging Date Time: 2016-12-08 14:18:03,960] =====================================================================================
  416. 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]
  417. [Logging Date Time: 2016-12-08 14:18:03,960] =====================================================================================
  418. 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]
  419. [Logging Date Time: 2016-12-08 14:18:03,961] =====================================================================================
  420. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[orddd,20161018], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  421. [Logging Date Time: 2016-12-08 14:18:03,961] =====================================================================================
  422. SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[orddd,20161018], param3=[cretno,1], param4=[orddeptcd,2110000000]]
  423. [Logging Date Time: 2016-12-08 14:18:03,961] =====================================================================================
  424. 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]]
  425. [Logging Date Time: 2016-12-08 14:18:03,961] =====================================================================================
  426. 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]]
  427. [Logging Date Time: 2016-12-08 14:18:04,274] =====================================================================================
  428. 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]
  429. [Logging Date Time: 2016-12-08 14:18:04,274] =====================================================================================
  430. 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]
  431. [Logging Date Time: 2016-12-08 14:18:04,274] =====================================================================================
  432. SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2088963], param1=[startDt,20010601], param2=[endDt,20161208]]
  433. [Logging Date Time: 2016-12-08 14:18:04,274] =====================================================================================
  434. SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2088963], param1=[startDt,20010601], param2=[endDt,20161208]]
  435. [Logging Date Time: 2016-12-08 14:18:04,274] =====================================================================================
  436. SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  437. [Logging Date Time: 2016-12-08 14:18:04,274] =====================================================================================
  438. SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
  439. [Logging Date Time: 2016-12-08 14:18:04,405] =====================================================================================
  440. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  441. [Logging Date Time: 2016-12-08 14:18:04,405] =====================================================================================
  442. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  443. [Logging Date Time: 2016-12-08 14:18:04,405] =====================================================================================
  444. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  445. [Logging Date Time: 2016-12-08 14:18:04,405] =====================================================================================
  446. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  447. [Logging Date Time: 2016-12-08 14:18:04,405] =====================================================================================
  448. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  449. [Logging Date Time: 2016-12-08 14:18:04,405] =====================================================================================
  450. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  451. [Logging Date Time: 2016-12-08 14:18:04,433] =====================================================================================
  452. 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']
  453. [Logging Date Time: 2016-12-08 14:18:04,433] =====================================================================================
  454. 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']
  455. [Logging Date Time: 2016-12-08 14:18:04,433] =====================================================================================
  456. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1146]]
  457. [Logging Date Time: 2016-12-08 14:18:04,433] =====================================================================================
  458. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1146]]
  459. [Logging Date Time: 2016-12-08 14:18:04,434] =====================================================================================
  460. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  461. [Logging Date Time: 2016-12-08 14:18:04,434] =====================================================================================
  462. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  463. [Logging Date Time: 2016-12-08 14:19:11,093] =====================================================================================
  464. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  465. [Logging Date Time: 2016-12-08 14:19:11,093] =====================================================================================
  466. SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
  467. [Logging Date Time: 2016-12-08 14:19:11,093] =====================================================================================
  468. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  469. [Logging Date Time: 2016-12-08 14:19:11,093] =====================================================================================
  470. SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
  471. [Logging Date Time: 2016-12-08 14:19:11,093] =====================================================================================
  472. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  473. [Logging Date Time: 2016-12-08 14:19:11,093] =====================================================================================
  474. SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
  475. [Logging Date Time: 2016-12-08 14:19:24,615] =====================================================================================
  476. 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']
  477. [Logging Date Time: 2016-12-08 14:19:24,615] =====================================================================================
  478. 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']
  479. [Logging Date Time: 2016-12-08 14:19:24,615] =====================================================================================
  480. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1146]]
  481. [Logging Date Time: 2016-12-08 14:19:24,615] =====================================================================================
  482. SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1146]]
  483. [Logging Date Time: 2016-12-08 14:19:24,615] =====================================================================================
  484. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
  485. [Logging Date Time: 2016-12-08 14:19:24,615] =====================================================================================
  486. SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]