makeAppointment() 공개 메소드

public makeAppointment ( string pid, string clinicId, string apptTimestamp, string category, string subCategory, string apptLength, string apptType ) : AppointmentTO
pid string
clinicId string
apptTimestamp string
category string
subCategory string
apptLength string
apptType string
리턴 MdwsDemo.scheduling.AppointmentTO
예제 #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);
            }
        }
예제 #2
0
        public void testMakeAppointment()
        {
            string pid = "91";

            login100();
            // user is now authenticated
            IList <AppointmentTypeTO> apptTypes = _dao.getAppointmentTypes("A");
            // we now have the appointment types we can display to the user
            IList <HospitalLocationTO> clinics = _dao.getClinics("A"); // get clinics starting at 'A'
            // we now have a list of clinics we can allow the user to select one
            HospitalLocationTO clinicWithDetails = _dao.getClinicSchedulingDetails(clinics[0].id);
            // we now have the details for the selected clinic and can show those to the user so a timeslot can be selected and we can pass the correct params to makeAppointment

            // note we hard coded the vista format timestamp here, we also hard coded the category as a suitable call to retrieve the categories needs to be developed and exposed
            AppointmentTO scheduledAppt = _dao.makeAppointment(pid, clinics[0].id, "3121210.10", "N", "", clinicWithDetails.appointmentLength, apptTypes[0].id);

            Assert.IsNull(scheduledAppt.fault);
        }