예제 #1
0
        public Qs2000State GetState(TFileData query)
        {
            string    testsFile = GlobalConfigVars.DbPath + "\\" + "Tests.qsd";
            TestsFile test      = ParseTestsFile(testsFile);

            string tfile = GlobalConfigVars.DbPath + "\\" + GetTFile(query.SeqNum);
            TFile  tFile = ParseTFile(tfile);
            string dfile = GlobalConfigVars.DbPath + "\\" + GetDFile(query.SeqNum);
            DFile  dFile = ParseDFile(dfile, tFile.Header.Identity.Name, tFile.Header.Identity.GelSize);
            // 查找配置
            TestProperties tp = test.Tests.Where(t => t.Identity.Equals(tFile.Header.Identity)).First();

            int         idx   = query.Id - 1;
            Qs2000State state = new Qs2000State
            {
                SeqNum      = query.SeqNum.ToString(),
                SampleNum   = query.Id.ToString(),
                SampleId    = tFile.Datas[idx].Patient.Demographic[0],
                ScannedDate = tFile.Datas[idx].ScanDate.ToString("yyyy/MM/dd HH:mm:ss"),
                Scan        = dFile.Scans[idx].DestBytes,
                TestType    = tFile.Header.Identity.Name
            };

            if (!tp.bIFE)
            {
                StdScan scan = dFile.Scans[idx] as StdScan;
                state.Result = new Qs2000Result(scan.Data, scan.Fraction, tp.Fraction);
            }
            return(state);
        }
예제 #2
0
        public Qs2000State GetState(TFileData query)
        {
            string testsFile = GlobalConfigVars.DbPath + "\\" + "Tests.qsd";
            TestsFile test = ParseTestsFile(testsFile);

            string tfile = GlobalConfigVars.DbPath + "\\" + GetTFile(query.SeqNum);
            TFile tFile = ParseTFile(tfile);
            string dfile = GlobalConfigVars.DbPath + "\\" + GetDFile(query.SeqNum);
            DFile dFile = ParseDFile(dfile, tFile.Header.Identity.Name, tFile.Header.Identity.GelSize);
            // 查找配置
            TestProperties tp = test.Tests.Where(t => t.Identity.Equals(tFile.Header.Identity)).First();

            int idx = query.Id - 1;
            Qs2000State state = new Qs2000State
            {
                SeqNum = query.SeqNum.ToString(),
                SampleNum = query.Id.ToString(),
                SampleId = tFile.Datas[idx].Patient.Demographic[0],
                ScannedDate = tFile.Datas[idx].ScanDate.ToString("yyyy/MM/dd HH:mm:ss"),
                Scan = dFile.Scans[idx].DestBytes,
                TestType = tFile.Header.Identity.Name
            };
            if (!tp.bIFE)
            {
                StdScan scan = dFile.Scans[idx] as StdScan;
                state.Result = new Qs2000Result(scan.Data, scan.Fraction, tp.Fraction);
            }
            return state;
        }