//1.2.156.112605.75006877305224.20121123025201.9.4420.2 private void LoadStudyByInterationInfo(byte[] interationStudyInfo) { try { Logger.LogFuncUp(); var infoWrapper = new InteractionInfoWrapper(); infoWrapper.Deserialize(interationStudyInfo); var studyUidList = (from study in infoWrapper.GetStudyList() select study.UID).ToList(); var seriesUidList = (from series in infoWrapper.GetSeriesList() select series.UID).ToList(); LoadStudies(studyUidList); if (seriesUidList.Count == 1 && infoWrapper.GetSrcAppName() == "PA")//Efilm series from PA { AddEFilmSeriesToFilmPage(seriesUidList.FirstOrDefault()); } Logger.LogFuncDown(); } catch (Exception ex) { Logger.LogError(ex.StackTrace); } }
private void SynchronousLoadStudyByInterationInfo(byte[] interationStudyInfo) { try { var infoWrapper = new InteractionInfoWrapper(); infoWrapper.Deserialize(interationStudyInfo); List <string> studyInstanceUidList = (from study in infoWrapper.GetStudyList() select study.UID).ToList(); LoadStudies(studyInstanceUidList); } catch (Exception ex) { Logger.LogError(ex.StackTrace); } }
private void LoadStudyByInterationInfo(byte[] interationStudyInfo) { try { var infoWrapper = new InteractionInfoWrapper(); infoWrapper.Deserialize(interationStudyInfo); List <string> studyInstanceUidList = (from study in infoWrapper.GetStudyList() select study.UID).ToList(); FilmingViewerContainee.Main.StudyInstanceUID = studyInstanceUidList[0]; LoadStudies(studyInstanceUidList); FilmingViewerContainee.DataHeaderJobManagerInstance.JobFinished(); } catch (Exception ex) { Logger.LogError(ex.StackTrace); } }
public void LoadStudyByInterationInfo(InteractionInfoWrapper infoWrapper) { try { //var infoWrapper = new InteractionInfoWrapper(); //infoWrapper.Deserialize(interationStudyInfo); List <string> studyInstanceUidList = (from study in infoWrapper.GetStudyList() select study.UID).ToList(); FilmingViewerContainee.Main.StudyInstanceUID = studyInstanceUidList[0]; LoadStudies(studyInstanceUidList); var contextString = "[Switched to Filming Application]" + string.Join(";", studyInstanceUidList); Logger.Instance.LogSvcInfo(Logger.Source, FilmingSvcLogUid.LogUidSvcInfoSwitchToFilming, contextString); ProcessInfomationFromPa(infoWrapper); } catch (Exception ex) { Logger.LogError(ex.StackTrace); } }
/// \brief Handle command /// /// \param[in] cc command context /// \param[in] marObj marshal object /// /// \return 0 for success and -1 for failure public override int HandleCommand(CommandContext pContext, ISyncResult pSyncResult) { try { CommandID id = (CommandID)pContext.iCommandId; Logger.LogFuncUp("Command: " + id.ToString()); switch (id) { case CommandID.SWITCH_TO_APPLICATION: { Logger.LogInfo("Get Mainframe's SWITCH_TO_APPLICATION information!"); if (!FilmingViewerContainee.IsInitialized) { FilmingViewerContainee.InitializeFilmingCard(); } //var switchHandler=new SwitchToFilmingCommandHandler(pContext.sSerializeObject); //switchHandler.LoadStudyByInterationInfo(pContext.sSerializeObject); var infoWrapper = new InteractionInfoWrapper(); infoWrapper.Deserialize(pContext.sSerializeObject); if (infoWrapper.GetSrcAppName().ToUpper() == "PA") //只有从pa进入的切换才进入JobManager队列处理 { var filmingCard = FilmingViewerContainee.FilmingViewerWindow as FilmingCard; if (filmingCard != null && filmingCard.IsModalityDBT()) { break; } List <string> studyInstanceUidList = (from study in infoWrapper.GetStudyList() select study.UID).ToList(); if (studyInstanceUidList.Count > 0) { FilmingViewerContainee.DataHeaderJobManagerInstance.PushProcessedJob( new SwitchToFilmingCommandHandler(infoWrapper)); } } } break; case CommandID.SynchronousStudyList: { Logger.LogInfo("Get Mainframe's Update_StudyList information!"); if (!FilmingViewerContainee.IsInitialized) { FilmingViewerContainee.InitializeFilmingCard(); } SynchronousLoadStudyByInterationInfo(pContext.sSerializeObject); // FilmingViewerContainee.DataHeaderJobManagerInstance.PushProcessedJob(new SynchronousToFilmingCommandHandler(pContext.sSerializeObject)); } break; case CommandID.SAVE_EFILM_COMPLETE_COMMAND: var encoding = new UTF8Encoding( ); string constructedString = encoding.GetString(pContext.sSerializeObject); string[] msg = constructedString.Split('#'); //msg = "patientName" + ["#ErrorInfo"] if (msg.Length > 1) { //FilmingViewerContainee.ShowStatusWarning("UID_Filming_Fail_To_Save_EFilm", msg[0]); FilmingViewerContainee.Main.ShowStatusWarning("UID_Filming_Fail_To_Save_EFilm", msg[0]); } else { //FilmingViewerContainee.Main.ShowStatusInfo("UID_Filming_Complete_To_Save_EFilm", msg[0]); FilmingViewerContainee.Main.ShowStatusInfo("UID_Filming_Complete_To_Save_EFilm", msg[0]); } break; case CommandID.AutoLoadSeries: //auto load series from review //var seriesUids = pContext.sStringObject.Split(';'); //LoadSeries(seriesUids); //FilmingViewerContainee.Main.ShowStatusInfo("UID_Filming_Request_Of_Loading_Series_From_Review"); FilmingViewerContainee.Main.ShowStatusInfo("UID_Filming_Request_Of_Loading_Series_From_Review"); FilmingViewerContainee.DataHeaderJobManagerInstance.PushProcessedJob(new ReviewSeriesCommandHandler(pContext.sStringObject)); break; case CommandID.SET_LAYOUT_COMMAND: if (!FilmingViewerContainee.IsInitialized) { FilmingViewerContainee.InitializeFilmingCard(); } FilmingViewerContainee.DataHeaderJobManagerInstance.PushProcessedJob(new SetLayoutCommandHandler(new LayoutCommandInfo(pContext.sStringObject))); break; default: break; } Logger.LogFuncDown(); } catch (Exception exp) { //MedViewerLogger.Instance.LOG_DEV_ERROR( // MedViewerLogger.Source, // MedViewerLogger.LogUID, // "Exception: " + exp.Message); Logger.LogFuncException(exp.Message); return(-1); } return(0); }