Exemplo n.º 1
0
        //public ActionResult Delete_Click(int id)
        //{
        //    PatientContainer patientContainer = new PatientContainer();
        //    patientContainer.CallRemovePatientLinkedToDoctor(username, id);

        //    DeleteViewModel deleteViewModel = new DeleteViewModel
        //    {
        //        patients = GetPatients(username),
        //        deleteMessage = Resource.RemoveSuccess
        //    };

        //    return View("Delete", deleteViewModel);
        //}

        public ActionResult Status_RemovePatientFromDoctor(string ID)
        {
            string idD = User.FindFirstValue(ClaimTypes.NameIdentifier);

            PatientContainer patientContainer = new PatientContainer();

            patientContainer.CallRemovePatientLinkedToDoctor(idD, ID);

            RemoveViewModel removeViewModel = new RemoveViewModel
            {
                Confirmation = Resource.RemoveSuccess
            };

            return(View("Remove", removeViewModel));
        }
Exemplo n.º 2
0
        //not used in project anymore
        //public List<PatientViewModel> GetPatients(string username)
        //{
        //    PatientContainer patientContainer = new PatientContainer();
        //    List<PatientModel> patientsModel = patientContainer.RetreivePatientsLinkedToDoctor(username);
        //    List<PatientViewModel> patients = new List<PatientViewModel>();
        //    foreach (PatientModel patient in patientsModel)
        //    {
        //        PatientViewModel patientViewModel = new PatientViewModel
        //        {
        //            id = patient.id,
        //            Firstname = patient.Firstname,
        //            Lastname = patient.Lastname
        //        };
        //        patients.Add(patientViewModel);
        //    }
        //    return patients;
        //}

        public List <PatientViewModel> GetPatientStatus(string idP)
        {
            PatientContainer        patientContainer = new PatientContainer();
            List <PatientModel>     patientStatusM   = patientContainer.RetreivePatientStatus(idP);
            List <PatientViewModel> patientStatus    = new List <PatientViewModel>();

            foreach (PatientModel patientModel in patientStatusM)
            {
                PatientViewModel patientViewModel = new PatientViewModel
                {
                    statusViewModel = new StatusGraphViewModel
                    {
                        Date = patientModel.statusModel.Date,
                        INR  = patientModel.statusModel.INR
                    }
                };
                patientStatus.Add(patientViewModel);
            }
            return(patientStatus);
        }
Exemplo n.º 3
0
        //not used in project anymore
        //public ActionResult Delete_Start()
        //{
        //    DeleteViewModel deleteViewModel = new DeleteViewModel
        //    {
        //        patients = GetPatients(username)
        //    };
        //    return View("Delete", deleteViewModel);
        //}

        public ActionResult Overview_Start(string ID)
        {
            Comment comment = new Comment
            {
                Message = "Opmerking 1",
                Date    = DateTime.Now,
                State   = true
            };
            Comment comment2 = new Comment
            {
                Message = "Opmerking 2",
                Date    = DateTime.Now,
                State   = false
            };
            List <Comment> comments = new List <Comment>();

            comments.Add(comment);
            comments.Add(comment2);
            OverviewViewModel overviewViewModel = new OverviewViewModel
            {
                patientStatus = GetPatientStatus(ID),
                comments      = comments
            };

            HttpContext.Session.SetString("patientId", ID);
            if (overviewViewModel.patientStatus.Count > 0)
            {
                PatientContainer patientContainer = new PatientContainer();
                PatientModel     patientModel     = patientContainer.RetreivePatientAdditionalInfo(ID);
                overviewViewModel.patientViewModel = new PatientViewModel
                {
                    UserId      = ID,
                    Firstname   = patientModel.Firstname,
                    Lastname    = patientModel.Lastname,
                    Phonenumber = patientModel.Phonenumber,
                    Email       = patientModel.Email,
                    DateOfBirth = patientModel.DateOfBirth
                };
            }
            return(View("Overview", overviewViewModel));
        }