1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381 |
- #region Copyright © 2015 CLIPSOFT Co.,Ltd. All Rights Reserved.
- //
- // All rights are reserved. Reproduction or transmission in whole or in part,
- // in any form or by any means, electronic, mechanical or otherwise, is
- // prohibited without the prior written consent of the copyright owner.
- //
- // Filename: ConsentSvc.asmx.cs
- //
- #endregion
- using System;
- using System.Collections.Generic;
- using System.Web.Services;
- using System.Collections;
- using IBatisNet.DataMapper;
- using CLIP.eForm.Server.Data;
- using CLIP.eForm.Consent.Entity;
- using CLIP.eForm.Consent.Dac;
- using System.IO;
- using System.Drawing;
- using System.Text;
- using System.Linq;
- namespace CLIP.eForm.Consent.WebService {
- /// <summary>
- /// Class description
- /// </summary>
- /// <remarks>
- /// <p>[설계자]</p>
- /// <p> 클립소프트 연구소 홍지철 (jchong@clipsoft.co.kr)</p>
- /// <p>[원본 작성자]</p>
- /// <p> 클립소프트 기술부 이인희</p>
- /// <p>[수정 작성자]</p>
- /// <p> 파티마병원 정보지원과 오재은</p>
- /// <p>----------------------------------------------------------------------------------------</p>
- /// <p>[HISTORY]</p>
- /// <p> 2016-06-15 : 최초작성</p>
- /// <p>----------------------------------------------------------------------------------------</p>
- /// </remarks>
- /// <summary>
- /// HospitalSvc 요약 설명입니다.
- /// </summary>
- [WebService(Namespace = "http://tempuri.org/")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- [System.ComponentModel.ToolboxItem(false)]
- // ASP.NET AJAX를 사용하여 스크립트에서 이 웹 서비스를 호출하려면 다음 줄의 주석 처리를 제거합니다.
- // [System.Web.Script.Services.ScriptService]
- public class HospitalSvc : System.Web.Services.WebService {
- private IBatisHelper _ibatisHelper;
- //private IBatisHelper cendbHelper;
- public HospitalSvc() {
- _ibatisHelper = new IBatisHelper("HospitalSvcOracleMap.config");
- //cendbHelper = new IBatisHelper("CenDBOracleMap.config");
- }
- protected override void Dispose(bool disposing) {
- if (IbatisSession != null && IbatisSession.Transaction != null) {
- IbatisSession.CommitTransaction();
- IbatisSession.CloseConnection();
- }
- if (IbatisMapper != null)
- IbatisMapper.CloseConnection();
- //if (cendbSession != null && cendbSession.Transaction != null) {
- // cendbSession.CommitTransaction();
- // cendbSession.CloseConnection();
- //}
- //if (cendbMapper != null) {
- // cendbMapper.CloseConnection();
- //}
- base.Dispose(disposing);
- }
- /// <summary>
- /// 현재 연결된 IBatis Connection을 반환
- /// </summary>
- public ISqlMapper IbatisMapper {
- get {
- if (_ibatisHelper == null) {
- return null;
- } else {
- return _ibatisHelper.GetSqlMapper();
- }
- }
- }
- //public ISqlMapper cendbMapper {
- // get {
- // if (cendbHelper == null) {
- // return null;
- // } else {
- // return cendbHelper.GetSqlMapper();
- // }
- // }
- //}
- /// <summary>
- /// 현재 연결된 ISqlMapSession 을 반환
- /// </summary>
- public ISqlMapSession IbatisSession {
- get {
- if (_ibatisHelper == null) {
- return null;
- } else {
- return _ibatisHelper.GetMapSession();
- }
- }
- }
- //public ISqlMapSession cendbSession {
- // get {
- // if (cendbHelper == null) {
- // return null;
- // } else {
- // return cendbHelper.GetMapSession();
- // }
- // }
- //}
- [WebMethod]
- public bool CheckWebService() {
- return true;
- }
- //[WebMethod]
- //public string checkCendbService() {
- // int hashCode = 0;
- // if (cendbHelper != null) {
- // hashCode = cendbHelper.GetHashCode();
- // }
- // return String.Format("result is: {0}", hashCode);
- //}
- [WebMethod]
- public bool CheckDatabaseConnection() {
- // TODO: 데이터 베이스 커넥션 테스트 호출 필요
- if (IbatisMapper != null) {
- return true;
- }
- return false;
- }
- /// <summary>
- /// 동의서 기본 세팅 정보
- /// </summary>
- /// <returns></returns>
- [WebMethod(Description = "동의서 기본 세팅 정보")]
- public List<SettingListVO> GetSettingData() {
- List<SettingListVO> result = null;
- try {
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- //return (List<SettingListVO>) dac.GetSettingData(IbatisMapper, param);
- result = (List<SettingListVO>) dac.GetSettingData(IbatisMapper, param);
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetSettingData error: {0}", ex.Message));
- }
- return result;
- }
- /// <summary>
- /// 사용자 상세정보
- /// 의사의 경우 엔존번호를 반환한다
- /// </summary>
- /// <param name="userId">사용자 ID</param>
- /// <param name="instCd">근무지기관코드</param>
- /// <param name="deptCd">근무지부서코드</param>
- /// <returns></returns>
- [WebMethod(Description = "사용자 상세정보")]
- public UserVO GetUserInfo(string userId, string instCd, string deptCd) {
- UserVO user = new UserVO();
- try {
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable {
- { "userId", userId },
- { "instCd", instCd },
- { "deptCd", deptCd ?? "" }
- };
- user = dac.GetUserInfo(this.IbatisMapper, param);
- if (user == null) {
- user = new UserVO();
- user.userId = "";
- user.userName = "";
- user.userDeptCode = "";
- user.userDeptName = "";
- user.deptEngAbbr = "";
- user.jobKindCd = "";
- user.jobKindNm = "";
- user.instCd = "";
- user.userTelNo = "";
- user.ioFlag = "";
- }
- }
- return user;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetUserInfo error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 환자 진료일 조회
- /// </summary>
- /// <param name="patientNo">환자번호</param>
- /// <param name="searchClnDate">검색진료일</param>
- /// <param name="searchType">검색조건, (searchType == ">=" 이면 clnDate >= searchClnDate, searchType == "=" 이면 clnDate = searchClnDate) </param>
- /// <param name="orddeptcd">진료부서코드</param>
- /// <param name="dutinstcd">근무지기관코드</param>
- /// <returns></returns>
- [WebMethod(Description = "환자 진료일 조회")]
- public List<ClnDateForDropdownVO> GetTrmtDateList(string patientNo, string searchClnDate, string searchType, string orddeptcd
- , string dutinstcd, string ordType) {
- List<ClnDateForDropdownVO> clnDateList;
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable {
- { "instcd", dutinstcd },
- { "pid", patientNo },
- { "searchClnDate", searchClnDate },
- { "searchType", searchType },
- { "orddeptcd", orddeptcd },
- { "ordType", ordType}
- };
- clnDateList = (List<ClnDateForDropdownVO>) dac.GetTrmtDateList(this.IbatisMapper, param);
- }
- return clnDateList;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetTrmtDateList error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 환자리스트 조회
- /// </summary>
- /// <param name="srchDd">조회일자 ex) 20200101</param>
- /// <param name="ordDeptCd">진료과 코드</param>
- /// <param name="doctorId">의사 아이디</param>
- /// <param name="pid">환자 등록번호</param>
- /// <param name="patientState">동의서 상태 및 환자 상태</param>
- /// <param name="instCd">병원 기관코드</param>
- /// <param name="wardCd">병동코드</param>
- /// <param name="userId">사용자 아이디</param>
- /// <param name="myPatient">입원에서 내환자 검색 조건</param>
- /// <param name="jobKindCd"></param>
- /// <param name="drKind">의사 구분코드 전공의(A), 담당교수(B), 그외 직종(C) 구분코드 </param>
- /// <param name="selectFlag">화면 구분 입원 : I, 외래 : O, 응급 : ER, 수술 : OP, 검색 : S</param>
- /// <param name="srchYN">검색 화면 여부</param>
- /// <returns></returns>
- [WebMethod(Description = "환자리스트 조회")]
- public List<PatListVO> GetPatientList(String srchDd, String ordDeptCd, String doctorId, String pid, String patientState, String instCd,
- String wardCd, String userId, String myPatient, String jobKindCd, String drKind, String selectFlag, String srchYN) {
- wardCd = wardCd ?? "";
- userId = userId ?? "";
- myPatient = myPatient ?? "N";
- jobKindCd = jobKindCd ?? "";
- drKind = drKind ?? "";
- selectFlag = selectFlag.ToUpper();
- if (selectFlag.Equals("SR")) {
- if (patientState.Equals("A")) {
- selectFlag = "I";
- patientState = "A";
- } else if (patientState.Equals("0")) {
- selectFlag = "O";
- } else if (patientState.Equals("1")) {
- selectFlag = "E";
- patientState = "A";
- }
- }
- List<PatListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- param.Add("srchDd", srchDd);
- param.Add("ordDeptCd", ordDeptCd);
- param.Add("doctorId", doctorId);
- param.Add("pid", pid);
- param.Add("patientState", patientState);
- param.Add("instCd", instCd);
- param.Add("selectFlag", selectFlag);
- param.Add("srchYN", srchYN);
- if (selectFlag.Equals("I")) {
- param.Add("wardCd", wardCd);
- param.Add("userId", userId);
- param.Add("myPatient", myPatient);
- }
- if (selectFlag.Equals("I") || selectFlag.Equals("E")) {
- param.Add("jobKindCd", jobKindCd);
- param.Add("drKind", drKind);
- }
- result = (List<PatListVO>) dac.GetPatList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetPatientList error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 검사탭 환자리스트 조회 모바일 전용
- /// </summary>
- /// <param name="selectFlag">선택한 탭의 상태값 입원 : I, 외래 : O, 응급 : ER, 수술 : OP, 검사 : EX, 검색 : S</param>
- /// <param name="toDt"></param>
- /// <param name="fromDt"></param>
- /// <param name="baseCd">지원부서목록</param>
- /// <param name="supportDeptCd">지원과</param>
- /// <param name="pid">환자번호</param>
- /// <param name="patientState"></param>
- /// <returns></returns>
- [WebMethod(Description = "검사탭 환자리스트 조회")]
- public List<PatListVO> GetPatientExList(String selectFlag, String toDt, String fromDt, String baseCd, String supportDeptCd, String pid, String patientState) {
- List<PatListVO> result = null;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- param.Add("selectFlag", selectFlag);
- param.Add("toDt", toDt);
- param.Add("fromDt", fromDt);
- param.Add("baseCd", baseCd);
- param.Add("supportDeptCd", supportDeptCd);
- param.Add("pid", pid);
- param.Add("patientState", patientState);
- param.Add("deviceType", "MOBILE");
- result = (List<PatListVO>) dac.GetPatList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetInPatList error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 검사탭 환자리스트 조회 모바일 전용
- /// </summary>
- /// <param name="selectFlag">선택한 탭의 상태값 입원 : I, 외래 : O, 응급 : ER, 수술 : OP, 검사 : EX, 검색 : S</param>
- /// <param name="toDt"></param>
- /// <param name="fromDt"></param>
- /// <param name="baseCd">지원부서목록</param>
- /// <param name="supportDeptCd">지원과</param>
- /// <param name="pid">환자번호</param>
- /// <param name="patientState"></param>
- /// <returns></returns>
- [WebMethod(Description = "검사탭 환자리스트 조회")]
- public List<PatListVO> GetPatientExListPC(String selectFlag, String toDt, String fromDt, String baseCd, String supportDeptCd, String pid, String patientState, string isMainD, string mainDrId) {
- List<PatListVO> result = null;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- param.Add("selectFlag", selectFlag);
- param.Add("toDt", toDt);
- param.Add("fromDt", fromDt);
- param.Add("baseCd", baseCd);
- param.Add("supportDeptCd", supportDeptCd);
- param.Add("pid", pid);
- param.Add("patientState", patientState);
- param.Add("deviceType", "PC");
- param.Add("isMainD", isMainD);
- param.Add("mainDrId", mainDrId);
- result = (List<PatListVO>) dac.GetPatList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetInPatList error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 검사탭 환자리스트 조회 PC 클라이언트 전용
- /// </summary>
- /// <param name="selectFlag">선택한 탭의 상태값 입원 : I, 외래 : O, 응급 : ER, 수술 : OP, 검사 : EX, 검색 : S</param>
- /// <param name="toDt"></param>
- /// <param name="fromDt"></param>
- /// <param name="baseCd">지원부서목록</param>
- /// <param name="supportDeptCd">지원과</param>
- /// <param name="pid">환자번호</param>
- /// <param name="patientState"></param>
- /// <returns></returns>
- [WebMethod(Description = "검사탭 환자리스트 조회")]
- public List<PatListVO> GetPatientExPCList(String selectFlag, String toDt, String fromDt, String baseCd, String supportDeptCd, String pid, String patientState, string isMainD, string mainDrId) {
- List<PatListVO> result = null;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- param.Add("selectFlag", selectFlag);
- param.Add("toDt", toDt);
- param.Add("fromDt", fromDt);
- param.Add("baseCd", baseCd);
- param.Add("supportDeptCd", supportDeptCd);
- param.Add("pid", pid);
- param.Add("patientState", patientState);
- param.Add("isMainD", isMainD);
- param.Add("mainDrId", mainDrId);
- result = (List<PatListVO>) dac.GetPatList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetInPatList error: {0}", ex.Message));
- throw ex;
- }
- }
- ///// <summary>
- ///// 입원탭 환자리스트 조회
- ///// </summary>
- ///// <param name="srchdd">조회일자 ex)20160623</param>
- ///// <param name="orddeptcd">진료과 및 집도과 ex) 빈값은 전체</param>
- ///// <param name="doctorid">진료의 또는 주치의 또는 집도의 ex) 빈값은 전체</param>
- ///// <param name="pid">환자등록번호 ex) 빈값은 전체</param>
- ///// <param name="wardcd">병동 코드 ex) 3041400000</param>
- ///// <param name="patstat">환자 상태구분 (외래 : 진료구분, 입원 : 구분, 수술 : 수술상태, 응급 : 재원구분, 환자찾기 : ID인지 이름인지) ex)빈값은 전체</param>
- ///// <param name="jobkindcd"></param>
- ///// <param name="dutinstcd">근무지기관코드</param>
- ///// <param name="userId">로그인 사용자 ID</param>
- ///// <param name="myPatient">내환자 검색 checkbox value, 내환자 검색의 경우 pid 파라미터는 null 로 보내야 한다.ex) Y, N</param>
- //[WebMethod(Description = "입원탭 환자리스트 조회")]
- //public List<PatListVO> GetInPatList(String srchdd, String orddeptcd, String doctorid, String pid, String wardcd, String patstat, String jobkindcd, String dutinstcd, String userId, String myPatient, String drKind) {
- // List<PatListVO> result;
- // try {
- // using (PatListDac dac = new PatListDac()) {
- // var myPatValue = myPatient ?? "N";
- // var userIdValue = userId ?? "";
- // // 내환자 검색일 경우 입력된 환자 번호를 무시하도록 설정
- // if (myPatValue == "Y") {
- // pid = "";
- // }
- // //CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetCategoryForDropdown error: {0}", srchdd));
- // Hashtable param = new Hashtable {
- // { "instcd", dutinstcd },
- // { "srchdd", srchdd },
- // { "orddeptcd", orddeptcd },
- // { "wardcd", wardcd },
- // { "patstat", patstat },
- // { "pid", pid },
- // { "doctorid", doctorid },
- // { "selectflag", "I" },
- // { "userid", userIdValue },
- // { "myPatient", myPatValue },
- // { "srchYN", "N" },
- // { "drKind", drKind }
- // };
- // result = (List<PatListVO>) dac.GetPatList(this.IbatisMapper, param);
- // }
- // return result;
- // } catch (Exception ex) {
- // CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetInPatList error: {0}", ex.Message));
- // throw ex;
- // }
- //}
- ///// <summary>
- ///// 외래탭 환자리스트 조회
- ///// </summary>
- ///// <param name="srchdd">조회일자 ex)20160628 orddd</param>
- ///// <param name="orddeptcd">진료과 및 집도과 ex)빈값은 전체, 2010400000</param>
- ///// <param name="doctorid">진료의 또는 주치의 또는 집도의 ex)빈값은 전체, 104796 orddrid</param>
- ///// <param name="pid">환자등록번호 ex)빈값은 전체</param>
- ///// <param name="patstat">환자 상태구분 (외래 : 진료구분, 입원 : 구분, 수술 : 수술상태, 응급 : 재원구분, 환자찾기 : ID인지 이름인지) 빈값은 전체</param>
- ///// <param name="dutinstcd">근무지기관코드</param>
- ///// <returns>외래 환자 리스트</returns>
- //[WebMethod(Description = "외래탭 환자리스트 조회")]
- //public List<PatListVO> GetOutPatList(String srchdd, String orddeptcd, String doctorid, String pid, String patstat, String dutinstcd) {
- // List<PatListVO> result = null;
- // try {
- // using (PatListDac dac = new PatListDac()) {
- // Hashtable param = new Hashtable {
- // { "instcd", dutinstcd },
- // { "srchdd", srchdd },
- // { "orddeptcd", orddeptcd },
- // { "orddrid", doctorid },
- // { "pid", pid },
- // { "patstat", patstat },
- // { "selectflag", "O" },
- // { "srchYN", "N" }
- // };
- // result = (List<PatListVO>) dac.GetPatList(this.IbatisMapper, param);
- // }
- // return result;
- // } catch (Exception ex) {
- // CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetOutPatList error: {0}", ex.Message));
- // throw ex;
- // }
- //}
- ///// <summary>
- ///// 수술탭 환자리스트 조회
- ///// </summary>
- ///// <param name="srchdd">조회일자 ex)20160623</param>
- ///// <param name="orddeptcd">진료과 및 집도과 ex)빈값은 전체</param>
- ///// <param name="doctorid">진료의 또는 주치의 또는 집도의 ex)빈값은 전체</param>
- ///// <param name="pid">환자등록번호 ex)빈값은 전체</param>
- ///// <param name="patstat">환자 상태구분 (외래 : 진료구분, 입원 : 구분, 수술 : 수술상태, 응급 : 재원구분, 환자찾기 : ID인지 이름인지) ex)A</param>
- ///// <param name="dutinstcd">근무지기관코드</param>
- ///// <returns></returns>
- //[WebMethod(Description = "수술탭 환자리스트 조회")]
- //public List<PatListVO> GetOpPatList(String srchdd, String orddeptcd, String doctorid, String pid, String patstat, String dutinstcd) {
- // List<PatListVO> result;
- // try {
- // using (PatListDac dac = new PatListDac()) {
- // Hashtable param = new Hashtable {
- // { "instcd", dutinstcd },
- // { "srchdd", srchdd },
- // { "opstatcd", patstat },
- // { "orddeptcd", orddeptcd },
- // { "orddrid", doctorid },
- // { "pid", pid },
- // { "selectflag", "OP" },
- // { "srchYN", "N" }
- // };
- // result = (List<PatListVO>) dac.GetPatList(this.IbatisMapper, param);
- // }
- // return result;
- // } catch (Exception ex) {
- // CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetOpPatList error: {0}", ex.Message));
- // throw ex;
- // }
- //}
- ///// <summary>
- ///// 응급탭 환자 리스트 조회
- ///// </summary>
- ///// <param name="srchdd">조회일자 ex) 20160623</param>
- ///// <param name="orddeptcd">진료과 및 집도과 ex)빈값은 전체</param>
- ///// <param name="doctorid"> 진료의 또는 주치의 또는 집도의 ex)빈값은 전체</param>
- ///// <param name="pid">환자등록번호 ex)빈값은 전체</param>
- ///// <param name="patstat">환자 상태구분 (외래 : 진료구분, 입원 : 구분, 수술 : 수술상태, 응급 : 재원구분, 환자찾기 : ID인지 이름인지) ex)빈값은 전체</param>
- ///// <param name="jobkindcd">직무의 종류와 담당분야가 동일한 직무의군 코드값 아직 정의 되지 않았음. 예)영양직, 의무정보직, 임상병리직'</param>
- ///// <param name="dutinstcd">근무지기관코드</param>
- ///// <returns></returns>
- //[WebMethod(Description = "응급탭 환자 리스트 조회")]
- //public List<PatListVO> GetErPatList(String srchdd, String orddeptcd, String doctorid, String pid, String patstat, String jobkindcd, String dutinstcd, String drKind) {
- // List<PatListVO> result;
- // try {
- // using (PatListDac dac = new PatListDac()) {
- // Hashtable param = new Hashtable {
- // { "instcd", dutinstcd },
- // { "srchdd", srchdd },
- // { "orddeptcd", orddeptcd },
- // { "orddrid", doctorid },
- // { "patstat", patstat },
- // { "pid", pid },
- // { "selectflag", "ER" },
- // { "srchYN", "N" },
- // { "drKind", drKind }
- // };
- // result = (List<PatListVO>) dac.GetPatList(this.IbatisMapper, param);
- // }
- // return result;
- // } catch (Exception ex) {
- // CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetErPatList error: {0}", ex.Message));
- // throw ex;
- // }
- //}
- ///// <summary>
- ///// 환자검색 조회 기능
- ///// </summary>
- ///// <param name="srchdd">조회일자 ex)20160623</param>
- ///// <param name="orddeptcd">진료과 및 집도과 ex)빈값은 전체</param>
- ///// <param name="doctorid">진료의 또는 주치의 또는 집도의 ex)빈값은 전체</param>
- ///// <param name="pid">환자등록번호 ex)빈값은 전체</param>
- ///// <param name="ordtype">외래 O / 입원 I / 응급 ER</param>
- ///// <param name="dutinstcd">근무지기관코드</param>
- ///// <param name="userId">로그인 사용자 ID</param>
- ///// <param name="myPatient">내환자 검색 checkbox value, 내환자 검색의 경우 pid 파라미터는 null 로 보내야 한다.ex) Y, N</param>
- ///// <returns></returns>
- //[WebMethod(Description = "환자검색 조회 기능")]
- //public List<PatListVO> GetSrPatList(String srchdd, String orddeptcd, String doctorid, String pid, String ordtype, String dutinstcd, String userId, String myPatient) {
- // List<PatListVO> result;
- // try {
- // using (PatListDac dac = new PatListDac()) {
- // var myPatValue = myPatient ?? "N";
- // var userIdValue = userId ?? "";
- // // 내환자 검색일 경우 입력된 환자 번호를 무시하도록 설정
- // if (myPatValue == "Y") {
- // pid = "";
- // }
- // Hashtable param = new Hashtable {
- // { "instcd", dutinstcd },
- // { "srchdd", srchdd },
- // { "orddeptcd", orddeptcd },
- // { "wardcd", "" },
- // { "medispclid", doctorid },
- // { "orddrid", doctorid },
- // { "pid", pid },
- // { "opstatcd", "A" },
- // { "selectflag", ordtype },
- // { "patstat", "0" },
- // { "myPatient", myPatValue },
- // { "userId", userIdValue },
- // { "srchYN", "Y" }
- // };
- // result = (List<PatListVO>) dac.GetPatList(this.IbatisMapper, param);
- // }
- // return result;
- // } catch (Exception ex) {
- // CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetSrPatList error: {0}", ex.Message));
- // throw ex;
- // }
- //}
- /// <summary>
- /// 환자리스트 조회조건 중 진료과 조회
- /// </summary>
- /// <param name="ordType">내원 종류 ( 탭 종류 ) 외래 : O , 입원 : I , 수술 : OP, 응급 : ER, 환자검색 : SR</param>
- /// <param name="instCd">근무지기관코드</param>
- [WebMethod(Description = "환자리스트 조회조건 중 진료과 조회")]
- public List<DeptListVO> GetDeptList(String ordType, String instCd) {
- List<DeptListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- if (instCd == null) {
- instCd = "031";
- }
- param.Add("instCd", instCd);
- param.Add("ordType", ordType);
- result = (List<DeptListVO>) dac.GetDeptList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetDeptList error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 환자리스트 조회조건 중 진료과 리스트 진짜 사용할꺼
- /// </summary>
- /// <param name="ordType">내원 종류 ( 탭 종류 ) 외래 : O , 입원 : I , 수술 : OP, 응급 : ER, 환자검색 : S</param>
- /// <param name="dutInstCd">근무지기관코드</param>
- [WebMethod(Description = "환자리스트 조회조건 중 진료과 리스트")]
- public List<DeptListVO> GetOrgDeptList(String ordType, String dutInstCd) {
- List<DeptListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- if (dutInstCd == null) {
- dutInstCd = "101";
- }
- param.Add("instCd", dutInstCd);
- param.Add("ordType", ordType);
- result = (List<DeptListVO>) dac.GetDeptList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetDeptList error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 환자리스트 조회조건 중 병동 조회
- /// </summary>
- /// <param name="dutInstCd">근무지기관코드</param>
- /// <returns></returns>
- [WebMethod(Description = "환자리스트 조회조건 중 병동 조회")]
- public List<DeptListVO> GetWardList(String instCd) {
- List<DeptListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- param.Add("instCd", instCd);
- result = (List<DeptListVO>) dac.GetWardList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetWardList error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 환자리스트 조회조건 의사 조회
- /// </summary>
- /// <param name="srchDd">조회 일자 20190822</param>
- /// <param name="ordDeptCd">진료과 코드 (소화기내과 : 2010000000) </param>
- /// <param name="dutInstCd">근무지기관코드 101</param>
- /// <returns></returns>
- [WebMethod(Description = "환자리스트 조회조건 중 의사 조회")]
- public List<DocListVO> GetDoctorList(String srchDd, String ordDeptCd, String instCd) {
- List<DocListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- param.Add("instCd", instCd);
- param.Add("srchDd", srchDd);
- param.Add("ordDeptCd", ordDeptCd);
- result = (List<DocListVO>) dac.GetDocList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetDoctorList error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 검사 지원부서 설정 목록
- /// </summary>
- /// <returns></returns>
- [WebMethod(Description = "검사 지원부서 설정 목록")]
- public List<DeptListVO> GetSupportDeptList() {
- List<DeptListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- result = (List<DeptListVO>)dac.GetSupportDeptList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetSupportDeptList error: {0}", ex.Message));
- throw ex;
- }
- }
- [WebMethod(Description = "검사 지원부서 설정 목록")]
- public List<InspectionVO> GetInspectingRoomName(string deptCd) {
- List<InspectionVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- param.Add("deptCd", deptCd);
- result = (List<InspectionVO>) dac.GetInspectingRoomName(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetInspectingRoomName error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 환자리스트 조회조건 중 환자 검색 팝업
- /// </summary>
- /// <param name="srchcond">조회 구분( 1: 등록번호, 2: 환자명, 3: 주민번호, 4: 환자명+주민번호)</param>
- /// <param name="pid">환자 등록번호 ex) 2234596</param>
- /// <param name="hngnm">환자이름 ex) 오재은</param>
- /// <param name="rrgstno1">주민번호 앞자리 ex) 891117</param>
- /// <param name="rrgstno2">주민번호 뒷자리 ex) 1682813</param>
- /// <param name="dutinstcd">근무지기관코드</param>
- /// <returns></returns>
- [WebMethod(Description = "환자리스트 조회조건 중 환자 검색 팝업")]
- public List<PatInfoListVO> GetSrchPatInfo(String srchcond, String pid, String hngnm, String rrgstno1, String rrgstno2, String dutinstcd) {
- List<PatInfoListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", dutinstcd);
- param.Add("srchcond", srchcond);
- param.Add("pid", pid);
- param.Add("hngnm", hngnm);
- param.Add("rrgstno1", rrgstno1);
- param.Add("rrgstno2", rrgstno2);
- result = (List<PatInfoListVO>) dac.GetSrchPatInfo(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetSrchPatInfo error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 환자 선택시 수진일자별 진단 데이터 조회.
- /// 입원일때 한 수진에 수술이 여러개일 경우 집도과로 체크
- /// 외래일때 당일 수진이 여러개일경우 진료과로 체크
- /// </summary>
- /// <param name="pid">환자 등록번호 ex) 2234596 , 2270516</param>
- /// <param name="inDd">외래 : 진료일, 입원: 입원일 ex) 20160205 , 20151201</param>
- /// <param name="ordType">내원 구분 (I: 입원, E: 응급, O: 외래) O , I</param>
- /// <param name="ordDeptCd">내원 구분 (I: 입원, E: 응급, O: 외래) O , I</param>
- /// <param name="cretNo">생성번호</param>
- /// <param name="instCd">근무지기관코드</param>
- /// <param name="opRsrvNo">수술예약번호</param>
- /// <returns></returns>
- [WebMethod(Description = "환자 선택시 수진일자별 진단 데이터 조회")]
- public List<PatientVO> GetPatientInfo(String pid, String inDd, String ordType, String ordDeptCd, String cretNo, String instCd, String opRsrvNo) {
- List<PatientVO> result;
- opRsrvNo = opRsrvNo ?? "";
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable {
- { "instCd", instCd },
- { "inDd", inDd },
- { "pid", pid },
- { "ordType", ordType},
- { "ordDeptCd", ordDeptCd},
- { "cretNo", cretNo },
- { "opRsrvNo", opRsrvNo }
- };
- result = (List<PatientVO>) dac.GetPatientInfo(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetPatientInfo error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 사용자 즐겨찾기 추가
- /// </summary>
- /// <param name="userId">사용자 아이디 107810</param>
- /// <param name="formCd">서식코드 </param>
- /// <param name="instCd">근무지기관코드</param>
- [WebMethod(Description = "사용자 즐겨찾기 추가")]
- public SingleReturnData SetUserFormSetList(String userId, String formCd, String instCd) {
- SingleReturnData result = new SingleReturnData();
- int res = 0;
- try {
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- param.Add("instCd", instCd);
- param.Add("userId", userId);
- param.Add("formCd", formCd);
- res = dac.SetUserFormSet(this.IbatisMapper, param);
- }
- result.responseData = Convert.ToString(res);
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm SetUserFormSetList error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 사용자 즐겨찾기 삭제
- /// </summary>
- /// <param name="idx">즐겨찾기에 추가된 동의서 고유번호</param>
- /// <param name="userId">사용자 아이디 107810</param>
- /// <param name="formCd">서식코드 </param>
- /// <param name="dutInstCd">근무지기관코드</param>
- [WebMethod(Description = "사용자 즐겨찾기 삭제")]
- public SingleReturnData DelUserFormSetList(String idx, String userId, String formCd, String dutInstCd) {
- SingleReturnData result = new SingleReturnData();
- int res = 0;
- try {
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- param.Add("idx", idx);
- param.Add("instCd", dutInstCd);
- param.Add("userId", userId);
- param.Add("formCd", formCd);
- dac.DelUserFormSet(this.IbatisMapper, param);
- //if (cendbHelper.GetSqlMapper().DataSource.Name == "DCUMCHospitalDB") {
- // res = dac.DelUserFormSet(this.IbatisMapper, param);
- // result.responseData = Convert.ToString(res);
- //} else {
- // res = dac.DelUserFormSet(this.cendbMapper, param);
- // result.responseData = Convert.ToString(res);
- //}
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm DelUserFormSetList error: {0}", ex.Message));
- throw ex;
- }
- return result;
- }
- /// <summary>
- /// OCRTAG 할당
- /// </summary>
- /// <returns></returns>
- [WebMethod(Description = "OCRTAG 할당")]
- public SingleReturnData GetOcrTag() {
- SingleReturnData result = new SingleReturnData();
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable();
- String res = dac.GetOcrTag(this.IbatisMapper, param);
- result.responseData = res;
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetOcrTag error: {0}", ex.Message));
- throw ex;
- }
- return result;
- }
- /// <summary>
- /// 사용자의 서명이미지 조회
- /// </summary>
- /// <param name="userId">사용자 아이디 103043</param>
- /// <param name="instCd">근무지기관코드</param>
- [WebMethod(Description = "사용자의 서명이미지 조회")]
- public UserSignImageVO GetSignImage(string userId, string instCd) {
- UserSignImageVO vo = new UserSignImageVO();
- try {
- string base64stringimg = string.Empty;
-
- using (UserDac dac = new UserDac()) {
- userId = userId.ToUpper();
- Hashtable param = new Hashtable();
- param.Add("userId", userId);
- param.Add("instCd", instCd);
- IList<UserSignImageVO> vos = dac.GetUserSignImage(this.IbatisMapper, param);
- foreach (UserSignImageVO item in vos) {
- vo = item;
- break;
- }
- if (vos.Count == 0) {
- vo.SignImage = new Byte[0];
- }
- }
-
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetSignImage error: {0}", ex.Message));
- throw ex;
- }
- return vo;
- }
- /// <summary>
- /// 주,부 진단명 리스트 조회(진단명 팝업)
- /// </summary>
- /// <param name="pid">등록번호 </param>
- /// <param name="orddd">진료일, 입원일 </param>
- /// <param name="dutinstcd">근무지기관코드</param>
- [WebMethod(Description = "주,부 진단명 리스트 조회(진단명 팝업)")]
- public List<string> GetDiagNameList(String pid, String orddd, String dutinstcd) {
- List<string> result;
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable();
- if (dutinstcd == null) {
- dutinstcd = "031";
- }
- param.Add("instcd", dutinstcd);
- param.Add("orddd", orddd);
- param.Add("pid", pid);
- result = (List<string>) dac.GetDiagList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetDiagNameList error: {0}", ex.Message));
- throw ex;
- }
- }
- public List<string> getOpNameList(String pid, string dutinstcd) {
- List<string> result = null;
- try {
- //using (OperationNameDAC opDac = new OperationNameDAC())
- {
- Hashtable args = new Hashtable();
- //Hashtable param = new Hashtable();
- args.Add("pid", pid);
- args.Add("dutinstcd", dutinstcd);
- //result = (List<string>)opDac.getOpNameList(this.IbatisMapper, args);
- }
- return result;
- } catch (Exception e) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm getOpNameList error: {0}", e.Message));
- throw e;
- }
- }
- /// <summary>
- /// 파일이름 조회
- /// </summary>
- /// <param name=" pid">등록번호 1640515</param>
- /// <param name=" ordtype">내원구분 I</param>
- /// <param name=" orddd">내월일자 20151130</param>
- /// <param name=" dschdd">퇴원일자 99991231</param>
- /// <param name=" cretno">이력번호 1</param>
- /// <param name=" filesize">파일크기 없어도됨</param>
- /// <param name=" formcd">서식코드 1300010289</param>
- /// <param name=" pageno">페이지번호 6</param>
- /// <param name=" ocrtag">OCR코드 2016071989074</param>
- /// <param name=" userid">사용자아이디 105042</param>
- /// <param name = "dutinstcd" >근무지기관코드</ param >
- [WebMethod(Description = "파일이름 조회")]
- public string GetFileName(string pid, string ordtype, string orddd, string dschdd, string cretno, string filesize, string formcd, string pageno, string ocrtag, string userid, string orddeptcd, string dutinstcd) {
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", dutinstcd);
- param.Add("pid", pid);
- param.Add("ordtype", ordtype);
- param.Add("orddd", orddd);
- param.Add("dschdd", dschdd);
- param.Add("cretno", cretno);
- param.Add("filesize", filesize);
- param.Add("formcd", formcd);
- param.Add("pageno", pageno);
- param.Add("ocrtag", ocrtag);
- param.Add("userid", userid);
- param.Add("orddeptcd", orddeptcd);
- //return dac.GetFileName(this.IbatisMapper, param);
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetFileName error: {0}", ex.Message));
- throw ex;
- }
- return "";
- }
- /// <summary>
- /// setFileName으로 등록된 데이터 삭제하는 로직
- /// </summary>
- /// <param name="pid">등록번호 1640515</param>
- /// <param name="ordtype">내원구분 I</param>
- /// <param name="orddd">내월일자 20151130</param>
- /// <param name="dschdd">퇴원일자 99991231</param>
- /// <param name="cretno">이력번호 1</param>
- /// <param name="formcd">서식코드 1300010289</param>
- /// <param name="ocrtag">OCR코드 2016071989074</param>
- /// <param name="userid">사용자아이디 105042</param>
- /// <param name="username">사용자명 홍길동</param>
- /// <param name="consentmstrid">동의서 생성 아이디 1573</param>
- /// <param name="hostype">병원구분 111</param>
- /// <param name="orddeptcd">진료과 코드 </param>
- /// <param name="dutinstcd">근무지기관코드</param>
- [WebMethod(Description = "setFileName으로 등록된 데이터 삭제하는 함수")]
- public void delEformData(string pid, string ordtype, string orddd, string dschdd, string cretno, string formcd, string ocrtag, string userid, string username, string consentmstrid, string hostype, string orddeptcd, string dutinstcd) {
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", dutinstcd);
- param.Add("pid", pid);
- param.Add("ordtype", ordtype);
- param.Add("orddd", orddd);
- param.Add("dschdd", dschdd);
- param.Add("cretno", cretno);
- param.Add("formcd", formcd);
- param.Add("ocrtag", ocrtag);
- param.Add("userid", userid);
- param.Add("username", username);
- param.Add("consentmstrid", consentmstrid);
- param.Add("hostype", hostype);
- param.Add("orddeptcd", orddeptcd);
- dac.delEformData(this.IbatisMapper, param);
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm delEformData error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 모바일 Default Tap(외래, 입원..) 설정
- /// </summary>
- /// <param name="userId">사용자 아이디</param>
- /// <param name="status">외래 O 입원 I 응급 E 수술 P </param>
- /// <param name="instCd">근무지기관코드</param>
- [WebMethod(Description = "모바일 Default Tap(외래, 입원..) 설정")]
- public SingleReturnData UpdateUserSetup(string userId, string status, string instCd) {
- SingleReturnData result = new SingleReturnData();
- int rts = 1;
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable();
- param.Add("userId", userId);
- param.Add("status", status);
- param.Add("instCd", instCd);
- rts = dac.UpdateUserSetup(this.IbatisMapper, param);
- result.responseData = Convert.ToString(rts);
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm UpdateUserSetup error: {0}", ex.Message));
- //throw ex;
- }
- return result;
- }
- ///// <summary>
- ///// 모바일 주치의별 미작성 리스트 가져오기
- ///// </summary>
- ///// <param name="userid">사용자 아이디</param>
- ///// <param name="status">동의서 상태(UNFINISHED, TEMP ....)</param>
- ///// <param name="fromdd"></param>
- ///// <param name="todd"></param>
- ///// <param name="dutinstcd">근무지기관코드</param>
- ///// <returns></returns>
- //[WebMethod(Description = "모바일 주치의별 미작성 리스트 가져오기")]
- //public List<UnFinishedListVO> GetUnfinishedListPerDoctor(string userid, string status, string fromdd, string todd, string dutinstcd) {
- // try {
- // using (ConsentDac dac = new ConsentDac()) {
- // Hashtable param = new Hashtable {
- // { "userid", userid },
- // { "status", status },
- // { "fromdd", fromdd },
- // { "todd", todd },
- // { "instcd", dutinstcd }
- // };
- // return (List<UnFinishedListVO>) dac.GetUnfinishedListPerDoctor(this.IbatisMapper, param);
- // }
- // } catch (Exception ex) {
- // CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetUnfinishedListPerDoctor error: {0}", ex.Message));
- // throw ex;
- // }
- //}
- /// <summary>
- /// 모바일 사용자 로그인 API
- /// </summary>
- /// <param name="userid"></param>
- /// <param name="password"></param>
- /// <param name="dutinstcd"></param>
- /// <returns></returns>
- [WebMethod(Description = "모바일 사용자 로그인 API")]
- public List<UserLoginDeptList> doLogin(string userid, string pwd, string dutinstcd, String certSucc) {
- MobileLoginResult result;
- try {
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- int n;
- if (!int.TryParse(userid, out n)) {
- userid = userid.ToUpper();
- }
- param.Add("userid", userid);
- result = dac.doLogin(this.IbatisMapper, param);
- if (result == null) {
- return null;
- }
- if (certSucc == "false") {
- if (result.pwd != pwd) {
- return null;
- }
- }
- string syscd = (dutinstcd == "031") ? "HIS031" : "HIS032";
- Hashtable param2 = new Hashtable();
- param2.Add("userid", result.userid);
- param2.Add("syscd", syscd);
- return (List<UserLoginDeptList>) dac.getUserdeptList(this.IbatisMapper, param2);
- }
- } catch (Exception e) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm doLogin ERROR : {0}", e.ToString()));
- throw e;
- }
- }
- /// <summary>
- /// 사용자 로그인, 로그아웃 로그
- /// </summary>
- /// <param name="userId">사용자 아이디</param>
- /// <param name="loginStatus">로그인 성공(CERT_LOGIN, LOGIN), 실패(CERT_FAIL, FAIL), 로그아웃(LOGOFF) 상태</param>
- /// <param name="deviceType">모바일(MOBILE), PC(PC) 구분</param>
- /// <param name="macAddress">사용자 단말 고유 정보</param>
- /// <returns></returns>
- [WebMethod(Description = "사용자 로그인, 로그아웃 로그")]
- public void userLoginOutLog(string userId, string loginStatus, string deviceType, string macAddress) {
- try {
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- param.Add("userId", userId);
- param.Add("loginStatus", loginStatus);
- param.Add("deviceType", deviceType);
- param.Add("macAddress", macAddress);
- dac.userLoginOutLog(this.IbatisMapper, param);
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm userLoginOutLog ERROR : {0}", ex.ToString()));
- throw ex;
- }
- }
- /// <summary>
- /// 모바일 사용자 정보요청 API
- /// </summary>
- /// <param name="userid"></param>
- /// <param name="dutplceinstcd"></param>
- /// <param name="dutplcecd"></param>
- /// <returns></returns>
- [WebMethod(Description = "모바일 사용자 정보요청 API")]
- public MobileUserInfo GetMobileUserInfo(string userid, string dutplceinstcd, string dutplcecd) {
- MobileUserInfo result = null;
- try {
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- param.Add("userid", userid);
- param.Add("dutplceinstcd", dutplceinstcd);
- param.Add("dutplcecd", dutplcecd);
- result = dac.getMobileUserInfo(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception e) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm GetMobileUserInfo ERROR : {0}", e.ToString()));
- throw e;
- }
- }
- [WebMethod(Description = "사용자별 지원부서 설정 저장")]
- public string getUserPrefMonitor(string userId, string instcd) {
- string monitorNo = string.Empty;
- try {
- using(UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- param.Add("userid", userId);
- monitorNo = dac.getUserPrefMonitor(this.IbatisMapper, param);
- }
- } catch (Exception e) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm getUserPrefMonitor ERROR : {0}", e.ToString()));
- }
- return monitorNo;
- }
- [WebMethod(Description = "사용자별 지원부서 설정 저장")]
- public SingleReturnData SetSupportUserData(string userId, string baseCd, string supportDeptCd, string supportDeptNm, string macAddress) {
- SingleReturnData result = new SingleReturnData();
- string rts = "";
- try {
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- param.Add("userId", userId);
- param.Add("supportDeptCd", supportDeptCd);
- param.Add("supportDeptNm", supportDeptNm);
- param.Add("macAddress", macAddress);
- param.Add("baseCd", baseCd);
- rts = dac.SetSupportUserData(this.IbatisMapper, param);
- result.responseData = rts;
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm SetSupportUserData ERROR : {0}", ex.ToString()));
- }
- return result;
- }
- [WebMethod(Description = "사용자별 활성화 듀얼모니터 설정 저장")]
- public SingleReturnData SetUserPrefMonitor(string userId, string monitorNo) {
- SingleReturnData result = new SingleReturnData();
- try {
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- param.Add("userId", userId);
- param.Add("monitorNo", monitorNo);
- var resultStr = dac.SetUserPrefMonitor(this.IbatisMapper, param);
- result.responseData = resultStr;
- }
- } catch (Exception e) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm SetUserPrefMonitor ERROR : {0}", e.ToString()));
- }
- return result;
- }
- [WebMethod(Description = "로그아웃 세션 타임 반환")]
- public string getSessionTime(string instcd) {
- string sessionTime = "30";
- try {
- using(UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- sessionTime = dac.getSessionTime(this.IbatisMapper, param);
- }
- }catch(Exception e) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm getSessionTime ERROR : {0}", e.ToString()));
- }
- return sessionTime;
- }
- /// <summary>
- /// 세션타임을 가져온다
- /// </summary>
- /// <returns></returns>
- [WebMethod(Description = "모바일 세션 시간을 가져옴")]
- public SingleReturnData GetBaseData(String instCd) {
- SingleReturnData result = new SingleReturnData();
- try {
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- param.Add("instCd", instCd);
- result.responseData = dac.GetBaseData(this.IbatisMapper, param);
- }
- } catch (Exception e) {
- //result.responseData = "30";
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm checkPrintable ERROR : {0}", e.ToString()));
- }
- return result;
- }
- }
- }
|