The following instructions outline how to convert a form from a PDF to an image and then into a macro that can be run in the EMR system to reproduce the form.
Tools You Will Be Using:
- DEV Environment
- PDF-XChange Viewer
- DigitizeForm
Folder Paths Required:
- G:\PCAC_EMR\Digitize
- G:\PCAC_EMR\Digitize\pdf
- G:\PCAC_EMR\Digitize\inputs
- G:\PCAC_EMR\Digitize\outputs
Step-by-Step Instructions
1. Remote into LD038654
Currently, the DigitizeForm tool and all the components needed to use it is only accessible by remoting into the laptop (LD038654), which is located in the office.
2. Save the PDF
Save the desired form as a PDF in the folder:
G:\PCAC_EMR\Digitize\pdf
3. Convert PDF to Image
- Launch PDF-XChange Viewer and load open the saved PDF.
- Go to the File > Export > Export to Image.
- Ensure the following values in the Export to Image properties:
- Page Range: All (unless the desire is to only digitize specific pages)
- Save As Image Type: PNG - Portable Network Graphic
- Destination Folder: G:\PCAC_EMR\Digitize\inputs
- Click Export... button. This will convert the PDF into an image and save it in the inputs folder:
G:\PCAC_EMR\Digitize\inputs
4. Convert Image to Code
- Open DigitizeForm.exe from this location:
G:\PCAC_EMR\Digitize - Click Browse and navigate to the file saved in the inputs folder.
- Click OK to load the file. After loading the form, you'll see content boxed in different colors:
- Red boxes: ORC text (equivalent to labels in EMR) – Checkbox is checked by default.
- Pink boxes: Free text areas – Checkbox is checked by default.
- Blue boxes: Shapes – Checkbox is checked by default.
- If the form is a single page, enter/ensure 1 under the Set Page Number field.
- Click Save. This will create a text file in the outputs folder:
G:\PCAC_EMR\Digitize\outputs
Note: there is no feedback from the software that it was completed. The only way to validate it's completed is by checking the output folder - If the form has multiple pages, repeat steps 4.2 - 4.5 except adjust the page number accordingly, Each Save action will create a new file, with the page number at the end of the filename.
5. Create Form in the DEV Environment
- Launch the DEV Environment.
- Navigate to Maintain > Templates > Forms
- Make a copy of the zCustom Form Template under the VCH folder and paste it into your folder (e.g., zXXDEV).
- Double-click the copied template in your folder and click the Open form editor button.
- In the form editor, select all the controls except the Print buttons and the (well hidden) Memo field beside the Print buttons, then press Delete.
6. Copy the Form Data
- Go to the outputs folder and double-click the saved file.
- A text file will open in Notepad.
- Select all the text and press Ctrl+C to copy it.
7. Run the Macro
- Go to the Special menu and select Run Macro.
- Paste the copied text from Notepad into the Run Macro window.
- Click the Green Play button to execute the macro.
- If the form has more than one page:
- Click the Plus Sign at the bottom to add a blank page. Make sure this page is visible.
- Repeat steps 6.1 - 7.3, ensuring when you paste the Run Macro window, the new text replaces all of the old text.
8. Save the Form
After running the macro for all pages, save the form. After that, make any further adjustments to the form as needed. These are common adjustments to the label properties:
- Update '&' to '&&' for the ampersand character to show
- Change AutoSize to True
- Change Transparent to True
- Change Font size to 10 (with exceptions. See Form Development Standard article)
9. Clean up Folder Paths
Reminder to move the files created in this process into their appropriate archive folders