Patient Flags
These flags are a clinical decision support to highlight important aspects of a patient's treatment
The flags use the traffic light analogy as follows:
  • Green – information for an upcoming e.g., Upcoming appointment, Due for Viral Load
  • Orange – warning, prepare to take action e.g., Missed appointment
  • Red – take action now e.g., Lost, Lost to Followup, Overdue for Viral Load
The patient flags are:
1. Due for 1st DNA PCR (green) 2. Due for 1st Viral Load (green) 3. Due for 2nd DNA PCR (green) 4. Due for Rapid Test (green) 5. Due for Routine Viral Load (green) 6. Lost(red) 7. Lost to Followup (red) 8. Missed appointment (orange) 9. Overdue for 1st DNA PCR (red) 10. Overdue for First Viral Load (red) 11. Overdue for Rapid Test (red) 12. Overdue for Routine Viral Load (red) 13. Overdue for 2nd DNA PCR (red) 14. Transferred Out Patient (orange) 15. Un-suppressed Viral Load (red) 16. Upcoming appointment (green)

Disabling Patient Flags

Depending on the facility needs, not all the patient flags will be relevant, so the steps below provide the capability of disabling unused flags which will also improve the performance of the patient dashboard
  1. 1.
    On the home page click the Legacy System Administration button
  2. 2.
    On the administration page, click the Settings link
  3. 3.
    Select Ugandaemr in the left-hand menu to display the UgandaEMR settings
  4. 4.
    In the "Patientflags Disabled Flags" text field enter the names of the patient flags you want to disable separated by a comma (,)
  5. 5.
    Restart your computer

Troubleshooting Tips

Module cannot start due to error creating patientflags_displaypoint

See message below
Fix
  1. 1.
    Open Heidi and delete the patientflags_displaypoint table
  2. 2.
    Click Start All to start all the modules

Module cannot start create patientflags_tag_role

