public static void GetStudyMemo(StudyKey key, out StudyMemoItem item, out int count) { if (AppUtil.DbType == AppUtil.DB_CLD) { LCL.GetStudyMemo(key, out item, out count); } else { throw new NotImplementedException(); } }
public static void GetStudyMemoHistory(StudyKey key, out List <StudyMemoItem> items) { if (AppUtil.DbType == AppUtil.DB_CLD) { LCL.GetStudyMemoHistory(key, out items); } else { throw new NotImplementedException(); } }
public static bool SetKeyword(StudyKey key, string item) { if (AppUtil.DbType == AppUtil.DB_CLD) { return(LCL.SetKeyword(key, item)); } else { throw new NotImplementedException(); } }
public static bool SetStudyMemo(StudyKey key, StudyMemoItem item) { if (AppUtil.DbType == AppUtil.DB_CLD) { return(LCL.SetStudyMemo(key, item)); } else { throw new NotImplementedException(); } }
public static bool DelStudy(StudyKey key, out List <string> items) { if (AppUtil.DbType == AppUtil.DB_CLD) { return(LCL.DelStudy(key, out items)); } else { throw new NotImplementedException(); } }
public static void LoginUrl(string loginID, out string SID) { if (AppUtil.LoginAuth == AppUtil.LOGIN_EXP) { EXP.LoginUrl(loginID, out SID); } else { LCL.LoginUrl(loginID, out SID); } LCL.DelLogin(); }
public static void Login(string loginID, string password, string flag, out string SID, out string UserID, out int IsAdmin) { if (AppUtil.LoginAuth == AppUtil.LOGIN_EXP) { EXP.Login(loginID, password, out SID); UserID = null; IsAdmin = 0; } else { LCL.Login(loginID, password, flag, out SID, out UserID, out IsAdmin); } LCL.DelLogin(); }
public static void GetSeriesList(StudyKey key, out List <SeriesTag> tags) { if (key.IsPacsSearch) { DCM.GetSeriesList(key, out tags); } else if (AppUtil.DbType == AppUtil.DB_RS) { RS.GetSeriesList(key, out tags); } else if (AppUtil.DbType == AppUtil.DB_YCOM) { YCOM.GetSeriesList(key, out tags); } else { LCL.GetSeriesList(key, out tags); } }
public static bool GetStudyKey(FindParam prm, out string patientid, out List <string> studykey) { if (prm.IsPacsSearch) { return(DCM.GetStudyKey(prm, out patientid, out studykey)); } else if (AppUtil.DbType == AppUtil.DB_RS) { return(RS.GetStudyKey(prm, out patientid, out studykey)); } else if (AppUtil.DbType == AppUtil.DB_YCOM) { return(YCOM.GetStudyKey(prm, out patientid, out studykey)); } else { return(LCL.GetStudyKey(prm, out patientid, out studykey)); } }
//T public static void GetStudyList(FindParam prm, out List <StudyTag> tags, out int count) { if (prm.IsPacsSearch) { DCM.GetStudyList(prm, out tags, out count); } else if (AppUtil.DbType == AppUtil.DB_RS) { RS.GetStudyList(prm, out tags, out count); } else if (AppUtil.DbType == AppUtil.DB_YCOM) { YCOM.GetStudyList(prm, out tags, out count); } else { LCL.GetStudyList(prm, out tags, out count); } }
public static void GetStudyList_Kako(string patientid, StudyKey key, out List <StudyTag> tags) { if (key.IsPacsSearch) { DCM.GetStudyList_Kako(patientid, key, out tags); } else if (AppUtil.DbType == AppUtil.DB_RS) { RS.GetStudyList_Kako(patientid, key, out tags); } else if (AppUtil.DbType == AppUtil.DB_YCOM) { YCOM.GetStudyList_Kako(patientid, key, out tags); } else { LCL.GetStudyList_Kako(patientid, key, out tags); } }
public static void GetImageList(LoginItem login, SeriesKey key, out List <ImageTag> imTags, out List <SeriesTag> seTags) { if (key.IsPacsSearch) { DCM.GetImageList(login, key, out imTags, out seTags); } else if (AppUtil.DbType == AppUtil.DB_RS) { RS.GetImageList(key, out imTags); seTags = null; } else if (AppUtil.DbType == AppUtil.DB_YCOM) { YCOM.GetImageList(key, out imTags); seTags = null; } else { LCL.GetImageList(key, out imTags); seTags = null; } }
public static void GetThumbnail(SeriesKey key, out byte[] thumb, out bool save) { if (key.IsPacsSearch) { DCM.GetThumbnail(key, out thumb); save = true; } else if (AppUtil.DbType == AppUtil.DB_RS) { RS.GetThumbnail(key, out thumb); save = false; } else if (AppUtil.DbType == AppUtil.DB_YCOM) { YCOM.GetThumbnail(key, out thumb, out save); } else { LCL.GetThumbnail(key, out thumb); save = true; } }
public static bool SetUserPassword(string UserID, string Password, string NewPassword) { return(LCL.SetUserPassword(UserID, Password, NewPassword)); }
public static void SetUserConfig(string UserID, Dictionary <string, string> items) { LCL.SetUserConfig(UserID, items); }
public static void LoginCheck(string SID, out LoginItem item) { LCL.LoginCheck(SID, out item); }
public static void GetStorageList(out List <StorageItem> items) { LCL.GetStorageList(out items); }
public static void GetAnnotationList(LoginItem login, out List <AnnotationItem> items) { LCL.GetAnnotationList(login, out items); }
public static void GetModalityConfig(LoginItem login, out Dictionary <string, Dictionary <string, string> > items) { LCL.GetModalityConfig(login, out items); }
public static void GetUserConfig(LoginItem login, out Dictionary <string, string> items) { LCL.GetUserConfig(login, out items); }
public static void GetGsps(GSPSKey key, out List <ImageKey> items) { LCL.GetGsps(key, out items); }
//サムネイルの作成 public static void GetThumbnail(SeriesKey key, out byte[] thumb) { thumb = null; if (key.SOPInstanceUID == null || key.SOPInstanceUID == "") { using (var pc = new PacsComm()) { DicomTagsResult ret = pc.CFindImage(key.StudyInstanceUID, key.SeriesInstanceUID); if (!ret.IsSuccess) { LogUtil.Error("CFINDに失敗しました。"); return; } var tags = new List <Tuple <string, long> >(); foreach (var dcmTag in ret.Tags) { long InstanceNumber = 0; Int64.TryParse(dcmTag.GetTagValue(DicomDic.Find("InstanceNumber").Tag), out InstanceNumber); var tag = Tuple.Create(dcmTag.GetTagValue(DicomDic.Find("SOPInstanceUID").Tag), InstanceNumber); tags.Add(tag); } //ソート tags = tags.OrderBy(n => n.Item2).ToList(); if (tags.Count > 0) { key.SOPInstanceUID = tags[0].Item1; } } } if (key.SOPInstanceUID != null && key.SOPInstanceUID != "") { //DICOMがある { LCL.GetImageStorageID(ref key); if (key.StorageID != null && key.StorageID != "") { var sto = DbCacheUtil.GetStorage(key.StorageID); using (var imp = new Impersonate(sto.LogonUsername, sto.LogonPassword)) { var file = FileUtil.GetDicomFile(key); if (File.Exists(file)) { DicomUtil.DicomToThumb(file, out thumb); if (thumb != null) { return; } } } } } //DICOMがない using (var pc = new PacsComm()) { //画像取得 DicomFilesResult ret = pc.CMoveImage(key.StudyInstanceUID, key.SeriesInstanceUID, key.SOPInstanceUID); if (!ret.IsSuccess) { LogUtil.Error("CMoveImage"); return; } if (ret.Files.Length == 0) { LogUtil.Error("CMoveImage [File=0]"); return; } LogUtil.Debug1("CMoveImage [File={0}]", ret.Files.Length.ToString()); foreach (DicomFile dcmfile in ret.Files) { var file = dcmfile.FileName.Trim(); if (!File.Exists(file)) { continue; } DicomUtil.DicomToThumb(file, out thumb); if (thumb != null) { return; } } } } }
public static void GetMServerConfig(out Dictionary <string, Tuple <string, string> > items) { LCL.GetMServerConfig(out items); }
public static void CheckLoginID(string LoginID, out bool used) { LCL.CheckLoginID(LoginID, out used); }
public static void GetSaiban(string SaibanID, out string item) { LCL.GetSaiban(SaibanID, out item); }
//I public static bool DicomToDB(List <Dictionary <string, string> > data) { return(LCL.DicomToDB(data)); }
public static void SetMServerConfig(Dictionary <string, string> items) { LCL.SetMServerConfig(items); }
public static bool UpdateStudy(string StudyUid) { return(LCL.UpdateStudy(StudyUid)); }
static AppUtil() { //LOGフォルダ LogPath = Path.Combine(LogPath, Path.GetFileName(System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath.TrimEnd('\\'))); LogUtil.Info("START"); //ライセンスチェック if (File.Exists(LicensePath)) { //////var License = File.ReadAllText(LicensePath); //////if (License != CryptoUtil.LicenseString()) //////{ ////// LogUtil.Error("License NG"); ////// return; //////} } else { LogUtil.Error("License Not Found"); return; } //ServerConfig取得 Dictionary <string, string> svcfg; LCL.GetServerConfig(out svcfg); //サーバー設定 if (svcfg.ContainsKey("DbType")) { DbType = svcfg["DbType"]; } if (svcfg.ContainsKey("LoginAuth")) { LoginAuth = svcfg["LoginAuth"]; } if (svcfg.ContainsKey("ThumbPath")) { ThumbPath = svcfg["ThumbPath"]; } if (svcfg.ContainsKey("ReportPath")) { ReportPath = svcfg["ReportPath"]; } if (svcfg.ContainsKey("MemoOutputPath")) { MemoOutputPath = svcfg["MemoOutputPath"]; } if (svcfg.ContainsKey("DeletePath")) { DeletePath = svcfg["DeletePath"]; } if (svcfg.ContainsKey("RetryCount")) { RetryCount = int.Parse(svcfg["RetryCount"]); } if (svcfg.ContainsKey("SleepTime")) { SleepTime = int.Parse(svcfg["SleepTime"]); } if (svcfg.ContainsKey("DBTimeout")) { DBTimeout = int.Parse(svcfg["DBTimeout"]); } if (svcfg.ContainsKey("ExeTimeout")) { ExeTimeout = int.Parse(svcfg["ExeTimeout"]) * 1000; } if (svcfg.ContainsKey("LockoutThreshold")) { LockoutThreshold = int.Parse(svcfg["LockoutThreshold"]); } if (svcfg.ContainsKey("LockoutDuration")) { LockoutDuration = int.Parse(svcfg["LockoutDuration"]); } if (svcfg.ContainsKey("LockoutReset")) { LockoutReset = int.Parse(svcfg["LockoutReset"]); } if (svcfg.ContainsKey("TimeLimit")) { TimeLimit = int.Parse(svcfg["TimeLimit"]); } if (svcfg.ContainsKey("MaxStudyList")) { MaxStudyList = int.Parse(svcfg["MaxStudyList"]); } if (svcfg.ContainsKey("DicomExt")) { DicomExt = svcfg["DicomExt"]; } if (svcfg.ContainsKey("CompExe")) { CompExe = svcfg["CompExe"]; } if (svcfg.ContainsKey("CompType")) { CompType = svcfg["CompType"]; } if (svcfg.ContainsKey("CompOption")) { CompOption = svcfg["CompOption"]; } if (svcfg.ContainsKey("ThumbPos")) { ThumbPos = svcfg["ThumbPos"]; } if (svcfg.ContainsKey("LoginUrl")) { LoginUrl = svcfg["LoginUrl"]; } if (svcfg.ContainsKey("RapidServ_Port")) { rsPort = ushort.Parse(svcfg["RapidServ_Port"]); } if (svcfg.ContainsKey("RapidServ_Nas")) { rsNas = int.Parse(svcfg["RapidServ_Nas"]); } if (svcfg.ContainsKey("RapidServ_Max")) { rsMax = int.Parse(svcfg["RapidServ_Max"]); } if (svcfg.ContainsKey("RapidServ_CM_PatientID")) { cmPatientID = int.Parse(svcfg["RapidServ_CM_PatientID"]); } if (svcfg.ContainsKey("RapidServ_CM_PatientName")) { cmPatientName = int.Parse(svcfg["RapidServ_CM_PatientName"]); } if (svcfg.ContainsKey("RapidServ_CM_AccessionNumber")) { cmAccessionNumber = int.Parse(svcfg["RapidServ_CM_AccessionNumber"]); } if (svcfg.ContainsKey("RapidServ_CM_Modality")) { cmModality = int.Parse(svcfg["RapidServ_CM_Modality"]); } if (svcfg.ContainsKey("YComClientInfo")) { YComClientInfo = svcfg["YComClientInfo"]; } if (svcfg.ContainsKey("YComHospitalID")) { YComHospitalID = svcfg["YComHospitalID"]; } if (svcfg.ContainsKey("YComUserID")) { YComUserID = svcfg["YComUserID"]; } if (svcfg.ContainsKey("YComOnlineLocation")) { YComOnlineLocation = int.Parse(svcfg["YComOnlineLocation"]); } if (svcfg.ContainsKey("DcmtkExePath")) { DcmtkExePath = svcfg["DcmtkExePath"]; } if (svcfg.ContainsKey("DcmtkDicPath")) { DcmtkDicPath = svcfg["DcmtkDicPath"]; } if (svcfg.ContainsKey("DcmtkTempPath")) { DcmtkTempPath = svcfg["DcmtkTempPath"]; } if (svcfg.ContainsKey("DcmtkCFindOptions")) { DcmtkCFindOptions = svcfg["DcmtkCFindOptions"]; } if (svcfg.ContainsKey("DcmtkCMoveOptions")) { DcmtkCMoveOptions = svcfg["DcmtkCMoveOptions"]; } if (svcfg.ContainsKey("DcmtkMyAETitle")) { DcmtkMyAETitle = svcfg["DcmtkMyAETitle"]; } if (svcfg.ContainsKey("DcmtkMyPort")) { DcmtkMyPort = svcfg["DcmtkMyPort"]; } if (svcfg.ContainsKey("DcmtkPacsAETitle")) { DcmtkPacsAETitle = svcfg["DcmtkPacsAETitle"]; } if (svcfg.ContainsKey("DcmtkPacsPeer")) { DcmtkPacsPeer = svcfg["DcmtkPacsPeer"]; } if (svcfg.ContainsKey("DcmtkPacsPort")) { DcmtkPacsPort = svcfg["DcmtkPacsPort"]; } if (svcfg.ContainsKey("CFindTimeout")) { CFindTimeout = int.Parse(svcfg["CFindTimeout"]) * 1000; } if (svcfg.ContainsKey("CMoveTimeout")) { CMoveTimeout = int.Parse(svcfg["CMoveTimeout"]) * 1000; } if (svcfg.ContainsKey("ImageCacheMax")) { ImageCacheMax = int.Parse(svcfg["ImageCacheMax"]); } if (svcfg.ContainsKey("ImageCacheTime")) { ImageCacheTime = int.Parse(svcfg["ImageCacheTime"]); } if (svcfg.ContainsKey("HideData")) { HideData = svcfg["HideData"]; } string mods = ""; if (svcfg.ContainsKey("SkipModality")) { mods = svcfg["SkipModality"]; } SkipModality = mods.Split(','); mods = ""; if (svcfg.ContainsKey("ModalityCompType")) { mods = svcfg["ModalityCompType"]; } foreach (string mod in mods.Split(',')) { string[] tmp = mod.Split('='); if (tmp.Length > 1) { ModalityCompType.Add(tmp[0], tmp[1]); } } mods = ""; if (svcfg.ContainsKey("ModalityCompOption")) { mods = svcfg["ModalityCompOption"]; } foreach (string mod in mods.Split(',')) { string[] tmp = mod.Split('='); if (tmp.Length > 1) { ModalityCompOption.Add(tmp[0], tmp[1]); } } mods = ""; if (svcfg.ContainsKey("ModalityThumbPos")) { mods = svcfg["ModalityThumbPos"]; } foreach (string mod in mods.Split(',')) { string[] tmp = mod.Split('='); if (tmp.Length > 1) { ModalityThumbPos.Add(tmp[0], tmp[1]); } } string addr = ""; if (svcfg.ContainsKey("RapidServ_Addr")) { addr = svcfg["RapidServ_Addr"]; } if (addr != "") { var tmp1 = new List <byte>(); foreach (var s in addr.Split('.')) { tmp1.Add(Convert.ToByte(s)); } rsAddr = tmp1.ToArray(); } //TryDb初期化 TryDb.TryDbConfig.CommandTimeout = DBTimeout; }
//GSPS public static void GetGspsList(SeriesKey key, out List <GSPSItem> items) { LCL.GetGspsList(key, out items); }