-
Notifications
You must be signed in to change notification settings - Fork 565
Increase max valueset size to 20,000 #4850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ | |
| using Hl7.Fhir.ElementModel; | ||
| using Hl7.Fhir.Model; | ||
| using Hl7.Fhir.Specification.Source; | ||
| using Hl7.Fhir.Specification.Terminology; | ||
| using Hl7.Fhir.Validation; | ||
| using Microsoft.Extensions.Options; | ||
| using Microsoft.Health.Fhir.Core.Configs; | ||
|
|
@@ -38,12 +39,20 @@ public ProfileValidator(IProvideProfilesForValidation profilesResolver, IOptions | |
|
|
||
| private Validator GetValidator() | ||
| { | ||
| var expanderSettings = new ValueSetExpanderSettings | ||
| { | ||
| MaxExpansionSize = 20000, // Set your desired max expansion size here | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we set this from a configuration somewhere?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could add a setting, and make it configurable. But I wanted a quick change to address this issue. Then we can consider a more in depth change. |
||
| }; | ||
|
|
||
| var terminologyService = new LocalTerminologyService(_resolver.AsAsync(), expanderSettings); | ||
|
|
||
| var ctx = new ValidationSettings() | ||
| { | ||
| ResourceResolver = _resolver, | ||
| GenerateSnapshot = true, | ||
| Trace = false, | ||
| ResolveExternalReferences = false, | ||
| TerminologyService = terminologyService, | ||
| }; | ||
|
|
||
| var validator = new Validator(ctx); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did we get the 20,000 from? Was that the default value for Firely until we upgraded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current valueset expansion that is being used is ~17,000. The 20,000 give a bit of a buffer, but I don't want much larger than necessary.