songjun
2024-09-04 cc908053e0b5075fbfd27350b6da4b39bca9e550
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
using BatchService.Framework.Utility;
using PalGain.Core;
using sbcLabSystem.Data.Domain.Backstage;
using sbcLabSystem.Service.QC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
 
namespace sbcLabSystem.Models.Backstage
{
    public class CountModel
    {
        public void Calculation(int QCid)
        {
            var service = PalGainEngine.Instance.Resolve<QCService>();
            var distInfo = service.GetQcDistributions().FirstOrDefault(p => p.Id == QCid);
            if (distInfo != null && distInfo.QCDistributionRegisters.Count > 0)
            {
                AnswerInfoViewModel standmodel = JsonHelper.JsonDeserialize<AnswerInfoViewModel>(distInfo.AnswerJSON);
                var approvals = service.GetApprovals().Where(p => p.QCDistributionID == QCid);
 
                distInfo.QCDistributionRegisters.OrderBy(p => p.LabInfo.LabCode).ToList().ForEach(info =>
                {
                    Resultspercentage result = service.GetResultSpercentages()
                        .FirstOrDefault(p => p.QCDistributionId == QCid &&
                            p.QcDistributionRegisterId == info.Id);
                    if (result == null)
                    {
                        result = new Resultspercentage();
                    }
                    var standResult = new Resultspercentage();
                    result.ABO_Score = 0;
                    result.RH_Score = 0;
                    result.KangtiIdentity_Score = 0;
                    result.KangtiFilter_Score = 0;
                    result.JiaoChaPeiXing_Score = 0;
 
                    result.QCDistributionId = QCid;
                    result.QcDistributionRegisterId = info.Id;
                    #region 计算结果个数
                    if (info.AnswerJSON != null)
                    {
                        AnswerInfoViewModel model = JsonHelper.JsonDeserialize<AnswerInfoViewModel>(info.AnswerJSON);
                        this.SetValue(result, model);
                        this.SetValue(standResult, standmodel);
 
                        #region 算分
                        if (result.Abo1 != standResult.Abo1)
                        {
                            result.ABO_Score += approvals.FirstOrDefault(p => p.FieldName == "11" && p.FieldPatient == "1").Score;
                        }
                        if (result.Abo2 != standResult.Abo2)
                        {
                            result.ABO_Score += approvals.FirstOrDefault(p => p.FieldName == "11" && p.FieldPatient == "2").Score;
                        }
                        if (result.Abo3 != standResult.Abo3)
                        {
                            result.ABO_Score += approvals.FirstOrDefault(p => p.FieldName == "11" && p.FieldPatient == "3").Score;
                        }
                        if (result.RH1 != standResult.RH1)
                        {
                            result.RH_Score += approvals.FirstOrDefault(p => p.FieldName == "12" && p.FieldPatient == "1").Score;
                        }
                        if (result.RH2 != standResult.RH2)
                        {
                            result.RH_Score += approvals.FirstOrDefault(p => p.FieldName == "12" && p.FieldPatient == "2").Score;
                        }
                        if (result.RH3 != standResult.RH3)
                        {
                            result.RH_Score += approvals.FirstOrDefault(p => p.FieldName == "12" && p.FieldPatient == "3").Score;
                        }
 
                        double filter1_Score = 0, filter2_Score = 0, filter3_Score = 0;
                        if (result.KangTiFilter1 != standResult.KangTiFilter1)
                        {
                            filter1_Score = approvals.FirstOrDefault(p => p.FieldName == "21" && p.FieldPatient == "1").Score;
                            result.KangtiFilter_Score += filter1_Score;
                        }
                        if (result.KangTiFilter2 != standResult.KangTiFilter2)
                        {
                            filter2_Score = approvals.FirstOrDefault(p => p.FieldName == "21" && p.FieldPatient == "2").Score;
                            result.KangtiFilter_Score += filter2_Score;
                        }
                        if (result.KangTiFilter3 != standResult.KangTiFilter3)
                        {
                            filter3_Score = approvals.FirstOrDefault(p => p.FieldName == "21" && p.FieldPatient == "3").Score;
                            result.KangtiFilter_Score += filter3_Score;
                        }
                         
                        var scoreIdentityTemp = 0.0;
                        var scoreTemp = approvals.FirstOrDefault(p => p.FieldName == "22" && p.FieldPatient == "1").Score;
                        if (filter1_Score == 0)
                        {
                            if (result.KangTiIdentity1 != standResult.KangTiIdentity1)
                            {
                                if (result.KangTiIdentity1.Contains(standResult.KangTiIdentity1) ||
                                    result.KangTiIdentity1.IndexOf("UI") >= 0)
                                {
                                    scoreIdentityTemp = scoreTemp / 2;
                                    result.KangtiIdentity_Score += scoreIdentityTemp;
                                }
                                else
                                {
                                    scoreIdentityTemp = scoreTemp;
                                    result.KangtiIdentity_Score += scoreIdentityTemp;
                                }
                            }
                        }
 
                        scoreIdentityTemp = 0.0;
                        scoreTemp = approvals.FirstOrDefault(p => p.FieldName == "22" && p.FieldPatient == "2").Score;
                        if (filter1_Score == 0)
                        {
                            if (result.KangTiIdentity2 != standResult.KangTiIdentity2)
                            {
                                if (result.KangTiIdentity2.Contains(standResult.KangTiIdentity2) ||
                                    result.KangTiIdentity2.IndexOf("UI") >= 0)
                                {
                                    scoreIdentityTemp = scoreTemp / 2;
                                    result.KangtiIdentity_Score += scoreIdentityTemp;
                                }
                                else
                                {
                                    scoreIdentityTemp = scoreTemp;
                                    result.KangtiIdentity_Score += scoreIdentityTemp;
                                }
                            }
                        }
 
                        scoreIdentityTemp = 0.0;
                        scoreTemp = approvals.FirstOrDefault(p => p.FieldName == "22" && p.FieldPatient == "3").Score;
                        if (filter1_Score == 0)
                        {
                            if (result.KangTiIdentity3 != standResult.KangTiIdentity3)
                            {
                                if (result.KangTiIdentity3.Contains(standResult.KangTiIdentity3) ||
                                    result.KangTiIdentity3.IndexOf("UI") >= 0)
                                {
                                    scoreIdentityTemp = scoreTemp / 2;
                                    result.KangtiIdentity_Score += scoreIdentityTemp;
                                }
                                else
                                {
                                    scoreIdentityTemp = scoreTemp;
                                    result.KangtiIdentity_Score += scoreIdentityTemp;
                                }
                            }
                        }
                        if (result.JiaoChaPeiXing1W != standResult.JiaoChaPeiXing1W)
                        {
                            result.JiaoChaPeiXing_Score += approvals.FirstOrDefault(p => p.FieldName == "31" && p.FieldPatient == "1").Score;
                        }
                        if (result.JiaoChaPeiXing1Y != standResult.JiaoChaPeiXing1Y)
                        {
                            result.JiaoChaPeiXing_Score += approvals.FirstOrDefault(p => p.FieldName == "31" && p.FieldPatient == "2").Score;
                        }
                        if (result.JiaoChaPeiXing1Z != standResult.JiaoChaPeiXing1Z)
                        {
                            result.JiaoChaPeiXing_Score += approvals.FirstOrDefault(p => p.FieldName == "31" && p.FieldPatient == "3").Score;
                        }
                        if (result.JiaoChaPeiXing2W != standResult.JiaoChaPeiXing2W)
                        {
                            result.JiaoChaPeiXing_Score += approvals.FirstOrDefault(p => p.FieldName == "32" && p.FieldPatient == "1").Score;
                        }
                        if (result.JiaoChaPeiXing2Y != standResult.JiaoChaPeiXing2Y)
                        {
                            result.JiaoChaPeiXing_Score += approvals.FirstOrDefault(p => p.FieldName == "32" && p.FieldPatient == "2").Score;
                        }
                        if (result.JiaoChaPeiXing2Z != standResult.JiaoChaPeiXing2Z)
                        {
                            result.JiaoChaPeiXing_Score += approvals.FirstOrDefault(p => p.FieldName == "32" && p.FieldPatient == "3").Score;
                        }
                        if (result.JiaoChaPeiXing3W != standResult.JiaoChaPeiXing3W)
                        {
                            result.JiaoChaPeiXing_Score += approvals.FirstOrDefault(p => p.FieldName == "33" && p.FieldPatient == "1").Score;
                        }
                        if (result.JiaoChaPeiXing3Y != standResult.JiaoChaPeiXing3Y)
                        {
                            result.JiaoChaPeiXing_Score += approvals.FirstOrDefault(p => p.FieldName == "33" && p.FieldPatient == "2").Score;
                        }
                        if (result.JiaoChaPeiXing3Z != standResult.JiaoChaPeiXing3Z)
                        {
                            result.JiaoChaPeiXing_Score += approvals.FirstOrDefault(p => p.FieldName == "33" && p.FieldPatient == "3").Score;
                        }
                        #endregion
 
                        if (result.Id > 0)
                        {
                            service.UpdateResultspercentage(result);
                        }
                        else
                        {
                            service.AddResultspercentage(result);
                        }
                    }
                    #endregion
                });
            }
        }
 
