public CytologyReportsModel GetCytologyReportsList()
        {
            CytologyReportsModel model = new CytologyReportsModel();

            model.CytologyReportsModelList = new List <CytologyReportsModel>();
            using (EHMSEntities ent = new EHMSEntities())
            {
                var result = ent.CytologyReports.Where(x => x.Status == true);
                foreach (var item in result)
                {
                    var Viewmodel = new CytologyReportsModel()
                    {
                        CytologyId        = item.CytologyId,
                        CytopathNo        = item.CytopathNo,
                        ProcedureNote     = item.ProcedureNote,
                        Comments          = item.Comments,
                        Site              = item.Site,
                        Diagnosis         = item.Diagnosis,
                        DateOfDispatch    = (DateTime)item.DateOfDispatch,
                        DateOfReceipt     = (DateTime)item.DateOfReceipt,
                        PatientId         = (int)item.PatientId,
                        RefDocId          = (int)item.RefDocId,
                        RegId             = (int)item.RegId,
                        WardOrOpd         = item.WardOrOpd,
                        ClinicalFeatures  = item.ClinicalFeatures,
                        Speciman          = item.Speciman,
                        MiicroDescription = item.MiicroDescription
                    };

                    model.CytologyReportsModelList.Add(Viewmodel);
                }

                return(model);
            }
        }
        public CytologyReportsModel GetCytologyReportByRegNumber(string CytopathNo, int RegisterId)
        {
            CytologyReportsModel model = new CytologyReportsModel();

            using (EHMSEntities ent = new EHMSEntities())
            {
                var ResultSingle = ent.CytologyReports.Where(x => x.RegId == RegisterId).FirstOrDefault();

                model.CytologyId        = ResultSingle.CytologyId;
                model.CytopathNo        = ResultSingle.CytopathNo;
                model.ProcedureNote     = ResultSingle.ProcedureNote;
                model.Comments          = ResultSingle.Comments;
                model.Site              = ResultSingle.Site;
                model.Diagnosis         = ResultSingle.Diagnosis;
                model.DateOfDispatch    = (DateTime)ResultSingle.DateOfDispatch;
                model.DateOfReceipt     = (DateTime)ResultSingle.DateOfReceipt;
                model.PatientId         = (int)ResultSingle.PatientId;
                model.RefDocId          = (int)ResultSingle.RefDocId;
                model.RegId             = (int)ResultSingle.RegId;
                model.WardOrOpd         = ResultSingle.WardOrOpd;
                model.ClinicalFeatures  = ResultSingle.ClinicalFeatures;
                model.Speciman          = ResultSingle.Speciman;
                model.MiicroDescription = ResultSingle.MiicroDescription;



                return(model);
            }
        }
        public bool CreateCytologyRpt(CytologyReportsModel model)
        {
            using (EHMSEntities ent = new EHMSEntities())
            {
                var cytoReprot = new CytologyReport()
                {
                    CytopathNo        = model.CytopathNo,
                    PatientId         = model.PatientId,
                    RefDocId          = model.RefDocId,
                    RegId             = model.RegId,
                    DateOfDispatch    = model.DateOfDispatch,
                    DateOfReceipt     = model.DateOfReceipt,
                    WardOrOpd         = model.WardOrOpd,
                    ClinicalFeatures  = model.ClinicalFeatures,
                    Speciman          = model.Speciman,
                    Site              = model.Site,
                    ProcedureNote     = model.ProcedureNote,
                    MiicroDescription = model.MiicroDescription,
                    Diagnosis         = model.Diagnosis,
                    Comments          = model.Comments,
                    Status            = true,
                    CreatedBy         = HospitalManagementSystem.Utility.GetCurrentLoginUserId(),
                    CreatedDate       = DateTime.Today,
                    Remarks           = "Patho"
                };
                ent.CytologyReports.Add(cytoReprot);
                ent.SaveChanges();


                return(true);
            }
        }
Beispiel #4
0
        public ActionResult ShowCytologyReport(string CytopathNo, string RegisterId)
        {
            CytologyReportsModel model = new CytologyReportsModel();

            model = pro.GetCytologyReportByRegNumber(CytopathNo, Convert.ToInt32(RegisterId));
            return(View(model));
        }
Beispiel #5
0
        public ActionResult CreateCytologyRpt(int id)
        {
            CytologyReportsModel model = new CytologyReportsModel();

            model.PatientId = id;
            return(View(model));
        }
Beispiel #6
0
        public ActionResult CytologyReportIndex()
        {
            CytologyReportsModel model = new CytologyReportsModel();

            model = pro.GetCytologyReportsList();
            return(View(model));
        }
Beispiel #7
0
        public ActionResult CreateCytologyRpt(CytologyReportsModel model)
        {
            if (ModelState.IsValid)
            {
                pro.CreateCytologyRpt(model);
            }

            //CytologyReportsModel model = new CytologyReportsModel();
            //return View(model);
            return(RedirectToAction("CytologyReportIndex"));
        }