-
Notifications
You must be signed in to change notification settings - Fork 521
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
Add _before parameter to History search #455
Conversation
src/Microsoft.Health.Fhir.Core/Features/Search/SearchService.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Core/Features/Search/SearchService.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Core/Features/Search/SearchService.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Core/Features/Search/BundleFactory.cs
Outdated
Show resolved
Hide resolved
7c91f84
to
373db47
Compare
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.
I think we should remove the stuff that tries to add _before
when not specified. I think unless the user adds it, all bets are off.
src/Microsoft.Health.Fhir.Core/Features/Search/SearchService.cs
Outdated
Show resolved
Hide resolved
@@ -221,10 +222,11 @@ public async Task<IActionResult> Read(string type, string id) | |||
public async Task<IActionResult> SystemHistory( | |||
[FromQuery(Name = KnownQueryParameterNames.At)] PartialDateTime at, |
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.
Not your code, but I just realized that the at
parasmeter is an instant type. Filed new bug for this.
@@ -157,7 +157,7 @@ public async Task GivenAMissingResourceId_WhenSearchingHistory_ThenAResourceNotF | |||
|
|||
_searchService.SearchImplementation = options => new SearchResult(new ResourceWrapper[0], null); | |||
|
|||
await Assert.ThrowsAsync<ResourceNotFoundException>(() => _searchService.SearchHistoryAsync(resourceType, resourceId, null, null, null, null, CancellationToken.None)); | |||
await Assert.ThrowsAsync<ResourceNotFoundException>(() => _searchService.SearchHistoryAsync(resourceType, resourceId, null, null, null, null, null, CancellationToken.None)); |
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.
nit: can we add named parameter for readability?
…ts to be more stable/reliable.
d355fbe
to
e1a0394
Compare
… the tests unreliable.
Description
Adds support for a new parameter: _before, for history searches
Related issues
Addresses [issue AB#68975].
Testing
Created several new E2E tests for history covering different values for _since and _before with different number of updates in history