Exemplo n.º 1
0
 public AuthorizedStorageDataAccessAgent(IStorageDataAccessAgent3 storageDataAccess, IPatientRightsDataAccessAgent patientRightsDataAccess, IPermissionManagementDataAccessAgent permissionManagementDataAccessAgent)
 {
     StorageDataAccess               = storageDataAccess;
     PatientRightsDataAccess         = patientRightsDataAccess;
     PermissionManagementDataAccess  = permissionManagementDataAccessAgent;
     PermissionManagementDataAccess2 = permissionManagementDataAccessAgent as IPermissionManagementDataAccessAgent2;
 }
Exemplo n.º 2
0
 public ExportAddin(IStorageDataAccessAgent3 dataAccessAgent, IAuthorizedStorageDataAccessAgent2 authAgent, Lazy <IExternalStoreDataAccessAgent> externalStoreAgent, ILoggingDataAccessAgent loggingAgent, string storageServerServicePath, IStoreAddin storeAddin, IOptionsDataAccessAgent optionsAgent, IPermissionManagementDataAccessAgent2 permissionsAgent, Leadtools.Dicom.Imaging.IDataCacheProvider dataCache)
 {
     _DataAccessAgent     = dataAccessAgent;
     _Exporter            = new Exporter(dataAccessAgent);
     _ObjectRetrieveAddIn = new ObjectRetrieveAddin(dataAccessAgent, externalStoreAgent, loggingAgent, storageServerServicePath, optionsAgent, permissionsAgent, authAgent, dataCache);
     _StoreAddin          = storeAddin;
     _QueryAddIn          = new DatabaseQueryAddin(authAgent, optionsAgent, permissionsAgent, externalStoreAgent, loggingAgent, storageServerServicePath, null, dataCache);
 }
Exemplo n.º 3
0
        public static void RegisterInterfaces()
        {
#if TUTORIAL_CUSTOM_DATABASE
            // The 'RegisterInterfaces' method is implemented as part of the "Changing the LEAD HTML5 Medical Viewer to use a different database schema" tutorial.
            // For the tutorial, 'RegisterInterfaces' is used to register custom classes that you define to interact with a custom database.
            // For the shipping version, the 'RegisterInterfaces' does nothing
            //
            // Since the WCF services are stateless (below), this method is called before using any of the services.
            // The AddinsFactory class is used to generate the addins required by each of the services.
            // So the AddinsFactory constructor calls 'RegisterInterfaces' if it has not already been called.
            //
            // WCF Services:
            // * AuthenticationService
            // * ObjectRetrieveService
            // * PacsQueryService
            // * PACSRetrieveService
            // * StoreService
            //
            // The MyPatientInfo, MyStudyInfo, MySeriesInfo, and MyInstanceInfo classes are used for extracting DICOM data from a System.Data.DataRow.
            // The MyStorageSqlDbDataAccessAgent and MyStorageDataAccessConfigurationView classes are used for accessing your custom database
            // The MyPatient, MyStudy, MySeries, and MyInstance classes are used to generate the WHERE statement of the database query
            // For more details, see the "Changing the LEAD HTML5 Medical Viewer to use a different database schema" tutorial.

            if (!DataAccessServiceLocator.IsRegistered <IPatientInfo>())
            {
                DataAccessServiceLocator.Register <IPatientInfo>(new MyPatientInfo());
            }

            if (!DataAccessServiceLocator.IsRegistered <IStudyInfo>())
            {
                DataAccessServiceLocator.Register <IStudyInfo>(new MyStudyInfo());
            }

            if (!DataAccessServiceLocator.IsRegistered <ISeriesInfo>())
            {
                DataAccessServiceLocator.Register <ISeriesInfo>(new MySeriesInfo());
            }

            if (!DataAccessServiceLocator.IsRegistered <IInstanceInfo>())
            {
                DataAccessServiceLocator.Register <IInstanceInfo>(new MyInstanceInfo());
            }

            if (!DataAccessServices.IsDataAccessServiceRegistered <IStorageDataAccessAgent3>())
            {
                System.Configuration.Configuration configuration     = ServiceUtils.GetGlobalPacsConfig();
                IStorageDataAccessAgent3           storageDataAccess = DataAccessFactory.GetInstance(new MyStorageDataAccessConfigurationView(configuration, ServiceUtils.ProductNameStorageServer, null)).CreateDataAccessAgent <IStorageDataAccessAgent3>();
                DataAccessServices.RegisterDataAccessService <IStorageDataAccessAgent3>(storageDataAccess);
            }

            RegisteredEntities.AddItem(RegisteredEntities.PatientEntityName, typeof(MyPatient));
            RegisteredEntities.AddItem(RegisteredEntities.StudyEntityName, typeof(MyStudy));
            RegisteredEntities.AddItem(RegisteredEntities.SeriesEntityName, typeof(MySeries));
            RegisteredEntities.AddItem(RegisteredEntities.InstanceEntityName, typeof(MyInstance));
#endif
        }
Exemplo n.º 4
0
        static void RegisterDataAccessAgents(string serviceName)
        {
            System.Configuration.Configuration configuration = DicomDemoSettingsManager.GetGlobalPacsAddinsConfiguration(ServiceDirectory);
            if (!DataAccessServices.IsDataAccessServiceRegistered <IStorageDataAccessAgent3>())
            {
                IStorageDataAccessAgent3 storageDataAccess =
                    DataAccessFactory.GetInstance(new MyStorageDataAccessConfigurationView(configuration, null, serviceName)).CreateDataAccessAgent <IStorageDataAccessAgent3>();

                DataAccessServices.RegisterDataAccessService <IStorageDataAccessAgent3>(storageDataAccess);

                DataAccess = storageDataAccess;
            }
            else
            {
                DataAccess = DataAccessServices.GetDataAccessService <IStorageDataAccessAgent3>();
            }
        }