Exemplo n.º 1
0
        /// <summary>
        /// Calls from the request Controller
        /// </summary>
        /// <param name="mrNumber"></param>
        /// <param name="vunetId"></param>
        /// <returns></returns>
        public Patient GetPatient(string mrNumber, string vunetId)
        {
            Patient patientModel = new Patient();

            try
            {
                List <epi.Patient> epipatients = new List <epi.Patient>();
                PatientDetails     details     = new PatientDetails();
                epi.PersonService.ServiceUrl = patientProdurl;
                try
                {
                    epipatients = epi.PersonService.GetPatientInformation(details.ApplicationName, details.AppPassKeyPrd, vunetId, mrNumber, "", false, "", false, "", "", "", "", null, null, null, "", "", "", 0);
                }
                catch (Exception ex)
                {
                    var exception = ex;
                    //throw ex.InnerException;
                    //patientModel.MRN = "";
                    return(patientModel);
                }
                if (epipatients.Count > 0 && epipatients.Count == 1)
                {
                    patientModel = ConvertToPatientModel(epipatients[0]);
                }
                return(patientModel);
            }
            catch (Exception ex)
            {
                throw ex.InnerException;
            }
        }
Exemplo n.º 2
0
        public List <epi.PatientInsuranceRecord> GetInsuranceList(List <string> mrns, string vunetId, string serviceUrl)
        {
            epi.PersonService.ServiceUrl = serviceUrl;
            PatientDetails patientdetails = new PatientDetails();
            List <epi.PatientInsuranceRecord> insuranceRecords = new List <epi.PatientInsuranceRecord>();

            insuranceRecords = epi.PersonService.GetPatientInsuranceInformation(patientdetails.ApplicationName, patientdetails.AppPassKeyPrd, vunetId, mrns, true);
            return(insuranceRecords);
        }
Exemplo n.º 3
0
        string patientInturl  = WebConfigurationManager.AppSettings["EPIServiceInt"]; //"https://epiint.service.vumc.org/epi7_0/request";

        /// <summary>
        /// Get the patient information from the GenServices
        /// </summary>
        /// <param name="mrNumber"></param>
        /// <returns></returns>
        public List <Patient> GetPatientInformation(string mrNumber)
        {
            List <epi.Patient> epiPatients = new List <epi.Patient>();

            epi.PersonService.ServiceUrl = patientProdurl;
            PatientDetails details = new PatientDetails();

            epiPatients = epi.PersonService.GetPatientInformation(details.ApplicationName, details.AppPassKeyPrd, details.VunetId, mrNumber, "", false, "", false, "", "", "", "", null, null, null, "", "", "", 0);
            List <Patient> patientListModel = new List <Patient>();
            Patient        patientModel     = new Patient();

            foreach (var patient in epiPatients)
            {
                patientModel = ConvertToPatientModel(patient);
                patientListModel.Add(patientModel);
            }
            return(patientListModel);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Search for MRN using the patient name
        /// </summary>
        /// <param name="Fname"></param>
        /// <param name="Lname"></param>
        /// <returns></returns>
        public string GetMrnByName(string Fname, string Lname)
        {
            string             MRNumber    = string.Empty;
            List <epi.Patient> epiPatients = new List <epi.Patient>();

            epi.PersonService.ServiceUrl = patientProdurl;
            PatientDetails details = new PatientDetails();

            epiPatients = epi.PersonService.GetPatientInformation(details.ApplicationName, details.AppPassKeyPrd, details.VunetId, string.Empty, Lname, true, Fname, true, string.Empty, string.Empty, string.Empty, string.Empty, null, null, null, string.Empty, string.Empty, string.Empty, 0);
            List <string> mrnumbers = new List <string>();

            foreach (var p in epiPatients)
            {
                mrnumbers.Add(p.MedicalRecordNumber);
            }
            RetrieveCensusInformation rc = new RetrieveCensusInformation();

            MRNumber = rc.GetMrnFromCensus(mrnumbers);
            return(MRNumber);//mrnumbers.FirstOrDefault();
        }