private void GenerateStepID() { List <string> list = new List <string>(); DateTime dtBegin = DateTime.Now; for (int i = 0; i < count; i++) { list.Add(WorklistSCPHelper.GetRandomNumber(maxLenStepID)); } DateTime dtEnd = DateTime.Now; TimeSpan dtSpan = dtEnd.Subtract(dtBegin); double average = (double)dtSpan.TotalMilliseconds / (double)count; foreach (string guid in list) { AddItem(guid, Thread.CurrentThread.ManagedThreadId.ToString(), average.ToString()); } }
public IOutboundRule[] GetRules() { DicomMappingHelper.CleanMappingList <MWLQueryCriteriaItem, MWLQueryResultItem>(Program.ConfigMgt.Config.Rule); WorklistSCPHelper.ModifyQCMappingList_CS <MWLQueryCriteriaItem>(Program.ConfigMgt.Config.Rule.QueryCriteria.MappingList, true); DicomMappingHelper.ModifyQCMappingList_DateTime <MWLQueryCriteriaItem>(Program.ConfigMgt.Config.Rule.QueryCriteria.MappingList, true); DicomMappingHelper.ModifyQCMappingList_FixValue <MWLQueryCriteriaItem>(Program.ConfigMgt.Config.Rule.QueryCriteria.MappingList); DicomMappingHelper.SetDataIDMapping <MWLQueryResultItem>(Program.ConfigMgt.Config.Rule.QueryResult.MappingList); WorklistSCPHelper.SetAdditionalQueryCriteria <MWLQueryCriteriaItem>(Program.ConfigMgt.Config.Rule.QueryCriteria.MappingList, Program.ConfigMgt.Config.AdditionalQueryCriteria, Program.ConfigMgt.Config.AdditionalQueryCriteriaJoinType); return(new IOutboundRule[] { Program.ConfigMgt.Config.Rule }); }
public bool Initialize(string[] arguments) { Program.PreLoading(); Program.Log.Write(Program.AppName + " is running in Adapter.Service host."); DicomMappingHelper.PersonNameRule = Program.ConfigMgt.Config.PersonNameRule; WorklistSCPHelper.ModifyQCMappingList_CS <MWLQueryCriteriaItem>(Program.ConfigMgt.Config.Rule.QueryCriteria.MappingList, false); DicomMappingHelper.ModifyQCMappingList_DateTime <MWLQueryCriteriaItem>(Program.ConfigMgt.Config.Rule.QueryCriteria.MappingList, false); DicomMappingHelper.PreperatMappingList <MWLQueryResultItem>(QRList, Program.ConfigMgt.Config.Rule.QueryResult.MappingList); DicomMappingHelper.PreperatMappingList <MWLQueryCriteriaItem>(QCList, Program.ConfigMgt.Config.Rule.QueryCriteria.MappingList); DicomMappingHelper.CleanMappingList <MWLQueryCriteriaItem, MWLQueryResultItem>(Program.ConfigMgt.Config.Rule); return(true); }