public static DeletedStudyInfo CreateDeletedStudyInfo(StudyDeleteRecord record)
        {
            Filesystem fs = Filesystem.Load(record.FilesystemKey);

            StudyDeleteExtendedInfo extendedInfo = XmlUtils.Deserialize <StudyDeleteExtendedInfo>(record.ExtendedInfo);
            DeletedStudyInfo        info         = new DeletedStudyInfo
            {
                DeleteStudyRecord = record.GetKey(),
                RowKey            = record.GetKey().Key,
                StudyInstanceUid  = record.StudyInstanceUid,
                PatientsName      = record.PatientsName,
                AccessionNumber   = record.AccessionNumber,
                PatientId         = record.PatientId,
                StudyDate         = record.StudyDate,
                PartitionAE       = record.ServerPartitionAE,
                StudyDescription  = record.StudyDescription,
                BackupFolderPath  = fs.GetAbsolutePath(record.BackupPath),
                ReasonForDeletion = record.Reason,
                DeleteTime        = record.Timestamp,
                UserName          = extendedInfo.UserName,
                UserId            = extendedInfo.UserId
            };

            if (record.ArchiveInfo != null)
            {
                info.Archives = XmlUtils.Deserialize <DeletedStudyArchiveInfoCollection>(record.ArchiveInfo);
            }


            return(info);
        }
Beispiel #2
0
 public string ResolveAbsolutePath(string relativePath)
 {
     return(_filesystem.GetAbsolutePath(relativePath));
 }