Пример #1
0
        /// <summary> </summary>
        /// <param name="context"></param>
        protected override void DoWork(CodeActivityContext context)
        {
            string localStatus       = "FAILED";
            string sroDcmInstanceId  = SroUnitId.Get(context);
            int    nSroDcmInstanceId = Convert.ToInt32(sroDcmInstanceId);

            string rpsDcmInstanceId  = RpsUnitId.Get(context);
            int    nRpsDcmInstanceId = Convert.ToInt32(rpsDcmInstanceId);

            IList <string> planningImageSopInstanceUidValues     = new List <string>();
            IList <string> verificationImageSopInstanceUidValues = new List <string>();


            context.GetExtension <CompositionContainer>().SatisfyImportsOnce(this);

            _processSpatialRegistrationObject.ParseXVI5xSpatialRegistration(nSroDcmInstanceId, nRpsDcmInstanceId,
                                                                            ref planningImageSopInstanceUidValues, ref verificationImageSopInstanceUidValues);

            // did we successfully extract the lists of image sop instance uids ?
            if (planningImageSopInstanceUidValues.Count > 0 && verificationImageSopInstanceUidValues.Count > 0)
            {
                localStatus = "SUCCESS";
            }

            PlanningImageSopInstanceValues.Set(context, planningImageSopInstanceUidValues);
            VerificationImageSopInstanceValues.Set(context, verificationImageSopInstanceUidValues);
            ActivityStatus.Set(context, localStatus);
        }
Пример #2
0
        /// <summary> </summary>
        /// <param name="context"></param>
        protected override void DoWork(CodeActivityContext context)
        {
            string localStatus = "FAILED";

            ActivityStatus.Set(context, localStatus);
            string sroDcmInstanceId = SroUnitId.Get(context);
            string rpsDcmInstanceId = RpsUnitId.Get(context);

            int nSroDcmInstanceId = Convert.ToInt32(sroDcmInstanceId);
            int nRpsDcmInstanceId = Convert.ToInt32(rpsDcmInstanceId);

            context.GetExtension <CompositionContainer>().SatisfyImportsOnce(this);

            bool result = _processSpatialRegistrationObject.CreateElektaXVI5xSRORegistrationFoRREntries(nSroDcmInstanceId, nRpsDcmInstanceId);

            if (result)
            {
                localStatus = "SUCCESS";
            }

            Result.Set(context, result);
            ActivityStatus.Set(context, localStatus);
        }