Пример #1
0
        public static PatientEntity GetByUid(string patientUid)
        {
            PatientCollection patients = new PatientCollection();

            patients.GetMulti(new PredicateExpression(PatientFields.UniqueIdentifier == patientUid));
            return(patients.Count > 0 ? patients[0] : null);
        }
Пример #2
0
        public async Task <ActionResult> AddPatient(PatientCollection model)
        {
            var user = new ApplicationUser
            {
                UserName       = model.ApplicationUser.UserName,
                Email          = model.ApplicationUser.Email,
                UserRole       = "Patient",
                RegisteredDate = DateTime.Now.Date
            };
            var result = await UserManager.CreateAsync(user, model.ApplicationUser.Password);

            if (result.Succeeded)
            {
                await UserManager.AddToRoleAsync(user.Id, "Patient");

                var patient = new Patient
                {
                    FirstName    = model.Patient.FirstName,
                    LastName     = model.Patient.LastName,
                    FullName     = model.Patient.FirstName + " " + model.Patient.LastName,
                    EmailAddress = model.ApplicationUser.Email,
                    //ContactNo = model.Doctor.ContactNo,
                    PhoneNo           = model.Patient.PhoneNo,
                    Gender            = model.Patient.Gender,
                    BloodGroup        = model.Patient.BloodGroup,
                    ApplicationUserId = user.Id,
                    DateOfBirth       = model.Patient.DateOfBirth,
                    Address           = model.Patient.Address
                };
                db.Patients.Add(patient);
                db.SaveChanges();
                return(RedirectToAction("ListOfPatients"));
            }
            return(HttpNotFound());
        }
Пример #3
0
		/// <summary>
		/// Creates an instance of <see cref="StudyTree"/>.
		/// </summary>
		public StudyTree()
		{
			_patients = new PatientCollection();
			_studies = new Dictionary<string, Study>();
			_series = new Dictionary<string, Series>();
			_sops = new Dictionary<string, Sop>();
		}
