Przeglądaj źródła

[task-1766] 性能验证模块 开发 (二期) / 添加新的验证方法和新的配置detail表

Li Yuan 1 rok temu
rodzic
commit
f4dd03655e

+ 3 - 3
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/components/verification/model/ConfigVO.java

@@ -16,7 +16,7 @@ public class ConfigVO {
     private double[] allowableSDl;
     private int decimal;
 
-    private double claimValue;
+    private double[] claimValue;
     private int rejectionRate;
 
     private boolean isSupportItems;
@@ -100,11 +100,11 @@ public class ConfigVO {
         this.decimal = decimal;
     }
 
-    public double getClaimValue() {
+    public double[] getClaimValue() {
         return claimValue;
     }
 
-    public void setClaimValue(double claimValue) {
+    public void setClaimValue(double[] claimValue) {
         this.claimValue = claimValue;
     }
 

+ 1 - 1
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/components/verification/model2/PrecisionEP15Item.java

@@ -76,7 +76,7 @@ public class PrecisionEP15Item {
         this.level = configVO.getSpecimensNum();
         int rate = configVO.getRejectionRate();
         if (rate > 0 && rate < 100) {
-            this.p = rate / 100;
+            this.p = rate / 100d;
         } else {
             this.p = 0.01;
         }

+ 1 - 1
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/components/verification/model2/TruenessBiasAssessment.java

@@ -21,7 +21,7 @@ public class TruenessBiasAssessment extends PVModel {
         super(data, configVO);
         this.means = new double[specimensNum];
         this.bias = new double[specimensNum];
-        this.tea = configVO.getTea();
+        this.tea = configVO.getBatchCVSValue();
         this.targetValues = configVO.getTargetValue();
         this.teaFormat = getTEaFormat(configVO.getBatchCVS());
     }

+ 2 - 2
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/components/verification/model2/TruenessEP15Patient.java

@@ -44,7 +44,7 @@ public class TruenessEP15Patient extends PVModel {
         meanX = StatUtils.mean(x);
         meanY = StatUtils.mean(y);
         this.n = this.y.length;
-        this.sdClaim = configVO.getClaimValue();
+        this.sdClaim = configVO.getClaimValue()[0];
         this.rejectionRate = (double)configVO.getRejectionRate()/100;
         this.t = getTValue(this.y.length - 1, rejectionRate);
     }
@@ -243,7 +243,7 @@ public class TruenessEP15Patient extends PVModel {
 //        config.put("yAxisLow", -sdClaim);
         config.put("data", JSONObject.toJSONString(data, SerializerFeature.DisableCircularReferenceDetect));
         chartDTO.setOption(renderChartTemplate(config, 0, "/scatter/linesForRange.ftl"));
-        chartDTO.setNote(String.format("%s%d %s","图中实线为平均偏移值",format(bias),getUnits()));
+        chartDTO.setNote(String.format("%s%s %s","图中实线为平均偏移值",format(bias),getUnits()));
         return chartDTO;
     }
 }

+ 2 - 1
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/components/verification/model2/TruenessRefernece.java

@@ -19,7 +19,8 @@ public class TruenessRefernece extends PVModel {
             double[][] sub = new double[data.length][configVO.getRepeatNum()];
             realMatrix.copySubMatrix(0, data.length - 1,
                     i * configVO.getRepeatNum(), (i + 1) * configVO.getRepeatNum() - 1, sub);
-            items.add(new TruenessReferneceItem(specimensName[i], sub, configVO, configVO.getTargetValue()[i]));
+            items.add(new TruenessReferneceItem(specimensName[i], sub, configVO,
+                    configVO.getTargetValue()[i],configVO.getClaimValue()[i]));
         }
     }
 

+ 3 - 3
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/components/verification/model2/TruenessReferneceItem.java

@@ -22,7 +22,7 @@ public class TruenessReferneceItem {
     private double sdClaim;//SD assigned value
     private double cse;
 
-    public TruenessReferneceItem(String name, double[][] data, InspectionConfigVO configVO, double target) {
+    public TruenessReferneceItem(String name, double[][] data, InspectionConfigVO configVO, double target,double sdClaim) {
         this.name = name;
         this.data = data;
         int i = 0;
@@ -33,8 +33,8 @@ public class TruenessReferneceItem {
             }
         }
         this.target = target;
-        this.sdClaim = configVO.getClaimValue();
-        this.rejectionRate = (double)configVO.getRejectionRate()/100;
+        this.sdClaim = sdClaim;
+        this.rejectionRate = configVO.getRejectionRate()/100d;
         if (t == 0) {
             this.t = PVModel.getTValue(calcData.length - 1, rejectionRate);
         } else {

+ 1 - 1
ibps-provider-root/modules/provider-business/src/test/java/com/lc/ibps/components/verification/model2/TruenessEP15PatientTest.java

@@ -30,7 +30,7 @@ public class TruenessEP15PatientTest {
         InspectionConfigVO config = new InspectionConfigVO("EP15-A2方法学比对", 1, 20,
                 null, 1, LocalDate.now(), true);
         config.setMethodNum(2);
-        config.setClaimValue(0.022);
+        config.setClaimValue(new double[]{0.022});
         config.setUnits("mmol/L");
         config.setDecimal(3);
         config.setRejectionRate(5);

+ 1 - 1
ibps-provider-root/modules/provider-business/src/test/java/com/lc/ibps/components/verification/model2/TruenessReferneceTest.java

@@ -31,7 +31,7 @@ public class TruenessReferneceTest {
                 null, 2, LocalDate.now(), true);
         config.setUnits("mmol/L");
         config.setTargetValue(new double[]{3.1, 3.2});
-        config.setClaimValue(0.02);
+        config.setClaimValue(new double[]{0.02,0.03});
         config.setRejectionRate(5);
         config.setDecimal(3);
         config.setKey(ModelEnum.TruenessRefernece.getKey());