Exemplo n.º 1
0
 public ClientTermCustomizationService(
     ICodeSystemCodeService codeSystemCodeService,
     IValueSetCodeService valueSetCodeService,
     IClientTermValueSetService clientTermValueSetService)
 {
     this.codeSystemCodeService     = codeSystemCodeService;
     this.valueSetCodeService       = valueSetCodeService;
     this.clientTermValueSetService = clientTermValueSetService;
 }
Exemplo n.º 2
0
        public CodeSystemCodeModule(
            ICodeSystemCodeService codeSystemCodeService,
            IAppConfiguration config,
            ILogger logger)
            : base($"/{TerminologyVersion.Route}/codes", config, logger)
        {
            this.codeSystemCodeService = codeSystemCodeService;

            this.Get("/", async _ => await this.GetCodeSystemCodePage(), null, "GetPagedCodeSystemCodes");

            this.Get("/{codeGuid}", parameters => this.GetCodeSystemCode(parameters.codeGuid), null, "GetCodeSystemCode");

            this.Post("/batch/", async _ => await this.GetBatch(), null, "GetBatchCodes");

            this.Post("/multiple/", _ => this.GetMultiple(), null, "GetCodeSystemCodes");

            this.Post("/search/", async _ => await this.Search(), null, "SearchCodeSystemCodes");
        }
Exemplo n.º 3
0
        private void Initialize()
        {
            var cacheManagerFactory    = new CachingManagerFactory(this.Cache);
            var pagingStrategyFactory  = new PagingStrategyFactory();
            var clientTermCacheManager = new ClientTermCacheManager(cacheManagerFactory);
            var uow = new ClientTermValueUnitOfWorkManager(this.ClientTermContext.AsLazy(), this.Logger);
            var valueSetStatusChangePolicy = new DefaultValueSetUpdateValidationPolicy();
            var orderingStrategyFactory    = new OrderingStrategyFactory();

            var valueSetCodeRepository = new SqlValueSetCodeRepository(
                this.SharedContext,
                this.Logger,
                cacheManagerFactory,
                pagingStrategyFactory,
                orderingStrategyFactory);

            var valueSetCodeCountRepository = new SqlValueSetCodeCountRepository(
                this.SharedContext,
                this.Logger,
                cacheManagerFactory);

            var valueSetBackingItemRepository = new SqlValueSetBackingItemRepository(
                this.SharedContext,
                this.Logger,
                cacheManagerFactory,
                pagingStrategyFactory,
                orderingStrategyFactory);

            var sqlClientTermUowRepository = new SqlClientTermValueSetRepository(
                this.Logger,
                uow,
                valueSetStatusChangePolicy,
                clientTermCacheManager);

            var sqlCodeSystemRepository = new SqlCodeSystemRepository(
                this.SharedContext,
                this.Logger,
                new CodeSystemCachingManager(this.Cache));

            var sqlCodeSystemCodeRepository = new SqlCodeSystemCodeRepository(
                this.SharedContext,
                this.Logger,
                new CodeSystemCodeCachingManager(this.Cache),
                pagingStrategyFactory);

            this.ValueSetService = new SqlValueSetService(
                this.Logger,
                valueSetBackingItemRepository,
                valueSetCodeRepository,
                valueSetCodeCountRepository);

            this.ClientTermValueSetService = new SqlClientTermValueSetService(
                this.Logger,
                valueSetBackingItemRepository,
                sqlClientTermUowRepository);

            this.ValueSetSummaryService = new SqlValueSetSummaryService(
                this.Logger,
                valueSetBackingItemRepository,
                valueSetCodeCountRepository);

            this.CodeSystemService = new SqlCodeSystemService(sqlCodeSystemRepository);

            this.CodeSystemCodeService = new SqlCodeSystemCodeService(sqlCodeSystemCodeRepository);
        }
Exemplo n.º 4
0
 public CodeSystemCodeServiceTests(SqlServiceFixture fixture, ITestOutputHelper output)
     : base(output)
 {
     this.codeSystemCodeService = fixture.CodeSystemCodeService;
 }