Draw On Image In Form

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

This worked perfectly!

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

-Erik

3 Likes

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

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

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

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

Is there a way to make the Image Canvas larger?

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

Oh, this is great. Thank you!!

Hola, estoy comenzando a utilizar openemr, como hicieron para agregar el cuadro para la imagen y posteriormente agregar la imagen, ingresaron directo al código?

It is explained above:
1 place the image in the openemrdirectory / sites / images directory
2 You create a form LBF Administration -> Layout -> New Layout
3 You create the field where you want to put the image. The Data Type must be Image Canvas, and in description you must place image = TuImagen.extension. In size, you can place the size of the images in pixels.

Spanish:
Esta explicado mas arriba:
1 colocas la imagen en el directorio openemrdirectory/sites/images
2 Creas un formulario LBF Administracion -> diseño -> Nuevo Diseño
3 Creas el campo donde quieres poner la imagen. El Tipo de Dato debe ser Image Canvas, y en descripción debes colocar image=TuImagen.extension. En tamaño, puedes colocar el tamaño de la imágenes en pixeles.

3 Likes

Hola, hice todos los pasos pero sigue sin funcionar, la extensión de la carpeta images es: xampp/htdocs/openemr/sites/default/images
Sabe cuál puede ser el problema?

Hola, al crear el formulario se debe completar algún campo en especial?

Yes, in the form you must place a field where the Data Type is Image Canvas and in the description of the field you must place image=name_of_your_file.jpg (the name of the file you placed in xampp/htdocs/openemr/sites/default/images)

In Spanish:
Si, en el formulario debes colocar un campo donde el Tipo de Datos es Image Canvas y en la descripción del campo debes colocar image=nombre_de_tu_archivo.jpg (el nombre del archivo que colocaste en xampp/htdocs/openemr/sites/default/images)

Example:
Ejemplo:

1 Like

Is there a method to enable loading images to the patient record and using them as a canvas background to draw on?

I agree with the question
Thank´s

Hello, I am interested in renaming the form and changing the image to be able to use it for other things, how could this be done?
On the other hand, is there a way to upload images to the canvas, from the medical history? What I would like is to be able to upload two images, one before and one after the procedure to be able to compare them.
Thank you

Hello @mlobo4370 From my understanding of current system limitations I would recommend using the layout to make 2 half form width areas and use those to do side by side. If you have a dynamic link you can get created to do date/time specifics for link to the image in the medical record that would make it so you can get this done. You would have to modify the save of the form though to allow the new images with drawings as a new file.

Hi @Jeremiah_Ocasio , thanks for your response. I really don’t understand how to do what you tell me, could you give an example?
regards

@mlobo4370, sure thing. using a LBF form format you will need to make 2 columns with half page width then in the description for straight images use either a direct image link like shown in the screenshot earlier in the thread or for dynamic images have a dynamic image link in there. To apply it using the canvas utility in OpenEMR you would have to load in the canvas and set that canvas background using css and the image link. The dynamic image loading and canvas background loading is something you would need to have an understanding of html/css to self implement. (note on the canvas. If you lookup literallycanvas that is the utility that gives you a good understanding of how to alter it. also addressed a few years ago here.

1 Like