Error while trying to start module Appointment

0 views
Skip to first unread message

Tuan Le Dinh

unread,
Feb 20, 2013, 2:36:28 PM2/20/13
to implem...@openmrs.org
I got this error while starting module Appointment, does anybody have any idea what is the problem ? Thank you.

Error while trying to start module
Error while running sql: INSERT INTO appointment (patient_id, location_id, provider_id, appointment_date, attended, reason, voided)
				SELECT obs.person_id , obs.location_id, (SELECT user_id FROM users u INNER JOIN person p ON u.person_id=p.person_id
                                            WHERE p.person_id=enc.provider_id) ,
                       CAST(obs.value_datetime AS DATE), FALSE ,
                	(SELECT ob.obs_id FROM obs ob INNER JOIN encounter enc ON enc.encounter_id = ob.encounter_id
		            WHERE ob.voided = FALSE AND ob.concept_id = 6189 GROUP BY obs.person_id),
					FALSE FROM obs INNER JOIN encounter enc ON enc.encounter_id = obs.encounter_id
 				INNER JOIN person per ON obs.person_id = per.person_id WHERE obs.voided = FALSE AND per.dead = FALSE
 				AND per.voided= FALSE AND obs.concept_id = 5096 AND obs.encounter_id IS NOT NULL ORDER BY obs.value_datetime DESC . Message: Unknown column 'enc.provider_id' in 'where clause'
 ** org.openmrs.util.DatabaseUtil.executeSQL(DatabaseUtil.java:139)
 ** org.openmrs.api.db.hibernate.HibernateAdministrationDAO.executeSQL(HibernateAdministrationDAO.java:340)
 ** org.openmrs.api.impl.AdministrationServiceImpl.executeSQL(AdministrationServiceImpl.java:802)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
$Proxy17.executeSQL(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 ** org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
$Proxy37.executeSQL(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
$Proxy37.executeSQL(Unknown Source)
 ** org.openmrs.module.ModuleFactory.runDiff(ModuleFactory.java:696)
 ** org.openmrs.module.ModuleFactory.startModuleInternal(ModuleFactory.java:540)
 ** org.openmrs.api.context.Daemon$1.run(Daemon.java:58)

Darius Jazayeri

unread,
Feb 20, 2013, 3:20:53 PM2/20/13
to implementers
Hi Tuan,

Just from looking at the error message, it seems like that snippet of SQL was written against the OpenMRS pre-1.9 data model, and I assume you're running OpenMRS 1.9.

Perhaps Tobin, or one of the devs of that module, can comment?

-Darius


--
OpenMRS Implementers: http://go.openmrs.org/implementers
Post: implem...@openmrs.org
Unsubscribe: implementers...@openmrs.org
Manage your OpenMRS subscriptions at https://id.openmrs.org/
 
 

Tuan Le Dinh

unread,
Feb 20, 2013, 5:17:02 PM2/20/13
to implem...@openmrs.org
Hi Darius,

Yes, I'm running OpenMRS 1.9.2
Reply all
Reply to author
Forward
0 new messages