public XMLResult setAnalysis3DInfo(string analysis3DUID, XMLParameter p02_xmlAnalysis3DInfo) { this.lastResult = new XMLResult(this.InvokeMethod("setAnalysis3DInfo", new object[] { analysis3DUID, p02_xmlAnalysis3DInfo.GenerateXML() })); return(this.lastResult); }
public XMLResult createAnalysis3D(string p01_instanceUID, XMLParameter p02_xmlAnalysis3DInfo) { this.lastResult = new XMLResult(this.InvokeMethod("createAnalysis3D", new object[] { p01_instanceUID, p02_xmlAnalysis3DInfo.GenerateXML() })); return this.lastResult; }
public XMLResult createPresentationState(string imageInternalID, XMLParameter presentationState) { this.lastResult = new XMLResult(this.InvokeMethod("createPresentationState", new object[] { imageInternalID, presentationState.GenerateXML() })); return this.lastResult; }
public XMLResult getVolumeInfo(XMLParameter filter) { this.lastResult = new XMLResult(this.InvokeMethod("getVolumeInfo", new object[] { filter.GenerateXML() })); return(this.lastResult); }
public XMLResult setAnalysisInfo(string analysisInternalID, XMLParameter indexedInfo) { this.lastResult = new XMLResult(this.InvokeMethod("setAnalysisInfo", new object[] { analysisInternalID, indexedInfo.GenerateXML() })); return this.lastResult; }
public XMLResult createPatient(XMLParameter patientInfo) { this.lastResult = new XMLResult(this.InvokeMethod("createPatient", new object[] { patientInfo.GenerateXML() })); return this.lastResult; }
public XMLResult setPresentationStateInfo(XMLParameter indexInfo, string presentationStateInternalID) { this.lastResult = new XMLResult(this.InvokeMethod("setPresentationStateInfo", new object[] { indexInfo.GenerateXML(), presentationStateInternalID })); return(this.lastResult); }
public XMLResult createImage(XMLParameter imageInfo) { this.lastResult = new XMLResult(this.InvokeMethod("createImage", new object[] { imageInfo.GenerateXML() })); return(this.lastResult); }
public XMLResult deleteImage(string imageInternalID, XMLParameter preferences) { this.lastResult = new XMLResult(this.InvokeMethod("deleteImage", new object[] { imageInternalID, preferences.GenerateXML() })); return(this.lastResult); }
public XMLResult registerLocalPAS(XMLParameter localPasInfo) { this.lastResult = new XMLResult(this.InvokeMethod("registerLocalPAS", new object[] { localPasInfo.GenerateXML() })); return(this.lastResult); }
public XMLResult uploadFile(XMLParameter fileURL) { this.lastResult = new XMLResult(this.InvokeMethod("uploadFile", new object[] { fileURL.GenerateXML() })); return(this.lastResult); }
public XMLResult setStudy(string studyInternalID, XMLParameter studyInfo) { this.lastResult = new XMLResult(this.InvokeMethod("setStudy", new object[] { studyInternalID, studyInfo.GenerateXML() })); return(this.lastResult); }
public XMLResult createStudy(XMLParameter studyInfo) { this.lastResult = new XMLResult(this.InvokeMethod("createStudy", new object[] { studyInfo.GenerateXML() })); return(this.lastResult); }
public XMLResult createSimpleInstance(XMLParameter instanceInfo) { this.lastResult = new XMLResult(this.InvokeMethod("createSimpleInstance", new object[] { instanceInfo.GenerateXML() })); return(this.lastResult); }
public XMLResult createRadioLogEntry(XMLParameter radioLogEntryInfoXml) { this.lastResult = new XMLResult(this.InvokeMethod("createRadioLogEntry", new object[] { radioLogEntryInfoXml.GenerateXML() })); return(this.lastResult); }
public XMLResult listPresentationState(XMLParameter filter, string imageInternalID) { this.lastResult = new XMLResult(this.InvokeMethod("listPresentationState", new object[] { filter.GenerateXML(), imageInternalID })); return(this.lastResult); }
public XMLResult exportRadioLog(XMLParameter filter) { this.lastResult = new XMLResult(this.InvokeMethod("exportRadioLog", new object[] { filter.GenerateXML() })); return(this.lastResult); }
public XMLResult getImageInfo(XMLParameter imageInternalID) { this.lastResult = new XMLResult(this.InvokeMethod("getImageInfo", new object[] { imageInternalID.GenerateXML() })); return(this.lastResult); }
public XMLResult listObjects(XMLParameter filter) { this.lastResult = new XMLResult(this.InvokeMethod("listObjects", new object[] { filter.GenerateXML() })); return this.lastResult; }
public XMLResult setImageInfo(XMLParameter imageInfo, string imageInternalID) { this.lastResult = new XMLResult(this.InvokeMethod("setImageInfo", new object[] { imageInfo.GenerateXML(), imageInternalID })); return(this.lastResult); }
public XMLResult setVolume(string volumeUID,XMLParameter volumeCompleteInfo) { this.lastResult = new XMLResult(this.InvokeMethod("setVolume", new object[] { volumeUID, volumeCompleteInfo.GenerateXML() })); return this.lastResult; }
public XMLResult listInstances(XMLParameter listInfomation) { this.lastResult = new XMLResult(this.InvokeMethod("listInstances", new object[] { listInfomation.GenerateXML() })); return this.lastResult; }
public XMLResult createFMS(XMLParameter fmsInfo) { this.lastResult = new XMLResult(this.InvokeMethod("createFMS", new object[] { fmsInfo.GenerateXML() })); return this.lastResult; }
public XMLResult setAnalysisInfo(string analysisInternalID, XMLParameter indexedInfo) { this.lastResult = new XMLResult(this.InvokeMethod("setAnalysisInfo", new object[] { analysisInternalID, indexedInfo.GenerateXML() })); return(this.lastResult); }
public XMLResult openObjects(XMLParameter objectInternalIDs) { this.lastResult = new XMLResult(this.InvokeMethod("openObjects", new object[] { objectInternalIDs.GenerateXML ()})); return this.lastResult; }
public XMLResult startAcquisition(XMLParameter acqInfo) { this.lastResult = new XMLResult(this.InvokeMethod("startAcquisition", new object[] { acqInfo.GenerateXML() })); return(this.lastResult); }
//Case 980: 1.3.17_workflow_CSI select a patient, open an image and then close it public void Run_WorkFlow_CSIOpenImageAndClose_Case980() { // Test Case added for work flow: CSI select a patient to list all the image, click to open one of them and then save and close it. PatientService patientService = new PatientService(); AcquisitionService acquisitionService = new AcquisitionService(); PresentationStateService presentationStateService = new PresentationStateService(); AnalysisService analysisService = new AnalysisService(); string patientUID = null; XMLParameter setAsynAcqPatientInfoParam = new XMLParameter("acq_info"); XMLParameter listObjectForPSParam = new XMLParameter("filter"); XMLParameterCollection getPresentionStateInfoParam = new XMLParameterCollection(); XMLParameter listObjectForVolumeParam = new XMLParameter("filter"); XMLParameter listObjectForFMSParam = new XMLParameter("filter"); XMLParameter listObjectForOtherParam = new XMLParameter("filter"); XMLParameter setPresentationStateParam = new XMLParameter("presentationstate"); XMLParameter setPresentationStateInfoParam = new XMLParameter("presentationstate"); XMLParameter listObjectForAnalysisParam = new XMLParameter("filter"); XMLParameter setAnalysisInfoParam = new XMLParameter("analysis"); foreach (InputDataSet ids in this.Input.DataSets) { Round r = new Round(); try { for (int i = 0; i < ids.InputParameters.Count; i++) { if (ids.InputParameters.GetParameter(i).Step == "getPatient") { if (ids.InputParameters.GetParameter(i).Key == "patientInternalID") { patientUID = ids.InputParameters.GetParameter(i).Value; } } if (ids.InputParameters.GetParameter(i).Step == "setAsynAcqPatientInfo") { setAsynAcqPatientInfoParam.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value); } if (ids.InputParameters.GetParameter(i).Step == "listObjectForPS") { listObjectForPSParam.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value); } if (ids.InputParameters.GetParameter(i).Step == "listObjectForVolume") { listObjectForVolumeParam.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value); } if (ids.InputParameters.GetParameter(i).Step == "listObjectForFMS") { listObjectForFMSParam.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value); } if (ids.InputParameters.GetParameter(i).Step == "listObjectForOther") { listObjectForOtherParam.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value); } if (ids.InputParameters.GetParameter(i).Step == "listObjectForAnalysis") { listObjectForAnalysisParam.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value); } if (ids.InputParameters.GetParameter(i).Step == "setPresentationStateInfo") { setPresentationStateInfoParam.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value); } if (ids.InputParameters.GetParameter(i).Step == "setAnalysisInfo") { setAnalysisInfoParam.AddParameter(ids.InputParameters.GetParameter(i).Key, ids.InputParameters.GetParameter(i).Value); } } #region Step 1: Check the specific patient exists in Database CheckPoint pGetPatient = new CheckPoint("getPatient", "Step 1: Get the specific patient info"); r.CheckPoints.Add(pGetPatient); XMLResult getPatientResult = patientService.getPatient(patientUID); if (getPatientResult.IsErrorOccured) { pGetPatient.Result = TestResult.Fail; System.Diagnostics.Debug.Print("Get the specific patient info fail:"); pGetPatient.Outputs.AddParameter("getPatient", "get the specific patient info", getPatientResult.Message); SaveRound(r); break; } else { pGetPatient.Result = TestResult.Pass; System.Diagnostics.Debug.Print("Get the specific patient info succeed:"); pGetPatient.Outputs.AddParameter("getPatient", "get the specific patient info", getPatientResult.Message); } #endregion // Step 2 - Step 7 are what to do after select a patient #region Step 2: set asyn acq patient with the specific patient CheckPoint pSetAsynAcqPatientInfo = new CheckPoint("setAsynAcqPatientInfo", "Step 2: call setAsynAcqPatientInfo to set asyn acq patient info"); r.CheckPoints.Add(pSetAsynAcqPatientInfo); XMLResult setAsynAcqPatientInfoResult = acquisitionService.setAsynAcqPatientInfo(setAsynAcqPatientInfoParam); if (setAsynAcqPatientInfoResult.IsErrorOccured) { pSetAsynAcqPatientInfo.Result = TestResult.Fail; System.Diagnostics.Debug.Print("Set asyn acq PatientInfo fail:"); pSetAsynAcqPatientInfo.Outputs.AddParameter("setAsynAcqPatientInfo", "set asyn acq patient info", setAsynAcqPatientInfoResult.Message); SaveRound(r); break; } else { pSetAsynAcqPatientInfo.Result = TestResult.Pass; System.Diagnostics.Debug.Print("Set asyn acq PatientInfo succeed:"); pSetAsynAcqPatientInfo.Outputs.AddParameter("setAsynAcqPatientInfo", "set asyn acq patient info", setAsynAcqPatientInfoResult.Message); } #endregion #region Step 3: Call listObject to get the presentation state list of the patient CheckPoint pListObjectForPS = new CheckPoint("listObjectForPS", "Step 3: call listObject to get PS info"); r.CheckPoints.Add(pListObjectForPS); XMLResult listObjectForPSResult = patientService.listObjects(listObjectForPSParam); if (listObjectForPSResult.IsErrorOccured) { pListObjectForPS.Result = TestResult.Fail; System.Diagnostics.Debug.Print("Call listObject to get PS info fail:"); pListObjectForPS.Outputs.AddParameter("listObject", "listObject to get PS", listObjectForPSResult.Message); SaveRound(r); break; } else { pListObjectForPS.Result = TestResult.Pass; System.Diagnostics.Debug.Print("Call listObject to get PS info succeed:"); pListObjectForPS.Outputs.AddParameter("listObject", "listObject to get PS", listObjectForPSResult.Message); } #endregion #region Step 4: Call getPresentationStateInfo to get the presentationstate info according to the presentationstate internal_id CheckPoint pGetPresentionStateInfo = new CheckPoint("getPresentionStateInfo", "Step 4: call getPresentationStateInfo to get presention state info"); r.CheckPoints.Add(pGetPresentionStateInfo); foreach (XMLParameter param in listObjectForPSResult.MultiResults) { getPresentionStateInfoParam.Add(param); } XMLResult getPresentationStateInfoResult = presentationStateService.getPresentationStateInfo(getPresentionStateInfoParam); if (getPresentationStateInfoResult.IsErrorOccured) { pGetPresentionStateInfo.Result = TestResult.Fail; System.Diagnostics.Debug.Print("Call getPresentationStateInfo to get PS info fail:"); pGetPresentionStateInfo.Outputs.AddParameter("getPresentationStateInfo", "getPresentationStateInfo to get PS info", getPresentationStateInfoResult.Message); SaveRound(r); break; } else { pGetPresentionStateInfo.Result = TestResult.Pass; System.Diagnostics.Debug.Print("Call getPresentationStateInfo to get PS info succeed:"); pGetPresentionStateInfo.Outputs.AddParameter("getPresentationStateInfo", "getPresentationStateInfo to get PS info", getPresentationStateInfoResult.Message); } #endregion #region Step 5: Call listObject to get the volume list of the patient CheckPoint pListObjectForVolume = new CheckPoint("listObjectForVolume", "Step 5: call listObject to get volume info"); r.CheckPoints.Add(pListObjectForVolume); XMLResult listObjectForVolumeResult = patientService.listObjects(listObjectForVolumeParam); if (listObjectForVolumeResult.IsErrorOccured) { pListObjectForVolume.Result = TestResult.Fail; System.Diagnostics.Debug.Print("Call listObject to get volume info fail:"); pListObjectForVolume.Outputs.AddParameter("listObject", "listObject to get volume", listObjectForVolumeResult.Message); SaveRound(r); break; } else { pListObjectForVolume.Result = TestResult.Pass; System.Diagnostics.Debug.Print("Call listObject to get volume info succeed:"); pListObjectForVolume.Outputs.AddParameter("listObject", "listObject to get volume", listObjectForVolumeResult.Message); } #endregion #region Step 6: Call listObject to get the FMS list of the patient CheckPoint pListObjectForFMS = new CheckPoint("listObjectForFMS", "Step 6: call listObject to get FMS info"); r.CheckPoints.Add(pListObjectForFMS); XMLResult listObjectForFMSResult = patientService.listObjects(listObjectForFMSParam); if (listObjectForFMSResult.IsErrorOccured) { pListObjectForFMS.Result = TestResult.Fail; System.Diagnostics.Debug.Print("Call listObject to get FMS info fail:"); pListObjectForFMS.Outputs.AddParameter("listObject", "listObject to get FMS", listObjectForFMSResult.Message); SaveRound(r); break; } else { pListObjectForFMS.Result = TestResult.Pass; System.Diagnostics.Debug.Print("Call listObject to get FMS info succeed:"); pListObjectForFMS.Outputs.AddParameter("listObject", "listObject to get FMS", listObjectForFMSResult.Message); } #endregion #region Step 7: Call listObject to get the other info of the patient CheckPoint pListObjectForOther = new CheckPoint("listObjectForOther", "Step 7: call listObject to get other info"); r.CheckPoints.Add(pListObjectForOther); XMLResult listObjectForOtherResult = patientService.listObjects(listObjectForOtherParam); if (listObjectForOtherResult.IsErrorOccured) { pListObjectForOther.Result = TestResult.Fail; System.Diagnostics.Debug.Print("Call listObject to get other info fail:"); pListObjectForOther.Outputs.AddParameter("listObject", "listObject to get other", listObjectForOtherResult.Message); SaveRound(r); break; } else { pListObjectForOther.Result = TestResult.Pass; System.Diagnostics.Debug.Print("Call listObject to get other info succeed:"); pListObjectForOther.Outputs.AddParameter("listObject", "listObject to get other", listObjectForOtherResult.Message); } #endregion // After double click an image to open it, it will repeat step 3 to step 7 // When open image, it will call getPresentationState to get the presentation state, which can be used in setPresentationState step later string presentationStateInternalID = null; XMLParameterCollection setPresentationStateParamList = new XMLParameterCollection(); foreach (XMLParameterNode psNode in listObjectForPSResult.ArrayResult.Parameters) { presentationStateInternalID = psNode.ParameterValue; XMLResult getPresentationStateResult = presentationStateService.getPresentationState(presentationStateInternalID); setPresentationStateParam = getPresentationStateResult.ArrayResult; setPresentationStateParamList.Add(setPresentationStateParam); } // Close the image, it will do step 8 to step 10 #region Step 8: Call setPresentationState to set presentation state, not change the presentation state value, just set it back CheckPoint pSetPresentationState = new CheckPoint("setPresentationState", "Step 8: call setPresentationState to set the presentation state after close the image"); r.CheckPoints.Add(pSetPresentationState); XMLResult setPresentationStateResult = new XMLResult(); foreach (XMLParameter presentationStateInfo in setPresentationStateParamList) { setPresentationStateResult = presentationStateService.setPresentationState(presentationStateInfo, presentationStateInternalID); if (setPresentationStateResult.IsErrorOccured) { pSetPresentationState.Result = TestResult.Fail; break; } else { pSetPresentationState.Result = TestResult.Pass; } } if (pSetPresentationState.Result == TestResult.Fail) { System.Diagnostics.Debug.Print("Call setPresentationState to set presentation state fail:"); pSetPresentationState.Outputs.AddParameter("setPresentationState", "setPresentationState to set presentation state", setPresentationStateResult.Message); SaveRound(r); break; } else { System.Diagnostics.Debug.Print("Call setPresentationState to set presentation state succeed:"); pSetPresentationState.Outputs.AddParameter("setPresentationState", "setPresentationState to set presentation state", setPresentationStateResult.Message); } #endregion #region Step 9: Call setPresentationStateInfo to set the presentation state info CheckPoint pSetPresentationStateInfo = new CheckPoint("setPresentationStateInfo", "Step 9: call setPresentationStateInfo to set the presentation state info after close the image"); r.CheckPoints.Add(pSetPresentationStateInfo); XMLResult setPresentationStateInfoResult = new XMLResult(); foreach (XMLParameter presentationStateInfoParam in getPresentationStateInfoResult.MultiResults) { presentationStateInternalID = presentationStateInfoParam.GetParameterValueByName("internal_id"); setPresentationStateInfoResult = presentationStateService.setPresentationStateInfo(setPresentationStateInfoParam, presentationStateInternalID); if (setPresentationStateInfoResult.IsErrorOccured) { pSetPresentationStateInfo.Result = TestResult.Fail; break; } else { pSetPresentationStateInfo.Result = TestResult.Pass; } } if (pSetPresentationStateInfo.Result == TestResult.Fail) { System.Diagnostics.Debug.Print("Call setPresentationStateInfo to set presentation state info fail:"); pSetPresentationStateInfo.Outputs.AddParameter("setPresentationStateInfo", "setPresentationState to set presentation state info", setPresentationStateInfoResult.Message); SaveRound(r); break; } else { System.Diagnostics.Debug.Print("Call setPresentationStateInfo to set presentation state info succeed:"); pSetPresentationStateInfo.Outputs.AddParameter("setPresentationState", "setPresentationState to set presentation state info", setPresentationStateInfoResult.Message); } #endregion #region Step 10: Call listObject to get the presentation state CheckPoint pListObjectForPS2 = new CheckPoint("listObjectForPS", "Step 10: call listObject to get PS info after close image"); r.CheckPoints.Add(pListObjectForPS2); XMLResult listObjectForPSResult2 = patientService.listObjects(listObjectForPSParam); if (listObjectForPSResult2.IsErrorOccured) { pListObjectForPS.Result = TestResult.Fail; System.Diagnostics.Debug.Print("Call listObject to get PS info fail:"); pListObjectForPS2.Outputs.AddParameter("listObject", "listObject to get PS", listObjectForPSResult2.Message); SaveRound(r); break; } else { pListObjectForPS2.Result = TestResult.Pass; System.Diagnostics.Debug.Print("Call listObject to get PS info succeed:"); pListObjectForPS2.Outputs.AddParameter("listObject", "listObject to get PS", listObjectForPSResult2.Message); } #endregion #region Step 11: Call getPresentationStateInfo to get the presentation state info CheckPoint pGetPresentionStateInfo2 = new CheckPoint("getPresentionStateInfo", "Step 11: call getPresentationStateInfo to get presention state info after close image"); r.CheckPoints.Add(pGetPresentionStateInfo2); XMLResult getPresentationStateInfoResult2 = presentationStateService.getPresentationStateInfo(getPresentionStateInfoParam); if (getPresentationStateInfoResult2.IsErrorOccured) { pGetPresentionStateInfo2.Result = TestResult.Fail; System.Diagnostics.Debug.Print("Call getPresentationStateInfo to get PS info fail:"); pGetPresentionStateInfo2.Outputs.AddParameter("getPresentationStateInfo", "getPresentationStateInfo to get PS info", getPresentationStateInfoResult2.Message); SaveRound(r); break; } else { pGetPresentionStateInfo2.Result = TestResult.Pass; System.Diagnostics.Debug.Print("Call getPresentationStateInfo to get PS info succeed:"); pGetPresentionStateInfo2.Outputs.AddParameter("getPresentationStateInfo", "getPresentationStateInfo to get PS info", getPresentationStateInfoResult2.Message); } #endregion // Close the viewer #region Step 12: Call listObject to get the analysis CheckPoint pListObjectForAnalysis = new CheckPoint("listObjectForAnalysis", "Step 12: call listObject to get analysis info"); r.CheckPoints.Add(pListObjectForAnalysis); XMLResult listObjectForAnalysisResult = patientService.listObjects(listObjectForAnalysisParam); if (listObjectForAnalysisResult.IsErrorOccured) { pListObjectForAnalysis.Result = TestResult.Fail; System.Diagnostics.Debug.Print("Call listObject to get analysis info fail:"); pListObjectForAnalysis.Outputs.AddParameter("listObject", "listObject to get analysis", listObjectForAnalysisResult.Message); SaveRound(r); break; } else { pListObjectForAnalysis.Result = TestResult.Pass; System.Diagnostics.Debug.Print("Call listObject to get analysis info succeed:"); pListObjectForAnalysis.Outputs.AddParameter("listObject", "listObject to get analysis", listObjectForAnalysisResult.Message); } #endregion string analysisId = null; analysisId = listObjectForAnalysisResult.SingleResult; if (analysisId == null || analysisId == string.Empty) { // Below Step are excuted when there is no analysis before #region Step 13: createAnalysis CheckPoint pCreateAnalysis = new CheckPoint("createAnalysis", "Step 13: call createAnalysis to create new analysis"); r.CheckPoints.Add(pCreateAnalysis); XMLResult createAnalysisResult = new XMLResult(); XMLParameter analysisXml = new XMLParameter("analysis"); XMLParameterCollection uidsXml = new XMLParameterCollection(); XMLParameter presentationStateUids = new XMLParameter("presentationstate"); XMLParameter fmsUids = new XMLParameter("fms"); uidsXml.Add(presentationStateUids); uidsXml.Add(fmsUids); createAnalysisResult = analysisService.createAnalysis(analysisXml.GenerateXML().ToString(), true, true, patientUID, null, uidsXml); // public XMLResult createAnalysis(string analysisXml, bool current, bool currentSpecified, string patientInternalID, string thumbnail, XMLParameterCollection uidsXml); if (createAnalysisResult.IsErrorOccured) { System.Diagnostics.Debug.Print("Call createAnalysis to create analysis fail:"); pCreateAnalysis.Outputs.AddParameter("createAnalysis", "createAnalysis to create analysis", createAnalysisResult.Message); SaveRound(r); break; } else { System.Diagnostics.Debug.Print("Call createAnalysis to create analysis succeed:"); pCreateAnalysis.Outputs.AddParameter("createAnalysis", "createAnalysis to create analysis", createAnalysisResult.Message); } #endregion #region Step 14: Call AnalysisService.setAnalysisInfo to set the analysis info CheckPoint pSetAnalysisInfo = new CheckPoint("setAnalysisInfo", "Step 14: call setAnalysisInfo to set the analysis info"); r.CheckPoints.Add(pSetAnalysisInfo); XMLResult setAnalysisInfoResult = new XMLResult(); analysisId = createAnalysisResult.MultiResults[0].GetParameterValueByName("internal_id"); setAnalysisInfoResult = analysisService.setAnalysisInfo(analysisId, setAnalysisInfoParam); if (setAnalysisInfoResult.IsErrorOccured) { System.Diagnostics.Debug.Print("Call setAnalysisInfo to set analysis info fail:"); pSetAnalysisInfo.Outputs.AddParameter("setAnalysisInfo", "setAnalysisInfo to set analysis info", setAnalysisInfoResult.Message); SaveRound(r); break; } else { System.Diagnostics.Debug.Print("Call setAnalysisInfo to set analysis info succeed:"); pSetAnalysisInfo.Outputs.AddParameter("setAnalysisInfo", "setAnalysisInfo to set analysis info", setAnalysisInfoResult.Message); } #endregion } else { // Below Step 15 to Step 17 are excuted when there is analysis exist before... #region Step 15: Call AnalysisService.getAnalysisInfo to get the analysis info CheckPoint pGetAnalysisInfo = new CheckPoint("getAnalysisInfo", "Step 15: call getAnalysisInfo to get the analysis info"); r.CheckPoints.Add(pGetAnalysisInfo); XMLResult getAnalysisInfoResult = new XMLResult(); getAnalysisInfoResult = analysisService.getAnalysisInfo(analysisId); if (getAnalysisInfoResult.IsErrorOccured) { pGetAnalysisInfo.Result = TestResult.Fail; System.Diagnostics.Debug.Print("Call getAnalysisInfo to get analysis info fail:"); pGetAnalysisInfo.Outputs.AddParameter("getAnalysisInfo", "getAnalysisInfo to get analysis info", getAnalysisInfoResult.Message); SaveRound(r); break; } else { pGetAnalysisInfo.Result = TestResult.Pass; System.Diagnostics.Debug.Print("Call getAnalysisInfo to get analysis info succeed:"); pGetAnalysisInfo.Outputs.AddParameter("getAnalysisInfo", "getAnalysisInfo to get analysis info", getAnalysisInfoResult.Message); } #endregion #region Step 16: Call AnalysisService.setAnalysisDescription to set analysis description CheckPoint pSetAnalysisDescription = new CheckPoint("setAnalysisDescription", "Step 16: call setAnalysisDescription to set the analysis description"); r.CheckPoints.Add(pSetAnalysisDescription); XMLResult setAnalysisDescriptionResult = new XMLResult(); XMLParameter analysisXml = new XMLParameter("analysis"); XMLParameterCollection uidsXml = new XMLParameterCollection(); XMLParameter presentationStateUids = new XMLParameter("presentationstate"); XMLParameter fmsUids = new XMLParameter("fms"); uidsXml.Add(presentationStateUids); uidsXml.Add(fmsUids); setAnalysisDescriptionResult = analysisService.setAnalysisDescription(analysisId, analysisXml.GenerateXML(), false, uidsXml); if (setAnalysisDescriptionResult.IsErrorOccured) { pSetAnalysisDescription.Result = TestResult.Fail; System.Diagnostics.Debug.Print("Call setAnalysisDescription to set the analysis description fail:"); pSetAnalysisDescription.Outputs.AddParameter("setAnalysisDescription", "call set the analysis description", setAnalysisDescriptionResult.Message); SaveRound(r); break; } else { pSetAnalysisDescription.Result = TestResult.Pass; System.Diagnostics.Debug.Print("Call setAnalysisDescription to set the analysis description succeed:"); pSetAnalysisDescription.Outputs.AddParameter("setAnalysisDescription", "call set the analysis description", setAnalysisDescriptionResult.Message); } #endregion #region Step 17: Call AnalysisService.setAnalysisInfo to set the analysis info CheckPoint pSetAnalysisInfo = new CheckPoint("setAnalysisInfo", "Step 17: call setAnalysisInfo to set the analysis info"); r.CheckPoints.Add(pSetAnalysisInfo); XMLResult setAnalysisInfoResult = new XMLResult(); setAnalysisInfoResult = analysisService.setAnalysisInfo(analysisId, setAnalysisInfoParam); if (setAnalysisInfoResult.IsErrorOccured) { pSetAnalysisInfo.Result = TestResult.Fail; System.Diagnostics.Debug.Print("Call setAnalysisInfo to set analysis info fail:"); pSetAnalysisInfo.Outputs.AddParameter("setAnalysisInfo", "setAnalysisInfo to set analysis info", setAnalysisInfoResult.Message); SaveRound(r); break; } else { pSetAnalysisInfo.Result = TestResult.Pass; System.Diagnostics.Debug.Print("Call setAnalysisInfo to set analysis info succeed:"); pSetAnalysisInfo.Outputs.AddParameter("setAnalysisInfo", "setAnalysisInfo to set analysis info", setAnalysisInfoResult.Message); } #endregion } SaveRound(r); } catch (Exception ex) { CheckPoint cp = new CheckPoint(); r.CheckPoints.Add(cp); cp.Outputs.AddParameter("Exception thrown", "Exception Message", ex.Message); cp.Result = TestResult.Fail; SaveRound(r); } } Output(); }
public XMLResult queryLines(XMLParameter deviceIdList) { this.lastResult = new XMLResult(this.InvokeMethod("queryLines", new object[] { deviceIdList.GenerateXML() })); return(this.lastResult); }
public override void Run() { string newPSId = string.Empty; string setPSInfoString = string.Empty; string getPSInfoString = string.Empty; PresentationStateService psService = new PresentationStateService(); try { //create a new patient and import a new image to get a new ps id. string newPatientId = CommonLib.CreatePatient(); ImportService import = new ImportService(); XMLResult r = import.importObject(newPatientId, string.Empty, @"c:\PASPerformance\001.png", null, true, string.Empty); newPSId = r.MultiResults[1].GetParameterValueByIndex(0); XMLParameter psId = new XMLParameter("presentationstate"); psId.AddParameter("internal_id", newPSId); getPSInfoString = psId.GenerateXML(); XMLParameterCollection c = new XMLParameterCollection(); c.Add(psId); setPSInfoString = psService.getPresentationStateInfo(c).ArrayResult.GenerateXML(); } catch (Exception ex) { LogRecordType lr = new LogRecordType(); lr.FunctionName = this.mFunctionName; lr.Lable = this.mLabel; string innerText = ex.InnerException == null ? string.Empty : ex.InnerException.Message; lr.Message = ex.Message + innerText == string.Empty ? string.Empty : "(" + innerText + ")"; lr.Passed = false; Log.AddRecord(lr); this.RiseSingleCallCompleteEvent(lr.ResponseTime, lr.Passed, true); this.RiseTestCaseCompleteEvent(); this.mExecuted = this.mRepeat; this.mFailed = this.mRepeat; return; } double userCaseResponse=0; for (int i = 1; i <= this.mRepeat; i++) { LogRecordType lr = new LogRecordType(); lr.Lable = this.mLabel; lr.FunctionName = this.mFunctionName; try { //get ps info XMLResult getResult=new XMLResult (psService.InvokeMethod ("getPresentationStateInfo", new object []{getPSInfoString })); //if get presentation infor failed. if (getResult.IsErrorOccured) { lr.Message = "Get PS info faild. Message: " + getResult.Message; lr.ResponseTime = psService.ResponseTime; lr.Passed = false; Log.AddRecord(lr); this.mFailed++; continue; } else //if get ps info successed { userCaseResponse = psService.ResponseTime; } //set ps info XMLResult setResult = new XMLResult(psService.InvokeMethod("setPresentationStateInfo", new object[] { setPSInfoString, newPSId})); //if set ps info failed if (setResult.IsErrorOccured) { lr.Message = "Set PS info failed. Message: " + setResult.Message; lr.ResponseTime = psService.ResponseTime; lr.Passed = false; Log.AddRecord(lr); this.mFailed++; continue; } else //if set ps info successed. { userCaseResponse += psService.ResponseTime; } lr.ResponseTime = userCaseResponse; this.ExecutedTime += userCaseResponse; } catch (Exception ex) { this.mFailed++; lr.Passed = false; string innerText = ex.InnerException == null ? string.Empty : ex.InnerException.Message; lr.Message = ex.Message + innerText == string.Empty ? string.Empty : "(" + innerText + ")"; } this.mExecuted = i; Log.AddRecord(lr); this.RiseSingleCallCompleteEvent(lr.ResponseTime, lr.Passed); } this.RiseTestCaseCompleteEvent(); }
public XMLResult queryDevices(XMLParameter sensorTypeList) { this.lastResult = new XMLResult(this.InvokeMethod("queryDevices", new object[] { sensorTypeList.GenerateXML() })); return(this.lastResult); }
public XMLResult setFMSInfo(XMLParameter fmsInfo, string fmsInternalID) { this.lastResult = new XMLResult(this.InvokeMethod("setFMSInfo", new object[] { fmsInfo.GenerateXML(), fmsInternalID })); return(this.lastResult); }
public XMLResult setAsynAcqPatientInfo(XMLParameter asyncAcqPatientInfo) { this.lastResult = new XMLResult(this.InvokeMethod("setAsynAcqPatientInfo", new object[] { asyncAcqPatientInfo.GenerateXML() })); return(this.lastResult); }
public XMLResult setRadioLogEntry(XMLParameter radioLogEntryInfoXml, string radioLogEntryInternalId) { this.lastResult = new XMLResult(this.InvokeMethod("setRadioLogEntry", new object[] { radioLogEntryInfoXml.GenerateXML(), radioLogEntryInternalId })); return(this.lastResult); }
public XMLResult listInstances(XMLParameter listInfomation) { this.lastResult = new XMLResult(this.InvokeMethod("listInstances", new object[] { listInfomation.GenerateXML() })); return(this.lastResult); }
public XMLResult setPatient(XMLParameter patientInfo, string patientInternalID) { this.lastResult = new XMLResult(this.InvokeMethod("setPatient", new object[] { patientInfo.GenerateXML(), patientInternalID })); return this.lastResult; }
public XMLResult createRadioLogEntry(XMLParameter radioLogEntryInfoXml) { this.lastResult = new XMLResult(this.InvokeMethod("createRadioLogEntry", new object[] { radioLogEntryInfoXml.GenerateXML() })); return this.lastResult; }
public XMLResult initFindPatient(XMLParameter filter) { this.lastResult = new XMLResult(this.InvokeMethod("initFindPatient", new object[] { filter.GenerateXML() })); return lastResult; }
public XMLResult exportRadioLog(XMLParameter filter) { this.lastResult = new XMLResult(this.InvokeMethod("exportRadioLog", new object[] { filter.GenerateXML() })); return this.lastResult; }
public XMLResult createPresentationState(string imageInternalID, XMLParameter presentationState) { this.lastResult = new XMLResult(this.InvokeMethod("createPresentationState", new object[] { imageInternalID, presentationState.GenerateXML() })); return(this.lastResult); }
public XMLResult setRadioLogEntry(XMLParameter radioLogEntryInfoXml, string radioLogEntryInternalId) { this.lastResult = new XMLResult(this.InvokeMethod("setRadioLogEntry", new object[] { radioLogEntryInfoXml.GenerateXML(), radioLogEntryInternalId })); return this.lastResult; }
public XMLResult getVolumeInfo(XMLParameter filter) { this.lastResult = new XMLResult(this.InvokeMethod("getVolumeInfo", new object[] { filter.GenerateXML() })); return this.lastResult; }
public XMLResult createApplication(string application, XMLParameter config) { this.lastResult = new XMLResult(this.InvokeMethod("createApplication", new object[] { application, config.GenerateXML() })); return(this.lastResult); }
public override void Run() { string PatientStarts = string.Empty; Random random = new Random(Guid.NewGuid().GetHashCode()); PatientStarts += Convert.ToChar(random.Next(65, 91)); PatientStarts += Convert.ToChar(random.Next(65, 91)); PatientStarts += Convert.ToChar(random.Next(65, 91)); PatientStarts += Convert.ToChar(random.Next(65, 91)); PatientService ps = new PatientService(); XMLParameter pa = new XMLParameter("patient"); pa.AddParameter("patient_id", "$_R"); pa.AddParameter("dpms_id", "$_R"); pa.AddParameter("first_name", "$_R"); pa.AddParameter("last_name", "$_R"); pa.AddParameter("middle_name", "$_R"); pa.AddParameter("prefix", "Mr"); pa.AddParameter("suffix", "X"); pa.AddParameter("birth_date", "2010-10-22"); pa.AddParameter("sex", "female"); pa.AddParameter("pregnancy", "not pregnant"); pa.AddParameter("insurance_number", "1234567"); pa.AddParameter("address", "Test address"); pa.AddParameter("town", "test town"); pa.AddParameter("postal_code", "female"); pa.AddParameter("cellular_phone", "female"); pa.AddParameter("home_phone", "female"); pa.AddParameter("work_phone", "female"); pa.AddParameter("comments", "user comments"); pa.AddParameter("email", "*****@*****.**"); pa.AddParameter("photo", ""); string PatientInfo = pa.GenerateXML(); for (int i = 1; i <= this.mRepeat; i++) { LogRecordType lr = new LogRecordType(); lr.Lable = this.mLabel; lr.FunctionName = this.mFunctionName; try { XMLResult result = new XMLResult(ps.InvokeMethod("createPatient", new object[] { PatientInfo.Replace("$_R", PatientStarts + (i + 1).ToString()) })); lr.ResponseTime = ps.ResponseTime; lr.Passed = !(result.IsErrorOccured); if (!lr.Passed) { lr.Message = result.Message; this.mFailed++; } else { lr.Message = result.SingleResult; this.mExectuedTime += lr.ResponseTime; } } catch (Exception ex) { this.mFailed++; lr.Passed = false; string innerText = ex.InnerException == null ? string.Empty : ex.InnerException.Message; lr.Message = ex.Message + innerText == string.Empty ? string.Empty : "(" + innerText + ")"; } this.Executed = i; Log.AddRecord(lr); this.RiseSingleCallCompleteEvent(lr.ResponseTime, lr.Passed); } this.RiseTestCaseCompleteEvent(); }
public XMLResult setConfiguration(string appliInstanceID, XMLParameter config) { this.lastResult = new XMLResult(this.InvokeMethod("setConfiguration", new object[] { appliInstanceID, config.GenerateXML() })); return(this.lastResult); }
public XMLResult setVolume(string volumeUID, XMLParameter volumeCompleteInfo) { this.lastResult = new XMLResult(this.InvokeMethod("setVolume", new object[] { volumeUID, volumeCompleteInfo.GenerateXML() })); return(this.lastResult); }
public XMLResult openObjects(XMLParameter objectInternalIDs) { this.lastResult = new XMLResult(this.InvokeMethod("openObjects", new object[] { objectInternalIDs.GenerateXML() })); return(this.lastResult); }
public XMLResult setFMSInfo(XMLParameter fmsInfo, string fmsInternalID) { this.lastResult = new XMLResult(this.InvokeMethod("setFMSInfo", new object[] { fmsInfo.GenerateXML(), fmsInternalID })); return this.lastResult; }
public XMLResult createSimpleInstance(XMLParameter instanceInfo) { this.lastResult = new XMLResult(this.InvokeMethod("createSimpleInstance", new object[] { instanceInfo.GenerateXML() })); return this.lastResult; }
public XMLResult createApplication(string application, XMLParameter config) { this.lastResult = new XMLResult(this.InvokeMethod("createApplication", new object[] { application, config.GenerateXML() })); return this.lastResult; }
public XMLResult queryDevices(XMLParameter sensorTypeList) { this.lastResult = new XMLResult(this.InvokeMethod("queryDevices", new object[] { sensorTypeList.GenerateXML() })); return this.lastResult; }
public XMLResult setConfiguration(string appliInstanceID, XMLParameter config) { this.lastResult = new XMLResult(this.InvokeMethod("setConfiguration", new object[] { appliInstanceID, config.GenerateXML() })); return this.lastResult; }
public XMLResult queryLines(XMLParameter deviceIdList) { this.lastResult = new XMLResult(this.InvokeMethod("queryLines", new object[] { deviceIdList.GenerateXML() })); return this.lastResult; }
public XMLResult setAnalysis3DInfo(string analysis3DUID, XMLParameter p02_xmlAnalysis3DInfo) { this.lastResult = new XMLResult(this.InvokeMethod("setAnalysis3DInfo", new object[] { analysis3DUID, p02_xmlAnalysis3DInfo .GenerateXML() })); return this.lastResult; }
public XMLResult setAsynAcqPatientInfo(XMLParameter asyncAcqPatientInfo) { this.lastResult = new XMLResult(this.InvokeMethod("setAsynAcqPatientInfo", new object[] { asyncAcqPatientInfo.GenerateXML() })); return this.lastResult; }
public override void Run() { string acqInfoString = string.Empty; string sessionId = string.Empty; AcquisitionService acqService = new AcquisitionService(); ExactTimer timer = new ExactTimer(); int timeOut=600; try { LaunchNotification(); string PatientId = CommonLib.CreatePatient(); XMLParameter acqInfo = new XMLParameter("acq_info"); acqInfo.AddParameter("device_id", "AcqImgFiles.dll"); acqInfo.AddParameter("line_id", "308C0000"); acqInfo.AddParameter("patient_internal_id", PatientId); acqInfo.AddParameter("series_performing_physician_name", "performing_physician_name"); acqInfoString = acqInfo.GenerateXML(); } catch (Exception ex) { LogRecordType lr = new LogRecordType(); lr.FunctionName = this.mFunctionName; lr.Lable = this.mLabel; string innerText = ex.InnerException == null ? string.Empty : ex.InnerException.Message; lr.Message = ex.Message + innerText == string.Empty ? string.Empty : "(" + innerText + ")"; lr.Passed = false; Log.AddRecord(lr); this.RiseSingleCallCompleteEvent(lr.ResponseTime, lr.Passed, true); this.RiseTestCaseCompleteEvent(); this.mExecuted = this.mRepeat; this.mFailed = this.mRepeat; return; } for (int i = 1; i <= this.mRepeat; i++) { LogRecordType lr = new LogRecordType(); lr.Lable = this.mLabel; lr.FunctionName = this.mFunctionName; try { int attemp = 0; int errorCode = 272; //the error code for session existed. XMLResult result=new XMLResult (); timer.Start(); while (errorCode == 272) { result = new XMLResult(acqService.InvokeMethod("startAcquisition", new object[] { acqInfoString })); errorCode = result.Code; } sessionId = result.SingleResult; XMLResult acqResult = acqService.getAcquisitionResult(sessionId); while (acqResult.IsErrorOccured && attemp < timeOut) //loop while the result code is 0, and the time out is 60s { acqResult = acqService.getAcquisitionResult(sessionId); System.Threading.Thread.Sleep(100); attemp++; } timer.Stop(); lr.ResponseTime = timer.Duration; lr.Passed = !(acqResult.IsErrorOccured); if (!lr.Passed) { if (attemp >= timeOut) lr.Message = "the service did not return after 60s. "+acqResult.Message; else lr.Message = acqResult.Message; this.mFailed++; } else { lr.Message = result.SingleResult +"code: "+ result.Code; this.mExectuedTime += lr.ResponseTime; } } catch (Exception ex) { this.mFailed++; lr.Passed = false; string innerText = ex.InnerException == null ? string.Empty : ex.InnerException.Message; lr.Message = ex.Message + innerText == string.Empty ? string.Empty : "(" + innerText + ")"; } this.mExecuted = i; Log.AddRecord(lr); if(i == this.mRepeat) FinishNotification(); this.RiseSingleCallCompleteEvent(lr.ResponseTime, lr.Passed); } this.RiseTestCaseCompleteEvent(); }
public XMLResult startAcquisition(XMLParameter acqInfo) { this.lastResult = new XMLResult(this.InvokeMethod("startAcquisition", new object[] { acqInfo.GenerateXML() })); return this.lastResult; }
public XMLResult setPresentationStateInfo(XMLParameter indexInfo,string presentationStateInternalID) { this.lastResult = new XMLResult(this.InvokeMethod("setPresentationStateInfo", new object[] { indexInfo.GenerateXML(), presentationStateInternalID })); return this.lastResult; }
public XMLResult createFMS(XMLParameter fmsInfo) { this.lastResult = new XMLResult(this.InvokeMethod("createFMS", new object[] { fmsInfo.GenerateXML() })); return(this.lastResult); }
public override void Run() { string openObjInfo = string.Empty; string psId = string.Empty; KDIS7ImageWindow iw = new KDIS7ImageWindow(); KDIS7ATAssistant ka = new KDIS7ATAssistant(); ApplicationService appService = new ApplicationService(); try { string PatientId = CommonLib.CreatePatient(); ImportService import = new ImportService(); XMLResult importResult = import.importObject(PatientId, string.Empty, @"c:\PASPerformance\001.png",null, true, string.Empty); psId = importResult.MultiResults[1].GetParameterValueByIndex(0); XMLParameter pa = new XMLParameter("two_dimension_viewer"); pa.AddParameter("internal_id", psId); openObjInfo = pa.GenerateXML(); appService.openObjects(pa); iw.ItemByID(psId).WaitProperty("ShownOnScreen", true, 60); } catch (Exception ex) { LogRecordType lr = new LogRecordType(); lr.FunctionName = this.mFunctionName; lr.Lable = this.mLabel; string innerText = ex.InnerException == null ? string.Empty : ex.InnerException.Message; lr.Message = ex.Message + innerText == string.Empty ? string.Empty : "(" + innerText + ")"; lr.Passed = false; Log.AddRecord(lr); this.RiseSingleCallCompleteEvent(lr.ResponseTime, lr.Passed, true); this.RiseTestCaseCompleteEvent(); this.mExecuted = this.mRepeat; this.mFailed = this.mRepeat; return; } for (int i = 1; i <= this.mRepeat; i++) { LogRecordType lr = new LogRecordType(); lr.Lable = this.mLabel; lr.FunctionName = this.mFunctionName; try { XMLResult result = new XMLResult(appService.InvokeMethod("openObjects", new object[] { openObjInfo })); lr.ResponseTime = appService.ResponseTime; lr.Passed = !(result.IsErrorOccured); if (!lr.Passed) { lr.Message = result.Message; this.mFailed++; } else { lr.Message = result.SingleResult; this.mExectuedTime += lr.ResponseTime; } } catch (Exception ex) { this.mFailed++; lr.Passed = false; string innerText = ex.InnerException == null ? string.Empty : ex.InnerException.Message; lr.Message = ex.Message + innerText == string.Empty ? string.Empty : "(" + innerText + ")"; } this.mExecuted = i; Log.AddRecord(lr); this.RiseSingleCallCompleteEvent(lr.ResponseTime, lr.Passed); } this.RiseTestCaseCompleteEvent(); }
public XMLResult createAnalysis3D(string p01_instanceUID, XMLParameter p02_xmlAnalysis3DInfo) { this.lastResult = new XMLResult(this.InvokeMethod("createAnalysis3D", new object[] { p01_instanceUID, p02_xmlAnalysis3DInfo.GenerateXML() })); return(this.lastResult); }