The error message displayed when starting the module is
1
Error while running sql: CREATE TABLE patientflags_tag_role (
2
tag_id int(11) NOT NULL,
3
role
4
varchar(50) NOT NULL,
5
KEY tag_id (tag_id),
6
KEY role (role),
7
CONSTRAINT
8
FOREIGN KEY (tag_id) REFERENCES patientflags_tag (tag_id),
9
CONSTRAINT
10
FOREIGN KEY (role) REFERENCES role (role)
11
) ENGINE=InnoDB DEFAULT
12
CHARSET=utf8 . Message: Can't create table 'openmrs.patientflags_tag_role' (errno: 150)
Copied!
The root cause of this that the character set for the patientflags_tag_role table, utf8, is different from the role table.
Run the script below to change all the tables in the database to UTF8
1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */;
2
/*!40101 SET @OLD_CHARACTER_SET_RESULTS = @@CHARACTER_SET_RESULTS */;
3
/*!40101 SET @OLD_COLLATION_CONNECTION = @@COLLATION_CONNECTION */;
4
/*!40101 SET NAMES utf8 */;
5
/*!40103 SET @OLD_TIME_ZONE = @@TIME_ZONE */;
6
/*!40103 SET TIME_ZONE = '+00:00' */;
7
/*!40014 SET @OLD_UNIQUE_CHECKS = @@UNIQUE_CHECKS, UNIQUE_CHECKS = 0 */;
8
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS = 0 */;
9
/*!40101 SET @OLD_SQL_MODE = @@SQL_MODE, SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO' */;
10
/*!40111 SET @OLD_SQL_NOTES = @@SQL_NOTES, SQL_NOTES = 0 */;
11
ALTER TABLE `address_hierarchy_address_to_entry_map` CONVERT TO CHARACTER SET UTF8;
12
ALTER TABLE `address_hierarchy_entry` CONVERT TO CHARACTER SET UTF8;
13
ALTER TABLE `address_hierarchy_level` CONVERT TO CHARACTER SET UTF8;
14
ALTER TABLE `allergy` CONVERT TO CHARACTER SET UTF8;
15
ALTER TABLE `allergy_reaction` CONVERT TO CHARACTER SET UTF8;
16
ALTER TABLE `appframework_component_state` CONVERT TO CHARACTER SET UTF8;
17
ALTER TABLE `appframework_user_app` CONVERT TO CHARACTER SET UTF8;
18
ALTER TABLE `appointmentscheduling_appointment` CONVERT TO CHARACTER SET UTF8;
19
ALTER TABLE `appointmentscheduling_appointment_block` CONVERT TO CHARACTER SET UTF8;
20
ALTER TABLE `appointmentscheduling_appointment_request` CONVERT TO CHARACTER SET UTF8;
21
ALTER TABLE `appointmentscheduling_appointment_status_history` CONVERT TO CHARACTER SET UTF8;
22
ALTER TABLE `appointmentscheduling_appointment_type` CONVERT TO CHARACTER SET UTF8;
23
ALTER TABLE `appointmentscheduling_block_type_map` CONVERT TO CHARACTER SET UTF8;
24
ALTER TABLE `appointmentscheduling_time_slot` CONVERT TO CHARACTER SET UTF8;
25
ALTER TABLE `calculation_registration` CONVERT TO CHARACTER SET UTF8;
26
ALTER TABLE `care_setting` CONVERT TO CHARACTER SET UTF8;
27
ALTER TABLE `chartsearch_bookmark` CONVERT TO CHARACTER SET UTF8;
28
ALTER TABLE `chartsearch_categories` CONVERT TO CHARACTER SET UTF8;
29
ALTER TABLE `chartsearch_category_displayname` CONVERT TO CHARACTER SET UTF8;
30
ALTER TABLE `chartsearch_history` CONVERT TO CHARACTER SET UTF8;
31
ALTER TABLE `chartsearch_note` CONVERT TO CHARACTER SET UTF8;
32
ALTER TABLE `chartsearch_preference` CONVERT TO CHARACTER SET UTF8;
33
ALTER TABLE `chartsearch_synonym_groups` CONVERT TO CHARACTER SET UTF8;
34
ALTER TABLE `chartsearch_synonyms` CONVERT TO CHARACTER SET UTF8;
35
ALTER TABLE `clob_datatype_storage` CONVERT TO CHARACTER SET UTF8;
36
ALTER TABLE `cohort` CONVERT TO CHARACTER SET UTF8;
37
ALTER TABLE `cohort_member` CONVERT TO CHARACTER SET UTF8;
38
ALTER TABLE `concept` CONVERT TO CHARACTER SET UTF8;
39
ALTER TABLE `concept_answer` CONVERT TO CHARACTER SET UTF8;
40
ALTER TABLE `concept_attribute` CONVERT TO CHARACTER SET UTF8;
41
ALTER TABLE `concept_attribute_type` CONVERT TO CHARACTER SET UTF8;
42
ALTER TABLE `concept_class` CONVERT TO CHARACTER SET UTF8;
43
ALTER TABLE `concept_complex` CONVERT TO CHARACTER SET UTF8;
44
ALTER TABLE `concept_datatype` CONVERT TO CHARACTER SET UTF8;
45
ALTER TABLE `concept_description` CONVERT TO CHARACTER SET UTF8;
46
ALTER TABLE `concept_map_type` CONVERT TO CHARACTER SET UTF8;
47
ALTER TABLE `concept_name` CONVERT TO CHARACTER SET UTF8;
48
ALTER TABLE `concept_name_tag` CONVERT TO CHARACTER SET UTF8;
49
ALTER TABLE `concept_name_tag_map` CONVERT TO CHARACTER SET UTF8;
50
ALTER TABLE `concept_numeric` CONVERT TO CHARACTER SET UTF8;
51
ALTER TABLE `concept_proposal` CONVERT TO CHARACTER SET UTF8;
52
ALTER TABLE `concept_proposal_tag_map` CONVERT TO CHARACTER SET UTF8;
53
ALTER TABLE `concept_reference_map` CONVERT TO CHARACTER SET UTF8;
54
ALTER TABLE `concept_reference_source` CONVERT TO CHARACTER SET UTF8;
55
ALTER TABLE `concept_reference_term` CONVERT TO CHARACTER SET UTF8;
56
ALTER TABLE `concept_reference_term_map` CONVERT TO CHARACTER SET UTF8;
57
ALTER TABLE `concept_set` CONVERT TO CHARACTER SET UTF8;
58
ALTER TABLE `concept_state_conversion` CONVERT TO CHARACTER SET UTF8;
59
ALTER TABLE `concept_stop_word` CONVERT TO CHARACTER SET UTF8;
60
ALTER TABLE `conditions` CONVERT TO CHARACTER SET UTF8;
61
ALTER TABLE `dataintegrity_result` CONVERT TO CHARACTER SET UTF8;
62
ALTER TABLE `dataintegrity_rule` CONVERT TO CHARACTER SET UTF8;
63
ALTER TABLE `drug` CONVERT TO CHARACTER SET UTF8;
64
ALTER TABLE `drug_ingredient` CONVERT TO CHARACTER SET UTF8;
65
ALTER TABLE `drug_order` CONVERT TO CHARACTER SET UTF8;
66
ALTER TABLE `drug_reference_map` CONVERT TO CHARACTER SET UTF8;
67
ALTER TABLE `encounter` CONVERT TO CHARACTER SET UTF8;
68
ALTER TABLE `encounter_provider` CONVERT TO CHARACTER SET UTF8;
69
ALTER TABLE `encounter_role` CONVERT TO CHARACTER SET UTF8;
70
ALTER TABLE `encounter_type` CONVERT TO CHARACTER SET UTF8;
71
ALTER TABLE `field` CONVERT TO CHARACTER SET UTF8;
72
ALTER TABLE `field_answer` CONVERT TO CHARACTER SET UTF8;
73
ALTER TABLE `field_type` CONVERT TO CHARACTER SET UTF8;
74
ALTER TABLE `fingerprint` CONVERT TO CHARACTER SET UTF8;
75
ALTER TABLE `form` CONVERT TO CHARACTER SET UTF8;
76
ALTER TABLE `form_field` CONVERT TO CHARACTER SET UTF8;
77
ALTER TABLE `form_resource` CONVERT TO CHARACTER SET UTF8;
78
ALTER TABLE `formfilter_filter_property` CONVERT TO CHARACTER SET UTF8;
79
ALTER TABLE `formfilter_form_filter` CONVERT TO CHARACTER SET UTF8;
80
ALTER TABLE `global_property` CONVERT TO CHARACTER SET UTF8;
81
ALTER TABLE `hl7_in_archive` CONVERT TO CHARACTER SET UTF8;
82
ALTER TABLE `hl7_in_error` CONVERT TO CHARACTER SET UTF8;
83
ALTER TABLE `hl7_in_queue` CONVERT TO CHARACTER SET UTF8;
84
ALTER TABLE `hl7_source` CONVERT TO CHARACTER SET UTF8;
85
ALTER TABLE `htmlformentry_html_form` CONVERT TO CHARACTER SET UTF8;
86
ALTER TABLE `idgen_auto_generation_option` CONVERT TO CHARACTER SET UTF8;
87
ALTER TABLE `idgen_id_pool` CONVERT TO CHARACTER SET UTF8;
88
ALTER TABLE `idgen_identifier_source` CONVERT TO CHARACTER SET UTF8;
89
ALTER TABLE `idgen_log_entry` CONVERT TO CHARACTER SET UTF8;
90
ALTER TABLE `idgen_pooled_identifier` CONVERT TO CHARACTER SET UTF8;
91
ALTER TABLE `idgen_remote_source` CONVERT TO CHARACTER SET UTF8;
92
ALTER TABLE `idgen_reserved_identifier` CONVERT TO CHARACTER SET UTF8;
93
ALTER TABLE `idgen_seq_id_gen` CONVERT TO CHARACTER SET UTF8;
94
ALTER TABLE `liquibasechangelog` CONVERT TO CHARACTER SET UTF8;
95
ALTER TABLE `liquibasechangeloglock` CONVERT TO CHARACTER SET UTF8;
96
ALTER TABLE `location` CONVERT TO CHARACTER SET UTF8;
97
ALTER TABLE `location_attribute` CONVERT TO CHARACTER SET UTF8;
98
ALTER TABLE `location_attribute_type` CONVERT TO CHARACTER SET UTF8;
99
ALTER TABLE `location_tag` CONVERT TO CHARACTER SET UTF8;
100
ALTER TABLE `location_tag_map` CONVERT TO CHARACTER SET UTF8;
101
ALTER TABLE `metadatamapping_metadata_set` CONVERT TO CHARACTER SET UTF8;
102
ALTER TABLE `metadatamapping_metadata_set_member` CONVERT TO CHARACTER SET UTF8;
103
ALTER TABLE `metadatamapping_metadata_source` CONVERT TO CHARACTER SET UTF8;
104
ALTER TABLE `metadatamapping_metadata_term_mapping` CONVERT TO CHARACTER SET UTF8;
105
ALTER TABLE `metadatasharing_exported_package` CONVERT TO CHARACTER SET UTF8;
106
ALTER TABLE `metadatasharing_imported_item` CONVERT TO CHARACTER SET UTF8;
107
ALTER TABLE `metadatasharing_imported_package` CONVERT TO CHARACTER SET UTF8;
108
ALTER TABLE `note` CONVERT TO CHARACTER SET UTF8;
109
ALTER TABLE `notification_alert` CONVERT TO CHARACTER SET UTF8;
110
ALTER TABLE `notification_alert_recipient` CONVERT TO CHARACTER SET UTF8;
111
ALTER TABLE `notification_template` CONVERT TO CHARACTER SET UTF8;
112
ALTER TABLE `obs` CONVERT TO CHARACTER SET UTF8;
113
ALTER TABLE `openconceptlab_item` CONVERT TO CHARACTER SET UTF8;
114
ALTER TABLE `openconceptlab_update` CONVERT TO CHARACTER SET UTF8;
115
ALTER TABLE `order_frequency` CONVERT TO CHARACTER SET UTF8;
116
ALTER TABLE `order_group` CONVERT TO CHARACTER SET UTF8;
117
ALTER TABLE `order_set` CONVERT TO CHARACTER SET UTF8;
118
ALTER TABLE `order_set_member` CONVERT TO CHARACTER SET UTF8;
119
ALTER TABLE `order_type` CONVERT TO CHARACTER SET UTF8;
120
ALTER TABLE `order_type_class_map` CONVERT TO CHARACTER SET UTF8;
121
ALTER TABLE `orders` CONVERT TO CHARACTER SET UTF8;
122
ALTER TABLE `patient` CONVERT TO CHARACTER SET UTF8;
123
ALTER TABLE `patient_identifier` CONVERT TO CHARACTER SET UTF8;
124
ALTER TABLE `patient_identifier_type` CONVERT TO CHARACTER SET UTF8;
125
ALTER TABLE `patient_program` CONVERT TO CHARACTER SET UTF8;
126
ALTER TABLE `patient_state` CONVERT TO CHARACTER SET UTF8;
127
ALTER TABLE `patientflags_displaypoint` CONVERT TO CHARACTER SET UTF8;
128
ALTER TABLE `patientflags_flag` CONVERT TO CHARACTER SET UTF8;
129
ALTER TABLE `patientflags_flag_tag` CONVERT TO CHARACTER SET UTF8;
130
ALTER TABLE `patientflags_priority` CONVERT TO CHARACTER SET UTF8;
131
ALTER TABLE `patientflags_tag` CONVERT TO CHARACTER SET UTF8;
132
ALTER TABLE `patientflags_tag_displayPoint` CONVERT TO CHARACTER SET UTF8;
133
ALTER TABLE `person` CONVERT TO CHARACTER SET UTF8;
134
ALTER TABLE `person_address` CONVERT TO CHARACTER SET UTF8;
135
ALTER TABLE `person_attribute` CONVERT TO CHARACTER SET UTF8;
136
ALTER TABLE `person_attribute_type` CONVERT TO CHARACTER SET UTF8;
137
ALTER TABLE `person_merge_log` CONVERT TO CHARACTER SET UTF8;
138
ALTER TABLE `person_name` CONVERT TO CHARACTER SET UTF8;
139
ALTER TABLE `privilege` CONVERT TO CHARACTER SET UTF8;
140
ALTER TABLE `program` CONVERT TO CHARACTER SET UTF8;
141
ALTER TABLE `program_workflow` CONVERT TO CHARACTER SET UTF8;
142
ALTER TABLE `program_workflow_state` CONVERT TO CHARACTER SET UTF8;
143
ALTER TABLE `provider` CONVERT TO CHARACTER SET UTF8;
144
ALTER TABLE `provider_attribute` CONVERT TO CHARACTER SET UTF8;
145
ALTER TABLE `provider_attribute_type` CONVERT TO CHARACTER SET UTF8;
146
ALTER TABLE `providermanagement_provider_role` CONVERT TO CHARACTER SET UTF8;
147
ALTER TABLE `providermanagement_provider_role_provider_attribute_type` CONVERT TO CHARACTER SET UTF8;
148
ALTER TABLE `providermanagement_provider_role_relationship_type` CONVERT TO CHARACTER SET UTF8;
149
ALTER TABLE `providermanagement_provider_role_supervisee_provider_role` CONVERT TO CHARACTER SET UTF8;
150
ALTER TABLE `providermanagement_provider_suggestion` CONVERT TO CHARACTER SET UTF8;
151
ALTER TABLE `providermanagement_supervision_suggestion` CONVERT TO CHARACTER SET UTF8;
152
ALTER TABLE `relationship` CONVERT TO CHARACTER SET UTF8;
153
ALTER TABLE `relationship_type` CONVERT TO CHARACTER SET UTF8;
154
ALTER TABLE `report_object` CONVERT TO CHARACTER SET UTF8;
155
ALTER TABLE `report_schema_xml` CONVERT TO CHARACTER SET UTF8;
156
ALTER TABLE `reporting_report_design` CONVERT TO CHARACTER SET UTF8;
157
ALTER TABLE `reporting_report_design_resource` CONVERT TO CHARACTER SET UTF8;
158
ALTER TABLE `reporting_report_processor` CONVERT TO CHARACTER SET UTF8;
159
ALTER TABLE `reporting_report_request` CONVERT TO CHARACTER SET UTF8;
160
ALTER TABLE `role` CONVERT TO CHARACTER SET UTF8;
161
ALTER TABLE `role_privilege` CONVERT TO CHARACTER SET UTF8;
162
ALTER TABLE `role_role` CONVERT TO CHARACTER SET UTF8;
163
ALTER TABLE `scheduler_task_config` CONVERT TO CHARACTER SET UTF8;
164
ALTER TABLE `scheduler_task_config_property` CONVERT TO CHARACTER SET UTF8;
165
ALTER TABLE `serialized_object` CONVERT TO CHARACTER SET UTF8;
166
ALTER TABLE `test_order` CONVERT TO CHARACTER SET UTF8;
167
ALTER TABLE `uiframework_user_defined_page_view` CONVERT TO CHARACTER SET UTF8;
168
ALTER TABLE `user_property` CONVERT TO CHARACTER SET UTF8;
169
ALTER TABLE `user_role` CONVERT TO CHARACTER SET UTF8;
170
ALTER TABLE `users` CONVERT TO CHARACTER SET UTF8;
171
ALTER TABLE `visit` CONVERT TO CHARACTER SET UTF8;
172
ALTER TABLE `visit_attribute` CONVERT TO CHARACTER SET UTF8;
173
ALTER TABLE `visit_attribute_type` CONVERT TO CHARACTER SET UTF8;
174
ALTER TABLE `visit_type` CONVERT TO CHARACTER SET UTF8;
175
ALTER TABLE `xforms_medical_history_field` CONVERT TO CHARACTER SET UTF8;
176
ALTER TABLE `xforms_person_repeat_attribute` CONVERT TO CHARACTER SET UTF8;
177
ALTER TABLE `xforms_xform` CONVERT TO CHARACTER SET UTF8;
178
179
/*!40101 SET [email protected]_SQL_MODE */;
180
/*!40014 SET [email protected]_FOREIGN_KEY_CHECKS */;
181
/*!40014 SET [email protected]_UNIQUE_CHECKS */;
182
/*!40101 SET [email protected]_CHARACTER_SET_CLIENT */;
183
/*!40101 SET [email protected]_CHARACTER_SET_RESULTS */;
184
/*!40101 SET [email protected]_COLLATION_CONNECTION */;
185
/*!40111 SET [email protected]_SQL_NOTES */;
Copied!

