|
|
@ -4,6 +4,7 @@ import a8k.SpringBootBeanUtil; |
|
|
|
import a8k.app.a8kproj.optalgo.type.OptScanResult; |
|
|
|
import a8k.app.a8ktype.device.BloodType; |
|
|
|
import a8k.app.a8ktype.exception.AppException; |
|
|
|
import a8k.app.a8ktype.opttype.ReactionResultStatus; |
|
|
|
import a8k.app.a8ktype.state.SampleInfo; |
|
|
|
import a8k.app.a8ktype.type.ReactionResult; |
|
|
|
import a8k.app.dao.db.ReactionReportDao; |
|
|
@ -51,11 +52,14 @@ public class FakeReactionRecordGeneratorPage { |
|
|
|
public void addSomeVirtualReactionRecord() throws AppException { |
|
|
|
var allproj = projInfoMgrService.getAllProjBuildInInfo(); |
|
|
|
for (var proj : allproj) { |
|
|
|
addVirtualReactionRecord("SAMPLEID-123456", proj.projId); |
|
|
|
addVirtualReactionRecord(false, "SAMPLEID-123456", proj.projId); |
|
|
|
} |
|
|
|
for (var proj : allproj) { |
|
|
|
addVirtualReactionRecord(true, "SAMPLEID-123456", proj.projId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void addVirtualReactionRecord(String sampleId, Integer projNum) throws AppException { |
|
|
|
public void addVirtualReactionRecord(Boolean error, String sampleId, Integer projNum) throws AppException { |
|
|
|
|
|
|
|
SampleInfo sampleInfo = new SampleInfo(); |
|
|
|
sampleInfo.sampleId = sampleId; |
|
|
@ -67,12 +71,13 @@ public class FakeReactionRecordGeneratorPage { |
|
|
|
|
|
|
|
ProjInfo projInfo = new ProjInfo(projInfoMgrService.getProjBuildInInfo(projNum), ProjExtInfoCardFactory.buildProjExtInfoCard(1, "LOTID123")); |
|
|
|
|
|
|
|
A8kResultBuilderFn resultBuilder0 = new A8kResultBuilderFn(A8kResultUnit.coi, A8kResultUnit.iuPml, A8kResultUnit.iuPml, 2.0, 2.0, 3.0, 3.0); |
|
|
|
A8kResultBuilderFn resultBuilder1 = new A8kResultBuilderFn(A8kResultUnit.coi, A8kResultUnit.iuPml, A8kResultUnit.iuPml, 2.0, 2.0, 3.0, 3.0); |
|
|
|
A8kResultBuilderFn resultBuilder2 = new A8kResultBuilderFn(A8kResultUnit.coi, A8kResultUnit.iuPml, A8kResultUnit.iuPml, 2.0, 2.0, 3.0, 3.0); |
|
|
|
A8kResultBuilderFn resultBuilder0 = new A8kResultBuilderFn(A8kResultUnit.coi, A8kResultUnit.iuPml, A8kResultUnit.uPl, 2.0, 2.0, 3.0, 3.0); |
|
|
|
A8kResultBuilderFn resultBuilder1 = new A8kResultBuilderFn(A8kResultUnit.coi, A8kResultUnit.iuPml, A8kResultUnit.uPl, 2.0, 2.0, 3.0, 3.0); |
|
|
|
A8kResultBuilderFn resultBuilder2 = new A8kResultBuilderFn(A8kResultUnit.coi, A8kResultUnit.iuPml, A8kResultUnit.uPl, 2.0, 2.0, 3.0, 3.0); |
|
|
|
|
|
|
|
List<ReactionResult> reactionResults = new ArrayList<>(); |
|
|
|
|
|
|
|
if (!error) { |
|
|
|
for (int i = 0; i < projInfo.buildIn.getSubProjNum(); i++) { |
|
|
|
if (i == 0) |
|
|
|
reactionResults.add(new ReactionResult("Tn-I", "Tn-I", 1.0, resultBuilder0.toResultUnitConverters())); |
|
|
@ -81,8 +86,16 @@ public class FakeReactionRecordGeneratorPage { |
|
|
|
if (i == 2) |
|
|
|
reactionResults.add(new ReactionResult("Myoglobin", "MG", 3.0, resultBuilder2.toResultUnitConverters())); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
for (int i = 0; i < projInfo.buildIn.getSubProjNum(); i++) { |
|
|
|
if (i == 0) |
|
|
|
reactionResults.add(new ReactionResult("Tn-I", "Tn-I", ReactionResultStatus.ERROR_RESULT_OUT_OF_RANGE, "结果超出范围")); |
|
|
|
if (i == 1) |
|
|
|
reactionResults.add(new ReactionResult("CK-MB", "CK-MB", ReactionResultStatus.ERROR_LOST_PEAK_R, "R峰丢失")); |
|
|
|
if (i == 2) |
|
|
|
reactionResults.add(new ReactionResult("Myoglobin", "MG", ReactionResultStatus.ERROR_QUALITY_PEAK_DETECTION, "质峰检测错误")); |
|
|
|
} |
|
|
|
} |
|
|
|
List<OptScanResult> optScanResults = new ArrayList<>(); |
|
|
|
|
|
|
|
if (projInfo.buildIn.getFoptCfg() != null) { |
|
|
|