-
Notifications
You must be signed in to change notification settings - Fork 50
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
Unable to use Patient List #423
Comments
Hi @artgoldberg, Mostly for reasons of de-identification (e.g., if Leaf needs to date-shift a My suggestion would be to
Immediately after seeing the error in the UI, can you try that? Best, |
One additional observation: in the example suggested OMOP query the database is omitted, and the schema is Any chance the database & schema mismatch could be the issue? In that case I would also expect an error in the API logs. |
Hi Leaf folks, @mh2727 and @jprosser I'm obtaining a reproducible error message when executing the "Patient list" feature: "Demographic Schema Validation Error" ... "'addressState' expected type 'String' but received 'None'". Here are all of the Leaf API log messages generated when "Patient list" is clicked:
The error is reported at "Timestamp":"2021-06-22T10:41:03.2055533-04:00". It's not clear to me whether this error is caused by executing the SQL or by analysis of the results of the query. I do wonder whether NULL values in cdm_std.location.state would cause this error. In our CDM 2,897,597 of the 14,181,381 location records are NULL in location.state and the patient list being obtained here is large enough that it almost certainly contains some of these NULLs. Please let me know what I can do to help debug this. For example, I could try to isolate the SQL and execute it. Regards |
Hi @artgoldberg. From the error, it seems one of the columns In the line at "Timestamp":"2021-06-22T10:41:02.0404648-04:00", can you try running the query listed there as is? That way we can check if the query is throwing an error by checking whether or not the If it is the case that we can run the query, it could mean that the analysis of the result is throwing an error because it cannot take null values. In which case, we can try to add the condition Hope this helps. -- |
Hi Leaf folks, @mh2727 and @jprosser Yes, that's what seems to be going on Mehadi. However, I think that the query at "Timestamp":"2021-06-22T10:41:02.0413969-04:00" is the one that needs to be executed, as it's the one that immediately precedes the error. Extracting the SQL and formatting it for people, I get this (I made the reference to @queryid in the query a literal, as it was giving a "Must declare the scalar variable" error in DBeaver.):
This query runs and produces the table below. My hypothesis is that the Thanks |
Hi @artgoldberg, thanks for your patience while I was out, and thank you @mh2727 for helping advise. The issue is likely an unknown SQL column type that we don't have a proper "Leaf Type" for (see https://github.com/uwrit/leaf/blob/master/src/server/Model/Schema/LeafType.cs#L31). As you can see, we map As a workaround, you can change |
Hi @ndobb I hope you enjoyed your vacation. Your diagnosis is correct. In our clinical DW, I've also updated my version of Thanks |
Hi Guys
Following the instructions at Defining the Basic Demographics Query, I configured Leaf to extract datasets. I used the "Try this Basic Demographics SQL query". This is the query being entered:
![image](https://user-images.githubusercontent.com/33882/121624150-01fc6280-ca3f-11eb-8a6d-1472caf9b765.png)
I was able to save it without error and all fields had green checkmarks.
This query ran, and found 844 patients:
![image](https://user-images.githubusercontent.com/33882/121624331-530c5680-ca3f-11eb-8043-a68f47821a36.png)
But selecting Patient List fails
![image](https://user-images.githubusercontent.com/33882/121624427-8353f500-ca3f-11eb-8a02-a92db6e1711b.png)
Unfortunately, Chrome's Developer Tools and the server logs do not provide helpful information.
The leaf API log only contains
"Level":"Information"
messagesand although the Apache log captures the 500 error, doesn't provide me with any insight:
Meanwhile, the servers appear to be running correctly
I tried the query that I expect Leaf to run directly on the database
and it worked
What do you think?
Regards and thanks
Arthur
The text was updated successfully, but these errors were encountered: