12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- using System;
- using System.Collections.Generic;
- using CLIP.eForm.Consent.WebService;
- using CLIP.eForm.Consent.Entity;
- using System.Web.Services;
- namespace CLIP.eForm.Consent.Web {
- public partial class DoctorList : System.Web.UI.Page {
- protected void Page_Load(object sender, EventArgs e) {
- // srchdd = (string.IsNullOrEmpty(this.Request.Params["IO_ADdate"])) ? DateTime.Now.ToShortDateString() : this.Request.Params["IO_ADdate"];
- }
- [WebMethod]
- public static string SetDeptDropdown(string gubun, string instcd) {
- List<DeptListVO> resultList = null;
- string sResultJson = string.Empty;
- using (HospitalSvc svc = new HospitalSvc()) {
- //수술,시술 선택에 따른 진료과 정보 바인딩
- resultList = svc.GetDeptList(gubun, instcd);
- resultList.Remove(resultList.Find(kvp => kvp.deptCd.Trim() == ""));
- if (resultList != null) {
- if (resultList != null && resultList.Count > 0) {
- sResultJson = "[";
- int i = 0;
- foreach (DeptListVO cVO in resultList) {
- if (i > 0) {
- sResultJson += ",";
- } else {
- sResultJson += "{ \"DeptListVo\":{ \"deptnm\":\"선택\",\"deptcd\":\"\",\"deptAbbr\":\"\",\"No\":\"\"} },";
- }
- sResultJson += "{\"DeptListVo\":{";
- sResultJson += "\"deptnm\":\"" + cVO.deptNm + "\",";
- sResultJson += "\"deptcd\":\"" + cVO.deptCd + "\",";
- //sResultJson += "\"deptAbbr\":\"" + cVO.deptAbbr + "\",";
- sResultJson += "\"No\":\"" + (i + 1) + "\"";
- sResultJson += "} }";
- i++;
- }
- sResultJson += "]";
- }
- }
- }
- CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(sResultJson);
- return sResultJson;
- }
- [WebMethod]
- public static string SetDoctorList(string deptCd, string deptNm, string srchdd, string dutinstcd) {
- //CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("SetDoctorList : deptCd[{0}]", deptCd));
- //CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("SetDoctorList : deptNm[{0}]", deptNm));
- //CLIP.eForm.Server.Diagnostics.LogHelper.LoggingHandler.Debug(string.Format("SetDoctorList : srchdd[{0}]", srchdd));
- List<DocListVO> resultList = null;
- string sResultJson = string.Empty;
- using (HospitalSvc svc = new HospitalSvc()) {
- resultList = svc.GetDoctorList(srchdd.Replace("-", "").Replace("/", ""), deptCd, dutinstcd);
- if (resultList != null) {
- if (resultList != null && resultList.Count > 0) {
- sResultJson = "[";
- int i = 0;
- foreach (DocListVO cVO in resultList) {
- if (i > 0) sResultJson += ",";
- var drKindValue = "C";
- // 의사 정보가 없다면 C 로 매핑
- if (!string.IsNullOrEmpty(cVO.drKind))
- drKindValue = cVO.drKind;
- sResultJson += "{";
- sResultJson += "\"doctorid\":\"" + cVO.doctorId + "\",";
- sResultJson += "\"doctornm\":\"" + cVO.doctorNm + "\",";
- sResultJson += "\"deptCd\":\"" + deptCd + "\",";
- sResultJson += "\"deptNm\":\"" + deptNm + "\",";
- sResultJson += "\"drKind\":\"" + drKindValue + "\",";
- sResultJson += "\"No\":\"" + (i + 1) + "\"";
- sResultJson += "}";
- i++;
- }
- sResultJson += "]";
- }
- }
- }
- return sResultJson;
- }
- }
- }
|