Esempio n. 1
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 SqlValueSetServiceTests(SqlServiceFixture fixture, [NotNull] ITestOutputHelper output)
     : base(output)
 {
     this.valueSetService        = fixture.ValueSetService;
     this.valueSetSummaryService = fixture.ValueSetSummaryService;
 }