public IActionResult DoctorView(Patient patient) { patientId = patient.Id; Properties.patient = patient; var doctorSpecialization = DoctorTable.GetSpecializationById(Properties.UserId); if (patient.Name == null) { patient.Id = 100; } List <Visit> visits = VisitTable.GetDataByPatientIdAndSpecialization(patient.Id, doctorSpecialization[0].Specialization); List <Prescription> prescriptions = PrescriptionTable.GetDataByPatientId(patient.Id); List <Test> tests = TestTable.GetDataByPatientId(patient.Id); List <Documentation> docs = DocumentationTable.GetDataByPatientId(patient.Id); List <MedicalDescription> list = MedicalDescriptionTable.GetDataByPatientId(patient.Id); ViewData["data"] = patient; ViewData["docs"] = docs; ViewData["visits"] = visits; ViewData["prescript"] = prescriptions; ViewData["tests"] = tests; ViewData["medicalDescriptionData"] = list; return(View()); }
public IActionResult PdfSickLeave(int id) { var sickLeave = SickLeaveTable.GetData(id); var patData = PatientTable.GetPatientById(Properties.UserId); patData[0].Name = patData[0].Name + " " + patData[0].Surname; ViewBag.patient = patData; var doc = DoctorTable.GetDoctorIdByName(sickLeave[0].DoctorName); var docData = DoctorTable.GetSpecializationById(doc[0].Id); docData[0].Name = docData[0].Name + " " + docData[0].Surname; ViewBag.doctor = docData; return(View(sickLeave)); }
public IActionResult PdfPrescription(int id) { var prescription = PrescriptionTable.GetDataById(id); var patData = PatientTable.GetPatientById(Properties.UserId); patData[0].Name = patData[0].Name + " " + patData[0].Surname; ViewBag.patient = patData; var doc = DoctorTable.GetDoctorIdByName(prescription[0].DoctorName); var docData = DoctorTable.GetSpecializationById(doc[0].Id); docData[0].Name = docData[0].Name + " " + docData[0].Surname; ViewBag.doctor = docData; return(View(prescription)); }
public IActionResult PdfResults(int id) { var results = ResultTable.GetDataByTestId(id); var docName = TestTable.GetDataById(results[0].TestId); var doc = DoctorTable.GetDoctorIdByName(docName[0].DoctorName); var docData = DoctorTable.GetSpecializationById(doc[0].Id); docData[0].Name = docData[0].Name + " " + docData[0].Surname; ViewBag.doctor = docData; var patData = PatientTable.GetPatientById(Properties.UserId); patData[0].Name = patData[0].Name + " " + patData[0].Surname; ViewBag.patient = patData; return(View(results)); }