OHDSI Home | Forums | Wiki | Github

Atlas Profiles can't find person

atlas

(Dramacloak) #1

{“methodName”:“run”,“fileName”:null,“lineNumber”:-1,“className”:“java.lang.Thread”,“nativeMethod”:false}],“serverErrorMessage”:{“message”:“relation “cdm.concept” does not exist”,“file”:“parse_relation.c”,“table”:null,“schema”:null,“position”:88,“severity”:“ERROR”,“sqlstate”:“42P01”,“column”:null,“where”:null,“internalQuery”:null,“routine”:“parserOpenTable”,“constraint”:null,“detail”:null,“datatype”:null,“hint”:null,“internalPosition”:0,“line”:1159},“errorCode”:0,“nextException”:null,“sqlstate”:“42P01”,“localizedMessage”:“ERROR: relation “cdm.concept” does not exist\n Position: 88”,“message”:“ERROR: relation “cdm.concept” does not exist\n Position: 88”,“suppressed”:[]},“localizedMessage”:“PreparedStatementCallback; bad SQL grammar [select gender_concept_id, year_of_birth, concept_name as gender\nfrom cdm.person p\njoin cdm.concept c on p.gender_concept_id = c.concept_id\nwhere person_id = ?\n]; nested exception is org.postgresql.util.PSQLException: ERROR: relation “cdm.concept” does not exist\n Position: 88”,“suppressed”:[]},“headers”:{“id”:“d34c5c80-80fe-2bda-6159-785abb1c774f”,“timestamp”:1548798527367}}

For some reason, Atlas profiles appears to be looking for the concept table in the cdm schema instead of in the vocab schema. How do I fix this? Thanks.


(Chris Knoll) #2

The notion of having separate schemas for vocabulary and CDM tables is relatively recent, and introduces a bit of confusion when talking about the cdm schema.

Is there any reason you can’t put the vocabulary tables in the CDM schema? Failing that, I would create views in your cdm schema that point over to your separate vocabulary schema.


(Dramacloak) #3

Alright, I created some views for the vocabulary in the CDM schema but am still not seeing anyone in profiles. It’s still getting a "Failed to load resource: server responded with a status of 500 () message linked to: http://localhost:8080/WebAPI/OHDSI/person/1?cohort=0

