Draw On Image In Form


(Erik Pampalone) #1

I have created a Layout Based Form and would like to add an image that I can draw on. I want to save the combined image/drawing every time I use that form.

The purpose is to document Botox and Filler injections. The image is of facial muscle and I would like to place dots on the image that represent the injections, to document each procedure.

Is there currently away to do this?


(Sherwin Gaddis) #2

@naya

There is a form that does something similar named the graphic pain map. You can install it and relabel it for your use. If you are a little techie, you can change the image to a face close up.


(Brady Miller) #3

hi @naya ,
Check out the ’ Image canvas’ data type in the LBF. I think that should get what you are looking for. Looks like it will take an image name in the description (or at least that’s what it looks like in the code at:
openemr/options.inc.php at master · openemr/openemr · GitHub
)
-brady


(Erik Pampalone) #4

Thank you both for your replies. Because I would like the drawing/image to be one of several data points, I am going to try using the Image Canvas first. If I can’t get that to work, I will try the using the pain map approach.

Here is the form I have so far.

I looked at the code Brady sent, and added an image to the folder shown below.
image

I added the image name to the description (see below).

I also tried adding the image to the directory /sites/images, but that didn’t work either.

Can you tell me if I am reading this right?

-Erik


(Brady Miller) #5

Hi @naya ,

In the Description on the LBF editor, try:
image=InjectableDiagram.png

-brady


(Brady Miller) #6

btw,
Definitely let us know if this works. If so, then this is a real jewel of a feature that I was not even aware of, so will be good to get it documented somewhere.
-brady


(Erik Pampalone) #7

This worked perfectly!

Thanks. Would you like me to write it up? If so, can you give me guidelines for the writeup?

-Erik


(Brady Miller) #8

hi @naya ,

Beautiful!

Just document your steps here (pics are always nice) and then I’ll copy it over to the wiki (I won’t make you learn wiki language especially since we are hoping to migrate to a modern doc engine in hopefully near future).

thanks,
-brady


(Brady Miller) #9

btw, @sunsetsystems , this is an awesome feature that you added to LBF!


(Rod Roark) #10

Thanks! And I am very happy to see the documentation effort.


(Erik Pampalone) #11

Let me know if this works.

Draw On Image Using Image Canvas in Layout Based Form

  1. Upload your image to the directory

[web root]/openemr/sites/default/images/YourImageName.ext

Note: The options.inc.php file holds the code for this functionality

  1. Create Layout Based Form
  • Data Type: Image Canvas
  • Description: image=YourImageName.extension

  1. Before drawing on image in form

  1. After drawing on image in form


(James Kay) #12

Is there a way to make the Image Canvas larger?


(Erik Pampalone) #13

Hi @drkay,

Yes. There is a way to make the canvas larger. As @brady.miller pointed out to me, you can make changes in the Layout gui for size width and height. Your picture is in pixels, so in the example below, I matched the Image Canvas size to the image size in pixels.
You can see I set the size width to 500 and the size height to 750.

My image is 500X700 pixels and here how it looks on the form. You can see there are 50 pixels at the bottom of the form.

-Erik


(James Kay) #14

Oh, this is great. Thank you!!