예제 #1
0
        public string DoTransfer(RevTransferMdl transferMdl)
        {
            bool doTransferResult = false;

            TransferJobTableMdl model = this.GetTransferJobModel(transferMdl);

            bool isWholeStudy = transferMdl.IsCheckAll;

            int checkCompress = 0;

            if (int.Parse(transferMdl.TransferCompressType) < 0)
            {
                checkCompress = 0;
            }
            else
            {
                checkCompress = 1;
            }

            doTransferResult = _dbHelper.SaveTransferJob(transferMdl.PacsList,
                                                         TransferJobCommandType.ID_COMMAND_PUSHIMAGES, model, isWholeStudy, transferMdl.IsCreateNewGuid,
                                                         checkCompress, transferMdl.TransferCompressType, transferMdl.TransferCompressType,
                                                         "admin", "administrator");

            return(_commonTool.GetJsonStringFromObject(doTransferResult));
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        private TransferJobTableMdl GetTransferJobModel(RevTransferMdl transferMdl)
        {
            TransferJobTableMdl transferJobTableMdl = new TransferJobTableMdl();

            List <string> studyGUIDList  = transferMdl.StudyList.Select(i => i.StudyInstanceUid).ToList();
            List <string> serialGUIDList = transferMdl.SeriesList.Select(i => i.InstanceUid).ToList();
            List <string> netAEList      = transferMdl.PacsList.Select(i => i.NetAEName).ToList();
            List <string> imageList      = transferMdl.ImageList.Select(i => i.SopInstanceUid).ToList();

            string studyGUIDs  = _commonTool.GetGUIDsByList(studyGUIDList);
            string seriesGUIDs = _commonTool.GetGUIDsByList(serialGUIDList);
            string imageGUIDs  = _commonTool.GetGUIDsByList(imageList);

            transferJobTableMdl = _dbHelper.GetTransferJobTableMdl(netAEList, studyGUIDs, seriesGUIDs, imageGUIDs);

            return(transferJobTableMdl);
        }