How can i have a dedicated link for ID card in Patient dashboard. When i click, it should directly open the Patient ID Card in PDF format and also i should have patient summary link which will print a report with detailed information about patient.
Go to the settings page as here: http://qa-refapp.openmrs.org/openmrs/admin/maintenance/settings.list?show=Xreports and set the value of the reportId for “Patient Summary Report Id” You can copy the reportId value from the url for the manage reports page as here: http://qa-refapp.openmrs.org/openmrs/xreports/report.page?reportId=5&groupId=&
I have also just uploaded the module to modulus. This time i was able to login.
Thank you @dkayiwa. With XReport v1.6, I can design the report without any problem.
If I set the reportId of any report for “Patient Summary Report Id”, then that report will be desplayed when i click on “Patient Summary”.
But I want to keep the existing “Patient Summary” as it is and add a new menu item/link for “Patient ID Card” just above the “Patient Summary”.
Do you want to print this for a group of patients? Or for one patient at a time?
For one patient at a time. So the link to print the ID should be in patient dashboard.
Here I have created a sample of Patient ID card (It may help another implementor to do less work to desing)
Data Set Definition (SQL Query)
SELECT GROUP_CONCAT(patient_identifier.identifier SEPARATOR ‘,’), (SELECT identifier FROM patient_identifier WHERE patient_identifier.patient_id = person.person_id AND identifier_type=1 AND voided=0 AND preferred=1) AS identifier1, (SELECT identifier FROM patient_identifier WHERE patient_identifier.patient_id = person.person_id AND identifier_type=2 AND voided=0 AND preferred=1) AS identifier2, (SELECT identifier FROM patient_identifier WHERE patient_identifier.patient_id = person.person_id AND identifier_type=3 AND voided=0 AND preferred=1) AS identifier3, DATE(person.date_created) AS register_date, given_name, family_name, birthdate, gender FROM person, person_name, patient_identifier WHERE person.person_id = 7 AND person.person_id=person_name.person_id AND person.person_id=patient_identifier.patient_id AND person.voided=0 AND person_name.voided=0 AND patient_identifier.voided=0 AND person_name.preferred=1 AND patient_identifier.preferred=1 AND patient_identifier.identifier_type=3 LIMIT 1;
XReport Patient-ID-Card.xml.txt (3.9 KB)
@hpardess i have updated the documentation at https://wiki.openmrs.org/display/docs/XReports+Module+User+Guide with how to add more custom reports to the patient dashboard. You can see it in action on this page http://qa-refapp.openmrs.org/openmrs/coreapps/clinicianfacing/patient.page?patientId=c117c842-9437-4d02-a9b8-74b76650eca8 where the Patient Summary report is different from the ID Card one.
You will need to use version 1.7 of the module which you can get from this download url: https://openmrs.jfrog.io/openmrs/modules/org/openmrs/module/xreports-omod/1.7/xreports-omod-1.7.jar
After downloading , you will need to rename the file “xreports-omod-1.7.jar” to “xreports-1.7.omod” before you can install it.
By the way, i like your desire to share what you have done with other implementers. Please keep it up.
Thank you so much @dkayiwa .
Thanks for a very useful thread. Have you considered including a barcode on the id card?
@dkayiwa: I did not understand bellow line in wiki:
To display more reports on the patient dashboard, for each report you would like to display, go under manage reports and give it an extension like below:
where is manage reports? i found one option in Reports>Manage Reports but i do not think you mean this place.
Go to home -> XReports -> Manage Reports -> Then choose a report.
Thanks were for all contributors and the query was also intended for anyone that could help.
At the risk of overburdening this thread. I have recently learned that there is a true type font that willproduce a code 39 barcode. I can now generate adequate barcodes easily in most text editors.
I got my font from http://www.barcodelink.net/barcode-font.php
I would like to have tried this using xreports but have not as yet been able to find any documentation on what governs the available fonts (Arial, Verdana etc). Can you advise if it is possible to add this font?
@mafrica can you send me those fonts and i try them out locally?
@mafrica for how to register custom fonts, take a look at the Font Family property on this page: https://wiki.openmrs.org/display/docs/XReports+Module+Widget+Properties+Pane
You would need to use version 1.8 of the module which you can download from: https://openmrs.jfrog.io/openmrs/modules/org/openmrs/module/xreports-omod/1.8/xreports-omod-1.8.jar Rename the file from “xreports-omod-1.8.jar” to “xreports-1.8.omod” before you can update the module.
Thanks so much for this.
I have installed xreports-1.8.omod and set the xreports.pdf.fonts property as in the jpg, but unfortunately the font family (code39) is not detected when applying the widget property to a label. Could it be that the colon in the windows path is confusing?
@mafrica you are correct. Can you replace full colons with equal signs and then use this version of the module? https://openmrs.jfrog.io/openmrs/modules/org/openmrs/module/xreports-omod/1.9/xreports-omod-1.9.jar Remember to rename the file from “xreports-omod-1.9.jar” to “xreports-1.9.omod” before you can update the module.
I have also updated the documentation with an example: https://wiki.openmrs.org/display/docs/XReports+Module+Widget+Properties+Pane
Daniel, I am sorry but with 1.9 it still seems not to be able to locate the new font in the widget properties.
What do you mean by not able to locate the font? Do you mean that you are getting a file not found error while trying to load the report? Or do you mean something else?
I set the parameter type as person for Patient ID Card. when i am trying to run the report from XReports>Run Reports section. I get a person field which list of all persons (it includes nurse, doctor, clerk and patient). How can i list only patients in this dropdown?