Beispiel #1
0
        public ActionResult ValidateMrNumber(string mrn)
        {
            string      vunetId = User.Identity.Name;
            PatientFill fill    = null;
            RetrieveCensusInformation censusinfo = new RetrieveCensusInformation();
            int censusRecords = censusinfo.GetCensusCount(mrn);

            if (censusRecords > 0)
            {
                RetrieveCoverageAndInsurance covandins = new RetrieveCoverageAndInsurance();
                var  ins   = covandins.GetInsurances(mrn, vunetId).Where(i => i.EffectiveDate <= DateTime.Today && (i.TerminationDate >= DateTime.Today || i.TerminationDate == null)).FirstOrDefault();
                long insId = 0;
                if (ins != null)
                {
                    insId = ins.InsuranceId;
                }
                RetrievePatientInformation patientinfo = new RetrievePatientInformation();
                Patient patient = patientinfo.GetPatient(mrn, vunetId);

                fill = new PatientFill()
                {
                    MrNumberFromEpi    = string.IsNullOrEmpty(patient.MRN) ? "0" : patient.MRN,
                    PatientFName       = patient.FirstName,
                    PatientLName       = patient.LastName,
                    InsuranceIdFromEpi = insId
                };
            }
            return(Json(fill, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        public ActionResult GetPatientAddress(string MrNumber)
        {
            //string patientAddress = string.Empty;
            string vunetId = User.Identity.Name;
            RetrievePatientInformation patientinfo = new RetrievePatientInformation();
            Patient patient = patientinfo.GetPatient(MrNumber, vunetId);

            //patientAddress = patient.Address + ", " + patient.City + ", " + patient.State + ", " + patient.Zip;
            if (!string.IsNullOrEmpty(patient.MRN))
            {
                RequestModel requestModel = new RequestModel();
                if (patient.State.Length > 2)
                {
                    var states = requestModel.GetStatesList();
                    patient.State = states.Where(x => x.Text == patient.State).FirstOrDefault().Value;
                }
                AddressFill fill = new AddressFill()
                {
                    AddressLineOne = patient.Address.Replace(",", ""),
                    City           = patient.City,
                    State          = patient.State,
                    Zip            = patient.Zip,
                    Phone          = patient.Phone
                };
                return(Json(fill, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json("", JsonRequestBehavior.AllowGet));
            }
        }
Beispiel #3
0
        public ActionResult PatientModel(string mrn)
        {
            RetrievePatientInformation info = new RetrievePatientInformation();
            Patient pat = new Models.Patient();

            pat = info.GetPatient(mrn);
            return(View(pat));
        }
Beispiel #4
0
        public ActionResult Patient(string mrn)
        {
            RetrievePatientInformation info     = new RetrievePatientInformation();
            List <Patient>             patients = new List <Patient>();

            patients = info.GetPatientInformation(mrn);
            return(View(patients));
        }
Beispiel #5
0
        public ActionResult RetrieveByName(string firstName, string lastName)
        {
            //Patient retrievedPatient = new Patient();
            RetrievePatientInformation patientinfo = new RetrievePatientInformation();

            //retrievedPatient = patientinfo.GetPatientByName(firstName, lastName);
            string MRNumber = patientinfo.GetMrnByName(firstName, lastName);

            return(Json(MRNumber, JsonRequestBehavior.AllowGet));
        }
Beispiel #6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="mrNumber"></param>
        /// <returns></returns>
        private GenServiceModel RetrieveDataFromGenServices(string mrNumber, string vunetId)
        {
            GenServiceModel gsm = new GenServiceModel();
            RetrieveCoverageAndInsurance coverageinfo = new RetrieveCoverageAndInsurance();
            RetrievePatientInformation   patientinfo  = new RetrievePatientInformation();
            RetrieveCensusInformation    censusinfo   = new RetrieveCensusInformation();
            CoverageInfo         coverages            = coverageinfo.GetCoverageAndInsurance(mrNumber, vunetId).Where(c => c.IsActive == true).FirstOrDefault();
            InsuranceInformation insurances           = coverageinfo.GetInsurances(mrNumber, vunetId).Where(i => i.EffectiveDate <= DateTime.Today && (i.TerminationDate >= DateTime.Today || i.TerminationDate == null)).FirstOrDefault();
            Patient     patient = patientinfo.GetPatient(mrNumber, vunetId);
            CensusModel census  = censusinfo.GetCensusRecords(mrNumber, vunetId).FirstOrDefault();

            gsm.PatientDemographics = patient;
            gsm.Coverages           = coverages;
            gsm.Insurances          = insurances;
            gsm.Census = census;

            return(gsm);
        }