-
Notifications
You must be signed in to change notification settings - Fork 160
Searching by full TimeStamp; Observation date search is not working #191
Comments
Thank for bringing this up we are currently using dynamic mapping of Elastic Search indexes meaning that FWoA search parameters could be classified as a We already have a issue open #129. I am in favor of combining the issues into one, but to confirm did I understand your issue correctly? |
Sorry for making you confuse. 1. About https://github.com/awslabs/fhir-works-on-aws-deployment/issues/129's issue, The FHIR document defined: I could not search by this search parameter. 2. Search based on dates only work with |
Ah okay thank you for explaining! Searching for time stamps has not been a known use case and we will put it on our backlog. For your first issue I'm not sure why you are getting a 500 could you look at your logs and share what the 500 is? |
Sorry, my first issue was not explained clearly. With the information below I think I can search Observation resource by In the FHIR document, The
The compiledSearchParameters.4.0.1.json defined: Additional information:
Thank you for replying! |
Hi, Thanks again for the detailed issue report. I looked into it, there are 2 things that are wrong:
"failed_shards": [
{
"shard": 0,
"index": "observation",
"node": "y4OiDdf7TxufLzZY96XMTA",
"reason": {
"type": "query_shard_exception",
"reason": "Failed to parse query [2019-11-28T19:00:06Z]",
"index_uuid": "KwM1-IHQQjq-kokhtuvMeA",
"index": "observation",
"caused_by": {
"type": "parse_exception",
"reason": "Cannot parse '2019-11-28T19:00:06Z': Encountered \" \":\" \": \"\" at line 1, column 16.\nWas expecting one of:\n <EOF> \n <AND> ...\n <OR> ...\n <NOT> ...\n \"+\" ...\n \"-\" ...\n <BAREOPER> ...\n \"(\" ...\n \"*\" ...\n \"^\" ...\n <QUOTED> ...\n <TERM> ...\n <FUZZY_SLOP> ...\n <PREFIXTERM> ...\n <WILDTERM> ...\n <REGEXPTERM> ...\n \"[\" ...\n \"{\" ...\n <NUMBER> ...\n ",
"caused_by": {
"type": "parse_exception",
"reason": "Encountered \" \":\" \": \"\" at line 1, column 16.\nWas expecting one of:\n <EOF> \n <AND> ...\n <OR> ...\n <NOT> ...\n \"+\" ...\n \"-\" ...\n <BAREOPER> ...\n \"(\" ...\n \"*\" ...\n \"^\" ...\n <QUOTED> ...\n <TERM> ...\n <FUZZY_SLOP> ...\n <PREFIXTERM> ...\n <WILDTERM> ...\n <REGEXPTERM> ...\n \"[\" ...\n \"{\" ...\n <NUMBER> ...\n "
}
}
}
}
]
In ElasticSearch
https://www.hl7.org/fhir/observation-definitions.html#Observation.effective_x_ |
With the above merges I believe we have addressed the issue here. Please re-open if needed! |
There is my data in Observation record:
"effectiveDateTime": "2019-11-28T19:00:06Z",
When I make a search request such as:
/Observation?date=2019-11-28T19:00:06Z
It is not working.
Error:
{ "resourceType": "OperationOutcome", "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">error</td><td>[]</td><td><pre>Internal server error</pre></td></tr></table></div>" }, "issue": [ { "severity": "error", "code": "exception", "diagnostics": "Internal server error" } ] }
If I change to:
/Observation?date=2019-11-28
it returns:
When I use yyyy-mm-dd format to search _lastUpdated, its work, but it seems not working with yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm] format.
Please correct me if I was wrong somewhere.
Thanks in advance!!
The text was updated successfully, but these errors were encountered: