123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729 |
- [Logging Date Time: 2016-12-08 14:16:17,425] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'임시저장', 'ELECTR_CMP', '서명', 'PAPER_OUT', '출력' , 'CERTIFY_CMP', '인증', 'UNFINISHED', '미작성', 'VERBAL', '구두') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
- [Logging Date Time: 2016-12-08 14:16:17,457] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,1491042], param1=[startDt,20010601], param2=[endDt,20161208]]
- [Logging Date Time: 2016-12-08 14:16:17,457] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,1491042], param1=[startDt,20010601], param2=[endDt,20161208]]
- [Logging Date Time: 2016-12-08 14:16:17,457] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:17,457] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:24,240] =====================================================================================
- 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]
- [Logging Date Time: 2016-12-08 14:16:24,240] =====================================================================================
- 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]
- [Logging Date Time: 2016-12-08 14:16:24,241] =====================================================================================
- SQL Command - Statement Id: [getInPatList] Parameters: [param0=[srchdd,20161208], param1=[instcd,111], param2=[wardcd,3041703000]]
- [Logging Date Time: 2016-12-08 14:16:24,241] =====================================================================================
- SQL Command - Statement Id: [getInPatList] Parameters: [param0=[srchdd,20161208], param1=[instcd,111], param2=[wardcd,3041703000]]
- [Logging Date Time: 2016-12-08 14:16:24,241] =====================================================================================
- SQL Command - Statement Id: [getInPatList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:24,241] =====================================================================================
- SQL Command - Statement Id: [getInPatList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:34,693] =====================================================================================
- 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]
- [Logging Date Time: 2016-12-08 14:16:34,693] =====================================================================================
- 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]
- [Logging Date Time: 2016-12-08 14:16:34,694] =====================================================================================
- SQL Command - Statement Id: [getInPatList] Parameters: [param0=[srchdd,20161208], param1=[instcd,111], param2=[wardcd,3040300000]]
- [Logging Date Time: 2016-12-08 14:16:34,694] =====================================================================================
- SQL Command - Statement Id: [getInPatList] Parameters: [param0=[srchdd,20161208], param1=[instcd,111], param2=[wardcd,3040300000]]
- [Logging Date Time: 2016-12-08 14:16:34,695] =====================================================================================
- SQL Command - Statement Id: [getInPatList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:34,695] =====================================================================================
- SQL Command - Statement Id: [getInPatList] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,086] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] PreparedStatement : [select a.userid, a.usernm, b.dutplcecd, dept.depthngnm, dept.deptengabbr, b.jobkindcd, (select cdnm from com.zbcmcode code where code.cdgrupid = 'R0061' and code.cdid = b.jobkindcd and code.valitodd = '99991231') from com.zsumusrb a, com.zsumusrd b, com.zsdddept dept where a.dutinstcd = '111' and a.dutinstcd = b.dutplceinstcd and a.userid = b.userid and a.usertodd = b.todd and dept.instcd = a.dutinstcd and dept.deptcd = b.dutplcecd and dept.valitodd = '99991231' and a.usertodd = '99991231' and b.userid = :param0]
- [Logging Date Time: 2016-12-08 14:16:41,086] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] PreparedStatement : [select a.userid, a.usernm, b.dutplcecd, dept.depthngnm, dept.deptengabbr, b.jobkindcd, (select cdnm from com.zbcmcode code where code.cdgrupid = 'R0061' and code.cdid = b.jobkindcd and code.valitodd = '99991231') from com.zsumusrb a, com.zsumusrd b, com.zsdddept dept where a.dutinstcd = '111' and a.dutinstcd = b.dutplceinstcd and a.userid = b.userid and a.usertodd = b.todd and dept.instcd = a.dutinstcd and dept.deptcd = b.dutplcecd and dept.valitodd = '99991231' and a.usertodd = '99991231' and b.userid = :param0]
- [Logging Date Time: 2016-12-08 14:16:41,086] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:16:41,086] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:16:41,086] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,086] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,139] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:16:41,139] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:16:41,140] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:16:41,140] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:16:41,140] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,140] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,236] =====================================================================================
- 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]
- [Logging Date Time: 2016-12-08 14:16:41,236] =====================================================================================
- 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]
- [Logging Date Time: 2016-12-08 14:16:41,237] =====================================================================================
- SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[searchClnDate,20161024], param3=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:16:41,237] =====================================================================================
- SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[searchClnDate,20161024], param3=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:16:41,237] =====================================================================================
- SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,237] =====================================================================================
- SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,331] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:16:41,331] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:16:41,332] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:16:41,332] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:16:41,332] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,332] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,434] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:16:41,434] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:16:41,435] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:16:41,435] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:16:41,435] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,435] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,569] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'임시저장', 'ELECTR_CMP', '서명', 'PAPER_OUT', '출력' , 'CERTIFY_CMP', '인증', 'UNFINISHED', '미작성', 'VERBAL', '구두') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
- [Logging Date Time: 2016-12-08 14:16:41,569] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'임시저장', 'ELECTR_CMP', '서명', 'PAPER_OUT', '출력' , 'CERTIFY_CMP', '인증', 'UNFINISHED', '미작성', 'VERBAL', '구두') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
- [Logging Date Time: 2016-12-08 14:16:41,569] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
- [Logging Date Time: 2016-12-08 14:16:41,569] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
- [Logging Date Time: 2016-12-08 14:16:41,569] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,569] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,710] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:16:41,710] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:16:41,711] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:16:41,711] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:16:41,711] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,711] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:41,754] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:16:41,754] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:16:41,755] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
- [Logging Date Time: 2016-12-08 14:16:41,755] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
- [Logging Date Time: 2016-12-08 14:16:41,755] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:16:41,755] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:16:46,620] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] PreparedStatement : [select a.userid, a.usernm, b.dutplcecd, dept.depthngnm, dept.deptengabbr, b.jobkindcd, (select cdnm from com.zbcmcode code where code.cdgrupid = 'R0061' and code.cdid = b.jobkindcd and code.valitodd = '99991231') from com.zsumusrb a, com.zsumusrd b, com.zsdddept dept where a.dutinstcd = '111' and a.dutinstcd = b.dutplceinstcd and a.userid = b.userid and a.usertodd = b.todd and dept.instcd = a.dutinstcd and dept.deptcd = b.dutplcecd and dept.valitodd = '99991231' and a.usertodd = '99991231' and b.userid = :param0]
- [Logging Date Time: 2016-12-08 14:16:46,620] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] PreparedStatement : [select a.userid, a.usernm, b.dutplcecd, dept.depthngnm, dept.deptengabbr, b.jobkindcd, (select cdnm from com.zbcmcode code where code.cdgrupid = 'R0061' and code.cdid = b.jobkindcd and code.valitodd = '99991231') from com.zsumusrb a, com.zsumusrd b, com.zsdddept dept where a.dutinstcd = '111' and a.dutinstcd = b.dutplceinstcd and a.userid = b.userid and a.usertodd = b.todd and dept.instcd = a.dutinstcd and dept.deptcd = b.dutplcecd and dept.valitodd = '99991231' and a.usertodd = '99991231' and b.userid = :param0]
- [Logging Date Time: 2016-12-08 14:16:46,620] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:16:46,620] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:16:46,620] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:46,620] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:46,673] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:16:46,673] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:16:46,674] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:16:46,674] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:16:46,674] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:46,674] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:46,784] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'임시저장', 'ELECTR_CMP', '서명', 'PAPER_OUT', '출력' , 'CERTIFY_CMP', '인증', 'UNFINISHED', '미작성', 'VERBAL', '구두') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
- [Logging Date Time: 2016-12-08 14:16:46,784] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'임시저장', 'ELECTR_CMP', '서명', 'PAPER_OUT', '출력' , 'CERTIFY_CMP', '인증', 'UNFINISHED', '미작성', 'VERBAL', '구두') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
- [Logging Date Time: 2016-12-08 14:16:46,784] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
- [Logging Date Time: 2016-12-08 14:16:46,784] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
- [Logging Date Time: 2016-12-08 14:16:46,784] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:46,784] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:46,878] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:16:46,878] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:16:46,879] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:16:46,879] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:16:46,879] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:46,879] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:46,905] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:16:46,905] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:16:46,905] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
- [Logging Date Time: 2016-12-08 14:16:46,905] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
- [Logging Date Time: 2016-12-08 14:16:46,905] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:16:46,905] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:16:56,420] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] PreparedStatement : [select a.userid, a.usernm, b.dutplcecd, dept.depthngnm, dept.deptengabbr, b.jobkindcd, (select cdnm from com.zbcmcode code where code.cdgrupid = 'R0061' and code.cdid = b.jobkindcd and code.valitodd = '99991231') from com.zsumusrb a, com.zsumusrd b, com.zsdddept dept where a.dutinstcd = '111' and a.dutinstcd = b.dutplceinstcd and a.userid = b.userid and a.usertodd = b.todd and dept.instcd = a.dutinstcd and dept.deptcd = b.dutplcecd and dept.valitodd = '99991231' and a.usertodd = '99991231' and b.userid = :param0]
- [Logging Date Time: 2016-12-08 14:16:56,420] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] PreparedStatement : [select a.userid, a.usernm, b.dutplcecd, dept.depthngnm, dept.deptengabbr, b.jobkindcd, (select cdnm from com.zbcmcode code where code.cdgrupid = 'R0061' and code.cdid = b.jobkindcd and code.valitodd = '99991231') from com.zsumusrb a, com.zsumusrd b, com.zsdddept dept where a.dutinstcd = '111' and a.dutinstcd = b.dutplceinstcd and a.userid = b.userid and a.usertodd = b.todd and dept.instcd = a.dutinstcd and dept.deptcd = b.dutplcecd and dept.valitodd = '99991231' and a.usertodd = '99991231' and b.userid = :param0]
- [Logging Date Time: 2016-12-08 14:16:56,420] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:16:56,420] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:16:56,420] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:56,420] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:56,475] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:16:56,475] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:16:56,476] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:16:56,476] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2073057], param2=[orddd,20161024], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:16:56,476] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:56,476] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:56,591] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'임시저장', 'ELECTR_CMP', '서명', 'PAPER_OUT', '출력' , 'CERTIFY_CMP', '인증', 'UNFINISHED', '미작성', 'VERBAL', '구두') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
- [Logging Date Time: 2016-12-08 14:16:56,591] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'임시저장', 'ELECTR_CMP', '서명', 'PAPER_OUT', '출력' , 'CERTIFY_CMP', '인증', 'UNFINISHED', '미작성', 'VERBAL', '구두') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
- [Logging Date Time: 2016-12-08 14:16:56,591] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
- [Logging Date Time: 2016-12-08 14:16:56,591] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
- [Logging Date Time: 2016-12-08 14:16:56,591] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:56,591] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:56,735] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:16:56,735] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:16:56,735] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:16:56,735] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:16:56,735] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:56,735] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:16:56,761] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:16:56,761] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:16:56,762] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
- [Logging Date Time: 2016-12-08 14:16:56,762] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
- [Logging Date Time: 2016-12-08 14:16:56,762] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:16:56,762] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:17:08,889] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:17:08,889] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:17:08,889] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:17:08,889] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:17:08,889] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:17:08,889] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:17:08,917] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:17:08,917] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:17:08,918] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
- [Logging Date Time: 2016-12-08 14:17:08,918] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
- [Logging Date Time: 2016-12-08 14:17:08,918] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:17:08,918] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:17:11,719] =====================================================================================
- 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']
- [Logging Date Time: 2016-12-08 14:17:11,719] =====================================================================================
- 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']
- [Logging Date Time: 2016-12-08 14:17:11,843] =====================================================================================
- 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 )]
- [Logging Date Time: 2016-12-08 14:17:11,843] =====================================================================================
- 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 )]
- [Logging Date Time: 2016-12-08 14:17:11,843] =====================================================================================
- SQL Command - Statement Id: [GET_CATEGORY_FOR_DROPDOWN] Parameters: [param0=[category_id,1CB1B494-1EF0-48BD-84D6-4965A54E6AEA]]
- [Logging Date Time: 2016-12-08 14:17:11,843] =====================================================================================
- SQL Command - Statement Id: [GET_CATEGORY_FOR_DROPDOWN] Parameters: [param0=[category_id,1CB1B494-1EF0-48BD-84D6-4965A54E6AEA]]
- [Logging Date Time: 2016-12-08 14:17:11,843] =====================================================================================
- SQL Command - Statement Id: [GET_CATEGORY_FOR_DROPDOWN] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:17:11,843] =====================================================================================
- SQL Command - Statement Id: [GET_CATEGORY_FOR_DROPDOWN] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:17:12,489] =====================================================================================
- 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]
- [Logging Date Time: 2016-12-08 14:17:12,489] =====================================================================================
- 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]
- [Logging Date Time: 2016-12-08 14:17:12,490] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_BY_SEARCH_LIST] Parameters: [param0=[category_id,1CB1B494-1EF0-48BD-84D6-4965A54E6AEA], param1=[key_word,%%%%]]
- [Logging Date Time: 2016-12-08 14:17:12,490] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_BY_SEARCH_LIST] Parameters: [param0=[category_id,1CB1B494-1EF0-48BD-84D6-4965A54E6AEA], param1=[key_word,%%%%]]
- [Logging Date Time: 2016-12-08 14:17:12,490] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_BY_SEARCH_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:17:12,490] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_BY_SEARCH_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:17:14,206] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:17:14,206] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:17:14,207] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:17:14,207] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:17:14,207] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:17:14,207] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:17:14,265] =====================================================================================
- 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]
- [Logging Date Time: 2016-12-08 14:17:14,265] =====================================================================================
- 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]
- [Logging Date Time: 2016-12-08 14:17:14,305] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:17:14,305] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:17:14,306] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,-1]]
- [Logging Date Time: 2016-12-08 14:17:14,306] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,-1]]
- [Logging Date Time: 2016-12-08 14:17:14,306] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:17:14,306] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:17:18,215] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'임시저장', 'ELECTR_CMP', '서명', 'PAPER_OUT', '출력' , 'CERTIFY_CMP', '인증', 'UNFINISHED', '미작성', 'VERBAL', '구두') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
- [Logging Date Time: 2016-12-08 14:17:18,215] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'임시저장', 'ELECTR_CMP', '서명', 'PAPER_OUT', '출력' , 'CERTIFY_CMP', '인증', 'UNFINISHED', '미작성', 'VERBAL', '구두') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
- [Logging Date Time: 2016-12-08 14:17:18,216] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
- [Logging Date Time: 2016-12-08 14:17:18,216] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2073057], param1=[startDt,20010601], param2=[endDt,20161208]]
- [Logging Date Time: 2016-12-08 14:17:18,216] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:17:18,216] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:17:18,307] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:17:18,307] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:17:18,308] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:17:18,308] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:17:18,308] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:17:18,308] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:17:18,333] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:17:18,333] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:17:18,333] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
- [Logging Date Time: 2016-12-08 14:17:18,333] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1144]]
- [Logging Date Time: 2016-12-08 14:17:18,333] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:17:18,333] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:18:03,348] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] PreparedStatement : [select a.userid, a.usernm, b.dutplcecd, dept.depthngnm, dept.deptengabbr, b.jobkindcd, (select cdnm from com.zbcmcode code where code.cdgrupid = 'R0061' and code.cdid = b.jobkindcd and code.valitodd = '99991231') from com.zsumusrb a, com.zsumusrd b, com.zsdddept dept where a.dutinstcd = '111' and a.dutinstcd = b.dutplceinstcd and a.userid = b.userid and a.usertodd = b.todd and dept.instcd = a.dutinstcd and dept.deptcd = b.dutplcecd and dept.valitodd = '99991231' and a.usertodd = '99991231' and b.userid = :param0]
- [Logging Date Time: 2016-12-08 14:18:03,348] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] PreparedStatement : [select a.userid, a.usernm, b.dutplcecd, dept.depthngnm, dept.deptengabbr, b.jobkindcd, (select cdnm from com.zbcmcode code where code.cdgrupid = 'R0061' and code.cdid = b.jobkindcd and code.valitodd = '99991231') from com.zsumusrb a, com.zsumusrd b, com.zsdddept dept where a.dutinstcd = '111' and a.dutinstcd = b.dutplceinstcd and a.userid = b.userid and a.usertodd = b.todd and dept.instcd = a.dutinstcd and dept.deptcd = b.dutplcecd and dept.valitodd = '99991231' and a.usertodd = '99991231' and b.userid = :param0]
- [Logging Date Time: 2016-12-08 14:18:03,348] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:18:03,348] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:18:03,348] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:18:03,348] =====================================================================================
- SQL Command - Statement Id: [GET_USER_INFO] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:18:03,399] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:18:03,399] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:18:03,400] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[orddd,20161018], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:18:03,400] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[orddd,20161018], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:18:03,401] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:18:03,401] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:18:03,615] =====================================================================================
- 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]
- [Logging Date Time: 2016-12-08 14:18:03,615] =====================================================================================
- 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]
- [Logging Date Time: 2016-12-08 14:18:03,617] =====================================================================================
- SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[searchClnDate,20161018], param3=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:18:03,617] =====================================================================================
- SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[searchClnDate,20161018], param3=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:18:03,617] =====================================================================================
- SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:18:03,617] =====================================================================================
- SQL Command - Statement Id: [GET_TRMT_DATE_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:18:03,772] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:18:03,772] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:18:03,773] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[orddd,20161018], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:18:03,773] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[orddd,20161018], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:18:03,773] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:18:03,773] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:18:03,960] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:18:03,960] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] PreparedStatement : [SELECT a.orddeptcd, a.pid as IO_Pt_ID, to_char(a.cretno) as IO_CretNo, (ptbs.sex || '/' || com.fn_zz_getageas(ptbs.rrgstno1, ptbs.rrgstno2, TO_CHAR(SYSDATE, 'YYYYMMDD'), 'A', ptbs.brthdd)) as IO_sex_age_y_m, ptbs.hngnm as IO_Pt_Name, (ptbs.rrgstno1 || '-' || substr(ptbs.rrgstno2, 1, 1) || '******') IO_JuminNo, ptbs.zipcdaddr as IO_Zipcdaddr, ptbs.mpphontel as IO_Tel, (select cdnm from com.zbcmcode where cdgrupid = 'P0008' and cdid = a.insukind) as IO_Insukind, (select dept.DEPTENGABBR from com.zsdddept dept where dept.deptcd = a.wardcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_Ward, a.roomcd as IO_roomNO, a.indd as IO_ADdate, a.dschdd as IO_Dschdd, a.ordtype as IO_VisitType, a.orddeptcd as IO_DeptCd, (select dept.deptengabbr from com.zsdddept dept where dept.deptcd = a.orddeptcd and dept.instcd = a.instcd and dept.valitodd >= a.indd and dept.valifromdd <= a.indd) as IO_DeptNm, COM.FN_ZS_GETDEPTNAME(a.instcd, a.orddeptcd, a.indd) AS IO_Dept2, '' AS IO_OPdeptCd, '' AS IO_OPdeptNm, '' AS IO_OPdrNm, '' AS IO_OPdrId, (SELECT diag.diagcd FROM emr.mmohdiag diag WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxCd, (SELECT term.diaghngnm FROM emr.mmohdiag diag, emr.mmbvdiag term WHERE diag.pid = a.pid AND diag.orddd = a.indd AND diag.cretno = a.cretno AND diag.instcd = term.instcd AND diag.diagcd = term.orgdiagcd AND diag.diaghistcd = 'O' AND diag.diagtypecd = 'D' AND diag.diagkindcdflag = 'M' AND diag.diagdd >= term.termfromdd AND diag.diagdd <= term.termtodd AND diag.diagdd >= term.diagattrfromdd AND diag.diagdd <= term.diagattrtodd AND diag.genrflagcd = a.ordtype and diag.orddeptcd = a.orddeptcd AND diag.diaghistno = (select max(diagh.diaghistno) from emr.mmohdiag diagh where diagh.pid = a.pid AND diagh.orddd = a.indd AND diagh.cretno = a.cretno AND diagh.instcd = '111' AND diagh.diaghistcd = 'O' AND diagh.diagkindcdflag = 'M' AND diagh.genrflagcd = a.ordtype and diagh.orddeptcd = a.orddeptcd group by pid)) as IO_DxNm, '111' as IO_HosType, case when ex.bp is null then null else ex.bp end as IO_bp, case when ex.dm is null then null else ex.dm end as IO_dm, case when ex.heart is null then null else ex.heart end as IO_heart, case when ex.kidney is null then null else ex.kidney end as IO_kidney, case when ex.respiration is null then null else ex.respiration end as IO_respiration, case when ex.hx is null then null else ex.hx end as IO_hx, case when ex.allergy is null then null else ex.allergy end as IO_allergy, case when ex.drug is null then null else ex.drug end as IO_drug, case when ex.smoking is null then null else ex.smoking end as IO_smoking, case when ex.idio is null then null else ex.idio end as IO_idio, case when ex.nacrotics is null then null else ex.nacrotics end as IO_nacrotics, case when ex.airway is null then null else ex.airway end as IO_airway, case when ex.hemorrhage is null then null else ex.hemorrhage end as IO_hemorrhage, ex.etc IO_status_etc, '' as IO_OrderNo, '111' as IO_PrintTime, a.medispclid as IO_MaindrId, COM.FN_ZS_GETUSERNM(a.ermedispclid, a.indd) as IO_ErdrNm, COM.FN_ZS_GETUSERNM(a.medispclid, a.indd) as IO_MaindrNm, '111' as IO_OcrCd, '111' as IO_InputId, '111' as IO_InputNm, '111' as IO_SignImg, a.fstrgstdt FROM pam.pmihinpt a left outer join cmr.consent_data_ex ex on (ex.pid = a.pid and ex.cln_date = a.indd) left outer join pam.pmcmptbs ptbs on (ptbs.pid = a.pid and ptbs.instcd = a.instcd) WHERE a.instcd = :param0 AND a.pid = :param1 AND a.indd = :param2 AND a.histstat = 'Y' AND a.mskind = 'M' AND a.cretno = :param3 AND a.orddeptcd = :param4 order by a.fstrgstdt desc]
- [Logging Date Time: 2016-12-08 14:18:03,961] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[orddd,20161018], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:18:03,961] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Parameters: [param0=[instcd,111], param1=[pid,2088963], param2=[orddd,20161018], param3=[cretno,1], param4=[orddeptcd,2110000000]]
- [Logging Date Time: 2016-12-08 14:18:03,961] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:18:03,961] =====================================================================================
- SQL Command - Statement Id: [getPatientInfoIn] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String], param3=[AnsiString, System.String], param4=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:18:04,274] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'임시저장', 'ELECTR_CMP', '서명', 'PAPER_OUT', '출력' , 'CERTIFY_CMP', '인증', 'UNFINISHED', '미작성', 'VERBAL', '구두') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
- [Logging Date Time: 2016-12-08 14:18:04,274] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] PreparedStatement : [SELECT CM.CONSENT_MST_RID , DECODE(CM.CONSENT_STATE, 'TEMP' ,'임시저장', 'ELECTR_CMP', '서명', 'PAPER_OUT', '출력' , 'CERTIFY_CMP', '인증', 'UNFINISHED', '미작성', 'VERBAL', '구두') AS CONSENT_STATE_DISP , VEF.FORM_NAME AS CONSENT_NAME , CM.HOS_TYPE , CM.PID , CM.VISIT_TYPE , CM.ORDER_NO , CM.ORDER_CD , CM.ORDER_NAME , CM.CLN_DEPT_CD , (SELECT DEPTHNGNM FROM COM.ZSDDDEPT WHERE DEPTCD = CM.CLN_DEPT_CD and valitodd = '99991231' and instcd = '111') AS CLN_DEPT_NM , COM.FN_ZS_GETDEPTNAME('111', (select dept.deptcd from com.zsdddept dept where dept.instcd = '111' and dept.valitodd = '99991231' and dept.deptengabbr = CM.WARDCD), '99991231') as WARDCD , CM.ROOMCD , CM.FORM_RID , VEF.FORM_CD , VEF.FORM_GUID , C.PRNTCNT , CM.CONSENT_STATE AS CONSENT_STATE , CM.OCR_NUMBER , CM.COSIGN_DC_ID , CM.COSIGN_DC_NAME , CM.MODIFY_USER_ID AS CREATE_USER_ID , CM.MODIFY_USER_NAME AS CREATE_USER_NAME , CM.MODIFY_DATETIME AS CREATE_DATETIME , CM.CLN_DATE , CM.CRETNO , (SELECT OCRTAGPRNTYN FROM V_EFORM_FORMDOC F WHERE F.FORM_RID = CM.FORM_RID ) AS OCRTAGPRNTYN FROM CONSENT_MST CM INNER JOIN EFORM_DOCUMENT VEF ON VEF.FORM_RID = CM.FORM_RID, EMR.MRFMFORM C WHERE CM.USE_YN = 'Y' AND CM.PID = :param0 AND TO_CHAR(TO_DATE(CM.CREATE_DATETIME, 'YYYY-MM-DD HH24:MI:SS'), 'YYYYMMDD') BETWEEN :param1 and :param2 AND VEF.FORM_CD = C.FORMCD AND C.instcd = '111' AND C.formprogflag LIKE 'OCR%' AND C.formlevlcd != '-' AND CM.HOS_TYPE = '111' AND SUBSTR (C.formtodt, 1, 8) = '99991231' AND CM.CONSENT_STATE IN ('UNFINISHED','TEMP') ORDER BY OCR_NUMBER DESC, CONSENT_STATE ASC]
- [Logging Date Time: 2016-12-08 14:18:04,274] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2088963], param1=[startDt,20010601], param2=[endDt,20161208]]
- [Logging Date Time: 2016-12-08 14:18:04,274] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Parameters: [param0=[patientCode,2088963], param1=[startDt,20010601], param2=[endDt,20161208]]
- [Logging Date Time: 2016-12-08 14:18:04,274] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:18:04,274] =====================================================================================
- SQL Command - Statement Id: [GET_CONSENT_LIST] Types: [param0=[AnsiString, System.String], param1=[AnsiString, System.String], param2=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:18:04,405] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:18:04,405] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:18:04,405] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:18:04,405] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:18:04,405] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:18:04,405] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:18:04,433] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:18:04,433] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:18:04,433] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1146]]
- [Logging Date Time: 2016-12-08 14:18:04,433] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1146]]
- [Logging Date Time: 2016-12-08 14:18:04,434] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:18:04,434] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:19:11,093] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:19:11,093] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] PreparedStatement : [SELECT signdata FROM emr.mrfmsignimge WHERE userid = :param0 and repryn = 'Y']
- [Logging Date Time: 2016-12-08 14:19:11,093] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:19:11,093] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Parameters: [param0=[userid,104806]]
- [Logging Date Time: 2016-12-08 14:19:11,093] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:19:11,093] =====================================================================================
- SQL Command - Statement Id: [getUserSignImage] Types: [param0=[AnsiString, System.String]]
- [Logging Date Time: 2016-12-08 14:19:24,615] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:19:24,615] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] PreparedStatement : [select mst.consent_state from cmr.consent_mst mst where mst.consent_mst_rid = :param0 and mst.use_yn = 'Y']
- [Logging Date Time: 2016-12-08 14:19:24,615] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1146]]
- [Logging Date Time: 2016-12-08 14:19:24,615] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Parameters: [param0=[consentmstrid,1146]]
- [Logging Date Time: 2016-12-08 14:19:24,615] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
- [Logging Date Time: 2016-12-08 14:19:24,615] =====================================================================================
- SQL Command - Statement Id: [GetConsentStateCheck] Types: [param0=[Int32, System.Int32]]
|