Beispiel #1
0
        private void button_leaveQ_Click(object sender, EventArgs e)
        {
            String statusMsg = "";
            //bool isSuccess;
            PatientObj pat = searchPatientInputPanel1.getSelectedPatient();

            if (pat == null)
            {
                return;
            }

            PermissibleValueObj pwChkStatus = new PermissibleValueObj("", "0");
            PatientPwChk        patPwChk    = new PatientPwChk();

            patPwChk.setPatIdSuccessFlag(pat.PatientId, ref pwChkStatus);
            patPwChk.ShowDialog();
            if (pwChkStatus.Value == "0")
            {
                return;
            }

            //isSuccess = patMgr.leaveQueue(int.Parse(pat.getValue()), Login.clinic.ClinicId, ref statusMsg);
            patMgr.leaveQueue(int.Parse(pat.getValue()), Login.clinic.ClinicId, ref statusMsg);
            MessageBox.Show(statusMsg, "", MessageBoxButtons.OK, MessageBoxIcon.Information);
            reset();
        }
Beispiel #2
0
        private void button_patDataUpdate_Click(object sender, EventArgs e)
        {
            //input validation
            if (!patientRegistration1.input_validation())
            {
                return;
            }

            if (Login.user == null)
            {
                PermissibleValueObj pwChkStatus = new PermissibleValueObj("", "0");
                PatientPwChk        patPwChk    = new PatientPwChk();
                patPwChk.setPatIdSuccessFlag(pat.PatientId, ref pwChkStatus);
                patPwChk.ShowDialog();
                if (pwChkStatus.Value == "0")
                {
                    return;
                }
            }

            String     statusMsg = "";
            PatientMgr patMgr    = new PatientMgr();

            bool isSuccess;

            if (Login.user == null)
            {
                isSuccess = patMgr.amdPatientRecordByPatient(pat.PatientId, patientRegistration1.getChiName(), Utilities.stringDataParse4SQL(patientRegistration1.getEngName()), (patientRegistration1.getPlainTextPassword().Trim().Length > 0 ? patientRegistration1.getHashedPassword() : ""), patientRegistration1.getPIDDocType(), patientRegistration1.getPIDDocNo(), patientRegistration1.getPhoneNo(), patientRegistration1.getDOB(), patientRegistration1.getSex(), patientRegistration1.getIsG6PD(), Utilities.stringDataParse4SQL(patientRegistration1.getAddr().Trim()), patientRegistration1.getAllergicDrugsIdString(), patientRegistration1.getIsPregnant(), patientRegistration1.getIsRecordShared(), ref statusMsg);
            }
            else
            {
                isSuccess = patMgr.amdPatientRecord(pat.PatientId, patientRegistration1.getChiName(), Utilities.stringDataParse4SQL(patientRegistration1.getEngName()), (patientRegistration1.getPlainTextPassword().Trim().Length > 0 ? patientRegistration1.getHashedPassword() : ""), patientRegistration1.getPIDDocType(), patientRegistration1.getPIDDocNo(), patientRegistration1.getPhoneNo(), patientRegistration1.getDOB(), patientRegistration1.getSex(), patientRegistration1.getIsG6PD(), Utilities.stringDataParse4SQL(patientRegistration1.getAddr().Trim()), patientRegistration1.getAllergicDrugsIdString(), patientRegistration1.getIsDeceased(), patientRegistration1.getIsPregnant(), patientRegistration1.getIsRecordShared(), ref statusMsg);
            }
            if (isSuccess)
            {
                MessageBox.Show(statusMsg, "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                pat = null;
                patientRegistration1.reset();
                searchPatientInputPanel1.reset();
            }
            else
            {
                MessageBox.Show(statusMsg, "", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #3
0
 private void button_selectPatient_Click(object sender, EventArgs e)
 {
     pat = searchPatientInputPanel1.getSelectedPatient();
     if (pat == null)
     {
         return;
     }
     if (Login.user == null)
     {
         PermissibleValueObj pwChkStatus = new PermissibleValueObj("", "0");
         PatientPwChk        patPwChk    = new PatientPwChk();
         patPwChk.setPatIdSuccessFlag(pat.PatientId, ref pwChkStatus);
         patPwChk.ShowDialog();
         if (pwChkStatus.Value == "0")
         {
             pat = null;
             return;
         }
     }
     patientRegistration1.Enabled = false;
     patientRegistration1.setPatientData(pat);
     patientRegistration1.Enabled = true;
 }