//Convert study public static StudyInfoModel StudyDb2Pa(Study dbStudy) { GlobalDefinition.LoggerWrapper.LogTraceInfo(" public static StudyInfoModel StudyDB2PA() start"); if (null == dbStudy) { return(null); } StudyInfoModel paStudy = null; StudyDb2Pa(dbStudy, out paStudy); Patient dbPatient = null; PatientInfoModel paPatient = null; try { dbPatient = DbWrapper.GetPatientByPatientUID(dbStudy.PatientUIDFk); } catch (Exception ex) { GlobalDefinition.LoggerWrapper.LogDevError(ex.Message); return(null); } PatientDb2Pa(dbPatient, out paPatient); //ProcedureListDB2PA(dbStudy.GetProcedureList()); paStudy.Patient = paPatient; GlobalDefinition.LoggerWrapper.LogTraceInfo(" public static StudyInfoModel StudyDB2PA() end"); return(paStudy); }
/// <summary> /// 更新PhysicianOptionConfig配置文件 /// Mini PR里的医生配置不做同步更新,原因如下: /// 医生配置的目的是让使用最频繁的医生显示在医生列表中。Mini PR中修改已完成的检查时,那时所选则的医生不一定是使用最频繁的医生。 /// 所有不需要覆盖掉医生列表。 /// </summary> /// <param name="study">检查信息</param> /// <returns></returns> public bool Update(StudyInfoModel study) { GlobalDefinition.LoggerWrapper.LogTraceInfo("Enter function Update"); if (study == null) { GlobalDefinition.LoggerWrapper.LogTraceInfo( "Exit function Update----Parameter study is null return false"); return(false); } try { var operatorNames = PreparePhysicianNames("OperatorNames"); var performingPhysicianNames = PreparePhysicianNames("PerformingPhysicianNames"); var referencePhysicianNames = PreparePhysicianNames("ReferencePhysicianNames"); var requestingPhysicianNames = PreparePhysicianNames("RequestingPhysicianNames"); var isChanged = IsPhysicianOptionDictionaryChanged(study.OperatorName, operatorNames) | IsPhysicianOptionDictionaryChanged(study.PerformingPhysician, performingPhysicianNames) | IsPhysicianOptionDictionaryChanged(study.ReferringPhysicianName, referencePhysicianNames) | IsPhysicianOptionDictionaryChanged(study.RequestingPhysician, requestingPhysicianNames); if (isChanged) { var physicianOptions = new SerializableDictionary <string, PhysicianOption>(); ConstructPhysicianOptionDictionary("OperatorNames", study.OperatorName, operatorNames, ref physicianOptions); ConstructPhysicianOptionDictionary("PerformingPhysicianNames", study.PerformingPhysician, performingPhysicianNames, ref physicianOptions); ConstructPhysicianOptionDictionary("ReferencePhysicianNames", study.ReferringPhysicianName, referencePhysicianNames, ref physicianOptions); ConstructPhysicianOptionDictionary("RequestingPhysicianNames", study.RequestingPhysician, requestingPhysicianNames, ref physicianOptions); this.PhysicianOptions = physicianOptions; ConfigManager.Save(PaConfigType.PhysicianOptionConfig, this); GlobalDefinition.LoggerWrapper.LogTraceInfo("Exit function Update----return true"); return(true); } } catch (Exception ex) { GlobalDefinition.LoggerWrapper.LogDevError(ex.Message); GlobalDefinition.LoggerWrapper.LogDevError(ex.StackTrace); } GlobalDefinition.LoggerWrapper.LogTraceInfo("Exit function Update----return false"); return(false); }
public static void StudyDb2Pa(Study dbStudy, out StudyInfoModel studyInfoModel) { GlobalDefinition.LoggerWrapper.LogTraceInfo( "enter function --- static void StudyDB2PA(Study dbStudy, out StudyInfoModel studyInfoModel)"); studyInfoModel = null; if (null == dbStudy) { GlobalDefinition.LoggerWrapper.LogDevError(" DB Study is null."); return; } studyInfoModel = new StudyInfoModel(); }
public PRViewModel() { InitIdCreater(); var studyinfo = new StudyInfoModel(); var patient = new PatientInfoModel(); studyinfo.AccessionNumber = "asdasd"; patient.PatientName = "juli.hu"; studyinfo.Patient = patient; StudyInfo = studyinfo; //调用此方法为了提前初始化jason类中的数据,以便该方法在第2次调用后速度更快 //该方法在第一次调用时很慢 SerializeHelper.CloneObject <StudyInfoModel>(new StudyInfoModel()); //订阅事件 eventAggregator = ServiceLocator.Current.GetInstance <IEventAggregator>(); eventAggregator.GetEvent <PaSelectChangeEvent>().Subscribe(PrStudyInfoChange); }
//Convert study public static Study StudyPa2Db(StudyInfoModel paStudy) { GlobalDefinition.LoggerWrapper.LogTraceInfo(" public static Study StudyPA2DB() start"); if (null == DbWrapper) { GlobalDefinition.LoggerWrapper.LogDevError("DBWrapper is null"); return(null); } if (null == paStudy) { GlobalDefinition.LoggerWrapper.LogDevError("Input PA study is null."); return(null); } Study dbStudy = null; try { dbStudy = DbWrapper.GetStudyByStudyInstanceUID(paStudy.InstanceUID); if (null == dbStudy) { dbStudy = DbWrapper.CreateStudy(); } } catch (System.Exception ex) { GlobalDefinition.LoggerWrapper.LogDevError(ex.Message); return(null); } GlobalDefinition.LoggerWrapper.LogTraceInfo(" public static Study StudyPA2DB() end"); return(dbStudy); }
//事件触发 public void PrStudyInfoChange(StudyInfoModel selectStudyInfoModel) { this.StudyInfo = selectStudyInfoModel; }