Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            PacsReport pacsReport = db.PacsReports.Find(id);

            db.PacsReports.Remove(pacsReport);
            int patientId = pacsReport.PatientId.Value;

            db.SaveChanges();
            return(RedirectToAction("List", new { id = patientId }));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "PacsReportId,PacsCode,CheckDate,DicomFileName,PreDiagnose,CheckPoint,ImageDesc,ImagingDiagnosis,ReportDate")] PacsReport pacsReport)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pacsReport).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("List", new { id = pacsReport.PatientId }));
     }
     return(View(pacsReport));
 }
Esempio n. 3
0
        // GET: PacsReports/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PacsReport pacsReport = db.PacsReports.Find(id);

            if (pacsReport == null)
            {
                return(HttpNotFound());
            }
            return(View(pacsReport));
        }
Esempio n. 4
0
 public string FillReport(int id, FillReportViewModel fillreport)
 {
     if (ModelState.IsValid)
     {
         PacsReport report      = db.PacsReports.Find(id);
         var        currentUser = db.Users.Find(User.Identity.GetUserId());
         report.ReportUser  = currentUser;
         report.ReportDate  = DateTime.Now;
         report.ReportState = ReportStateEnum.rsFilledReport;
         //db.Entry(currentUser).State = EntityState.Unchanged;
         db.Entry(report).State = EntityState.Modified;
         db.SaveChanges();
         return("保存成功");
     }
     return("保存失败");
 }
Esempio n. 5
0
        public ActionResult FillReport(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PacsReport pacsReport = db.PacsReports.Find(id);

            if (pacsReport == null)
            {
                return(HttpNotFound());
            }
            FillReportViewModel report = new FillReportViewModel();

            report.ImageDesc        = pacsReport.ImageDesc;
            report.ImagingDiagnosis = pacsReport.ImagingDiagnosis;
            return(View(report));
        }
Esempio n. 6
0
        public ActionResult DicomView(int id)
        {
            PacsReport pacsReport = db.PacsReports.Find(id);

            if (pacsReport == null)
            {
                return(HttpNotFound());
            }
            ViewBag.pacsReport = pacsReport;
            DicomParseHelper helper = new DicomParseHelper(pacsReport.DicomFileName);

            ViewData.Model = new DicomViewData()
            {
                DataItemList  = helper.GetDataList(),
                ImageItemList = helper.ImageList
            };

            return(View());
        }
Esempio n. 7
0
        public ActionResult Create(int id, [Bind(Include = "PacsReportId,PacsCode,CheckDate,DicomFileName,PreDiagnose,CheckPoint,ImageDesc,ImagingDiagnosis,ReportDate")] PacsReport pacsReport)
        {
            if (ModelState.IsValid)
            {
                var currentUser = db.Users.Find(User.Identity.GetUserId());
                pacsReport.Uploader      = currentUser;
                pacsReport.ReportState   = ReportStateEnum.rsUploadDicom;
                pacsReport.DicomFileName = "";
                pacsReport.PatientId     = id;
                db.PacsReports.Add(pacsReport);
                db.SaveChanges();

                pacsReport.DicomFileName   = SaveDicomFile(id);
                db.Entry(pacsReport).State = EntityState.Modified;

                db.SaveChanges();

                return(RedirectToAction("List", new { id = id }));
            }

            return(View(pacsReport));
        }