{“payload”:{“cause”:null,“stackTrace”:[{“methodName”:“compareTo”,“fileName”:null,“lineNumber”:-1,“className”:“java.sql.Timestamp”,“nativeMethod”:false},{“methodName”:“compareTo”,“fileName”:null,“lineNumber”:-1,“className”:“java.sql.Timestamp”,“nativeMethod”:false},{“methodName”:“lambda$comparing$77a9974f$1”,“fileName”:null,“lineNumber”:-1,“className”:“java.util.Comparator”,“nativeMethod”:false},{“methodName”:“lambda$minBy$0”,“fileName”:null,“lineNumber”:-1,“className”:“java.util.function.BinaryOperator”,“nativeMethod”:false},{“methodName”:“accept”,“fileName”:null,“lineNumber”:-1,“className”:“java.util.stream.ReduceOps$2ReducingSink”,“nativeMethod”:false},{“methodName”:“forEachRemaining”,“fileName”:null,“lineNumber”:-1,“className”:“java.util.ArrayList$ArrayListSpliterator”,“nativeMethod”:false},{“methodName”:“copyInto”,“fileName”:null,“lineNumber”:-1,“className”:“java.util.stream.AbstractPipeline”,“nativeMethod”:false},{“methodName”:“wrapAndCopyInto”,“fileName”:null,“lineNumber”:-1,“className”:“java.util.stream.AbstractPipeline”,“nativeMethod”:false},{“methodName”:“evaluateSequential”,“fileName”:null,“lineNumber”:-1,“className”:“java.util.stream.ReduceOps$ReduceOp”,“nativeMethod”:false},{“methodName”:“evaluate”,“fileName”:null,“lineNumber”:-1,“className”:“java.util.stream.AbstractPipeline”,“nativeMethod”:false},{“methodName”:“reduce”,“fileName”:null,“lineNumber”:-1,“className”:“java.util.stream.ReferencePipeline”,“nativeMethod”:false},{“methodName”:“min”,“fileName”:null,“lineNumber”:-1,“className”:“java.util.stream.ReferencePipeline”,“nativeMethod”:false},{“methodName”:“lambda$getPersonProfile$4”,“fileName”:“PersonService.java”,“lineNumber”:138,“className”:“org.ohdsi.webapi.service.PersonService”,“nativeMethod”:false},{“methodName”:“orElseGet”,“fileName”:null,“lineNumber”:-1,“className”:“java.util.Optional”,“nativeMethod”:false},{“methodName”:“getPersonProfile”,“fileName”:“PersonService.java”,“lineNumber”:137,“className”:“org.ohdsi.webapi.service.PersonService”,“nativeMethod”:false},{“methodName”:“invoke”,“fileName”:null,“lineNumber”:-1,“className”:“sun.reflect.GeneratedMethodAccessor302”,“nativeMethod”:false},{“methodName”:“invoke”,“fileName”:null,“lineNumber”:-1,“className”:“sun.reflect.DelegatingMethodAccessorImpl”,“nativeMethod”:false},{“methodName”:“invoke”,“fileName”:null,“lineNumber”:-1,“className”:“java.lang.reflect.Method”,“nativeMethod”:false},{“methodName”:“invoke”,“fileName”:“ResourceMethodInvocationHandlerFactory.java”,“lineNumber”:81,“className”:“org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1”,“nativeMethod”:false},{“methodName”:“run”,“fileName”:“AbstractJavaResourceMethodDispatcher.java”,“lineNumber”:144,“className”:“org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1”,“nativeMethod”:false},{“methodName”:“invoke”,“fileName”:“AbstractJavaResourceMethodDispatcher.java”,“lineNumber”:161,“className”:“org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher”,“nativeMethod”:false},{“methodName”:“doDispatch”,“fileName”:“JavaResourceMethodDispatcherProvider.java”,“lineNumber”:205,“className”:“org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker”,“nativeMethod”:false},{“methodName”:“dispatch”,“fileName”:“AbstractJavaResourceMethodDispatcher.java”,“lineNumber”:99,“className”:“org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher”,“nativeMethod”:false},{“methodName”:“invoke”,“fileName”:“ResourceMethodInvoker.java”,“lineNumber”:389,“className”:“org.glassfish.jersey.server.model.ResourceMethodInvoker”,“nativeMethod”:false},{“methodName”:“apply”,“fileName”:“ResourceMethodInvoker.java”,“lineNumber”:347,“className”:“org.glassfish.jersey.server.model.ResourceMethodInvoker”,“nativeMethod”:false},{“methodName”:“apply”,“fileName”:“ResourceMethodInvoker.java”,“lineNumber”:102,“className”:“org.glassfish.jersey.server.model.ResourceMethodInvoker”,“nativeMethod”:false},{“methodName”:“run”,“fileName”:“ServerRuntime.java”,“lineNumber”:326,“className”:“org.glassfish.jersey.server.ServerRuntime$2”,“nativeMethod”:false},{“methodName”:“call”,“fileName”:“Errors.java”,“lineNumber”:271,“className”:“org.glassfish.jersey.internal.Errors$1”,“nativeMethod”:false},{“methodName”:“call”,“fileName”:“Errors.java”,“lineNumber”:267,“className”:“org.glassfish.jersey.internal.Errors$1”,“nativeMethod”:false},{“methodName”:“process”,“fileName”:“Errors.java”,“lineNumber”:315,“className”:“org.glassfish.jersey.internal.Errors”,“nativeMethod”:false},{“methodName”:“process”,“fileName”:“Errors.java”,“lineNumber”:297,“className”:“org.glassfish.jersey.internal.Errors”,“nativeMethod”:false},{“methodName”:“process”,“fileName”:“Errors.java”,“lineNumber”:267,“className”:“org.glassfish.jersey.internal.Errors”,“nativeMethod”:false},{“methodName”:“runInScope”,“fileName”:“RequestScope.java”,“lineNumber”:317,“className”:“org.glassfish.jersey.process.internal.RequestScope”,“nativeMethod”:false},{“methodName”:“process”,“fileName”:“ServerRuntime.java”,“lineNumber”:305,“className”:“org.glassfish.jersey.server.ServerRuntime”,“nativeMethod”:false},{“methodName”:“handle”,“fileName”:“ApplicationHandler.java”,“lineNumber”:1154,“className”:“org.glassfish.jersey.server.ApplicationHandler”,“nativeMethod”:false},{“methodName”:“serviceImpl”,“fileName”:“WebComponent.java”,“lineNumber”:473,“className”:“org.glassfish.jersey.servlet.WebComponent”,“nativeMethod”:false},{“methodName”:“service”,“fileName”:“WebComponent.java”,“lineNumber”:427,“className”:“org.glassfish.jersey.servlet.WebComponent”,“nativeMethod”:false},{“methodName”:“service”,“fileName”:“ServletContainer.java”,“lineNumber”:388,“className”:“org.glassfish.jersey.servlet.ServletContainer”,“nativeMethod”:false},{“methodName”:“service”,“fileName”:“ServletContainer.java”,“lineNumber”:341,“className”:“org.glassfish.jersey.servlet.ServletContainer”,“nativeMethod”:false},{“methodName”:“service”,“fileName”:“ServletContainer.java”,“lineNumber”:228,“className”:“org.glassfish.jersey.servlet.ServletContainer”,“nativeMethod”:false},{“methodName”:“internalDoFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:231,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:166,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“WsFilter.java”,“lineNumber”:53,“className”:“org.apache.tomcat.websocket.server.WsFilter”,“nativeMethod”:false},{“methodName”:“internalDoFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:193,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:166,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“ProxiedFilterChain.java”,“lineNumber”:61,“className”:“org.apache.shiro.web.servlet.ProxiedFilterChain”,“nativeMethod”:false},{“methodName”:“executeChain”,“fileName”:“AdviceFilter.java”,“lineNumber”:108,“className”:“org.apache.shiro.web.servlet.AdviceFilter”,“nativeMethod”:false},{“methodName”:“doFilterInternal”,“fileName”:“AdviceFilter.java”,“lineNumber”:137,“className”:“org.apache.shiro.web.servlet.AdviceFilter”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“OncePerRequestFilter.java”,“lineNumber”:125,“className”:“org.apache.shiro.web.servlet.OncePerRequestFilter”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“ProxiedFilterChain.java”,“lineNumber”:66,“className”:“org.apache.shiro.web.servlet.ProxiedFilterChain”,“nativeMethod”:false},{“methodName”:“executeChain”,“fileName”:“AbstractShiroFilter.java”,“lineNumber”:449,“className”:“org.apache.shiro.web.servlet.AbstractShiroFilter”,“nativeMethod”:false},{“methodName”:“call”,“fileName”:“AbstractShiroFilter.java”,“lineNumber”:365,“className”:“org.apache.shiro.web.servlet.AbstractShiroFilter$1”,“nativeMethod”:false},{“methodName”:“doCall”,“fileName”:“SubjectCallable.java”,“lineNumber”:90,“className”:“org.apache.shiro.subject.support.SubjectCallable”,“nativeMethod”:false},{“methodName”:“call”,“fileName”:“SubjectCallable.java”,“lineNumber”:83,“className”:“org.apache.shiro.subject.support.SubjectCallable”,“nativeMethod”:false},{“methodName”:“execute”,“fileName”:“DelegatingSubject.java”,“lineNumber”:383,“className”:“org.apache.shiro.subject.support.DelegatingSubject”,“nativeMethod”:false},{“methodName”:“doFilterInternal”,“fileName”:“AbstractShiroFilter.java”,“lineNumber”:362,“className”:“org.apache.shiro.web.servlet.AbstractShiroFilter”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“OncePerRequestFilter.java”,“lineNumber”:125,“className”:“org.apache.shiro.web.servlet.OncePerRequestFilter”,“nativeMethod”:false},{“methodName”:“internalDoFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:193,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:166,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“executeChain”,“fileName”:“AdviceFilter.java”,“lineNumber”:108,“className”:“org.apache.shiro.web.servlet.AdviceFilter”,“nativeMethod”:false},{“methodName”:“doFilterInternal”,“fileName”:“AdviceFilter.java”,“lineNumber”:137,“className”:“org.apache.shiro.web.servlet.AdviceFilter”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“OncePerRequestFilter.java”,“lineNumber”:125,“className”:“org.apache.shiro.web.servlet.OncePerRequestFilter”,“nativeMethod”:false},{“methodName”:“internalDoFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:193,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:166,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilterInternal”,“fileName”:“RequestContextFilter.java”,“lineNumber”:99,“className”:“org.springframework.web.filter.RequestContextFilter”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“OncePerRequestFilter.java”,“lineNumber”:107,“className”:“org.springframework.web.filter.OncePerRequestFilter”,“nativeMethod”:false},{“methodName”:“internalDoFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:193,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:166,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilterInternal”,“fileName”:“HttpPutFormContentFilter.java”,“lineNumber”:105,“className”:“org.springframework.web.filter.HttpPutFormContentFilter”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“OncePerRequestFilter.java”,“lineNumber”:107,“className”:“org.springframework.web.filter.OncePerRequestFilter”,“nativeMethod”:false},{“methodName”:“internalDoFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:193,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:166,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilterInternal”,“fileName”:“HiddenHttpMethodFilter.java”,“lineNumber”:81,“className”:“org.springframework.web.filter.HiddenHttpMethodFilter”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“OncePerRequestFilter.java”,“lineNumber”:107,“className”:“org.springframework.web.filter.OncePerRequestFilter”,“nativeMethod”:false},{“methodName”:“internalDoFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:193,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:166,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilterInternal”,“fileName”:“CharacterEncodingFilter.java”,“lineNumber”:197,“className”:“org.springframework.web.filter.CharacterEncodingFilter”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“OncePerRequestFilter.java”,“lineNumber”:107,“className”:“org.springframework.web.filter.OncePerRequestFilter”,“nativeMethod”:false},{“methodName”:“internalDoFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:193,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:166,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“ErrorPageFilter.java”,“lineNumber”:115,“className”:“org.springframework.boot.web.support.ErrorPageFilter”,“nativeMethod”:false},{“methodName”:“access$000”,“fileName”:“ErrorPageFilter.java”,“lineNumber”:59,“className”:“org.springframework.boot.web.support.ErrorPageFilter”,“nativeMethod”:false},{“methodName”:“doFilterInternal”,“fileName”:“ErrorPageFilter.java”,“lineNumber”:90,“className”:“org.springframework.boot.web.support.ErrorPageFilter$1”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“OncePerRequestFilter.java”,“lineNumber”:107,“className”:“org.springframework.web.filter.OncePerRequestFilter”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“ErrorPageFilter.java”,“lineNumber”:108,“className”:“org.springframework.boot.web.support.ErrorPageFilter”,“nativeMethod”:false},{“methodName”:“internalDoFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:193,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“doFilter”,“fileName”:“ApplicationFilterChain.java”,“lineNumber”:166,“className”:“org.apache.catalina.core.ApplicationFilterChain”,“nativeMethod”:false},{“methodName”:“invoke”,“fileName”:“StandardWrapperValve.java”,“lineNumber”:199,“className”:“org.apache.catalina.core.StandardWrapperValve”,“nativeMethod”:false},{“methodName”:“invoke”,“fileName”:“StandardContextValve.java”,“lineNumber”:96,“className”:“org.apache.catalina.core.StandardContextValve”,“nativeMethod”:false},{“methodName”:“invoke”,“fileName”:“AuthenticatorBase.java”,“lineNumber”:490,“className”:“org.apache.catalina.authenticator.AuthenticatorBase”,“nativeMethod”:false},{“methodName”:“invoke”,“fileName”:“StandardHostValve.java”,“lineNumber”:139,“className”:“org.apache.catalina.core.StandardHostValve”,“nativeMethod”:false},{“methodName”:“invoke”,“fileName”:“ErrorReportValve.java”,“lineNumber”:92,“className”:“org.apache.catalina.valves.ErrorReportValve”,“nativeMethod”:false},{“methodName”:“invoke”,“fileName”:“AbstractAccessLogValve.java”,“lineNumber”:668,“className”:“org.apache.catalina.valves.AbstractAccessLogValve”,“nativeMethod”:false},{“methodName”:“invoke”,“fileName”:“StandardEngineValve.java”,“lineNumber”:74,“className”:“org.apache.catalina.core.StandardEngineValve”,“nativeMethod”:false},{“methodName”:“service”,“fileName”:“CoyoteAdapter.java”,“lineNumber”:343,“className”:“org.apache.catalina.connector.CoyoteAdapter”,“nativeMethod”:false},{“methodName”:“service”,“fileName”:“Http11Processor.java”,“lineNumber”:408,“className”:“org.apache.coyote.http11.Http11Processor”,“nativeMethod”:false},{“methodName”:“process”,“fileName”:“AbstractProcessorLight.java”,“lineNumber”:66,“className”:“org.apache.coyote.AbstractProcessorLight”,“nativeMethod”:false},{“methodName”:“process”,“fileName”:“AbstractProtocol.java”,“lineNumber”:834,“className”:“org.apache.coyote.AbstractProtocol$ConnectionHandler”,“nativeMethod”:false},{“methodName”:“doRun”,“fileName”:“NioEndpoint.java”,“lineNumber”:1417,“className”:“org.apache.tomcat.util.net.NioEndpoint$SocketProcessor”,“nativeMethod”:false},{“methodName”:“run”,“fileName”:“SocketProcessorBase.java”,“lineNumber”:49,“className”:“org.apache.tomcat.util.net.SocketProcessorBase”,“nativeMethod”:false},{“methodName”:“runWorker”,“fileName”:null,“lineNumber”:-1,“className”:“java.util.concurrent.ThreadPoolExecutor”,“nativeMethod”:false},{“methodName”:“run”,“fileName”:null,“lineNumber”:-1,“className”:“java.util.concurrent.ThreadPoolExecutor$Worker”,“nativeMethod”:false},{“methodName”:“run”,“fileName”:“TaskThread.java”,“lineNumber”:61,“className”:“org.apache.tomcat.util.threads.TaskThread$WrappingRunnable”,“nativeMethod”:false},{“methodName”:“run”,“fileName”:null,“lineNumber”:-1,“className”:“java.lang.Thread”,“nativeMethod”:false}],“localizedMessage”:null,“message”:null,“suppressed”:[]},“headers”:{“id”:“4ddb97fd-5e8c-0a3a-e89e-4d498b5b55b3”,“timestamp”:1548965173355}}


