Пример #1
0
        public PatientProfileViewModel()
        {
            Transfer    = new PatientTransfer();
            Patient     = new Patient();
            Program     = new PatientProgram();
            Regimen     = new PatientRegimen();
            Examination = new PatientExamination();

            DateOfBirth  = DateTime.Now.ToString("dd/MM/yyyy");
            RegimenDate  = DateTime.Now.ToString("dd/MM/yyyy");
            OutcomeDate  = DateTime.Now.ToString("dd/MM/yyyy");
            TransferDate = DateTime.Now.ToString("dd/MM/yyyy");

            Centers  = new List <SelectListItem>();
            Facility = new List <SelectListItem>();
            Outcomes = new List <SelectListItem>();
            ExamOpts = new List <SelectListItem>();
            Regimens = new List <SelectListItem>();

            LatestVitals = new Vitals();
            Examinations = new List <Examinations>();
            Contacts     = new List <Contacts>();

            Gender = new PatientService().InitializeGender();
        }
Пример #2
0
        public IActionResult TransferPatient()
        {
            DateTime date = DateTime.ParseExact(ProfileModel.TransferDate, "dd/MM/yyyy", CultureInfo.InvariantCulture);

            PatientProgram pp = ProfileModel.Program;

            pp.DateCompleted = date;
            pp.UpdateTransfer();

            PatientTransfer tf = ProfileModel.Transfer;

            tf.Date    = date;
            tf.Program = pp;
            tf.Save(HttpContext);

            return(LocalRedirect("/patients/profile/" + ProfileModel.Patient.GetUuid()));
        }