public string GetLaboratoryServices(DateTime FromDate, DateTime ToDate)
        {
            LaboratoryServices labServices = new LaboratoryServices();
            // DanpheHTTPResponse<DynamicReport> responseData1 = new DanpheHTTPResponse<DynamicReport>();
            DanpheHTTPResponse <LaboratoryServices> responseData = new DanpheHTTPResponse <LaboratoryServices>();

            try
            {
                GovernmentReportDbContext govreportingDbContext = new GovernmentReportDbContext(connString);
                LaboratoryServices        HaematologyResult     = govreportingDbContext.GetHaematology(FromDate, ToDate);
                labServices.HaematologyModel0 = HaematologyResult.HaematologyModel0;
                labServices.HaematologyModel1 = HaematologyResult.HaematologyModel1;

                LaboratoryServices ImmunologyResult = govreportingDbContext.GetImmunology(FromDate, ToDate);
                labServices.ImmunologyModel0 = ImmunologyResult.ImmunologyModel0;
                labServices.ImmunologyModel1 = ImmunologyResult.ImmunologyModel1;

                LaboratoryServices BiochemistryResult = govreportingDbContext.GetBiochemistry(FromDate, ToDate);
                labServices.BiochemistryModel0 = BiochemistryResult.BiochemistryModel0;
                labServices.BiochemistryModel1 = BiochemistryResult.BiochemistryModel1;

                LaboratoryServices BacteriologyResult = govreportingDbContext.GetBacteriology(FromDate, ToDate);
                labServices.BacteriologyModel0 = BacteriologyResult.BacteriologyModel0;

                LaboratoryServices CytologyResult = govreportingDbContext.GetCytology(FromDate, ToDate);
                labServices.CytologyModel0 = CytologyResult.CytologyModel0;

                LaboratoryServices VirologyResult = govreportingDbContext.GetVirology(FromDate, ToDate);
                labServices.VirologyModel0 = VirologyResult.VirologyModel0;

                LaboratoryServices ImmunohistochemistryResult = govreportingDbContext.GetImmunohistochemistry(FromDate, ToDate);
                labServices.ImmunohistochemistryModel0 = ImmunohistochemistryResult.ImmunohistochemistryModel0;

                LaboratoryServices HistologyResult = govreportingDbContext.GetHistology(FromDate, ToDate);
                labServices.HistologyModel0 = HistologyResult.HistologyModel0;

                LaboratoryServices ParasitologyResult = govreportingDbContext.GetParasitology(FromDate, ToDate);
                labServices.ParasitologyModel0 = ParasitologyResult.ParasitologyModel0;

                LaboratoryServices CardiacenzymesResult = govreportingDbContext.GetCardiacenzymes(FromDate, ToDate);
                labServices.CardiacenzymesModel0 = CardiacenzymesResult.CardiacenzymesModel0;

                LaboratoryServices HormonesendocrinologyResult = govreportingDbContext.GetHormonesendocrinology(FromDate, ToDate);
                labServices.HormonesendocrinologyModel0 = HormonesendocrinologyResult.HormonesendocrinologyModel0;

                responseData.Status  = "OK";
                responseData.Results = labServices;
            }
            catch (Exception ex)
            {
                //Insert exception details into database table.
                responseData.Status       = "Failed";
                responseData.ErrorMessage = ex.Message;
            }
            return(DanpheJSONConvert.SerializeObject(responseData));
        }
Ejemplo n.º 2
0
        public LaboratoryServices GetHaematology(DateTime FromDate, DateTime ToDate)
        {
            List <SqlParameter> paramsList = new List <SqlParameter>();

            paramsList.Add(new SqlParameter("@FromDate", FromDate));
            paramsList.Add(new SqlParameter("@ToDate", ToDate));
            DataSet            dsLabServicesHematology = GetDatasetFromStoredProc("SP_Report_Lab_Haematology", paramsList, this.connStr);
            LaboratoryServices obj = new LaboratoryServices();

            obj.HaematologyModel0 = JsonConvert.SerializeObject(dsLabServicesHematology.Tables[0]);
            obj.HaematologyModel1 = JsonConvert.SerializeObject(dsLabServicesHematology.Tables[1]);
            return(obj);
        }
Ejemplo n.º 3
0
        public LaboratoryServices GetCardiacenzymes(DateTime FromDate, DateTime ToDate)
        {
            List <SqlParameter> paramsList = new List <SqlParameter>();

            paramsList.Add(new SqlParameter("@FromDate", FromDate));
            paramsList.Add(new SqlParameter("@ToDate", ToDate));

            DataSet            dsLabServicesCardiacenzymes = GetDatasetFromStoredProc("SP_Report_Lab_CardiacEnzymes", paramsList, this.connStr);
            LaboratoryServices obj = new LaboratoryServices();

            obj.CardiacenzymesModel0 = JsonConvert.SerializeObject(dsLabServicesCardiacenzymes.Tables[0]);

            return(obj);
        }
Ejemplo n.º 4
0
        public LaboratoryServices GetImmunohistochemistry(DateTime FromDate, DateTime ToDate)
        {
            List <SqlParameter> paramsList = new List <SqlParameter>();

            paramsList.Add(new SqlParameter("@FromDate", FromDate));
            paramsList.Add(new SqlParameter("@ToDate", ToDate));

            DataSet            dsLabServicesImmunohistochemistry = GetDatasetFromStoredProc("SP_Report_Lab_ImmunoHistoChemistry", paramsList, this.connStr);
            LaboratoryServices obj = new LaboratoryServices();

            obj.ImmunohistochemistryModel0 = JsonConvert.SerializeObject(dsLabServicesImmunohistochemistry.Tables[0]);

            return(obj);
        }
Ejemplo n.º 5
0
        public async void refreshGridV()
        {
            dataGridView1.DataSource = null;
            dataGridView1.Rows.Clear();
            dataGridView1.Columns.Clear();
            dataGridView1.Refresh();

            dataGridView1.DataSource = await aS.getAll();

            dataGridView1.Columns[0].Visible = false;
            dataGridView1.Columns[1].Visible = false;
            dataGridView1.Columns.Add("Laboratory number", "Laboratory number");
            dataGridView1.Columns.Add("", "");
            dataGridView1.Columns.Add("", "");
            dataGridView1.Columns["Description"].Width = 230;
            assigns = await aS.getAll();

            var lS = new LaboratoryServices();

            for (int i = 0; i < dataGridView1.RowCount; i++)
            {
                var row = dataGridView1.Rows[i];

                List <LaboratoryModel> labs = await lS.getAll();

                LaboratoryModel cLab;
                int             labID = Int32.Parse(row.Cells[1].Value.ToString());
                cLab = labs.FirstOrDefault(l => l.ID == labID);
                row.Cells["Laboratory number"].Value = cLab.Number;
                DataGridViewButtonCell bEdit = new DataGridViewButtonCell();
                bEdit.Value = "edit";
                row.Cells[dataGridView1.ColumnCount - 2] = bEdit;
                DataGridViewButtonCell bDelete = new DataGridViewButtonCell();
                bDelete.Value = "delete";
                row.Cells[dataGridView1.ColumnCount - 1] = bDelete;
            }
        }