private bool Device;//0代表DS,1代表PL

        public Query_detail(Query.single_record record)
        {
            InitializeComponent();

            DetailsShow(record);
            DetailPrint(record);
        }
Example #2
0
 public void show(Query.single_record record)
 {
     PLtype.Text        = record.type;
     PLsample_id.Text   = record.sample_ID;
     PLaap.Text         = record.test_aap;
     PLtest_time.Text   = record.test_Time;
     PLsample_kind.Text = record.test_kind;
     PLdevice.Text      = record.test_Device;
     PLbarcode.Text     = record.barcode;
 }
 public void show(Query.single_record record)
 {
     DStype.Text        = record.type;
     DSsample_id.Text   = record.sample_ID;
     DSdoctor.Text      = record.doctor;
     DSpatient_id.Text  = record.patiennt_ID;
     DStest_time.Text   = record.test_Time;
     DSdepartment.Text  = record.department;
     DSfirst_name.Text  = record.patient_Name;
     DSsample_kind.Text = record.test_kind;
     DSarea.Text        = record.area;
     DSsex.Text         = record.patient_Sex;
     DSdevice.Text      = record.test_Device;
     DSbed.Text         = record.bed;
 }
Example #4
0
        public void show(Query.single_record record)
        {
            ChartValues <double> list_pac = new ChartValues <double>();

            for (int i = 0; i < 5; i++)
            {
                list_pac.Add(0.0);
            }
            ChartValues <double> list_rbc = new ChartValues <double>();
            ChartValues <double> list_plt = new ChartValues <double>();

            //label_PAC.Content = "test";
            foreach (var single in record.result)
            {
                if (single.item == "RBCHist" || single.item == "PLTHist" || single.item == "PACBit" || single.item == "PAC1" ||
                    single.item == "PAC2" || single.item == "PAC3" || single.item == "PAC4" || single.item == "PAC5" ||
                    single.item == "PAC6" || single.item == "PAC7" || single.item == "PAC8")
                {
                    if (single.item == "RBCHist")
                    {
                        for (int i = 0, j = 0; i < single.result.Length / 2; i++)
                        {
                            int Yaxis = Convert.ToInt16(single.result.Substring(j, 2), 16);
                            list_rbc.Add(Yaxis);

                            j = j + 2;
                        }
                    }
                    if (single.item == "PLTHist")
                    {
                        for (int i = 0, j = 0; i < single.result.Length / 2; i++)
                        {
                            int Yaxis = Convert.ToInt16(single.result.Substring(j, 2), 16);
                            list_plt.Add(Yaxis);
                            j = j + 2;
                        }
                    }
                    if (single.item == "PAC1")
                    {
                        list_pac[0] = Convert.ToInt16(single.result);
                    }
                    if (single.item == "PAC2")
                    {
                        list_pac[1] = Convert.ToInt16(single.result);
                    }
                    if (single.item == "PAC3")
                    {
                        list_pac[2] = Convert.ToInt16(single.result);
                    }
                    if (single.item == "PAC4")
                    {
                        list_pac[3] = Convert.ToInt16(single.result);
                    }
                    if (single.item == "PAC5")
                    {
                        list_pac[4] = Convert.ToInt16(single.result);
                    }
                    continue;
                }
            }

            LVC_PAC.Series = new SeriesCollection
            {
                new LineSeries
                {
                    Values            = list_pac,
                    Fill              = Brushes.Transparent,
                    PointGeometrySize = 6
                }
            };
            LVC_RBC.Series = new SeriesCollection
            {
                new LineSeries
                {
                    Values        = list_rbc,
                    PointGeometry = null,
                    Fill          = Brushes.OrangeRed,
                    Stroke        = Brushes.OrangeRed
                }
            };
            LVC_PLT.Series = new SeriesCollection
            {
                new LineSeries
                {
                    Values        = list_plt,
                    PointGeometry = null,
                    Fill          = Brushes.YellowGreen,
                    Stroke        = Brushes.YellowGreen
                }
            };
        }
 public void show(Query.single_record record)
 {
     DotListPAC            = new ObservableCollection <dot>();
     DotListRBC            = new ObservableCollection <dot>();
     DotListPLT            = new ObservableCollection <dot>();
     chart_PAC.ItemsSource = DotListPAC;
     chart_RBC.ItemsSource = DotListRBC;
     chart_PLT.ItemsSource = DotListPLT;
     foreach (var single in record.result)
     {
         if (single.item == "RBCHist" || single.item == "PLTHist" || single.item == "PACBit" || single.item == "PAC1" ||
             single.item == "PAC2" || single.item == "PAC3" || single.item == "PAC4" || single.item == "PAC5" ||
             single.item == "PAC6" || single.item == "PAC7" || single.item == "PAC8")
         {
             if (single.item == "RBCHist")
             {
                 for (int i = 0, j = 0; i < single.result.Length / 2; i++)
                 {
                     dot singledot = new dot();
                     singledot.Xaxis = i;
                     singledot.Yaxis = Convert.ToInt16(single.result.Substring(j, 2), 16);
                     Dispatcher.Invoke(new Action(() =>
                     {
                         DotListRBC.Add(singledot);
                     }));
                     j = j + 2;
                 }
             }
             if (single.item == "PLTHist")
             {
                 for (int i = 0, j = 0; i < single.result.Length / 2; i++)
                 {
                     dot singledot = new dot();
                     singledot.Xaxis = i;
                     singledot.Yaxis = Convert.ToInt16(single.result.Substring(j, 2), 16);
                     Dispatcher.Invoke(new Action(() =>
                     {
                         DotListPLT.Add(singledot);
                     }));
                     j = j + 2;
                 }
             }
             if (single.item == "PAC1")
             {
                 Dispatcher.Invoke(new Action(() =>
                 {
                     DotListPAC.Add(new dot {
                         Xaxis = 1, Yaxis = Convert.ToInt16(single.result)
                     });
                 }));
             }
             if (single.item == "PAC2")
             {
                 Dispatcher.Invoke(new Action(() =>
                 {
                     DotListPAC.Add(new dot {
                         Xaxis = 2, Yaxis = Convert.ToInt16(single.result)
                     });
                 }));
             }
             if (single.item == "PAC3")
             {
                 Dispatcher.Invoke(new Action(() =>
                 {
                     DotListPAC.Add(new dot {
                         Xaxis = 3, Yaxis = Convert.ToInt16(single.result)
                     });
                 }));
             }
             if (single.item == "PAC4")
             {
                 Dispatcher.Invoke(new Action(() =>
                 {
                     DotListPAC.Add(new dot {
                         Xaxis = 4, Yaxis = Convert.ToInt16(single.result)
                     });
                 }));
             }
             if (single.item == "PAC5")
             {
                 Dispatcher.Invoke(new Action(() =>
                 {
                     DotListPAC.Add(new dot {
                         Xaxis = 5, Yaxis = Convert.ToInt16(single.result)
                     });
                 }));
             }
             continue;
         }
     }
 }
        private void DetailsShow(Query.single_record record)
        {
            List <data_detailSource> result = new List <data_detailSource>();
            int len = record.result.Count;

            if (record.test_Device == "DS_800" || record.test_Device == "DS_400")
            {
                PL_data.Visibility  = Visibility.Collapsed;
                PL_chart.Visibility = Visibility.Collapsed;
                DS_data.Visibility  = Visibility.Visible;
                DS_data.show(record);
                //这个函数里面是直接赋值的,非绑定
            }
            if (record.test_Device == "PL_12" || record.test_Device == "PL_16")
            {
                DS_data.Visibility = Visibility.Collapsed;
                PL_data.Visibility = Visibility.Visible;
                PL_data.show(record);
                PL_chart.Visibility = Visibility.Visible;
                PL_chart.show(record);
            }
            else
            {
                //还是DS生化仪
                PL_data.Visibility  = Visibility.Collapsed;
                PL_chart.Visibility = Visibility.Collapsed;
                DS_data.Visibility  = Visibility.Visible;
                DS_data.show(record);
                //这个函数里面是直接赋值的,非绑定
            }
            foreach (var name in record.result)
            {
                if (name.item == "PAC1" || name.item == "PAC2")
                {
                    continue;
                }
                if (name.item == "PAC3" || name.item == "PAC4")
                {
                    continue;
                }
                if (name.item == "PAC5" || name.item == "PAC6")
                {
                    continue;
                }
                if (name.item == "PAC7" || name.item == "PAC8")
                {
                    continue;
                }
                if (name.item == "PACBit" || name.item == "PLTHist" || name.item == "RBCHist")
                {
                    continue;
                }
                data_detailSource res = new data_detailSource();
                res.item        = name.item;
                res.full_item   = name.fullname;
                res.result      = name.result;
                res.unit        = name.unit;
                res.normal_high = name.normal_high;
                res.normal_low  = name.normal_low;
                res.indicate    = name.indicate;
                result.Add(res);
            }
            this.Query_detail_datagrid.ItemsSource = result;//绑定进去
        }
        private void DetailPrint(Query.single_record record)
        {
            if (record.test_Device == "DS_800" || record.test_Device == "DS_400")
            {
                Device        = false;
                DsPrintDetail = new DetailInfoPrintDS
                {
                    DSTYPE        = record.type,
                    DSSAMPLE_ID   = record.sample_ID,
                    DSDOCTOR      = record.doctor,
                    DSPATIENT_ID  = record.patiennt_ID,
                    DSTEST_TIME   = record.test_Time,
                    DSDEPARTMENT  = record.department,
                    DSSAMPLE_KIND = record.test_kind,
                    DSAREA        = record.area,
                    DSSEX         = record.patient_Sex,
                    DSDEVICE      = record.test_Device,
                    DSBED         = record.bed
                };
                foreach (Query.single_result single in record.result)
                {
                    DsPrintDetail.TableDetails.Add(new data_detailSource
                    {
                        item        = single.item,
                        full_item   = single.fullname,
                        result      = single.result,
                        unit        = single.unit,
                        normal_low  = single.normal_low,
                        normal_high = single.normal_high,
                        indicate    = single.indicate
                    });
                }
            }
            if (record.test_Device == "PL_12" || record.test_Device == "PL_16")
            {
                Device        = true;
                PlPrintDetail = new DetailInfoPrintPL
                {
                    PLTYPE        = record.type,
                    PLSAMPLE_ID   = record.sample_ID,
                    PLAAP         = record.test_aap,
                    PLTEST_TIME   = record.test_Time,
                    PLSAMPLE_KIND = record.test_kind,
                    PLDEVICE      = record.test_Device,
                    PLBARCODE     = record.barcode
                };

                foreach (Query.single_result single in record.result)
                {
                    if (single.item == "PAC1" || single.item == "PAC2")
                    {
                        continue;
                    }
                    if (single.item == "PAC3" || single.item == "PAC4")
                    {
                        continue;
                    }
                    if (single.item == "PAC5" || single.item == "PAC6")
                    {
                        continue;
                    }
                    if (single.item == "PAC7" || single.item == "PAC8")
                    {
                        continue;
                    }
                    if (single.item == "PACBit" || single.item == "PLTHist" || single.item == "RBCHist")
                    {
                        continue;
                    }
                    PlPrintDetail.TableDetails.Add(new data_detailSource
                    {
                        item        = single.item,
                        full_item   = single.fullname,
                        result      = single.result,
                        unit        = single.unit,
                        normal_low  = single.normal_low,
                        normal_high = single.normal_high,
                        indicate    = single.indicate
                    });
                }
            }
            else
            {
                //还是DS生化仪
                Device        = false;
                DsPrintDetail = new DetailInfoPrintDS
                {
                    DSTYPE        = record.type,
                    DSSAMPLE_ID   = record.sample_ID,
                    DSDOCTOR      = record.doctor,
                    DSPATIENT_ID  = record.patiennt_ID,
                    DSTEST_TIME   = record.test_Time,
                    DSDEPARTMENT  = record.department,
                    DSSAMPLE_KIND = record.test_kind,
                    DSAREA        = record.area,
                    DSSEX         = record.patient_Sex,
                    DSDEVICE      = record.test_Device,
                    DSBED         = record.bed
                };
                foreach (Query.single_result single in record.result)
                {
                    DsPrintDetail.TableDetails.Add(new data_detailSource
                    {
                        item        = single.item,
                        full_item   = single.fullname,
                        result      = single.result,
                        unit        = single.unit,
                        normal_low  = single.normal_low,
                        normal_high = single.normal_high,
                        indicate    = single.indicate
                    });
                }
            }
        }