/// [설계자]
/// 클립소프트 연구소 홍지철 (jchong@clipsoft.co.kr)
/// [원본 작성자]
/// 클립소프트 기술부 이인희
/// [수정 작성자]
///
/// ----------------------------------------------------------------------------------------
/// [HISTORY]
/// 2016-07-11 : 최초작성
/// ----------------------------------------------------------------------------------------
///
public partial class PatientSelectTabInPatient : UserControl {
private IConsentMain consentMain = null;
private ConsentCommandCtrl commandControl = null;
private HospitalSvcRef.HospitalSvcSoapClient hospitalWebService = null;
public PatientSelectTabInPatient() {
InitializeComponent();
}
private void PatientSelectTabInPatient_Load(object sender, EventArgs e) {
if(this.DesignMode || LicenseManager.UsageMode == LicenseUsageMode.Designtime) {
return;
}
consentMain = ConsentMainControl.GetConsentMainInterface(this);
if(commandControl == null) commandControl = consentMain.ConsentCommandCtrl as ConsentCommandCtrl;
hospitalWebService = WebMethodCommon.GetHospitalWebService(consentMain.PluginExecuteInfo["hospitalSvcUrl"]);
if (ConsentMainControl.SETTING_DATA["MY_PATIENT"].Equals("Y")) {
chkMyPatient.Visible = true;
}
// 의사로 Agent 를 실행할 경우 입원 환자 탭에서 내환자 체크 박스 숨기기
if(commandControl.CurrentEndUser != null) {
if(!string.IsNullOrEmpty(commandControl.CurrentEndUser.JobKindCd)) {
if(!commandControl.CurrentEndUser.JobKindCd.Substring(0, 2).Equals("11")) {
chkMyPatient.Visible = false;
}
}
}
this.dateTimePickerClnDate.Value = DateTime.Now;
InitComboBind();
foreach(DeptListVO ward in (DeptListVO[])comboWard.DataSource) {
if(ward.deptCd.Equals(commandControl.CurrentEndUser.DeptCode)) {
comboWard.SelectedValue = commandControl.CurrentEndUser.DeptCode;
break;
}
}
InitDataGrid();
}
private void InitComboBind() {
// 병동 정보 가져오기 및 설정
DeptListVO[] wardList = this.hospitalWebService.GetWardList(this.consentMain.ConsentExecuteInfo["dutinstcd"]);
if(wardList != null) {
this.comboWard.DisplayMember = "deptnm";
this.comboWard.ValueMember = "deptcd";
this.comboWard.DataSource = wardList;
}
// 진료과 정보 가져오기 및 설정
DeptListVO[] deptList = this.hospitalWebService.GetDeptList(GetSelectGubunValue(), this.consentMain.ConsentExecuteInfo["dutinstcd"]);
if(deptList != null) {
this.comboDept.DisplayMember = "deptnm";
this.comboDept.ValueMember = "deptcd";
this.comboDept.DataSource = deptList;
}
}
private void InitDataGrid() {
this.dataGridViewPatientSelectResult.AutoGenerateColumns = false;
this.dataGridViewPatientSelectResult.AllowUserToAddRows = false;
//this.dataGridViewPatientSelectResult.CellPainting += new DataGridViewCellPaintingEventHandler(this.dataGridViewPatientSelectResult_CellPainting);
this.dataGridViewPatientSelectResult.ColumnHeaderMouseClick += new DataGridViewCellMouseEventHandler(this.dataGridViewPatientSelectResult_ColumnHeaderMouseClick);
this.dataGridViewPatientSelectResult.RowPostPaint += new DataGridViewRowPostPaintEventHandler(this.dataGridViewPatientSelectResult_RowPostPaint);
//CommonUtil.AddNewCheckBoxColumnToDataGridView(this.dataGridViewPatientSelectResult, "□", "colCheck", true, 30, DataGridViewContentAlignment.MiddleCenter);
CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "입원일자", "indd", true, 70);
CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "병실", "roomcd", true, 40);
CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "성명", "hngnm", true, 80);
CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "등록번호", "pid", true, 60);
CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "과", "deptnm", true, 120);
CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "주치의", "doctornm", true, 80);
CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "구분", "dschnoti", true, 80);
//dataGridViewPatientSelectResult.Columns["colCheck"].Visible = false;
}
#region 환자 조회
///