Aijar cannot start because the patientflags_tag_role table is missing

Symptom
There is an error starting the aijar module with the following text in the stack trace
1
INFO - AijarActivator.stopped(393) |2020-06-05 11:01:42,299| aijar Module stopped
2
WARN - ModuleUtil.refreshApplicationContext(935) |2020-06-05 11:01:42,359| Unable to invoke started() method on the module's activator
3
java.lang.RuntimeException: failed to setup the module
4
at org.openmrs.module.aijar.AijarActivator.started(AijarActivator.java:181)
5
at org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:927)
6
at org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:847)
7
at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:632)
8
at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:612)
9
at org.openmrs.web.Listener.startOpenmrs(Listener.java:251)
10
at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42)
11
Caused by: java.lang.RuntimeException: failed to install the common metadata
12
at org.openmrs.module.aijar.AijarActivator.installCommonMetadata(AijarActivator.java:366)
13
at org.openmrs.module.aijar.AijarActivator.started(AijarActivator.java:149)
14
... 6 more
15
Caused by: org.openmrs.api.APIException: Unable to install bundle UgandaEMRPatientFlagMetadataBundle
16
at org.openmrs.module.metadatadeploy.api.impl.MetadataDeployServiceImpl.installBundle(MetadataDeployServiceImpl.java:117)
17
at org.openmrs.module.metadatadeploy.api.impl.MetadataDeployServiceImpl.installBundle(MetadataDeployServiceImpl.java:81)
18
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
19
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
20
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
21
at java.lang.reflect.Method.invoke(Method.java:498)
22
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
23
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
24
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
25
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
26
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
27
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
28
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
29
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
30
at com.sun.proxy.$Proxy170.installBundle(Unknown Source)
31
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
32
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
33
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
34
at java.lang.reflect.Method.invoke(Method.java:498)
35
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
36
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
37
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
38
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
39
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
40
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
41
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
42
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
43
at com.sun.proxy.$Proxy332.installBundle(Unknown Source)
44
at org.openmrs.module.aijar.AijarActivator.installCommonMetadata(AijarActivator.java:360)
45
... 7 more
46
Caused by: org.hibernate.exception.SQLGrammarException: could not execute batch
47
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:123)
48
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
49
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
50
at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:136)
51
at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:114)
52
at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:163)
53
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:226)
54
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:484)
55
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:351)
56
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)
57
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
58
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1258)
59
at org.openmrs.api.db.hibernate.HibernateContextDAO.flushSession(HibernateContextDAO.java:368)
60
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
61
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
62
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
63
at java.lang.reflect.Method.invoke(Method.java:498)
64
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
65
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
66
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
67
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
68
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
69
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
70
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
71
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
72
at com.sun.proxy.$Proxy387.flushSession(Unknown Source)
73
at org.openmrs.api.context.Context.flushSession(Context.java:824)
74
at org.openmrs.module.metadatadeploy.api.impl.MetadataDeployServiceImpl.installBundle(MetadataDeployServiceImpl.java:114)
75
... 35 more
76
Caused by: java.sql.BatchUpdateException: Table 'openmrs.patientflags_tag_role' doesn't exist
77
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
78
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
79
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
80
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
81
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
82
at com.mysql.jdbc.Util.getInstance(Util.java:408)
83
at com.mysql.jdbc.SQLError.createBatchUpdateException(SQLError.java:1163)
84
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1778)
85
at com.mysql.jdbc.PreparedStatement.executeBatchInternal(PreparedStatement.java:1262)
86
at com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:970)
87
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1135)
88
at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:127)
89
... 59 more
90
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'openmrs.patientflags_tag_role' doesn't exist
91
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
92
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
93
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
94
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
95
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
96
at com.mysql.jdbc.Util.getInstance(Util.java:408)
97
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
98
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
99
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
100
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
101
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
102
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484)
103
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
104
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2079)
105
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1756)
Copied!
Resolution
Run the following SQL script on your database
``
1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */;
2
/*!40101 SET @OLD_CHARACTER_SET_RESULTS = @@CHARACTER_SET_RESULTS */;
3
/*!40101 SET @OLD_COLLATION_CONNECTION = @@COLLATION_CONNECTION */;
4
/*!40101 SET NAMES utf8 */;
5
/*!40103 SET @OLD_TIME_ZONE = @@TIME_ZONE */;
6
/*!40103 SET TIME_ZONE = '+00:00' */;
7
/*!40014 SET @OLD_UNIQUE_CHECKS = @@UNIQUE_CHECKS, UNIQUE_CHECKS = 0 */;
8
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS = 0 */;
9
/*!40101 SET @OLD_SQL_MODE = @@SQL_MODE, SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO' */;
10
/*!40111 SET @OLD_SQL_NOTES = @@SQL_NOTES, SQL_NOTES = 0 */;
11
12
CREATE TABLE `patientflags_tag_role`
13
(
14
`tag_id` int(11) NOT NULL,
15
`role` varchar(50) NOT NULL,
16
KEY `role` (`role`),
17
KEY `tag_role_id` (`tag_id`),
18
CONSTRAINT `patientflags_tag_role_ibfk_1` FOREIGN KEY (`tag_id`) REFERENCES `patientflags_tag` (`tag_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
19
CONSTRAINT `patientflags_tag_role_ibfk_2` FOREIGN KEY (`role`) REFERENCES `role` (`role`)
20
) ENGINE = InnoDB
21
DEFAULT CHARSET = utf8;
22
23
/*!40101 SET [email protected]_SQL_MODE */;
24
/*!40014 SET [email protected]_FOREIGN_KEY_CHECKS */;
25
/*!40014 SET [email protected]_UNIQUE_CHECKS */;
26
/*!40101 SET [email protected]_CHARACTER_SET_CLIENT */;
27
/*!40101 SET [email protected]_CHARACTER_SET_RESULTS */;
28
/*!40101 SET [email protected]_COLLATION_CONNECTION */;
29
/*!40111 SET [email protected]_SQL_NOTES */;
Copied!
Last modified 1yr ago