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 Kind regards!
Thank you @bci !.. I really appreciate it!
I tried it, and, the .omod file in the github-repository can be taken “as is” (no need to compile) (https://github.com/brci/prescription_print/blob/master/prescription/prescription-1.0.0.omod)
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: https://github.com/openmrs/openmrs-standalone/tree/openmrs-emr2
(git clone -b openmrs-emr2 --single-branch https://github.com/openmrs/openmrs-standalone --single-branch)
Please to do note, HAVE TO DO: when the standalone-app is run the first time, a file is created “openmrs-standalone-runtime.properties” - 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 openmrs-standalone-runtime.properties file, these 3 lines as config-data are to be be copied: …
prescription_address_2=21 health street
… 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 openmrs-standalone-runtime.properties … 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 https://github.com/brci/prescription_print/tree/master/prescription
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: https://github.com/openmrs/openmrs-module-basicmodule/blob/master/pom.xml)
<parent> <groupId >org.openmrs.maven.parents</groupId> <artifactId >maven-parent-openmrs-module</artifactId> <version>1.1.1</version> </parent>
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: https://wiki.openmrs.org/display/docs/Using+the+Module+Maven+Archetype
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! 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.