Inheritance: ISchedulingDao
Ejemplo n.º 1
0
        protected void Click_MakeAppointment(object sender, EventArgs e)
        {
            TimeSlot selectedSlot =
                (Session["FILTERED_SLOTS"] as IList<TimeSlot>)[dropdownAvailableTimes.SelectedIndex];

            if (!selectedSlot.Available)
            {
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('Please choose an available slot only');", true);
                return;
            }

            string dateString = "3" + selectedSlot.Start.ToString("yyMMdd.HHmmss");

            try
            {
                //esb.appointmentResponse response = new SchedulingDao().makeAppointmentEsb(dateString, "30", "12", _patient, _ssn);

                _dao = new SchedulingDao();
                UserTO user = _dao.connectAndLogin(_siteCode, _accessCode, _verifyCode);
                AppointmentTO result = _dao.makeAppointment(_patient, "12", dateString, "N", "", "30", "9");
                _dao.disconnect();

                if (result.fault == null)
                {
                    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('Your appointment is set for " +
                        selectedSlot.Start.ToString("MM/dd") + " at " + selectedSlot.Start.ToString("HH:mm") +
                        ". Good job.');", true);
                }
            }
            catch (Exception exc)
            {
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + exc.Message + "')", true);
            }
        }
Ejemplo n.º 2
0
        public void testFixtureSetUp()
        {
            VistaDao dao = new VistaDao();

            dao.addDataSource("100", "Dewdrop", "172.19.100.199", "9100", "1");
            _dao = new SchedulingDao(dao.EmrSvcSession); // copy session from VistaDao
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {

                if (calendarSelectDate.SelectedDate == null || calendarSelectDate.SelectedDate.Year == 1)
                {
                    calendarSelectDate.SelectedDate = DateTime.Today;
                    _selectedDate = DateTime.Today;
                }
                else
                {
                    _selectedDate = calendarSelectDate.SelectedDate;
                }

                _dao = new SchedulingDao();
                UserTO user = _dao.connectAndLogin(_siteCode, _accessCode, _verifyCode);
                //_dao.connect("901");
                //_dao.login("1programmer", "programmer1", "");
                HospitalLocationTO clinic = _dao.getClinicSchedulingDetails("12");
                PatientTO selectedPatient =_dao.selectPatient(_patient);
                labelPatientName.Text = selectedPatient.name;
                _dao.disconnect();
                // just do this once at launch
                _slots = SchedulingUtils.getItemsFromAvailabilityString
                    (clinic.clinicDisplayStartTime, Convert.ToInt32(clinic.appointmentLength), Convert.ToInt32(clinic.displayIncrements), clinic.availability);
                Session.Add("SLOTS", _slots);
                populateDropdown(_slots);
            }

            _slots = Session["SLOTS"] as IList<TimeSlot>;
        }
Ejemplo n.º 4
0
 public void testMakeApptEsb()
 {
     esb.appointmentResponse response = new SchedulingDao().makeAppointmentEsb("3130104.10", "30", "12", "51", "222334444");
     System.Console.WriteLine(response.patientEmail);
 }
Ejemplo n.º 5
0
 public void testFixtureSetUp()
 {
     VistaDao dao = new VistaDao();
     dao.addDataSource("100", "Dewdrop", "172.19.100.199", "9100", "1");
     _dao = new SchedulingDao(dao.EmrSvcSession); // copy session from VistaDao
 }
Ejemplo n.º 6
0
 public void testFixtureSetUp()
 {
     _dao = new SchedulingDao();
 }
Ejemplo n.º 7
0
 public void testMakeApptEsb()
 {
     esb.appointmentResponse response = new SchedulingDao().makeAppointmentEsb("3130104.10", "30", "12", "51", "222334444");
     System.Console.WriteLine(response.patientEmail);
 }