(Chris Knoll) #4

I can’t quite tell where the problem actually happens, but this part of the stack trace is a hint:

This is where it’s trying to get the patient level data out of the PersonService, however, looking at the requested URL: a cohort_id of 0 seems a little strange (IDs should start at 1)

Are you certain that there is a cohort_id = 0 that contains a subject_id = 1 in it?


(Dramacloak) #5

There isn’t a cohort_id = 0. The only cohort_id I have is 5 at the moment. My subject_id’s in the person table start at 1. I’m not sure why it’s trying to pull from a non-existent cohort?


(Chris Knoll) #6

Do you get the same exception when you take the ?cohort_id param off of the url?


(Dramacloak) #7

Yes. I wouldn’t think cohort would have anything to do with the profiles page, as it is based on the source data set rather than a particular cohort definition. At least there is no functionality to change the cohort that you’re interested in on the profiles page.


(Chris Knoll) #8

So, based on the stack trace, the issue is around this line of code here (assuming you are running in version 2.6):

And, just FYI, you can open the patient profile int he context of a cohort, however it does check for a cohort_id > 0 so, for purposes of the URL you wen tto, it should ignore the cohort paramater.

Unfortunately, I’m not as familiar with the profile/PersonService as other parts of the code. I can tell you that this statement:

profile.records.stream().min(Comparator.comparing(c -> c.startDate))

something in there is NULL. I’m guessing it’s the profile.records field. What you can do is try to invoke the query directly on your database, starting with this one:

select gender_concept_id, year_of_birth, concept_name as gender from @tableQualifier.person p join @tableQualifier.concept c on p.gender_concept_id = c.concept_id where person_id = @personId

(found from: https://github.com/OHDSI/WebAPI/blob/master/src/main/resources/resources/person/sql/personInfo.sql)

start with that one, since that’s the starting point for all the additional fetches for the patient level data. Let us know the result.


t