Пример #1
0
        public VM.Appointment GetAppointmentForAdd(string MRN, int clinicId)
        {
            GoldenAppointment _appointment = new GoldenAppointment();
            _appointment.MRN = MRN;
            _appointment.Load();
            Patient _patient;
            VM.Appointment app = new VM.Appointment();
            if (_appointment.apptid.HasValue)
            {
                AppointmentList appts = new AppointmentList();
                appts.BackgroundListLoad();

              ////Appointment goldenAppointment = appts.First(appt => appt.id == _appointment.apptid);

              // // SessionManager.Instance.SetActivePatient(goldenAppointment.unitnum, goldenAppointment.apptID);
              //  SessionManager.Instance.GetActivePatient().BackgroundLoadWork();
              ////  SessionManager.Instance.MetaData.AllProviders.BackgroundListLoad();
              //  _patient = SessionManager.Instance.GetActivePatient();
              //  _patient.Providers.BackgroundListLoad();
              // // VM.Appointment app = goldenAppointment.FromRAppointment();
              //  app.clinics= GetClinicList();
              ////  app.Providers = SessionManager.Instance.MetaData.AllProviders.ToProviderList();
              //  app.FromRAppointment(_patient);
              //  app.IsGoldenAppointment = "Yes";
              //  app.IsCopyAppointment = "No";
                return app;

            }
            else
            {
                _patient = new Patient(MRN);
                _patient.Providers.LoadFullList();

                SessionManager.Instance.SetActivePatient(_patient.unitnum, _patient.apptid);
                Appointment appointment = new Appointment();
              //  appointment = new Appointment(clinicId, MRN) { };
              //  VM.Appointment app = appointment.FromRAppointment();
              //  app.clinics=GetClinicList();
              // // SessionManager.Instance.MetaData.AllProviders.BackgroundListLoad();
              ////  app.Providers = SessionManager.Instance.MetaData.AllProviders.ToProviderList();
              //  app.FromRAppointment(_patient);
              //  app.IsGoldenAppointment = "No";
              //  app.IsCopyAppointment = "No";
                return app;

            }
        }
Пример #2
0
 public NewAppointmentWizard(int clinicId)
 {
     InitializeComponent();
     this._appointment = new GoldenAppointment();
     this._clinicId = clinicId;
 }