Пример #4
0
 public PatientCollection FetchAll()
 {
     var coll = new PatientCollection();
     var qry = new Query(Patient.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
Пример #5
0
        public ActionResult AddPatient()
        {
            var collection = new PatientCollection
            {
                ApplicationUser = new RegisterViewModel(),
                Patient         = new Patient()
            };

            return(View(collection));
        }
Пример #6
0
        public BaseResponse <PatientCollection> GetPatientQueueForCallPatient(BaseRequest <PatientQueueModel> request)
        {
            var q = from c in unitOfWork.GetRepository <DC_CheckRoomQueue>()
                    .dbSet.Where(a => a.OrganizationID == request.Data.OrganizationID)
                    join s in unitOfWork.GetRepository <DC_ServiceItem>()
                    .dbSet.Where(a => a.DeptId == request.Data.DeptID) on c.ServiceItemID equals s.ServiceItemID
                    join d in unitOfWork.GetRepository <ORG_Dept>().dbSet on s.DeptId equals d.DeptID
                    select new PatientQueueModel()
            {
                ServiceItemID       = c.ServiceItemID,
                SIName              = c.SIName,
                EmployeeID          = c.EmployeeID.Value,
                ResidentID          = c.ResidentID,
                ResidentName        = c.ResidentName,
                SerialNumber        = c.SerialNumber,
                CheckNumber         = c.CheckNumber,
                CheckStatus         = c.CheckStatus,
                CheckRoomQueueRecID = c.CheckRoomQueueRecID,
                OrganizationID      = c.OrganizationID,
                DeptID              = d.DeptID,
                DeptName            = d.DeptName,
                CheckRoomID         = c.CheckRoomID.Value
            };

            var waitForCheck = (int)CheckStatus.WaitForCheck;
            var inChecking   = (int)CheckStatus.InChecking;

            var collection = new PatientCollection();

            collection.InQueuePatientList     = q.Where(a => a.CheckStatus == waitForCheck).OrderBy(a => a.CheckNumber).ToList();
            collection.InServicingPatientList = q.Where(a => a.CheckStatus == inChecking && a.CheckRoomID == request.Data.CheckRoomID).OrderBy(a => a.CheckNumber).ToList();


            var response = new BaseResponse <PatientCollection>();

            response.RecordsCount = collection.InQueuePatientList.Count;

            if (request != null && request.PageSize > 0)
            {
                collection.InQueuePatientList = collection.InQueuePatientList.Skip((request.CurrentPage - 1) * request.PageSize).Take(request.PageSize).ToList();

                response.PagesCount = GetPagesCount(request.PageSize, response.RecordsCount);
                response.Data       = collection;
            }

            else
            {
                response.Data = collection;
            }


            return(response);
        }
Пример #7
0
         public amHealths()
            : base(null)
        {
            _practitioners = new PractitionerCollection(this);
            _patients = new PatientCollection(this);
            _appointments = new AppointmentCollection(this);
            _groups = new GroupCollection(this);
            _members = new MemberCollection(this);
            _queues = new QueueCollection(this);
            _messages = new MessageCollection(this);
            _familys = new FamilyCollection(this);
            _chronics = new ChronicCollection(this);
            _allergys = new AllergyCollection(this);


            _chronicMaps = new ChronicMapCollection(this);
            _allergyMaps = new AllergyMapCollection(this);


        }
Пример #8
0
        static void Main(string[] args)
        {
            var patientCollection = new PatientCollection();

            patientCollection[0] = new Patient("Lucas", "000.000.000-00", false);
            patientCollection[1] = new Patient("Gabriel", "111.111.111-11", false);
            patientCollection[2] = new Patient("Mariana", "990.999.999-99", false);

            var iterator = patientCollection.CreateIterator();

            Console.WriteLine("\nPatient count...");
            Console.WriteLine(patientCollection.Count);

            Console.WriteLine("\nIs First?");
            Console.WriteLine(iterator.IsFirst);

            Console.WriteLine("\nShowing first patient...");
            var firstPatient = iterator.First() as Patient;

            Console.WriteLine(firstPatient.Name);

            Console.WriteLine("\nMove to next patient...");
            var nextPatient = iterator.Next() as Patient;

            Console.WriteLine(nextPatient.Name);

            Console.WriteLine("\nCurrent patient...");
            var currentPatient = iterator.CurrentElement as Patient;

            Console.WriteLine(currentPatient.Name);

            Console.WriteLine("\nMove to last patient...");
            var lastPatient = iterator.Next() as Patient;

            Console.WriteLine(lastPatient.Name);

            Console.WriteLine("\nMove to previous patient...");
            var previousPatient = iterator.Previous() as Patient;

            Console.WriteLine(previousPatient.Name);
        }
Пример #9
0
		/// <summary>
		/// Implementation of the <see cref="IDisposable"/> pattern
		/// </summary>
		/// <param name="disposing">True if this object is being disposed, false if it is being finalized</param>
		private void Dispose(bool disposing)
		{
			if (disposing)
			{
				if (_sops != null)
				{
					foreach (Sop sop in _sops.Values)
						sop.Dispose();

					_sops.Clear();
					_sops = null;
				}

				if (_series != null)
				{
					foreach (Series series in _series.Values)
						series.SetSop(null);

					_series.Clear();
					_series = null;
				}

				if (_studies != null)
				{
					foreach (Study study in _studies.Values)
						study.SetSop(null);

					_studies.Clear();
					_studies = null;
				}

				if (_patients != null)
				{
					foreach (Patient patient in _patients)
						patient.SetSop(null);

					_patients.Clear();
					_patients = null;
				}
			}
		}
Пример #10
0
 public PatientIterator(PatientCollection patientCollection, int step = 1)
 {
     _patientCollection = patientCollection;
     _current           = 0;
     _step = step;
 }
Пример #11
0
 public PatientCollection FetchByQuery(Query qry)
 {
     var coll = new PatientCollection();
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
Пример #12
0
 public PatientCollection FetchByID(object Guid)
 {
     PatientCollection coll = new PatientCollection().Where("GUID", Guid).Load();
     return coll;
 }