        public void SetValue(Resultspercentage result, AnswerInfoViewModel model)
        {
            result.Abo1 = new ScoreInfo("ABO1").GetValue(model.Result_11_1);
            result.RH1 = new ScoreInfo("RH1").GetValue(model.Result_12_1);
            result.Abo2 = new ScoreInfo("ABO2").GetValue(model.Result_11_2);
            result.RH2 = new ScoreInfo("RH2").GetValue(model.Result_12_2);
            result.Abo3 = new ScoreInfo("ABO3").GetValue(model.Result_11_3);
            result.RH3 = new ScoreInfo("RH3").GetValue(model.Result_12_3);
            // 抗体筛选实验
            result.KangTiFilter1 = new ScoreInfo("Filter1").GetValue(model.Result_21_1);
            result.KangTiFilter2 = new ScoreInfo("Filter2").GetValue(model.Result_21_2);
            result.KangTiFilter3 = new ScoreInfo("Filter3").GetValue(model.Result_21_3);
            //交叉配型结果 
            result.JiaoChaPeiXing1W = new ScoreInfo("Patient1X").GetValue(model.Result_31_1);
            result.JiaoChaPeiXing1Y = new ScoreInfo("Patient1Y").GetValue(model.Result_32_1);
            result.JiaoChaPeiXing1Z = new ScoreInfo("Patient1Z").GetValue(model.Result_33_1);
            result.JiaoChaPeiXing2W = new ScoreInfo("Patient2X").GetValue(model.Result_31_2);
            result.JiaoChaPeiXing2Y = new ScoreInfo("Patient2Y").GetValue(model.Result_32_2);
            result.JiaoChaPeiXing2Z = new ScoreInfo("Patient2Z").GetValue(model.Result_33_2);
            result.JiaoChaPeiXing3W = new ScoreInfo("Patient3X").GetValue(model.Result_31_3);
            result.JiaoChaPeiXing3Y = new ScoreInfo("Patient3Y").GetValue(model.Result_32_3);
            result.JiaoChaPeiXing3Z = new ScoreInfo("Patient3Z").GetValue(model.Result_33_3);
            if (model.Part1 != null)
            {
                //题目1
                result.RevDate = model.Part1.RevDate;
                //题目2
                result.TestDate = model.Part1.TestDate;
            }
            //题目3
            result.SampleQuality = GetValue("SampleQuality", model);
            //题目5实验方法
            result.laboratoryMethod = GetValue("laboratoryMethod", model);
            //题目6试剂说明
            result.Reagents = GetValue("Reagents", model);
            //题目11试剂红细胞数量
            result.CellNumber = GetValue("CellNumber", model);
            if (model.Part4 != null)
            {
                result.ZhiKang1 = new ScoreInfo().GetZhiKangValue("ZhiKang1", model);
                result.ZhiKang2 = new ScoreInfo().GetZhiKangValue("ZhiKang2", model);
                result.ZhiKang3 = new ScoreInfo().GetZhiKangValue("ZhiKang3", model);
            }
 
            if (model.Part5 != null)
            {
                result.KangTiIdentity1 = new ScoreInfo().GetIdentityValue("Identity1", model.Part5);
                result.KangTiIdentity2 = new ScoreInfo().GetIdentityValue("Identity2", model.Part5);
                result.KangTiIdentity3 = new ScoreInfo().GetIdentityValue("Identity3", model.Part5);
            }
        }
        public string GetValue(string key, AnswerInfoViewModel model)
        {
            string ret = "";
            #region 题目3 样本质量
            if (key == "SampleQuality" && model.Part1!=null) 
            {
                if (!string.IsNullOrEmpty(model.Part1.CB3_11))
                {
                    if (model.Part1.CB3_11 == "cb3_11")
                    {
                        ret += "患者血浆P1满意,";
                    }
                    else
                    {
                        ret += "患者血浆P1不满意,";
                    }
 
                }
                if (!string.IsNullOrEmpty(model.Part1.CB3_12))
                {
                    if (model.Part1.CB3_12 == "cb3_12")
                    {
                        ret += "患者血浆P2满意,";
                    }
                    else
                    {
                        ret += "患者血浆P2不满意,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part1.CB3_13))
                {
                    if (model.Part1.CB3_13 == "cb3_13")
                    {
                        ret += "患者血浆P3满意,";
                    }
                    else
                    {
                        ret += "患者血浆P3不满意,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part1.CB3_14))
                {
                    if (model.Part1.CB3_14 == "cb3_14")
                    {
                        ret += "患者细胞P1满意,";
                    }
                    else
                    {
                        ret += "患者细胞P1不满意,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part1.CB3_15))
                {
                    if (model.Part1.CB3_15 == "cb3_15")
                    {
                        ret += "患者细胞P2满意,";
                    }
                    else
                    {
                        ret += "患者细胞P2不满意,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part1.CB3_16))
                {
                    if (model.Part1.CB3_16 == "cb3_16")
                    {
                        ret += "患者细胞P3满意,";
                    }
                    else
                    {
                        ret += "患者细胞P3不满意,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part1.CB3_17))
                {
                    if (model.Part1.CB3_17 == "cb3_17")
                    {
                        ret += "献血者细胞Dw满意,";
                    }
                    else
                    {
                        ret += "献血者细胞Dw不满意,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part1.CB3_18))
                {
                    if (model.Part1.CB3_18 == "cb3_18")
                    {
                        ret += "献血者细胞Dy满意,";
                    }
                    else
                    {
                        ret += "献血者细胞Dy不满意,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part1.CB3_19))
                {
                    if (model.Part1.CB3_19 == "cb3_19")
                    {
                        ret += "献血者细胞Dz满意,";
                    }
                    else
                    {
                        ret += "献血者细胞Dz不满意,";
                    }
                }
 
            }
            #endregion
            #region 题目5 实验方法
            if (key == "laboratoryMethod" && model.Part2!=null)
            { 
                string abo = "ABO定型:";
                string D = "D定型:";
                string ktsx = "抗体筛选:";
                string ktjd = "抗体鉴定:";
                string jxpx = "交叉配血:";
                #region ABO定型方法
                if (!string.IsNullOrEmpty(model.Part2.CB5_11))
                {
                    if (model.Part2.CB5_11.ToLower() == "true")
                    {
                        abo += "盐水试管,";
                    }
 
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_21))
                {
                    if (model.Part2.CB5_21.ToLower() == "true")
                    {
                        abo += "抗人球试管,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_31))
                {
                    if (model.Part2.CB5_31.ToLower() == "true")
                    {
                        abo += "聚凝胺,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_41))
                {
                    if (model.Part2.CB5_41.ToLower() == "true")
                    {
                        abo += "柱凝集,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_51))
                {
                    if (model.Part2.CB5_51.ToLower() == "true")
                    {
                        abo += "酶法,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_61))
                {
                    if (model.Part2.CB5_61.ToLower() == "true")
                    {
                        abo += "微量板法,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_71))
                {
                    if (model.Part2.CB5_71.ToLower() == "true")
                    {
                        abo += "其他,";
                    }
                }
                #endregion
                #region  D定型
                if (!string.IsNullOrEmpty(model.Part2.CB5_12))
                {
                    if (model.Part2.CB5_12.ToLower() == "true")
                    {
                        D += "盐水试管,";
                    }
 
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_22))
                {
                    if (model.Part2.CB5_22.ToLower() == "true")
                    {
                        D += "抗人球试管,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_32))
                {
                    if (model.Part2.CB5_32.ToLower() == "true")
                    {
                        D += "聚凝胺,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_42))
                {
                    if (model.Part2.CB5_42.ToLower() == "true")
                    {
                        D += "柱凝集,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_52))
                {
                    if (model.Part2.CB5_52.ToLower() == "true")
                    {
                        D += "酶法,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_62))
                {
                    if (model.Part2.CB5_62.ToLower() == "true")
                    {
                        D += "微量板法,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_72))
                {
                    if (model.Part2.CB5_72.ToLower() == "true")
                    {
                        D += "其他,";
                    }
                }
                #endregion
                #region 抗体筛选
                if (!string.IsNullOrEmpty(model.Part2.CB5_13))
                {
                    if (model.Part2.CB5_13.ToLower() == "true")
                    {
                        ktsx += "盐水试管,";
                    }
 
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_23))
                {
                    if (model.Part2.CB5_23.ToLower() == "true")
                    {
                        ktsx += "抗人球试管,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_33))
                {
                    if (model.Part2.CB5_33.ToLower() == "true")
                    {
                        ktsx += "聚凝胺,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_43))
                {
                    if (model.Part2.CB5_43.ToLower() == "true")
                    {
                        ktsx += "柱凝集,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_53))
                {
                    if (model.Part2.CB5_53.ToLower() == "true")
                    {
                        ktsx += "酶法,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_63))
                {
                    if (model.Part2.CB5_63.ToLower() == "true")
                    {
                        ktsx += "微量板法,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_73))
                {
                    if (model.Part2.CB5_73.ToLower() == "true")
                    {
                        ktsx += "其他,";
                    }
                }
                #endregion
                #region 抗体鉴定
                if (!string.IsNullOrEmpty(model.Part2.CB5_14))
                {
                    if (model.Part2.CB5_14.ToLower() == "true")
                    {
                        ktjd += "盐水试管,";
                    }
 
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_24))
                {
                    if (model.Part2.CB5_24.ToLower() == "true")
                    {
                        ktjd += "抗人球试管,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_34))
                {
                    if (model.Part2.CB5_34.ToLower() == "true")
                    {
                        ktjd += "聚凝胺,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_44))
                {
                    if (model.Part2.CB5_44.ToLower() == "true")
                    {
                        ktjd += "柱凝集,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_54))
                {
                    if (model.Part2.CB5_54.ToLower() == "true")
                    {
                        ktjd += "酶法,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_64))
                {
                    if (model.Part2.CB5_64.ToLower() == "true")
                    {
                        ktjd += "微量板法,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_74))
                {
                    if (model.Part2.CB5_74.ToLower() == "true")
                    {
                        ktjd += "其他,";
                    }
                }
                #endregion
                #region 交叉配血
                if (!string.IsNullOrEmpty(model.Part2.CB5_15))
                {
                    if (model.Part2.CB5_15.ToLower() == "true")
                    {
                        jxpx += "盐水试管,";
                    }
 
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_25))
                {
                    if (model.Part2.CB5_25.ToLower() == "true")
                    {
                        jxpx += "抗人球试管,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_35))
                {
                    if (model.Part2.CB5_35.ToLower() == "true")
                    {
                        jxpx += "聚凝胺,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_45))
                {
                    if (model.Part2.CB5_45.ToLower() == "true")
                    {
                        jxpx += "柱凝集,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_55))
                {
                    if (model.Part2.CB5_55.ToLower() == "true")
                    {
                        jxpx += "酶法,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_65))
                {
                    if (model.Part2.CB5_65.ToLower() == "true")
                    {
                        jxpx += "微量板法,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part2.CB5_75))
                {
                    if (model.Part2.CB5_75.ToLower() == "true")
                    {
                        jxpx += "其他,";
                    }
                }
                #endregion
                ret = abo + D + ktsx + ktjd + jxpx;
 
            }
            #endregion
            #region 题目6试剂说明
            if (key == "Reagents" && model.Part2!=null)
            {
                if (!string.IsNullOrEmpty(model.Part2.Factory1))
                {
                    ret += "抗-A,抗B:" + model.Part2.Factory1 + ",";
                }
                if (!string.IsNullOrEmpty(model.Part2.Factory2))
                {
                    ret += "抗-AB:" + model.Part2.Factory2 + ",";
                }
                if (!string.IsNullOrEmpty(model.Part2.Factory3))
                {
                    ret += "抗-D(1):" + model.Part2.Factory3 + ",";
                }
                if (!string.IsNullOrEmpty(model.Part2.Factory4))
                {
                    ret += "抗-D(2):" + model.Part2.Factory4 + ",";
                }
                if (!string.IsNullOrEmpty(model.Part2.Factory5))
                {
                    ret += "聚凝胺:" + model.Part2.Factory5 + ",";
                }
                if (!string.IsNullOrEmpty(model.Part2.Factory6))
                {
                    ret += "多特异性抗人球:" + model.Part2.Factory6 + ",";
                }
                if (!string.IsNullOrEmpty(model.Part2.Factory7))
                {
                    ret += "抗IgG:" + model.Part2.Factory7 + ",";
                }
                if (!string.IsNullOrEmpty(model.Part2.Factory8))
                {
                    ret += "柱凝集1:" + model.Part2.Factory8 + ",";
                }
                if (!string.IsNullOrEmpty(model.Part2.Factory9))
                {
                    ret += "柱凝集2:" + model.Part2.Factory9 + ",";
                }
                if (!string.IsNullOrEmpty(model.Part2.Factory10))
                {
                    ret += "其他:" + model.Part2.Factory10 + ",";
                }
                if (!string.IsNullOrEmpty(model.Part2.Factory11))
                {
                    ret += "筛选细胞:" + model.Part2.Factory11 + ",";
                }
                if (!string.IsNullOrEmpty(model.Part2.Factory12))
                {
                    ret += "谱细胞1:" + model.Part2.Factory12 + ",";
                }
                if (!string.IsNullOrEmpty(model.Part2.Factory13))
                {
                    ret += "谱细胞2:" + model.Part2.Factory13 + ",";
                }
                if (!string.IsNullOrEmpty(model.Part2.Factory14))
                {
                    ret += "酶处理谱细胞:" + model.Part2.Factory14 + ",";
                }
            }
            #endregion
            #region 题目11试剂红细胞数量 
            if (key == "CellNumber" && model.Part5!=null)
            {
                if (!string.IsNullOrEmpty(model.Part5.CB11_11))
                {
                    if (model.Part5.CB11_11.ToLower() == "cb11_11")
                    {
                        ret += "患者1:<=14,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part5.CB11_12))
                {
                    if (model.Part5.CB11_12.ToLower() == "cb11_12")
                    {
                        ret += "患者1:15-25,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part5.CB11_13))
                {
                    if (model.Part5.CB11_13.ToLower() == "cb11_13")
                    {
                        ret += "患者1:>25,";
                    }
                }
 
                //
                if (!string.IsNullOrEmpty(model.Part5.CB11_21))
                {
                    if (model.Part5.CB11_21.ToLower() == "cb11_21")
                    {
                        ret += "患者2:<=14,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part5.CB11_22))
                {
                    if (model.Part5.CB11_22.ToLower() == "cb11_22")
                    {
                        ret += "患者2:15-25,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part5.CB11_23))
                {
                    if (model.Part5.CB11_23.ToLower() == "cb11_23")
                    {
                        ret += "患者2:>25,";
                    }
                }
                //
                if (!string.IsNullOrEmpty(model.Part5.CB11_31))
                {
                    if (model.Part5.CB11_31.ToLower() == "cb11_31")
                    {
                        ret += "患者3:<=14,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part5.CB11_32))
                {
                    if (model.Part5.CB11_32.ToLower() == "cb11_32")
                    {
                        ret += "患者3:15-25,";
                    }
                }
                if (!string.IsNullOrEmpty(model.Part5.CB11_33))
                {
                    if (model.Part5.CB11_33.ToLower() == "cb11_33")
                    {
                        ret += "患者3:>25,";
                    }
                }
            }
            #endregion
            return ret;
        }
    }
}