Exemple #1
0
 public ValueSetServiceInMemoryTests(ITestOutputHelper output, CustomValueSetFixture fixture)
     : base(output)
 {
     this.valueSetRepository     = fixture.ValueSetRepository;
     this.valueSetService        = fixture.ValueSetService;
     this.valueSetCodeRepository = fixture.ValueSetCodeRepository;
 }
Exemple #2
0
 public ClientTermValueSetServiceTests(SqlServiceFixture fixture, ITestOutputHelper output)
     : base(output)
 {
     this.clientTermValueSetService      = fixture.ClientTermValueSetService;
     this.clientTermCustomizationService = fixture.ClientTermCustomizationService;
     this.valueSetService = fixture.ValueSetService;
 }
        public ClientTermValueSetModule(
            IValueSetService valueSetService,
            IAppConfiguration config,
            ILogger logger,
            ValueSetValidator valueSetValidator)
            : base($"/{TerminologyVersion.Route}/valuesets", config, logger)
        {
            this.valueSetService   = valueSetService;
            this.valueSetValidator = valueSetValidator;
            this.Post("/", _ => this.AddValueSet(), null, PostActionName);

            this.Delete("/{valueSetGuid}", parameters => this.DeleteValueSet(parameters), null, DeleteActionName);
        }
Exemple #4
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");
        }
Exemple #5
0
        public ValueSetModule(IValueSetService valueSetService, IAppConfiguration config, ILogger logger, ValueSetValidator valueSetValidator)
            : base($"/{TerminologyVersion.Route}/valuesets", logger)
        {
            this.valueSetService   = valueSetService;
            this.config            = config;
            this.valueSetValidator = valueSetValidator;

            this.Get("/", _ => this.GetValueSetPage(), null, "GetPaged");

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

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

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

            this.Delete("/{valueSetUniqueId}", parameters => this.DeleteValueSet(parameters), null, "DeleteValueSet");
        }
        private void Initialize()
        {
            this.ValueSetCodeRepository = new SqlValueSetCodeRepository(
                this.SharedContext,
                this.ClientTermContext.AsLazy(),
                this.Logger,
                new DefaultPagingStrategy <ValueSetCodeDto, IValueSetCode>(100));

            this.ValueSetRepository = new SqlValueSetRepository(
                this.SharedContext,
                this.ClientTermContext.AsLazy(),
                this.Cache,
                this.Logger,
                this.ValueSetCodeRepository,
                new DefaultPagingStrategy <ValueSetDescriptionDto, IValueSet>(20),
                new IsCustomValueStrategy());

            this.ValueSetService = new ValueSetService(this.ValueSetRepository, new IsCustomValueStrategy());
        }
Exemple #7
0
 public ValueSetComparisonService(
     IValueSetService valueSetService)
 {
     this.valueSetService = valueSetService;
 }
 public ValueSetServiceTests(ValueSetServiceFixture fixture, [NotNull] ITestOutputHelper output)
     : base(output)
 {
     this.fixture         = fixture;
     this.valueSetService = fixture.ValueSetService;
 }
 public SqlValueSetServiceTests(SqlServiceFixture fixture, [NotNull] ITestOutputHelper output)
     : base(output)
 {
     this.valueSetService        = fixture.ValueSetService;
     this.valueSetSummaryService = fixture.ValueSetSummaryService;
 }
 public ValueSetValidator(IValueSetService valueSetService)
 {
     this.service = valueSetService;
     this.ConfigureRules();
 }
Exemple #11
0
 public static Attempt <IValueSet> Create(this IValueSetService service, ValueSetCreationApiModel model)
 {
     return(service.Create(model.Name, model, model.CodeSetCodes.Select(code => code.ToCodeSetCode())));
 }