Example #1
0
        public List <PatientInformationModel> GetPatientBasicInformationFromOpd(int PatientID, int DepartmentID)
        {
            using (EHMSEntities ent = new EHMSEntities())
            {
                var singleValue = ent.OpdMasters.Where(x => x.OpdID == PatientID).SingleOrDefault();

                if (singleValue != null)
                {
                    List <PatientInformationModel> myList        = new List <PatientInformationModel>();
                    PatientInformationModel        objPatientInf = new PatientInformationModel();
                    objPatientInf.EmergencyMasterId = singleValue.OpdID;
                    objPatientInf.FirstName         = singleValue.FirstName;
                    objPatientInf.MiddleName        = singleValue.MiddleName;
                    objPatientInf.LastName          = singleValue.LastName;
                    objPatientInf.Age          = singleValue.AgeYear.GetValueOrDefault();
                    objPatientInf.Gender       = singleValue.Sex;
                    objPatientInf.DepartmentID = singleValue.DepartmentId.GetValueOrDefault();
                    objPatientInf.Address      = singleValue.Address;
                    //objPatientInf.PhoneNo = singleValue.ContactName;
                    myList.Add(objPatientInf);
                    return(myList);
                }
                else
                {
                    return(null);
                }
            }
        }
Example #2
0
 public PatientInformationVM()
 {
     try
     {
         Command             = new PatientInformationCommand(this);
         PatientInformationM = new PatientInformationModel();
         Patients            = new ObservableCollection <Patient>(PatientInformationM.GetPatients());
     }
     catch (Exception e)
     {
         (App.Current as App).navigation.MainWindows.comments.Text = e.Message.ToString();
     }
 }
Example #3
0
 public List <PatientInformationModel> GetPatientBasicInformationFromEmergency(int PatientID)
 {
     using (EHMSEntities ent = new EHMSEntities())
     {
         var singleValue = ent.OpdMasters.Where(x => x.OpdID == PatientID).SingleOrDefault();
         List <PatientInformationModel> myList        = new List <PatientInformationModel>();
         PatientInformationModel        objPatientInf = new PatientInformationModel();
         objPatientInf.EmergencyMasterId = singleValue.OpdID;
         objPatientInf.FirstName         = singleValue.FirstName;
         objPatientInf.MiddleName        = singleValue.MiddleName;
         objPatientInf.LastName          = singleValue.LastName;
         objPatientInf.Age          = singleValue.AgeYear.GetValueOrDefault();
         objPatientInf.Gender       = singleValue.Sex;
         objPatientInf.DepartmentID = 10;
         myList.Add(objPatientInf);
         return(myList);
     }
 }
Example #4
0
 public ActionResult Main(PatientSearchModel model)
 {
     try
     {
         using (InhCheckupDataContext cdc = new InhCheckupDataContext())
         {
             PatientInformationModel pi = new PatientInformationModel();
             pi.queue_no = model.queue_no;
             pi.listPatientInformation = cdc.trn_patient_regis
                                         .Where(x => x.tpr_queue_no == model.queue_no)
                                         .Select(x => new PatientInformation
             {
                 tpr_id       = x.tpr_id,
                 name         = x.trn_patient.tpt_first_name,
                 lastname     = x.trn_patient.tpt_last_name,
                 hn           = x.trn_patient.tpt_hn_no,
                 en           = x.tpr_en_no,
                 arrived_date = x.trn_patient_regis_detail == null ? x.tpr_arrive_date.Value : x.trn_patient_regis_detail.tpr_real_arrived_date.Value
             }).OrderByDescending(x => x.arrived_date)
                                         .ToList();
             if (pi.listPatientInformation.Count == 0)
             {
                 ViewBag.QueueNo = model.queue_no + " is Not Found.";
                 ModelState.Clear();
                 return(View("Main", new PatientSearchModel()));
             }
             else
             {
                 ViewBag.QueueNo = model.queue_no;
                 return(View("PatientList", pi));
             }
         }
     }
     catch
     {
         ViewBag.PageTitle = "Error (Please Try Again)";
         return(View(model));
     }
 }
Example #5
0
 public ActionResult PatientList(PatientInformationModel model)
 {
     return(View("Main"));
 }