public async Task <ActionResult> AppointmentMedicalRecord(int id, int?page) { var appointment = await _appointmentservices.GetAppointment(id); int pageIndex = page ?? 1; int dataCount = 3; ViewBag.patId = appointment.Pat_Id; ViewBag.phyId = appointment.Phys_id; ViewBag.appointNo = appointment.No; var patientRecordDetails = new PatientMedicalRecordDetailsViewModel { AppointmentId = appointment.No, PatientId = appointment.Pat_Id, PhyId = appointment.Phys_id, Phy_abr = _userphysicianservices.GetUserPhysician_By_Id(appointment.Phys_id).Abr, Patient = _patientservices.GetPatientById(appointment.Pat_Id) }; var medicalRecord = _patientrecordservices.GetAllRecords(appointment.Pat_Id, appointment.Phys_id); patientRecordDetails.MedicalRecordList = medicalRecord.OrderByDescending(t => t.RecordNo).ToList() .ToPagedList(pageIndex, dataCount); if (Request.IsAjaxRequest()) { return(PartialView("_RecordListPartialView", (PagedList <MedicalRecord>)patientRecordDetails.MedicalRecordList)); } return(View("MedicalHistory", patientRecordDetails)); }
public ActionResult MedicalHistory(string patientid, string phyid, int?page) { int pageIndex = page ?? 1; int dataCount = 3; ViewBag.patId = patientid; ViewBag.phyId = phyid; int appointNo = _patientrecordservices.GetAppointmentNo(patientid, DateTime.Now); var patientRecordDetails = new PatientMedicalRecordDetailsViewModel { AppointmentId = appointNo, PatientId = patientid, PhyId = phyid, Phy_abr = _userphysicianservices.GetUserPhysician_By_Id(phyid).Abr, Patient = _patientservices.GetPatientById(patientid) }; var medicalRecord = _patientrecordservices.GetAllRecords(patientid, phyid); patientRecordDetails.MedicalRecordList = medicalRecord.OrderByDescending(t => t.RecordNo).ToList() .ToPagedList(pageIndex, dataCount); if (Request.IsAjaxRequest()) { return(PartialView("_RecordListPartialView", (PagedList <MedicalRecord>)patientRecordDetails.MedicalRecordList)); } return(View(patientRecordDetails)); }
public ActionResult MedicalHistory(string id, string phyid, int?page) { int pageIndex = page ?? 1; int dataCount = 3; ViewBag.patId = id; ViewBag.phyId = phyid; var patientRecordDetails = new PatientMedicalRecordDetailsViewModel { PatientId = id, PhyId = phyid, Patient = _patientservices.GetPatientById(id) }; var medicalRecord = _patientrecordservices.GetAllRecords(id, phyid); patientRecordDetails.MedicalRecordList = medicalRecord.OrderByDescending(t => t.RecordNo).ToList() .ToPagedList(pageIndex, dataCount); if (Request.IsAjaxRequest()) { return(PartialView("_RecordListPartialView", (PagedList <MedicalRecord>)patientRecordDetails.MedicalRecordList)); } return(View(patientRecordDetails)); }