/// [설계자]
/// 클립소프트 연구소 홍지철 (jchong@clipsoft.co.kr)
/// [원본 작성자]
/// 클립소프트 기술부 이인희
/// [수정 작성자]
///
/// ----------------------------------------------------------------------------------------
/// [HISTORY]
/// 2016-06-21 : 최초작성
/// ----------------------------------------------------------------------------------------
///
public partial class PatientListCtrl : PatientListCtrlBase
{
private IConsentMain consentMain = null;
public PatientListCtrl()
{
InitializeComponent();
}
private void PatientListCtrl_Load(object sender, EventArgs e)
{
if (this.DesignMode || LicenseManager.UsageMode == LicenseUsageMode.Designtime)
{
return;
}
consentMain = ConsentMainControl.GetConsentMainInterface(this);
consentMain.OnLoadPartControls += ConsentMain_OnLoadPartControls;
}
private void ConsentMain_OnLoadPartControls(object sender, EventArgs e)
{
if (this.DesignMode)
{
return;
}
IConsentMain consentMain = ConsentMainControl.GetConsentMainInterface(this);
pageMove_tabPageOutPatient(consentMain);
SetPatientListSplitPanelVisibility(consentMain);
}
private static void SetPatientListSplitPanelVisibility(IConsentMain consentMain)
{
if (!(string.IsNullOrEmpty(consentMain.ConsentExecuteInfo["patientListView"])) && consentMain.ConsentExecuteInfo["patientListView"].Equals("Y"))
{
consentMain.SetPatientListSplitPanelVisibility(true);
}
else
{
consentMain.SetPatientListSplitPanelVisibility(false);
}
}
// 탭 선택을 할때마다 선택된 체크박스는 초기화 한다.
private void tabControlPatientSelect_SelectedIndexChanged(object sender, EventArgs e)
{
tabPageClearCheckBox(tabControlPatientSelect.SelectedIndex);
}
private void tabPageClearCheckBox(int tabIndex)
{
if (tabIndex == 0)
{
if (this.tabControlPatientSelect.TabPages["tabPageSearchPatient"].Controls.Count > 0)
{
PatientSelectTabSearchPatient searchPatient = this.tabControlPatientSelect.TabPages["tabPageSearchPatient"].Controls[0] as PatientSelectTabSearchPatient;
searchPatient.ClearCheckBox();
}
}
else if (tabIndex == 1)
{
if (this.tabControlPatientSelect.TabPages["tabPageEmergencyPatient"].Controls.Count > 0)
{
PatientSelectTabEmergencyPatient searchPatient = this.tabControlPatientSelect.TabPages["tabPageEmergencyPatient"].Controls[0] as PatientSelectTabEmergencyPatient;
searchPatient.ClearCheckBox();
}
}
else if (tabIndex == 2)
{
if (this.tabControlPatientSelect.TabPages["tabPageOperatePatient"].Controls.Count > 0)
{
PatientSelectTabOperatePatient searchPatient = this.tabControlPatientSelect.TabPages["tabPageOperatePatient"].Controls[0] as PatientSelectTabOperatePatient;
searchPatient.ClearCheckBox();
}
}
else if (tabIndex == 3)
{
if (this.tabControlPatientSelect.TabPages["tabPageInPatient"].Controls.Count > 0)
{
PatientSelectTabInPatient searchPatient = this.tabControlPatientSelect.TabPages["tabPageInPatient"].Controls[0] as PatientSelectTabInPatient;
searchPatient.ClearCheckBox();
}
}
else if (tabIndex == 4)
{
if (this.tabControlPatientSelect.TabPages["tabPageOutPatient"].Controls.Count > 0)
{
PatientSelectTabOutPatient searchPatient = this.tabControlPatientSelect.TabPages["tabPageOutPatient"].Controls[0] as PatientSelectTabOutPatient;
searchPatient.ClearCheckBox();
}
}
}
// 선택된 탭의 그리드 체크박스를 해제한다.
public override void SetClearCheckBox()
{
tabPageClearCheckBox(tabControlPatientSelect.SelectedIndex);
}
// 탭의 그리드에서 더블클릭하여 선택한 환자정보로 동의서 관리를 한다.
public override void SetChangePID(PatListVO vo)
{
if (vo != null)
{
// TODO..
// 동의서가 view일 경우
// if (consentMain.viewStatus && vo.orddeptcd != "2120000000")
// {
// DialogResult result = MessageBox.Show(string.Format(Properties.Resources.msg_confirm_tempsave)
//, string.Format(Properties.Resources.msg_caption_confirm),
//MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information);
//
//if (result == DialogResult.Yes)
//{
//consentMain.TempSave();
//}
//else if (result == DialogResult.Cancel)
//{
//return;
//}
//}
consentMain.ConsentExecuteInfo["patientNo"] = vo.pid;
consentMain.ConsentExecuteInfo["clnDate"] = vo.indd.Replace("/", "").Replace("-", "");
consentMain.ConsentExecuteInfo["clnDept"] = vo.orddeptcd;
consentMain.ConsentExecuteInfo["visitType"] = vo.ordtype;
consentMain.ConsentExecuteInfo["cretno"] = vo.cretno.ToString();
consentMain.ConsentExecuteInfo["userNo"] = vo.doctorid;
consentMain.ConsentExecuteInfo["userName"] = vo.doctornm;
// 외래일 경우에는 주치의 정보가 세팅이 되고 외래가 아닐경우 최초 로그인자 정보가 세팅이 되어야 한다.
if (!string.IsNullOrEmpty(vo.ordtype) && !vo.ordtype.Equals("O"))
{
consentMain.ConsentExecuteInfo["userNo"] = consentMain.ConsentExecuteInfo["loginUserNo"];
}
consentMain.UIControlsRefeash(vo.ordtype);
}
}
// 탭의 그리드에서 체크된 환자리스트를 갖고 온다.
public override List