Somebody please help and might review a module?

Which version of the reference application are you using?

Hello @dkayiwa, Thank you very much for asking, it’s the standalone, 2.5

Are they built in privileges? Or ones that you have created yourself?

Hello @dkayiwa, Thank you very much for asking, - they are created by ourselves, added here: omod/src/main/resources/config.xml

Did you stop the referencedemodata module?

Hi @dkayiwa, Thank you very much for asking, no, that module is not listed at all, in the standalone of ref app 2.5, please see below, these are there, no module with ‘demo’.

Ah, when I was starting the app the first time, I did select: no data. Thank you for your help

Admin UI Module Allergy UI Module App Framework Module App UI Module Appointment Scheduling Module Appointment Scheduling UI Module Atlas Module Calculation Chart Search Module Core Apps Module Data Exchange Module EMR API Module Event Module FHIR Module Form Entry App Module HTML Form Entry HTML Form Entry Extensions for OpenMRS 1.9 Module HTML Form Entry UI Framework Integration Module HTML Widgets ID Generation Legacy UI Module Metadata Deploy Metadata Mapping Metadata Sharing Open Web Apps Module OpenMRS UI Framework Provider Management Module Reference Application Module Reference Metadata Module Registration App Module Registration Core Module Reporting Reporting Compatibility Reporting REST Rest Web Services OMOD Serialization Xstream UI Commons Module UI Library Module

I have been able to reproduce this and noticed that the built in roles are always reset on startup and hence their privileges cannot be dropped or new ones added, and preserved on a restart. So you would need to use new custom roles, for now. @darius is this the expected behavior?

Hi @dkayiwa, Thank you very much for trying it, and your advice. May I please ask - ‘new custom roles’ - do you mean:

  • i can create them in the module?


  • I have to ‘add’ a new role, and e.g. ‘copy’ the privileges and role-inheritances (if have) of a ‘doctor’ - so to say, “create an advanced doctor” with ‘my’ privileges added? - and this “advanced doctor” will be kept by restart?

Thank you very much and kind regards

Yes, this is expected behavior. Looking at the role definitions, the application roles are intentionally set up that way, and the system would basically break without them. It is a mistake that we are hardcoding the organizational roles, so you’ll have to find some workaround.

I assume you’re talking about something like openmrs_drug_1.10.0_20141226.sql in the CIEL dropbox folder? See Andy’s comments here. More or less, yes they are free to use, but probably not available in French. If you translate to French, I assume Andy would love to get your translations. You should ask him this question in the #implementing:terminology category.

@darius, Thank you very much for your answers,

as to the drugs sql, I did some queries and may I think, the ‘drugs’ are derived from the CIEL (if I correctly understand that the ‘CIEL’ is the big mysql db comprising all concept… tables). - Yes, in case we had translations we will ‘give them out’, of course.

as to the roles: The “doctor” role is an organisational role? It is named: Organizational: Doctor

however given additionally privileges, they disappear.

Edit: so trying this solution: copying a build-in role as to inherited roles and privileges, and adding ‘own’ privileges’ to this newly-created role - that works. it stays after restarting the server.

@dkayiwa @darius please a question - the ‘provider’ - what is it for exactly (what we had seen, to ‘register a patient’ - or other rights also?)

and, is it correct to set it: 1 time in the role (provider role) plus 2 times for a user (a/ provider account b/ provider role) = 3 times to set? or is that maybe not a need, or, is there a difference in the settings? Thank you

Hi @bci b c !, Did you manage to find a “standard” way to “just print” the prescription directly within OpenMRS?.. I tried to install your module however I could not compile it because it fails to get some dependency for the omod module (I think that some repository is missing in my maven config)… However I’ve tried the oderentryui module and seems very appropriate to define the “drug order” (aka “prescription”) … unfortunately it seems that there is no easy way to print the prescription once created (opposed to sending an electronic version to the pharmacy)… Any suggestion? thank you in advance!..

Hello Francisco @frflores , Thank you very much for asking, sorry for late reply, seeing the message now. Yes it worked with our installation to “just print” a prescription, say, create a pdf file out of the prescription data. (well I did it, then, b/c we wanted something simple, and not to install a lot of other modules etc. … just print, that was it) I will try to install it again, it’s some time ago that I programmed it, and “make it run”, I hope to get it done within a week. I will write when I have a result :slight_smile: Kind regards!

