public void UpdateOutpatient(Outpatient patientToUpdate)
        {
            var outpatient = _context.Outpatients.Find(patientToUpdate.PersonId);

            outpatient.FirstName              = patientToUpdate.FirstName;
            outpatient.MiddleInitial          = patientToUpdate.MiddleInitial;
            outpatient.LastName               = patientToUpdate.LastName;
            outpatient.Address                = patientToUpdate.Address;
            outpatient.City                   = patientToUpdate.City;
            outpatient.State                  = patientToUpdate.State;
            outpatient.Zip                    = patientToUpdate.Zip;
            outpatient.Email                  = patientToUpdate.Email;
            outpatient.PhoneNumber            = patientToUpdate.PhoneNumber;
            outpatient.BirthDate              = patientToUpdate.BirthDate;
            outpatient.MedicalRecordNumber    = patientToUpdate.MedicalRecordNumber;
            outpatient.ContactPersonId        = patientToUpdate.ContactPersonId;
            outpatient.ContactRelationship    = patientToUpdate.ContactRelationship;
            outpatient.SubscriberPersonId     = patientToUpdate.SubscriberPersonId;
            outpatient.SubscriberRelationship = patientToUpdate.SubscriberRelationship;
            outpatient.DateOfContact          = patientToUpdate.DateOfContact;
            outpatient.InsuranceCompanyName   = patientToUpdate.InsuranceCompanyName;
            outpatient.InsurancePhoneNumber   = patientToUpdate.InsurancePhoneNumber;
            outpatient.PolicyNumber           = patientToUpdate.PolicyNumber;
            outpatient.GroupNumber            = patientToUpdate.GroupNumber;
            _context.SaveChanges();
        }
예제 #2
0
 public CombinedPatientViewModel(Outpatient outpatient)
 {
     // note that OutPatient IS also an InPatient, so this should be ok.
     // since the details of outpatient are also contain in InPatient,
     // the bindings in the UI is not affected, e.g.
     // {Binding Path=InPatientModel.FirstName}
     // will return the first name of the patient,
     // regardless if it is an inpatient or outpatient
     PatientModel    = outpatient;
     OutpatientModel = outpatient;
 }
예제 #3
0
        public EntityResult GetCityHospRelaList()
        {
            try
            {
                Outpatient bll = new Outpatient();
                return(new EntityResult(ResultType.Success, "", bll.GetNewCityList()));
            }
            catch (System.Exception ex)
            {
                return(new EntityResult(ResultType.Error, "", null));

                throw;
            }
        }
예제 #4
0
        public EntityResult GetZhiZhuHosp()
        {
            try
            {
                Outpatient bll = new Outpatient();
                return(new EntityResult(ResultType.Success, "", bll.ZhiShuHosp()));
            }
            catch (System.Exception ex)
            {
                return(new EntityResult(ResultType.Error, "", null));

                throw;
            }
        }
예제 #5
0
        public EntityResult CityHospList(string City)
        {
            try
            {
                Outpatient bll = new Outpatient();
                return(new EntityResult(ResultType.Success, "", bll.CityHospList(City)));
            }
            catch (System.Exception ex)
            {
                return(new EntityResult(ResultType.Error, "", null));

                throw;
            }
        }
예제 #6
0
        public EntityResult HomeData(string StateTime, string EndTime, string SPTXT, string K)
        {
            try
            {
                Outpatient bll = new Outpatient();
                return(new EntityResult(ResultType.Success, "", bll.BigDataBLL(StateTime, EndTime, SPTXT, K)));
            }
            catch (System.Exception ex)
            {
                return(new EntityResult(ResultType.Error, "", null));

                throw;
            }
        }
예제 #7
0
        public EntityResult GetFeverChartAgeData(string StartTime, string EndTime, string SPTXT, string K)
        {
            try
            {
                Outpatient bll = new Outpatient();
                return(new EntityResult(ResultType.Success, "", bll.FeverChartAgeData(StartTime, EndTime, SPTXT, K)));
            }
            catch (System.Exception ex)
            {
                return(new EntityResult(ResultType.Error, "", null));

                throw;
            }
        }
