本文整理汇总了C#中ClearCanvas.ImageServer.Model.Study类的典型用法代码示例。如果您正苦于以下问题:C# Study类的具体用法?C# Study怎么用?C# Study使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Study类属于ClearCanvas.ImageServer.Model命名空间,在下文中一共展示了Study类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateStudyDetail
/// <summary>
/// Creates an instance of <see cref="StudyDetails"/> base on a <see cref="Study"/> object.
/// </summary>
/// <param name="study"></param>
/// <returns></returns>
public StudyDetails CreateStudyDetail(Study study)
{
var details = new StudyDetails();
details.StudyInstanceUID = study.StudyInstanceUid;
details.PatientName = study.PatientsName;
details.AccessionNumber = study.AccessionNumber;
details.PatientID = study.PatientId;
details.StudyDescription = study.StudyDescription;
details.StudyDate = study.StudyDate;
details.StudyTime = study.StudyTime;
var controller = new StudyController();
using (IReadContext ctx = PersistentStoreRegistry.GetDefaultStore().OpenReadContext())
{
details.Modalities = controller.GetModalitiesInStudy(ctx, study);
}
if (study.StudyInstanceUid != null)
{
StudyStorage storages = StudyStorage.Load(study.StudyStorageKey);
if (storages != null)
{
details.WriteLock = storages.WriteLock;
details.ReadLock = storages.ReadLock;
details.Status = storages.StudyStatusEnum.ToString();
}
}
return details;
}
示例2: GetSeries
public IList<Series> GetSeries(Study study)
{
SeriesSelectCriteria criteria = new SeriesSelectCriteria();
criteria.StudyKey.EqualTo(study.Key);
return _seriesAdaptor.Get(criteria);
}
示例3: ValidationStudyInfo
public ValidationStudyInfo(Study theStudy, ServerPartition partition)
{
ServerAE = partition.AeTitle;
PatientsName = theStudy.PatientsName;
PatientsId = theStudy.PatientId;
StudyInstaneUid = theStudy.StudyInstanceUid;
AccessionNumber = theStudy.AccessionNumber;
StudyDate = theStudy.StudyDate;
}
示例4: LoadStudy
/// <summary>
/// Loads the related <see cref="Study"/> entity.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
private Study LoadStudy(IPersistenceContext context)
{
if (_study == null)
{
lock (SyncRoot)
{
_study = Study.Find(context, StudyStorageKey);
}
}
return _study;
}
示例5: DoSeriesLevelValidation
private void DoSeriesLevelValidation(StudyStorageLocation storageLocation, StudyXml studyXml, Study study)
{
IDictionary<string, Series> seriesList = study.Series;
foreach (var entry in seriesList)
{
Series series = entry.Value;
SeriesXml seriesXml = studyXml[series.SeriesInstanceUid];
ValidateSeries(storageLocation, series, seriesXml);
}
}
示例6: LoadStudy
/// <summary>
/// Loads the related <see cref="Study"/> entity.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public Study LoadStudy(IPersistenceContext context)
{
StudyStorage storage = LoadStudyStorage(context);
if (_study == null)
{
lock (_syncLock)
{
_study = storage.LoadStudy(context);
}
}
return _study;
}
示例7: LoadAdditionalEntities
private void LoadAdditionalEntities()
{
Debug.Assert(ServerPartition != null);
Debug.Assert(StorageLocation != null);
using (ServerExecutionContext context = new ServerExecutionContext())
{
if (_filesystem != null)
_filesystem = FilesystemMonitor.Instance.GetFilesystemInfo(StorageLocation.FilesystemKey);
_study = StorageLocation.LoadStudy(context.ReadContext);
_patient = Patient.Load(context.ReadContext, _study.PatientKey);
}
}
示例8: CreatePatientSummary
/// <summary>
/// Returns an instance of <see cref="PatientSummary"/> for a <see cref="Study"/>.
/// </summary>
/// <param name="study"></param>
/// <returns></returns>
/// <remark>
///
/// </remark>
static public PatientSummary CreatePatientSummary(Study study)
{
PatientSummary patient = new PatientSummary();
patient.PatientId = study.PatientId;
patient.Birthdate = study.PatientsBirthDate;
patient.PatientName = study.PatientsName;
patient.Sex = study.PatientsSex;
PatientAdaptor adaptor = new PatientAdaptor();
Patient pat = adaptor.Get(study.PatientKey);
patient.IssuerOfPatientId = pat.IssuerOfPatientId;
return patient;
}
示例9: GetStudy
public Study GetStudy()
{
if (_study == null)
{
lock (SyncRoot)
{
using (var context = new ServerExecutionContext())
{
_study = LoadStudy(context.ReadContext);
}
}
}
return _study;
}
示例10: GetStudy
public Study GetStudy()
{
if (_study == null)
{
lock (SyncRoot)
{
// TODO: Use ExecutionContext to re-use db connection if possible
// This however requires breaking the Common --> Model dependency.
using (IReadContext readContext = PersistentStoreRegistry.GetDefaultStore().OpenReadContext())
{
_study = LoadStudy(readContext);
}
}
}
return _study;
}
示例11: LoadRelatedEntities
private void LoadRelatedEntities()
{
if (_study==null || _studyStorage==null)
{
using (var context = new ServerExecutionContext())
{
lock (SyncRoot)
{
if (_study == null)
_study = LoadStudy(context.ReadContext);
if (_studyStorage == null)
_studyStorage = LoadStudyStorage(context.ReadContext);
}
}
}
}
示例12: LoadRelatedEntities
private void LoadRelatedEntities()
{
if (_study==null || _studyStorage==null)
{
using (IReadContext context = PersistentStoreRegistry.GetDefaultStore().OpenReadContext())
{
lock (SyncRoot)
{
if (_study == null)
_study = LoadStudy(context);
if (_studyStorage == null)
_studyStorage = LoadStudyStorage(context);
}
}
}
}
示例13: StudyEditor
/// <summary>
/// Constructor.
/// </summary>
/// <param name="thePartition"></param>
/// <param name="location"></param>
/// <param name="thePatient"></param>
/// <param name="theStudy"></param>
public StudyEditor(ServerPartition thePartition, StudyStorageLocation location, Patient thePatient, Study theStudy, WorkQueue workQueue)
{
FailureReason = string.Empty;
Platform.CheckForNullReference(thePartition, "thePartition");
Platform.CheckForNullReference(location, "location");
Platform.CheckForNullReference(thePatient, "thePatient");
Platform.CheckForNullReference(theStudy, "theStudy");
ServerPartition = thePartition;
StorageLocation = location;
Patient = thePatient;
Study = theStudy;
_workQueue = workQueue;
// Scrub for invalid characters that may cause a failure when the Xml is generated for the history
Patient.PatientId = XmlUtils.XmlCharacterScrub(Patient.PatientId);
Patient.PatientsName = XmlUtils.XmlCharacterScrub(Patient.PatientsName);
Study.StudyDescription = XmlUtils.XmlCharacterScrub(Study.StudyDescription);
Study.ReferringPhysiciansName = XmlUtils.XmlCharacterScrub(Study.ReferringPhysiciansName);
Study.PatientId = XmlUtils.XmlCharacterScrub(Study.PatientId);
Study.PatientsName = XmlUtils.XmlCharacterScrub(Study.PatientsName);
}
示例14: GetFileSystemQueueItems
public IList<FilesystemQueue> GetFileSystemQueueItems(Study study)
{
Platform.CheckForNullReference(study, "Study");
FileSystemQueueAdaptor adaptor = new FileSystemQueueAdaptor();
FilesystemQueueSelectCriteria fileSystemQueueCriteria = new FilesystemQueueSelectCriteria();
fileSystemQueueCriteria.StudyStorageKey.EqualTo(study.StudyStorageKey);
fileSystemQueueCriteria.ScheduledTime.SortAsc(0);
return adaptor.Get(fileSystemQueueCriteria);
}
示例15: GetCountPendingExternalEditWorkQueueItems
public int GetCountPendingExternalEditWorkQueueItems(Study study)
{
Platform.CheckForNullReference(study, "Study");
var adaptor = new WorkQueueAdaptor();
var workQueueCriteria = new WorkQueueSelectCriteria();
workQueueCriteria.StudyStorageKey.EqualTo(study.StudyStorageKey);
workQueueCriteria.WorkQueueTypeEnum.EqualTo(WorkQueueTypeEnum.ExternalEdit);
return adaptor.GetCount(workQueueCriteria);
}