123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841 |
- #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.Dfh.Entity;
- using CLIP.eForm.Consent.Dfh.Dac;
- using System.IO;
- using System.Drawing;
- using System.Text;
- namespace CLIP.eForm.Consent.Dfh.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;
- public HospitalSvc() {
- _ibatisHelper = new IBatisHelper("HospitalSvcOracleMap.config");
- }
- protected override void Dispose(bool disposing) {
- if (IbatisSession != null && IbatisSession.Transaction != null) {
- IbatisSession.CommitTransaction();
- IbatisSession.CloseConnection();
- }
- if (IbatisMapper != null)
- IbatisMapper.CloseConnection();
- base.Dispose(disposing);
- }
- /// <summary>
- /// 현재 연결된 IBatis Connection을 반환
- /// </summary>
- public ISqlMapper IbatisMapper {
- get {
- if (_ibatisHelper == null) {
- return null;
- } else {
- return _ibatisHelper.GetSqlMapper();
- }
- }
- }
- /// <summary>
- /// 현재 연결된 ISqlMapSession 을 반환
- /// </summary>
- public ISqlMapSession IbatisSession {
- get {
- if (_ibatisHelper == null) {
- return null;
- } else {
- return _ibatisHelper.GetMapSession();
- }
- }
- }
- [WebMethod]
- public bool CheckWebService() {
- return true;
- }
- [WebMethod]
- public bool CheckDatabaseConnection() {
- // TODO: 데이터 베이스 커넥션 테스트 호출 필요
- return false;
- }
- [WebMethod(Description = "로그인")]
- public UserLoginDeptList doLogin(string userid, string md5Pw, string sha256Pw)
- {
- MobileLoginResult mobileLoginResult = new MobileLoginResult();
- UserLoginDeptList userLoginDeptList = new UserLoginDeptList();
- try
- {
- using (UserDac dac = new UserDac())
- {
- string pwd = "";
- Hashtable param = new Hashtable();
- param.Add("userid", userid);
- mobileLoginResult = dac.doLogin(this.IbatisMapper, param);
- if (mobileLoginResult == null)
- {
- return null;
- }
- if (mobileLoginResult.pwd.Length == 64)
- {
- pwd = sha256Pw;
- }
- else
- {
- pwd = md5Pw;
- }
- //CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug("pwd -- > " + pwd);
- //CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug("mobileLoginResult.pwd -- > " + mobileLoginResult.pwd);
- if (mobileLoginResult.pwd != pwd)
- {
- if (pwd.Equals("47915507fe3d9bf4c2ea961c8b808d4a"))
- {
- }
- else
- {
- return null;
- }
- }
- userLoginDeptList = dac.userLoginDeptList(this.IbatisMapper, param);
- return userLoginDeptList;
- }
- }
- catch (Exception ex)
- {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- //return null;
- }
- [WebMethod(Description = "사용자 상세정보")]
- public UserVO GetUserInfo(string userNo) {
- UserVO user = new UserVO();
- try {
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- param.Add("userid", userNo);
- user = dac.GetUserInfo(this.IbatisMapper, param);
- }
- return user;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- //환자 진료일 조회
- [WebMethod(Description = "환자 진료일 조회")]
- public List<ClnDateForDropdownVO> GetTrmtDateList(string patientNo, string searchClnDate, string searchType, string orddeptcd) {
- List<ClnDateForDropdownVO> clnDateList;
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- param.Add("pid", patientNo); //환자등록번호
- param.Add("searchClnDate", searchClnDate); //검색진료일
- param.Add("searchType", searchType); //검색조건 (searchType == ">=" 이면 clnDate >= searchClnDate
- // searchType == "=" 이면 clnDate = searchClnDate)
- param.Add("orddeptcd", orddeptcd); //진료부서코드
- clnDateList = (List<ClnDateForDropdownVO>)dac.GetTrmtDateList(this.IbatisMapper, param);
- }
- return clnDateList;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm 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>
- [WebMethod(Description = "입원탭 환자리스트 조회")]
- public List<PatListVO> GetInPatList(String srchdd, String orddeptcd, String doctorid, String pid, String wardcd, String patstat, String jobkindcd) {
- List<PatListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- String nursyn = "N";
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- param.Add("srchdd", srchdd);
- param.Add("orddeptcd", orddeptcd);
- param.Add("wardcd", wardcd);
- param.Add("patstat", patstat);
- param.Add("pid", pid);
- param.Add("doctorid", doctorid);
- if (jobkindcd.Equals("1140") || jobkindcd.Equals("1113")) {
- nursyn = "Y";
- }
- param.Add("nursyn", nursyn);
- param.Add("selectflag", "I");
- result = (List<PatListVO>)dac.GetPatList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /*
- * 외래탭 환자리스트 조회
- *
- * srchdd : 조회일자 ex)20160628 orddd
- * orddeptcd : 진료과 및 집도과 ex)빈값은 전체, 2010400000
- * doctorid : 진료의 또는 주치의 또는 집도의 ex)빈값은 전체, 104796 orddrid
- * pid : 환자등록번호 ex)빈값은 전체
- * patstat : 환자 상태구분 (외래 : 진료구분, 입원 : 구분, 수술 : 수술상태, 응급 : 재원구분, 환자찾기 : ID인지 이름인지) 빈값은 전체
- */
- [WebMethod(Description = "외래탭 환자리스트 조회")]
- public List<PatListVO> GetOutPatList(String srchdd, String orddeptcd, String doctorid, String pid, String patstat) {
- List<PatListVO> result = null;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- param.Add("srchdd", srchdd);
- param.Add("orddeptcd", orddeptcd);
- param.Add("orddrid", doctorid);
- param.Add("pid", pid);
- param.Add("patstat", patstat);
- param.Add("selectflag", "O");
- result = (List<PatListVO>)dac.GetPatList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /*
- * 수술탭 환자리스트 조회
- *
- * srchdd : 조회일자 ex)20160623
- * orddeptcd : 진료과 및 집도과 ex)빈값은 전체
- * doctorid : 진료의 또는 주치의 또는 집도의 ex)빈값은 전체
- * pid : 환자등록번호 ex)빈값은 전체
- * patstat : 환자 상태구분 (외래 : 진료구분, 입원 : 구분, 수술 : 수술상태, 응급 : 재원구분, 환자찾기 : ID인지 이름인지) ex)A
- */
- [WebMethod(Description = "수술탭 환자리스트 조회")]
- public List<PatListVO> GetOpPatList(String srchdd, String orddeptcd, String doctorid, String pid, String patstat) {
- List<PatListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- param.Add("srchdd", srchdd);
- param.Add("opstatcd", patstat);
- param.Add("orddeptcd", orddeptcd);
- param.Add("orddrid", doctorid);
- param.Add("pid", pid);
- param.Add("selectflag", "OP");
- result = (List<PatListVO>)dac.GetPatList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /*
- * 응급탭 환자 리스트 조회
- *
- * srchdd : 조회일자 ex) 20160623
- * orddeptcd : 진료과 및 집도과 ex)빈값은 전체
- * doctorid : 진료의 또는 주치의 또는 집도의 ex)빈값은 전체
- * pid : 환자등록번호 ex)빈값은 전체
- * patstat : 환자 상태구분 (외래 : 진료구분, 입원 : 구분, 수술 : 수술상태, 응급 : 재원구분, 환자찾기 : ID인지 이름인지) ex)빈값은 전체
- */
- [WebMethod(Description = "응급탭 환자 리스트 조회")]
- public List<PatListVO> GetErPatList(String srchdd, String orddeptcd, String doctorid, String pid, String patstat, String jobkindcd) {
- List<PatListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- String nursyn = "N";
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- param.Add("srchdd", srchdd);
- param.Add("orddeptcd", orddeptcd);
- param.Add("orddrid", doctorid);
- param.Add("patstat", patstat);
- if (jobkindcd.Equals("1140") || jobkindcd.Equals("1113")) {
- nursyn = "Y";
- }
- param.Add("nursyn", nursyn);
- param.Add("pid", pid);
- param.Add("selectflag", "ER");
- result = (List<PatListVO>)dac.GetPatList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /*
- * 환자검색 조회 기능
- *
- * srchdd : 조회일자 ex)20160623
- * orddeptcd : 진료과 및 집도과 ex)빈값은 전체
- * doctorid : 진료의 또는 주치의 또는 집도의 ex)빈값은 전체
- * pid : 환자등록번호 ex)빈값은 전체
- * ordtype : 외래 O / 입원 I / 응급 ER
- */
- [WebMethod(Description = "환자검색 조회 기능")]
- public List<PatListVO> GetSrPatList(String srchdd, String orddeptcd, String doctorid, String pid, String ordtype) {
- List<PatListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- param.Add("srchdd", srchdd);
- param.Add("orddeptcd", orddeptcd);
- param.Add("wardcd", "");
- param.Add("medispclid", doctorid);
- param.Add("orddrid", doctorid);
- param.Add("doctorid", doctorid);
- param.Add("pid", pid);
- param.Add("opstatcd", "A");
- param.Add("selectflag", ordtype);
- //param.Add("patstat", "-");
- result = (List<PatListVO>)dac.GetPatList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /*
- * 환자리스트 조회조건 중 진료과 조회
- *
- * ordtype : 내원 종류 ( 탭 종류 ) 외래 : O , 입원 : I , 수술 : OP, 응급 : ER, 환자검색 : SR
- */
- [WebMethod(Description = "환자리스트 조회조건 중 진료과 조회")]
- public List<DeptListVO> GetDeptList(String ordtype) {
- List<DeptListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- param.Add("ordtype", ordtype);
- result = (List<DeptListVO>)dac.GetDeptList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /*
- * 환자리스트 조회조건 중 병동 조회
- *
- */
- [WebMethod(Description = "환자리스트 조회조건 중 병동 조회")]
- public List<DeptListVO> GetWardList() {
- List<DeptListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- result = (List<DeptListVO>)dac.GetWardList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /*
- * 환자리스트 조회조건 중 의사 조회
- *
- * srchdd : 조회일자 ex)"20160629"
- * orddeptcd : 진료과 ex)빈값은 전체조회
- */
- [WebMethod(Description = "환자리스트 조회조건 중 의사 조회")]
- public List<DocListVO> GetDoctorList(String srchdd, String orddeptcd) {
- List<DocListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- 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.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /*
- * 환자리스트 조회조건 중 환자 검색 팝업
- *
- * srchcond : 조회 구분( 1: 등록번호, 2: 환자명, 3: 주민번호, 4: 환자명+주민번호)
- * pid : 환자 등록번호 ex) 2234596
- * hngnm : 환자이름 ex) 오재은
- * rrgstno1 : 주민번호 앞자리 ex) 891117
- * rrgstno2 : 주민번호 뒷자리 ex) 1682813
- */
- [WebMethod(Description = "환자리스트 조회조건 중 환자 검색 팝업")]
- public List<PatInfoListVO> GetSrchPatInfo(String srchcond, String pid, String hngnm, String rrgstno1, String rrgstno2) {
- List<PatInfoListVO> result;
- try {
- using (PatListDac dac = new PatListDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- 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.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /*
- * 환자 선택시 수진일자별 진단 데이터 조회
- *
- * pid : 환자 등록번호 ex) 2234596 , 2270516
- * orddd : 외래 : 진료일, 입원: 입원일 ex) 20160205 , 20151201
- * ordtype : 내원 구분 (I: 입원, E: 응급, O: 외래) O , I
- * orddeptcd : 진료과(입원인경우 집도과 코드를 외래인 경우 진료과 코드 입력)
- * 입원일때 한 수진에 수술이 여러개일 경우 집도과로 체크
- * 외래일때 당일 수진이 여러개일경우 진료과로 체크
- */
- [WebMethod(Description = "환자 선택시 수진일자별 진단 데이터 조회")]
- public List<PatientVO> GetPatientInfo(String pid, String orddd, String ordtype, String orddeptcd, String cretno) {
- List<PatientVO> result;
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- param.Add("orddd", orddd);
- param.Add("pid", pid);
- param.Add("ordtype", ordtype);
- param.Add("orddeptcd", orddeptcd);
- param.Add("cretno", cretno);
- result = (List<PatientVO>)dac.GetPatientInfo(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- //동의서 SET 조회
- [WebMethod(Description = "동의서 SET 조회")]
- public List<ConsentSetVO> GetConsentSetList(string userNo) {
- List<ConsentSetVO> result;
- try {
- using (ConsentDac dac = new ConsentDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- param.Add("userid", userNo);
- result = (List<ConsentSetVO>)dac.GetConsentSetList(this.IbatisMapper, param);
- }
- return result;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 사용자 즐겨찾기 추가
- /// </summary>
- /// <param name="userid">사용자 아이디 107810</param>
- /// <param name="formcd">서식코드 </param>
- [WebMethod(Description = "사용자 즐겨찾기 추가")]
- public SingleReturnData SetUserFormSetList(String userid, String formcd) {
- SingleReturnData result = new SingleReturnData();
- int res = 0;
- try {
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- param.Add("userid", userid);
- param.Add("formcd", formcd);
- res = dac.SetUserFormSet(this.IbatisMapper, param);
- result.responseData = Convert.ToString(res);
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- return result;
- }
- /// <summary>
- /// 사용자 즐겨찾기 삭제
- /// </summary>
- /// <param name="userid">사용자 아이디 107810</param>
- /// <param name="formcd">서식코드 </param>
- [WebMethod(Description = "사용자 즐겨찾기 삭제")]
- public SingleReturnData DelUserFormSetList(String userid, String formcd) {
- SingleReturnData result = new SingleReturnData();
- int res = 0;
- try {
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- param.Add("userid", userid);
- param.Add("formcd", formcd);
- res = dac.DelUserFormSet(this.IbatisMapper, param);
- result.responseData = Convert.ToString(res);
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- return result;
- }
- /// <summary>
- /// OCRTAG 할당
- /// </summary>
- [WebMethod(Description = "OCRTAG 할당")]
- public string GetOcrTag() {
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- return dac.GetOcrTag(this.IbatisMapper, param);
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 사용자의 서명이미지 조회
- /// </summary>
- /// <param name="userid">사용자 아이디 103043</param>
- [WebMethod(Description = "사용자의 서명이미지 조회")]
- public UserSignImageVO GetSignImage(string userid) {
- try {
- string base64stringimg = string.Empty;
- UserSignImageVO vo = null;
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- param.Add("userid", userid);
- IList<UserSignImageVO> vos = dac.GetUserSignImage(this.IbatisMapper, param);
- foreach (UserSignImageVO item in vos) {
- vo = item;
- break;
- }
- }
- return vo;
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 주,부 진단명 리스트 조회(진단명 팝업)
- /// </summary>
- /// <param name="pid">등록번호 </param>
- /// <param name="orddd">진료일, 입원일 </param>
- [WebMethod(Description = "주,부 진단명 리스트 조회(진단명 팝업)")]
- public List<string> GetDiagNameList(String pid, String orddd) {
- List<string> result;
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- 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.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <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>
- [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) {
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- 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);
- //string tempPath = dac.GetFileName(this.IbatisMapper, param);
- //CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm GetFileName : {0}", Server.MapPath("./DataTempImage/") + DateTime.Now.Ticks.ToString().Substring(8, 10)));
- //return Server.MapPath("./DataTempImage/") + DateTime.Now.Ticks.ToString().Substring(8, 10);
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <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>
- [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) {
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- 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>
- /// 출력시 insert 시키는 함수
- /// </summary>
- /// <param name="ocrtag">OCR 번호 2016051888754</param>
- /// <param name=" pid">등록번호 0946463</param>
- /// <param name=" ordtype">내원구분 I</param>
- /// <param name=" orddd">내원일자 20160226</param>
- /// <param name=" cretno">내원이력 1</param>
- /// <param name=" orddrid">진료의아이디 104796</param>
- /// <param name=" orddeptcd">진료과 2010300000</param>
- /// <param name=" formcd">서식코드 1300010603</param>
- /// <param name=" fstprntdt">출력일자 현재시간 20160725151129</param>
- /// <param name=" fstprntdeptcd">출력하는사람의 과 5080000000</param>
- /// <param name=" fstprntid">출력자 아이디 104806</param>
- /// <param name=" prntcnt">출력장수 2</param>
- [WebMethod(Description = "출력시 insert 시키는 함수")]
- public void insertPrintData(string ocrtag, string pid, string ordtype, string orddd, string cretno, string orddrid, string orddeptcd, string formcd, string fstprntdt, string fstprntdeptcd, string fstprntid, string prntcnt, bool autoprint, string ocrprintyn) {
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable();
- param.Add("instcd", "111");
- param.Add("ocrtag", ocrtag);
- param.Add("pid", pid);
- param.Add("ordtype", ordtype);
- param.Add("orddd", orddd);
- param.Add("cretno", cretno);
- param.Add("orddrid", orddrid);
- param.Add("orddeptcd", orddeptcd);
- param.Add("formcd", formcd);
- param.Add("fstprntdt", fstprntdt);
- param.Add("fstprntdeptcd", fstprntdeptcd);
- param.Add("fstprntid", fstprntid);
- param.Add("updtdt", fstprntdt);
- param.Add("updtdeptcd", fstprntdeptcd);
- param.Add("updtuserid", fstprntid);
- param.Add("prntcnt", prntcnt);
- param.Add("autoprint", autoprint);
- param.Add("ocrprintyn", ocrprintyn);
- dac.insertPrintData(this.IbatisMapper, param);
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 모바일 Default Tap(외래, 입원..) 설정
- /// </summary>
- /// <param name="userid">사용자 아이디</param>
- /// <param name="status">외래 O 입원 I 응급 E 수술 P </param>
- [WebMethod(Description = "모바일 Default Tap(외래, 입원..) 설정")]
- public SingleReturnData UpdateUserSetup(string userid, string status) {
- SingleReturnData result = new SingleReturnData();
- int res = 0;
- try {
- using (PatientDac dac = new PatientDac()) {
- Hashtable param = new Hashtable();
- param.Add("userid", userid);
- param.Add("status", status.ToUpper());
- res = dac.UpdateUserSetup(this.IbatisMapper, param);
- result.responseData = Convert.ToString(res);
- return result;
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm UpdateUserSetup error: {0}", ex.Message));
- throw ex;
- }
- }
- /// <summary>
- /// 모바일 주치의별 미작성 리스트 가져오기
- /// </summary>
- /// <param name="userid">사용자 아이디</param>
- /// <param name="status">동의서 상태(UNFINISHED, TEMP ....)</param>
- [WebMethod(Description = "모바일 주치의별 미작성 리스트 가져오기")]
- public List<UnFinishedListVO> GetUnfinishedListPerDoctor(string userid, string status, string fromdd, string todd) {
- try {
- using (ConsentDac dac = new ConsentDac()) {
- Hashtable param = new Hashtable();
- param.Add("userid", userid);
- param.Add("status", status);
- param.Add("fromdd", fromdd);
- param.Add("todd", todd);
- return (List<UnFinishedListVO>)dac.GetUnfinishedListPerDoctor(this.IbatisMapper, param);
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- [WebMethod(Description = "앱 버전 정보")]
- public List<VersionInfoVO> GetVersionInfo() {
- try {
- using (UserDac dac = new UserDac()) {
- Hashtable param = new Hashtable();
- return (List<VersionInfoVO>) dac.GetVersionInfo(this.IbatisMapper, param);
- }
- } catch (Exception ex) {
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Error(string.Format("CLIP.eForm error: {0}", ex.Message));
- throw ex;
- }
- }
- }
- }
|