Beispiel #1
0
        private void Initialize()
        {
            var cacheManagerFactory     = new CachingManagerFactory(this.Cache);
            var pagingStrategyFactory   = new PagingStrategyFactory();
            var orderingStrategyFacotry = new OrderingStrategyFactory();

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

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

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

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

            this.ValueSetComparisonService = new ValueSetComparisonService(valueSetService);
        }
Beispiel #2
0
        public ValueSetModule(
            IValueSetService valueSetService,
            IValueSetSummaryService valueSetSummaryService,
            IClientTermValueSetService clientTermValueSetService,
            IClientTermCustomizationService clientTermCustomizationService,
            IValueSetComparisonService valueSetComparisonService,
            IAppConfiguration config,
            ILogger logger,
            ValueSetValidatorCollection valueSetValidatorCollection)
            : base($"{TerminologyVersion.Route}/valuesets", config, logger)
        {
            this.valueSetService                = valueSetService;
            this.valueSetSummaryService         = valueSetSummaryService;
            this.clientTermValueSetService      = clientTermValueSetService;
            this.clientTermCustomizationService = clientTermCustomizationService;
            this.valueSetComparisonService      = valueSetComparisonService;
            this.valueSetValidatorCollection    = valueSetValidatorCollection;

            this.Get("/", async _ => await this.GetValueSetPage().ConfigureAwait(false), null, "GetPaged");

            this.Get("/{valueSetGuid}", parameters => this.GetValueSet(parameters.valueSetGuid), null, "GetValueSet");

            this.Get(
                "/versions/{referenceId}",
                parameters => this.GetValueSetVersions(parameters.referenceId),
                null,
                "GetValueSetVersions");

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

            this.Post("/search/", async _ => await this.Search().ConfigureAwait(false), null, "Search");

            this.Post("/copy/", _ => this.CopyValueSet(), null, "CopyValueSet");

            this.Post("/compare/", async _ => await this.CompareValueSets().ConfigureAwait(false), null, "CompareValueSets");

            this.Post("/", _ => this.AddValueSet(), null, "AddValueSet");

            this.Patch("/{valueSetGuid}", parameters => this.PatchValueSet(parameters.valueSetGuid), null, "PatchValueSet");

            this.Put(
                "/{valueSetGuid}/statuscode/{statusCode}",
                parameters => this.ChangeStatus(parameters.valueSetGuid, parameters.statusCode),
                null,
                "ChangeValueSetStatus");

            this.Delete("/{valueSetGuid}", parameters => this.DeleteValueSet(parameters.valueSetGuid), null, "DeleteValueSet");
        }
 public ValueSetComparisonServiceTests(ValueSetComparisonServiceFixture fixture, ITestOutputHelper output)
     : base(output)
 {
     this.valueSetComparisonService = fixture.ValueSetComparisonService;
 }