Ejemplo n.º 1
0
 internal Appointment(Application parent, Patient patient, Referrer referrer, Provider provider, ClinicType clinicType)
 {
     _parent          = parent;
     _dbLib           = _parent.DbLib;
     _ubrn            = _parent.GetMaxUBRN();
     _patient         = patient;
     _referrer        = referrer;
     _provider        = provider;
     _clinicType      = clinicType;
     _createdDateTime = DateTime.Now;
     _status          = AppointmentStatus.Pending;
 }
Ejemplo n.º 2
0
        private void Load(DataRow dataRow)
        {
            _id = (Guid)dataRow["Id"];

            Guid clinicTypeId = (Guid)dataRow["ClinicTypeId"];

            _clinicType = _parent.Parent.FindClinicTypeById((Guid)clinicTypeId);
            _specialty  = _clinicType.Parent;

            _slotsAvailable = (int)dataRow["SlotsAvailable"];
            _slotDuration   = (int)dataRow["SlotDuration"];
            _dayStartTime   = (DateTime)dataRow["DayStartTime"];
            _dayEndTime     = (DateTime)dataRow["DayEndTime"];
            _weekDays       = (int)dataRow["WeekDays"];
        }
Ejemplo n.º 3
0
        private void Load(DataRow dataRow)
        {
            _ubrn       = (int)dataRow["UBRN"];
            _patient    = _parent.FindPatientById((Guid)dataRow["PatientId"]);
            _referrer   = _parent.FindReferrerById((Guid)dataRow["ReferrerId"]);
            _provider   = _parent.FindProviderById((Guid)dataRow["ProviderId"]);
            _clinicType = _parent.FindClinicTypeById((Guid)dataRow["ClinicTypeId"]);

            if (!String.IsNullOrEmpty(dataRow["SlotId"].ToString()))
            {
                Guid?slotId = (Guid?)dataRow["SlotId"];
                _slot          = _parent.FindSlotById((Guid)slotId);
                _startDateTime = (DateTime?)dataRow["StartDateTime"];
                _endDateTime   = (DateTime?)dataRow["EndDateTime"];
            }

            _createdDateTime = (DateTime)dataRow["CreatedDate"];
            _updatedDateTime = (DateTime)dataRow["UpdatedDate"];

            if (!String.IsNullOrEmpty(dataRow["CancelledBy"].ToString()))
            {
                Guid cancelledByUserId = new Guid(dataRow["CancelledBy"].ToString());
                _cancelledBy        = _parent.Session.FindUserById((Guid)cancelledByUserId);
                _cancellationReason = (string)dataRow["CancellationReason"];
                _cancelledDateTime  = (DateTime?)dataRow["CancelledDate"];
            }

            _status = (AppointmentStatus)Enum.Parse(typeof(AppointmentStatus), dataRow["Status"].ToString());

            if (!String.IsNullOrEmpty(dataRow["Comments"].ToString()))
            {
                _comments = (string)dataRow["Comments"];
            }

            if (!String.IsNullOrEmpty(dataRow["ReminderDate"].ToString()))
            {
                _reminderDate = (DateTime?)dataRow["ReminderDate"];
            }

            if (!String.IsNullOrEmpty(dataRow["WorkflowId"].ToString()))
            {
                _workflowId = (Guid?)dataRow["WorkflowId"];
            }
        }
Ejemplo n.º 4
0
        public ClinicType[] Find(ClinicTypeSearchCriteria criteria)
        {
            DataTable         dataTable      = _dbLib.ClinicTypeGet((Guid?)criteria.Id, (Guid?)criteria.SpecialtyId);
            List <ClinicType> clinicTypeList = new List <ClinicType>();

            foreach (DataRow dataRow in dataTable.Rows)
            {
                Guid      specialtyId = (Guid)dataRow["SpecialtyId"];
                Specialty specialty   = this.FindSpecialtyById((Guid)specialtyId);

                ClinicType clinicType = new ClinicType(specialty, dataRow);
                clinicTypeList.Add(clinicType);
            }

            clinicTypeList.Sort(delegate(ClinicType a, ClinicType b)
            {
                return(a.Name.CompareTo(b.Name));
            });

            return(clinicTypeList.ToArray());
        }
Ejemplo n.º 5
0
        private void Load(DataRow dataRow)
        {
            this._id = (Guid)dataRow["Id"];

            Guid providerId = new Guid(dataRow["ProviderId"].ToString());

            this._provider = _parent.FindProviderById(providerId);

            Guid _clinicTypeId = new Guid(dataRow["ClinicTypeId"].ToString());

            this._clinicType = _parent.FindClinicTypeById(_clinicTypeId);

            this._startDateTime = (DateTime)dataRow["StartDateTime"];
            this._endDateTime   = (DateTime)dataRow["EndDateTime"];

            if (!String.IsNullOrEmpty(dataRow["UBRN"].ToString()))
            {
                this._ubrn = (int)dataRow["UBRN"];
            }

            this._status = (SlotStatus)Enum.Parse(typeof(SlotStatus), dataRow["Status"].ToString());
        }
Ejemplo n.º 6
0
 public Appointment NewAppointment(Patient patient, Referrer referrer, Provider provider, ClinicType clinicType)
 {
     return(new Appointment(this, patient, referrer, provider, clinicType));
 }