/// [설계자]
/// 클립소프트 연구소 홍지철 (jchong@clipsoft.co.kr)
/// [원본 작성자]
/// 클립소프트 기술부 이인희
/// [수정 작성자]
///
/// ----------------------------------------------------------------------------------------
/// [HISTORY]
/// 2016-07-11 : 최초작성
/// ----------------------------------------------------------------------------------------
///
public partial class PatientSelectTabEmergencyPatient : UserControl {
private IConsentMain consentMain = null;
private ConsentCommandCtrl commandControl = null;
private HospitalSvcRef.HospitalSvcSoapClient hospitalWebService = null;
public PatientSelectTabEmergencyPatient() {
InitializeComponent();
}
private void PatientSelectTabEmergencyPatient_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"]);
this.dateTimePickerClnDate.Value = DateTime.Now;
InitComboBind();
InitDataGrid();
}
private void InitComboBind() {
// 진료과
//DeptListVO[] deptList = this.hospitalWebService.GetDeptList(GetSelectGubunValue(), this.consentMain.ConsentExecuteInfo["dutinstcd"]);
DeptListVO[] deptList = this.hospitalWebService.GetOrgDeptList(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, "등록번호", "pid", true, 80);
CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "성명", "hngnm", true, 80);
CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "입원일자", "indd", true, 80);
CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "진료과", "deptnm", true, 100);
CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "진료의", "doctornm", true, 80);
CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "ER접수과", "erorddeptnm", true, 100);
CommonUtil.AddNewColumnToDataGridView(this.dataGridViewPatientSelectResult, "ER진료의", "ermedispclnm", true, 80);
dataGridViewPatientSelectResult.Columns["colCheck"].Visible = false;
}
#region 환자 조회
private void BindDataGridRows() {
if (this.consentMain == null) consentMain = ConsentMainControl.GetConsentMainInterface(this);
if (this.hospitalWebService == null) this.hospitalWebService = WebMethodCommon.GetHospitalWebService(consentMain.PluginExecuteInfo["hospitalSvcUrl"]);
string srchdd = this.dateTimePickerClnDate.Value.ToString("yyyyMMdd");
string orddeptcd = (this.comboDept.Items.Count > 0) ? this.comboDept.SelectedValue.ToString().Trim() : "";
string doctorid = (this.comboDoctor.Items.Count > 0) ? this.comboDoctor.SelectedValue.ToString().Trim() : "";
string pid = this.textBoxSearchText.Text.Trim();
string patstat = GetSelectGubunValue();
Cursor currentCursor = this.Cursor;
this.Cursor = Cursors.WaitCursor;
// TODO 구현 필요
PatListVO[] resultData = null;
resultData = hospitalWebService.GetPatientList("ER",
"",
srchdd,
orddeptcd,
doctorid,
pid,
"", // ward
patstat, // patientState
this.consentMain.ConsentExecuteInfo["dutinstcd"],
commandControl.CurrentEndUser.userId,
"", // myPatien
"" // drKind
);
this.Cursor = currentCursor;
if (resultData == null) {
return;
}
this.dataGridViewPatientSelectResult.DataSource = new SortableBindingList