Thank you @bci !.. I really appreciate it!


Hello @frflores,

I tried it, and, the .omod file in the github-repository can be taken “as is” (no need to compile) (

It can be added per admin-view just as it is.

I am using: Ubuntu 18, Java8

and the emr2-standalone, as suggested, from this repository:

(git clone -b openmrs-emr2 --single-branch --single-branch)

Please to do note, HAVE TO DO: when the standalone-app is run the first time, a file is created “” - please note, that file does not exist before the standalone-app runs the first time.

(That is independent from the “prescription-module”. However, a few settings are taken from this file, so they must be added, there.)

The standalone-app has to be stopped, and then, into this file, these 3 lines as config-data are to be be copied: …

prescription_address_1=ABC hospital

prescription_address_2=21 health street

prescription_address_3=Mytown, Mycountry

… then please to re-start the standalone-app.


it is really very simple, that was all that was requested: a patient comes, and the doctor writes a prescription, and the prescription is printed. The printed prescription, then, can be taken to a pharmacists somewhere else and the patient will receive the correct medication.

Idea behind: The patient might not be literate. The doctor might not have a good handwriting. So, it’s just to improve the communication between doctor and pharmacists.

That is why, there is no need for a medication-storage or an inventory of it - because, the doctors do not have such.

So, given that there is a patient, the module will add a title “prescriptions”. (the link in blue will only appear when a prescription was created)

Clicking onto the ‘pen’, the prescription-window opens:

Those medications (those rows) that are marked with “print” will be added to a prescription. Then, to click ‘return’. - the first screenshot is shown, and now, has this link.

Click onto the link will open the “prescription”, as pdf-preview. it’s not beautiful however it’s sufficient and there is some space at the bottom, for the doctors, to add their stamp and to sign it.




Configuration is possible

a/ for the medication list to select. Idea is: the doctors might not entirely be sure how to spell the medication with its technical term, and in which quantity it is there. (Overall purpose: communication with the pharmacist, who will be not be in the same house/location with the doctors)

therefore, the .omod file can be renamed to .zip, then unzipped, the config-file changed, then zipped, then renamed to .omod

b/ the name of the doctors office, the language (the language spoken might be EN or FR or another one): stop the application, change the 3 settings in the … start the app

c/ roles. Only doctors shall be able to use this service, that is: to “see” the “prescription”-title when seeing the patient-view. … there was something with the fact that OpenMRS does not store roles … so, how we did, is described in the readme of



Hello Francisco, trying to compile, problems for me were, that the openmrs-parent version was not current, and, it could not be found. Solution was, to indicated the openmrs-parent in an extra separate file settings.xml.

1/ clone the module

2/ please to change in the pom.xml the version of the parent, to “1.1.1”: (this version number I found here:

        <groupId >org.openmrs.maven.parents</groupId>
        <artifactId >maven-parent-openmrs-module</artifactId>

3/ please create a file “settings.xml” (location: e.g. here, also, next to the pom.xml)

Please insert into this settings.xml the content, like described here:

4/ compile, like described in the mentioned link and refer to this extra settings.xml file // e.g. with settings.xml in the same location like the pom.xml:

mvn package -s settings.xml

The resulting module, then, is created in /omod/target/[prescription…].omod

… that worked for me. I can add this omod via the admin-view.

Thank you very much @bci b c for your complete explanation and great work!.. I really appreciate it !!! I will give it a try! Thank you again!, BR,

Hello @frflores Franciso thank you very much for your message, and kindly let me know your issues if there might be … also ok via (personal) message in case that might be a specific and not a general issue, maybe we had it also and can solve it! :slight_smile: kind regards and a good weekend!

something to add: the library taken to create the pdf preview is lowagie v.2.1.7, not itext directly. it is the same library, actually, just the package-name was changed, and versions with package name ‘itext’ provide more (modern) features however, for our purpose, lowagie was sufficient. And, versions greater lowagie 2.1.7 changed the licence, lowagie had MGPL and from higher versions on it’s AGPL … which might not be an issue with an open source project, anyhow. however that was the reason to stick with lowagie 2.1.7.