예제 #1
0
        public ResponsePatient Get(string identification)
        {
            ResponsePatient ans = null;

            try
            {
                if (ValidateSecurityAPI())
                {
                    ans = PatientModel.GetPatient(identification);
                }
                else
                {
                    ans = new ResponsePatient()
                    {
                        IsSuccessful = false, ResponseMessage = AppManagement.MSG_API_Validation_Failure
                    };
                }
            }
            catch (Exception ex)
            {
                ans = new ResponsePatient()
                {
                    IsSuccessful = false, ResponseMessage = AppManagement.MSG_GenericExceptionError
                };
            }

            return(ans);
        }
        // GET: PatientsList/Edit/5
        public ActionResult Edit(int id)
        {
            PatientModel     Model     = new PatientModel();
            Patient          patient   = new Patient(Model.GetPatient(id));
            PatientViewModel viewModel = new PatientViewModel(patient);

            return(View(viewModel));
        }
예제 #3
0
        // GET: Patient/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            /*IBL bl=new bl()
            *  bl.getpatient()*/
            PatientViewModel patientViewModel = patientModel.GetPatient((int)id);

            if (patientViewModel == null)
            {
                return(HttpNotFound());
            }
            return(View(patientViewModel));
        }
        public ActionResult Delete(Patient p)
        {
            //var patient = (Patient)TempData["patient"];
            PatientModel Model   = new PatientModel();
            Patient      patient = new Patient(Model.GetPatient(p.ID));

            Model.Delete(patient);
            return(RedirectToAction("Index"));
        }
        // GET: PatientsList/Delete/5
        public ActionResult Delete(int id)
        {
            PatientModel     Model     = new PatientModel();
            Patient          patient   = new Patient(Model.GetPatient(id));
            PatientViewModel viewModel = new PatientViewModel(patient);

            //TempData["patient"] = patient;
            return(View(viewModel));
        }
예제 #6
0
        // GET: Prescription/Create
        public ActionResult Create(int?Id)
        {
            var patientModel = new PatientModel();

            PatientViewModel             patientViewModel    = patientModel.GetPatient((int)Id);
            PatientPrescriptionViewModel patientPrescription = new PatientPrescriptionViewModel();

            patientPrescription.patientList = patientViewModel;

            return(View(patientPrescription));
        }
예제 #7
0
        // GET: Prescription

        // GET: Prescription/Details/5
        public ActionResult History(int?Id)
        {
            if (Id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            /*IBL bl=new bl()
            *  bl.getpatient()*/
            var patientModel = new PatientModel();
            PatientViewModel patientViewModel = patientModel.GetPatient((int)Id);
            var prescription = prescriptionModel.GetPrescriptions();
            PatientPrescriptionViewModel patientPrescription = new PatientPrescriptionViewModel();

            patientPrescription.patientList      = patientViewModel;
            patientPrescription.prescriptionList = prescription;
            return(View(patientPrescription));
        }
        public ActionResult Index(string TZ)
        {
            if (TZ == "")
            {
                return(Index());
            }

            PatientModel Model   = new PatientModel();
            Patient      patient = new Patient();

            patient = Model.GetPatient(Convert.ToInt32(TZ));

            TempData["patient"] = patient;
            if (Request.Form["details"] != null)
            {
                return(RedirectToAction("Details"));
            }
            else
            {
                return(RedirectToAction("Check", "Doctor"));
            }
        }