예제 #8
0
        public EntityResult TTPCityData(string StateTime, string EndTime, string City)
        {
            try
            {
                Outpatient bll = new Outpatient();
                return(new EntityResult(ResultType.Success, "", bll.BigTTPDataBLL(StateTime, EndTime, City, 2)));
            }
            catch (System.Exception ex)
            {
                return(new EntityResult(ResultType.Error, "", null));

                throw;
            }
        }
        public EntityResult GetTwoZhuanRuOrChuData(string StartTime, string EndTime, string SPTXT)
        {
            try
            {
                Outpatient bll    = new Outpatient();
                var        result = bll.TwoZhuanRuOrChuData(StartTime, EndTime, SPTXT);
                return(new EntityResult(ResultType.Success, "", result));
            }
            catch (System.Exception ex)
            {
                return(new EntityResult(ResultType.Error, "", null));

                throw;
            }
        }
예제 #10
0
        public EntityResult GetCheckMainAgeChartData(string StartTime, string EndTime, string SPTXT, string K)
        {
            try
            {
                Outpatient bll    = new Outpatient();
                var        result = bll.GetCheckMainAgeChartData(StartTime, EndTime, SPTXT, K);
                return(new EntityResult(ResultType.Success, "", result));
            }
            catch (System.Exception ex)
            {
                return(new EntityResult(ResultType.Error, "", null));

                throw;
            }
        }
예제 #11
0
        public EntityResult GetHealthBookByAgeData(string StartTime, string EndTime)
        {
            try
            {
                Outpatient bll    = new Outpatient();
                var        result = bll.HealthBookByAgeData(StartTime, EndTime);
                return(new EntityResult(ResultType.Success, "", result));
            }
            catch (System.Exception ex)
            {
                return(new EntityResult(ResultType.Error, "", null));

                throw;
            }
        }
예제 #12
0
        public EntityResult GetPuHealChildAndTotalData(string SPTXT, string K)
        {
            try
            {
                Outpatient bll = new Outpatient();
                var        bls = bll.PuHealChildAndTotalData(SPTXT, K);
                return(new EntityResult(ResultType.Success, "", bls));
            }
            catch (System.Exception ex)
            {
                return(new EntityResult(ResultType.Error, "", null));

                throw;
            }
        }
예제 #13
0
        public EntityResult GetHealthRecord()
        {
            try
            {
                Outpatient bll = new Outpatient();
                var        bls = bll.HealthRecordData();
                return(new EntityResult(ResultType.Success, "", bls));
            }
            catch (System.Exception ex)
            {
                return(new EntityResult(ResultType.Error, "", null));

                throw;
            }
        }
예제 #14
0
        public EntityResult GetHospLiveAgeData(string StateTime, string EndTime, string SPTXT, string K)
        {
            try
            {
                Outpatient bll = new Outpatient();
                var        bls = bll.HospLiveAgeData(StateTime, EndTime, SPTXT, K);
                return(new EntityResult(ResultType.Success, "", bls));
            }
            catch (System.Exception ex)
            {
                return(new EntityResult(ResultType.Error, "", null));

                throw;
            }
        }
예제 #15
0
        public EntityResult HospLiveData(string StateTime, string EndTime, string SPTXT, string K)
        {
            try
            {
                Outpatient bll    = new Outpatient();
                var        result = bll.HospLiveData(StateTime, EndTime, SPTXT, K);
                // bigAge, smallAge,  DiscSpe,  Sex,
                //string bigAge, string smallAge, string DiscSpe, string Sex,
                return(new EntityResult(ResultType.Success, "", result));
            }
            catch (System.Exception ex)
            {
                return(new EntityResult(ResultType.Error, "", null));

                throw;
            }
        }
 public void AddOutpatient(Outpatient patient)
 {
     _context.Outpatients.Add(patient);
     _context.SaveChanges();
 }
예제 #17
0
 public void Insert(Outpatient outpatient)
 {
     _unitOfWorks.OutpatientRepository.Insert(outpatient);
     _unitOfWorks.Save();
 }