Hello, with the kind help of many of you, we wrote a module. Thank you for your help.
The module is supposed to do: A ‘doctor’ adds some drugs to a patient. Then, groups those drugs and creates a ‘prescription’. - Another person (in another room), the ‘receptionist’ will print out the ‘prescription’. But, s/he cannot change (or create) it. There is no supply management or ‘pharmacy’ inventory integrated.
Reason for the module: The doctor might or might not be aware of the correct spelling of a drug. - Given that s/he is, he might do a hand-written ‘prescription’. - The patient might give this hand-written prescription to a pharmacist, who him/herself might or might not be aware of the correct spelling … or might not be able to decipher the hand-writing. Problem: maybe the ‘wrong’ drug is given to the patient.
A/ Two requirements: a/ only 1 module to install (not 2 like it is surely correct, like for allergy - ui and api). b/ the drug list in French.
B/ Technical Running as a standalone. On ref app 2.5. Java8. Linux (but maybe on Windows also … hopefully not an issue)
C/ please help.
1/ So we wrote it. Since my team had something else urgently to do, work had been on me, and I am not a super-coder … hm, could someone please maybe have a (very very strict) look and do sort of a code review. We want to put this module in place this year, and well it should be not too bad. it’s here https://github.com/brci/prescription_print
2/ while writing it, some questions arose (besides the coding). If someone had an idea, please share. thank you.
2.1/ using the standalone. starting it, setting privileges to roles (as described in the readme https://github.com/brci/prescription_print/blob/master/prescription/README.md).
- works. Then, stop the server, re-start it - the privileges are not set to the roles, any more. Have to be reset. Can we avoid this?
Or even better: can we ourselves create roles (like doctor_advanced, reception_advanced) - with ‘our privileges’, which are there, right from start?
2.2/ question of the vocabulary ‘drug list’. we found one in the dropbox. it’s mainly in English. so I did some sql operations … to create a similar list in French. it’s very sparse. could somebody please tell me, what is this druglist (in English), is it free for use at all, where could there be a similar list in French? … we plan to have the simplest solution possible, that is, provide an cvs file to use. (hm, or, is it thought that we create our own list? translate all the English drug names?)
2.3/ programming question: there seem to be 2 sorts of privileges. a/ in omod: config.xml // those, we took b/ in api: [ModuleName]Config.java
Such, we took a/ . Reason: we can set those privileges in the admin-view. Whereas, the privilege of the Config.java, we did not found out where to set.
2.4/ Unit test question: Trying the module to create unit tests for OpenMRS - it seems not to work with: Eclipse Neon2, Java8. - someone please give some advice. Hm, if someone please could tell us how to write them, and give one running sample (and maybe the method signatures of those that should be there) … we will write them.
Hm, if such module existed somewhere, please also share. It seems to be a simple requirements and a requirement, that might be in need more often.
We are glad to maybe extend this or work with somebody who is working on a inventory. Or with somebody who has experience in OpenMRS and please could tell us, how to write it correctly and good.
Right now, we simply want the code to be run stably and maybe, that the roles do not disappear after restart … that is indeed a problem for production.
Thank you and have a good day @darius thank you for telling me to ask this question.