Unable to add new priority for patient flags module

After deploying patientflags module, I follow the guideline to add the first priority. However, the same problem occurred every time I tried to do this (tried on 3 servers but still not working).

As the pictures from wiki patientflags module, I think that we can access this module and manage flags/priorities/tags in ‘configure metadata’ in referenceapp UI. However, my patientflags section only appears the ‘Manage Flags’, which goes to http://localhost:8080/openmrs/owa/patientflags/index.html and return empty webpage. I’m not sure which one is the root cause.

Please help me with this problem. Thank you so much for your help.

  • openjdk version “1.8.0_312”
  • Maven 3.6.3
  • MySQL 8.0.27
  1. pastebin link: PatientFlag - Edit Priorities - Pastebin.com
  2. openmrs-distro:
Distro

#Thu Jan 20 01:01:29 NZDT 2022

db.h2.supported=false

db.sql=classpath://openmrs-distro.sql

name=Reference Application

omod.addresshierarchy=2.14.2

omod.adminui=1.6.0

omod.allergyui=1.8.4

omod.appframework=2.16.0

omod.appointmentscheduling=1.17.0-SNAPSHOT

omod.appointmentschedulingui=1.12.0

omod.appui=1.15.0

omod.atlas=2.2.5

omod.atlas.type=omod

omod.attachments=2.5.0

omod.calculation=1.3.0

omod.coreapps=1.34.0

omod.dataexchange=1.3.7

omod.emrapi=1.32.0

omod.event=2.10.0

omod.event.groupId=org.openmrs

omod.fhir2=1.3.0

omod.formentryapp=1.4.2

omod.htmlformentry=4.3.0

omod.htmlformentryui=2.1.0

omod.htmlwidgets=1.10.0

omod.idgen=4.7.0

omod.legacyui=1.9.0

omod.metadatadeploy=1.13.0

omod.metadatamapping=1.4.0

omod.metadatasharing=1.8.0

omod.openconceptlab=1.2.9

omod.owa=1.13.0

omod.patientflags=3.0.3-SNAPSHOT

omod.providermanagement=2.13.0

omod.referenceapplication=2.12.0-SNAPSHOT

omod.referencedemodata=1.4.8-SNAPSHOT

omod.referencemetadata=2.12.0

omod.registrationapp=1.24.0

omod.registrationcore=1.11.0

omod.reporting=1.23.0

omod.reportingcompatibility=2.0.8

omod.reportingrest=1.12.0

omod.reportingui=1.8.0

omod.serialization.xstream=0.2.15

omod.serialization.xstream.type=omod

omod.spa=1.0.8

omod.uicommons=2.19.0

omod.uiframework=3.22.1

omod.uilibrary=2.0.7

omod.webservices.rest=2.33.0

owa.openmrs-owa-sysadmin=1.2

version=2.12.2

war.openmrs=2.5.1

  1. PatientFlags - Manage Priorities

It looks like you are facing the same problem as reported here Using MySQL reserved word as Field Name. for the rank field in the the patient flags module. You can just follow the same pattern as on that thread.

1 Like

Thank you for the guideline. I changed the ‘rank’ column in the Priority.hbm.xml into ‘priority_rank’. Then update the new changeset for that ‘priority_rank’ column in liquibase.xml. Successfully got the module working in legacyui. However, in the referenceapp, the module only created patientflags block in patient summary and I could not access the http://localhost:8000/openmrs/owa/patientflags/index.html (only return empty webpage). This is the link to pastebin. Again, I really appreciate your help. The problems always got fixed quickly with your instructions.

I tested the module on the same patient for both legacyui and referenceapp, but the flag did not appear here.

Do you have any errors on your browser’s JavaScript Console?

I got errors loading owa page

I mean on the patient dashboard page that you shared.

Sorry. I have attached bellow

You could look into the offending line which assumes that the response is a string, yet it is not: openmrs-module-patientflags/patientflagsDashboard.gsp at patientflags-3.0.2 · openmrs/openmrs-module-patientflags · GitHub

2 Likes

Sorry for late reply. I got it working by changing response using JSON.stringify. Thank you so much for your help