Best approach for having Patient ID card in OpenMRS 2x and RefApp 2x

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

1 Like

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?

@hpardess can you test the updated version of the htmlwidgets module that i have attached on this ticket? https://issues.openmrs.org/browse/HTMLWIDGETS-23 You will need to change the parameter type from Person to Patient.

1 Like

If you type a good font name into the widget property font family cell then the font is immediately applied to the widget. If you type a bad one eg xyz or in this case code39 then nothing happens. This is what I mean by can’t locate.

Is it possible that the path name needs to be in the URL style of filepath eg file///C:/etc?

I tried the idea but with no change. My last thought is that the address should perhaps be relative to some system location?

Thanks.

Also I want to add an image to Patient ID Card. How to upload the image as resource and use the link in xReports? I mean what is the best way to upload the logos in OpenMRS and use it later to either replace the OpenMRS logo or use as image in reports.

@mafrica after typing that font name and save, what happens when you now display the report in PDF format?

@hpardess take a look at this page for how to set the image: https://wiki.openmrs.org/display/docs/XReports+Module+Widget+Properties+Pane

Here is an example for it in action: http://qa-refapp.openmrs.org/openmrs/module/xreports/reportDesigner.form?reportId=5&refApp=true

I have upload the image using file menu but how to locate the file. I do not know where the file is stored and what is the name of that file? How to see other uploaded images previously uploaded in system?

You have got it. The save made all the difference.

It is a bit tricky to get size and spacing right without seeing the visual representation on the design surface, but I guess I can live with it.

I will post some examples of labels and ID cards when I am happy with them as I am sure many folks will be interested in a barcode solution that does not need special printers.

Many thanks.

@hpardess did you get a chance to use the documentation link i gave above and still failed to have it working? If yes, what exactly did you do? I just want to find out what i missed in the documentation.

@mafrica i completely agree about the trickiness without seeing the visual representation on the design surface. Keep reminding me to look into that. Thanks for the spirit of sharing with other folks! :slight_smile:

I have uploaded an image through file menu. then i placed the same name of file as it is uploaded in External Source field. it worked for me.

Just for better usage, it should work in 3 ways,

  1. there should be brows button next to “External Source” field which will show all the files uploaded using menu File>Upload file.
  2. or we place the external URL in this field.
  3. we should be able to pass this link through a “Design Items”. I mean the data source. suppose we can upload the patient photo and we want to print it in ID Card. In database, photo url will be stored. so if we place {photo_url} in “External Source” then patient image should be displayed.

Also, Can we upload the patient profile photo in OpenMRS 2x?

I do not seem to understand the last question.

I mean How to upload the patient Photo in OpenMRS 2x?

Is this of any help? How do I upload and view a patient image in OpenMRS 2?

The patent image module is not working in OpenMRS 2x. but I read your comments in this post that you have fixed this module but not uploaded in modulus.

Suppose we have uploaded patient image, then how to show/print that image in Patient ID card?

@darius: Can you please grant @dkayiwa the permission to upload in modulus?