コード例 #1
0
        public ActionResult SzpikDetails(int id)
        {
            var   result    = _context.Results.Include(h => h.SzpikTest).FirstOrDefault(i => i.Id == id);
            int   ID        = result.SzpikTest.Id;
            Szpik SzpikTest = _context.Szpiks.Find(ID);

            return(View(SzpikTest));
        }
コード例 #2
0
        public ActionResult Szpik(int id)
        {
            var model = new Szpik {
                isSzpik = false
            };

            return(View(model));
        }
コード例 #3
0
        public ActionResult Create(TSH model_TSH, T3T4 model_T3T4, Mocz model_Mocz, Szpik model_Szpik, BetaHCG model_HCG,
                                   Krzywa model_Krzywa, OGTT model_OGTT, Glukoza model_Glukoza, Morf model_Morf, Morf5 model_Morf5,
                                   Progesteron model_Progesteron, Testosteron model_Testosteron, Estrogen model_Estrogen,
                                   USGPiersi model_Piersi, USGSerca model_Serca, USGSzyi model_Szyi)
        {
            Result one = new Result();

            if (ModelState.IsValid)
            {
                if (model_TSH.isTSH == true)
                {
                    one.DoctorName = model_TSH.DocName;
                    one.TSHTest    = model_TSH;
                    one.ResultType = "Badanie TSH";
                }

                if (model_Glukoza.isGlukoza == true)
                {
                    one.DoctorName  = model_Glukoza.DocName;
                    one.GlukozaTest = model_Glukoza;
                    one.ResultType  = "Badanie poziomu glukozy";
                }

                if (model_Mocz.isMocz == true)
                {
                    one.DoctorName = model_Mocz.DocName;
                    one.MoczTest   = model_Mocz;
                    one.ResultType = "Posiew moczu";
                }

                if (model_Szpik.isSzpik == true)
                {
                    one.DoctorName = model_Szpik.DocName;
                    one.SzpikTest  = model_Szpik;
                    one.ResultType = "Barwienie szpiku";
                }


                if (model_HCG.isBeta == true)
                {
                    one.DoctorName  = model_HCG.DocName;
                    one.BetaHCGTest = model_HCG;
                    one.ResultType  = "Badanie hormonu BetaHCG";
                }

                if (model_Krzywa.isKrzywa == true)
                {
                    one.DoctorName = model_Krzywa.DocName;
                    one.KrzywaTest = model_Krzywa;
                    one.ResultType = "Krzywa cukrowa";
                }

                if (model_OGTT.isOGTT == true)
                {
                    one.DoctorName = model_OGTT.DocName;
                    one.OGTTTest   = model_OGTT;
                    one.ResultType = "Badanie obciążenia glukozy";
                }

                if (model_Morf.isMorf == true)
                {
                    one.DoctorName = model_Morf.DocName;
                    one.MorfTest   = model_Morf;
                    one.ResultType = "Morfologia krwi";
                }

                if (model_Morf5.isMorf5 == true)
                {
                    one.DoctorName = model_Morf5.DocName;
                    one.Morf5Test  = model_Morf5;
                    one.ResultType = "Morfologia krwi z rozmazem";
                }

                if (model_Progesteron.isProgesteron == true)
                {
                    one.DoctorName      = model_Progesteron.DocName;
                    one.ProgesteronTest = model_Progesteron;
                    one.ResultType      = "Badanie poziomu progesteronu";
                }

                if (model_Estrogen.isEstrogen == true)
                {
                    one.DoctorName   = model_Estrogen.DocName;
                    one.EstrogenTest = model_Estrogen;
                    one.ResultType   = "Badanie poziomu estrogenów";
                }

                if (model_Testosteron.isTestosteron == true)
                {
                    one.DoctorName      = model_Testosteron.DocName;
                    one.TestosteronTest = model_Testosteron;
                    one.ResultType      = "Badanie poziomu testosteronu";
                }

                if (model_Serca.isUSGSerca == true)
                {
                    one.DoctorName = model_Serca.DocName;

                    var files = HttpContext.Request.Form.Files;
                    foreach (var Image in files)
                    {
                        if (Image != null && Image.Length > 0)
                        {
                            var file    = Image;
                            var uploads = Path.Combine(_appEnvironment.WebRootPath, "uploads\\img");
                            if (file.Length > 0)
                            {
                                var fileName = Guid.NewGuid().ToString().Replace("-", "") + Path.GetExtension(file.FileName);
                                using (var fileStream = new FileStream(Path.Combine(uploads, fileName), FileMode.Create))
                                {
                                    file.CopyTo(fileStream);
                                    model_Serca.ImageName = fileName;
                                }
                            }
                        }
                    }
                    one.USGSercaTest = model_Serca;
                    one.ResultType   = "USG serca";
                }

                if (model_Piersi.isUSGPiersi == true)
                {
                    one.DoctorName = model_Piersi.DocName;

                    var files = HttpContext.Request.Form.Files;
                    foreach (var Image in files)
                    {
                        if (Image != null && Image.Length > 0)
                        {
                            var file    = Image;
                            var uploads = Path.Combine(_appEnvironment.WebRootPath, "uploads\\img");
                            if (file.Length > 0)
                            {
                                var fileName = Guid.NewGuid().ToString().Replace("-", "") + Path.GetExtension(file.FileName);
                                using (var fileStream = new FileStream(Path.Combine(uploads, fileName), FileMode.Create))
                                {
                                    file.CopyTo(fileStream);
                                    model_Piersi.ImageName = fileName;
                                }
                            }
                        }
                    }
                    one.USGPiersiTest = model_Piersi;
                    one.ResultType    = "USG piersi";
                }


                if (model_Szyi.isUSGSzyi == true)
                {
                    one.DoctorName = model_Szyi.DocName;

                    var files = HttpContext.Request.Form.Files;
                    foreach (var Image in files)
                    {
                        if (Image != null && Image.Length > 0)
                        {
                            var file    = Image;
                            var uploads = Path.Combine(_appEnvironment.WebRootPath, "uploads\\img");
                            if (file.Length > 0)
                            {
                                var fileName = Guid.NewGuid().ToString().Replace("-", "") + Path.GetExtension(file.FileName);
                                using (var fileStream = new FileStream(Path.Combine(uploads, fileName), FileMode.Create))
                                {
                                    file.CopyTo(fileStream);
                                    model_Szyi.ImageName = fileName;
                                }
                            }
                        }
                    }
                    one.USGSzyiTest = model_Szyi;
                    one.ResultType  = "USG szyi";
                }

                if (model_T3T4.isT3T4 == true)
                {
                    one.DoctorName = model_T3T4.DocName;
                    one.T3T4Test   = model_T3T4;
                    one.ResultType = "Badanie poziomu T3 i T4";
                }
                one.visit = _visits.GetById(CartHelper.GetVisitId());
                _result.Add(one);
            }
            return(RedirectToAction("ChooseRes", new { id = one.visit.Id }));
        }