ConsentDac.cs.svn-base 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. #region Copyright © 2015 CLIPSOFT Co.,Ltd. All Rights Reserved.
  2. //
  3. // All rights are reserved. Reproduction or transmission in whole or in part,
  4. // in any form or by any means, electronic, mechanical or otherwise, is
  5. // prohibited without the prior written consent of the copyright owner.
  6. //
  7. // Filename:SelectConsentSvcDac.cs
  8. //
  9. #endregion
  10. using CLIP.eForm.Consent.Entity;
  11. using CLIP.eForm.Server.Data;
  12. using IBatisNet.DataMapper;
  13. using System;
  14. using System.Collections;
  15. using System.Collections.Generic;
  16. using System.Linq;
  17. using System.Text;
  18. namespace CLIP.eForm.Consent.Dac {
  19. public class ConsentDac : DacBase {
  20. public IList<ConsentVO> GetConsentSetList(ISqlMapper mapper, Hashtable param) {
  21. return mapper.QueryForList<ConsentVO>("getUserFormSet", param);
  22. }
  23. public IList<ConsentVO> GetConsentBySearch(ISqlMapper mapper, Hashtable param) {
  24. return mapper.QueryForList<ConsentVO>("GET_CONSENT_BY_SEARCH_LIST", param);
  25. }
  26. public IList<ConsentVO> GetConsentList(ISqlMapper mapper, Hashtable param) {
  27. return mapper.QueryForList<ConsentVO>("GET_CONSENT_LIST", param);
  28. }
  29. public IList<ConsentVO> GetConsentDateList(ISqlMapper mapper, Hashtable param) {
  30. //consent_mst에 visit_type을 조건에 추가해야함
  31. String ordType = (String) param["ordType"];
  32. String patientState = (String) param["patientState"];
  33. if (ordType == "I") {
  34. return mapper.QueryForList<ConsentVO>("GET_CONSENT_IN_LIST", param);
  35. } else if (ordType == "O") {
  36. return mapper.QueryForList<ConsentVO>("GET_CONSENT_OUT_LIST", param);
  37. } else if (ordType == "ER") {
  38. return mapper.QueryForList<ConsentVO>("GET_CONSENT_ER_LIST", param);
  39. } else if (ordType == "OP") {
  40. return mapper.QueryForList<ConsentVO>("GET_CONSENT_OP_LIST", param);
  41. } else if (ordType == "EX") {
  42. return mapper.QueryForList<ConsentVO>("GET_CONSENT_EX_LIST", param);
  43. } else if (ordType == "S") {
  44. if (patientState == "I") {
  45. return mapper.QueryForList<ConsentVO>("GET_CONSENT_IN_LIST", param);
  46. } else if (patientState == "O") {
  47. return mapper.QueryForList<ConsentVO>("GET_CONSENT_OUT_LIST", param);
  48. } else if (patientState == "ER") {
  49. return mapper.QueryForList<ConsentVO>("GET_CONSENT_ER_LIST", param);
  50. }
  51. }
  52. return null;
  53. }
  54. public IList<ConsentVO> GetPrescriptionConsentList(ISqlMapper mapper, Hashtable param) {
  55. return mapper.QueryForList<ConsentVO>("GET_PRESCRIPTION_CONSENT_LIST", param);
  56. }
  57. public object GetFormGuidByFormCd(ISqlMapper mapper, Hashtable param) {
  58. return mapper.QueryForObject("GET_FORM_GUID_BY_FORM_CD", param);
  59. }
  60. public IList<ConsentImageVO> GetConsentImage(ISqlMapper mapper, Hashtable param) {
  61. return mapper.QueryForList<ConsentImageVO>("GET_CONSENT_IMAGE", param);
  62. }
  63. public IList<ConsentImageVO> getConsentAudio(ISqlMapper mapper, Hashtable param) {
  64. return mapper.QueryForList<ConsentImageVO>("GET_CONSENT_AUDIO", param);
  65. }
  66. public int GetConsentAudioCount(ISqlMapper mapper, Hashtable param) {
  67. return mapper.QueryForObject<int>("GET_CONSENT_AUDIO_COUNT", param);
  68. }
  69. public IList<UnFinishedListVO> GetUnfinishedListPerDoctor(ISqlMapper mapper, Hashtable param) {
  70. return mapper.QueryForList<UnFinishedListVO>("GetUnfinishedListPerDoctor", param);
  71. }
  72. public String GetConsentStateCheck(ISqlMapper mapper, Hashtable param) {
  73. return mapper.QueryForObject<String>("GetConsentStateCheck", param);
  74. }
  75. //public IList<ConsentBySearchVO> GetConsentByCalcscorcd(ISqlMapper mapper, Hashtable param) {
  76. // return mapper.QueryForList<ConsentBySearchVO>("GET_CONSENT_BY_CALCSCORCD", param);
  77. //}
  78. public IList<ConsentVO> getConsentByFormcd(ISqlMapper mapper, Hashtable param) {
  79. return mapper.QueryForList<ConsentVO>("GET_CONSENT_BY_FORMCD", param);
  80. }
  81. public String getOcrString(ISqlMapper mapper, Hashtable param) {
  82. return mapper.QueryForObject<String>("GET_OCR_STRING", param);
  83. }
  84. public String getConsentFormXml(ISqlMapper mapper, Hashtable param) {
  85. return mapper.QueryForObject<String>("GET_CONSENT_FORM_XML", param);
  86. }
  87. /// <summary>
  88. /// 원무 서식의 인증저장 사용 여부
  89. /// </summary>
  90. /// <param name="mapper">SQL mapper</param>
  91. /// <param name="param">The parameter.</param>
  92. /// <returns></returns>
  93. public String getCertuseYn(ISqlMapper mapper, Hashtable param) {
  94. return mapper.QueryForObject<String>("GET_CERTUSEYN", param);
  95. }
  96. /// <summary>
  97. /// 원무 서식의 인증저장 사용 여부
  98. /// 서식이 여러개 선택되었을때
  99. /// </summary>
  100. /// <param name="mapper">SQL mapper</param>
  101. /// <param name="param">The parameter.</param>
  102. /// <returns></returns>
  103. public String getCertUseYnData(ISqlMapper mapper, Hashtable param) {
  104. return mapper.QueryForObject<String>("GET_CERTUSEYN_MAP", param);
  105. }
  106. /// <summary>
  107. /// 동의서가 금일 작성되었는지 여부 확인 formCd 반환
  108. /// </summary>
  109. /// <param name="mapper">SQL mapper</param>
  110. /// <param name="param">The parameter.</param>
  111. /// <returns></returns>
  112. public String getDupCertConsent(ISqlMapper mapper, Hashtable param) {
  113. return mapper.QueryForObject<String>("GET_RESULT", param);
  114. }
  115. public int getScanFileMaxSeq(ISqlMapper mapper, Hashtable param) {
  116. return mapper.QueryForObject<int>("GET_SCANFILE_MAX_SEQ", param);
  117. }
  118. public String getTreatTSeq(ISqlMapper mapper, Hashtable param) {
  119. return mapper.QueryForObject<String>("GET_TREATT_SEQ", param);
  120. }
  121. public String getTreatTNewSeq(ISqlMapper mapper, Hashtable param) {
  122. return mapper.QueryForObject<String>("GET_TREATT_NEW_SEQ", param);
  123. }
  124. public void insertScanGroup(ISqlMapper mapper, Hashtable param) {
  125. mapper.QueryForObject<Int32>("INSERT_IMR_SCANGROUP", param);
  126. }
  127. public void insertScanFile(ISqlMapper mapper, Hashtable param) {
  128. mapper.QueryForObject<Int32>("INSERT_IMR_SCANFILE", param);
  129. }
  130. /// <summary>
  131. /// 경북대학교병원 accu 모니터 설치 사용자 여부
  132. /// </summary>
  133. /// <param name="mapper"></param>
  134. /// <param name="param"></param>
  135. /// <returns></returns>
  136. public String getDualViewMode(ISqlMapper mapper, Hashtable param) {
  137. return mapper.QueryForObject<String>("GET_DUAL_MODE", param);
  138. }
  139. public void updateToCertifyConsentMst(ISqlMapper mapper, Hashtable param) {
  140. mapper.QueryForObject<Int32>("TO_CERTIFY_CONSENT_MST", param);
  141. }
  142. public void updateToCertifyOcrprnt(ISqlMapper mapper, Hashtable param) {
  143. mapper.QueryForObject<Int32>("TO_CERTIFY_OCRPRNT", param);
  144. }
  145. public void updateConsentMaster(ISqlMapper mapper, Hashtable param) {
  146. mapper.QueryForObject<Int32>("UPDATE_CONSENT_MASTER", param);
  147. }
  148. public void updateOcrPrintHistory(ISqlMapper mapper, Hashtable param) {
  149. mapper.QueryForObject<Int32>("UPDATE_OCR_HISTORY", param);
  150. }
  151. public string ReUseCertifyConsentFlag(ISqlMapper mapper, Hashtable param) {
  152. return mapper.QueryForObject<String>("ReUseCertifyConsentFlag", param);
  153. }
  154. public string getSaveAllFlag(ISqlMapper mapper, Hashtable param) {
  155. return mapper.QueryForObject<String>("getSaveAllFlag", param);
  156. }
  157. }
  158. }