Yes, you can change the way that calendar dates are formatted in resultant eForm notes. For example, while the default 'Date' 'eForm item type results in the YYYY-MM-DD date format, you may prefer a date format such as Month DD, YYYY.
This article walks through the steps of converting the output of the default 'Date' eForm item type into an alternative format using the core 'Date Formatting' eForm.
Note: The 'Date Formatting' eForm itself found in Ocean's core eForm library is not designed for use with patients. This eForm has been created as an additional pre-built resource for Ocean users who are editing other eForms.
Instructions
1. Open the form in the eForm Editor.
- Open the eForm that you would like to apply the date formatting to in the eForm editor by locating it in your eForm library and clicking 'Edit'. An eForm editor will open in a new tab.
Note: It is assumed that the eForm that you want to apply the date formatting to has an existing 'Date' item type.
2. Copy your preferred Date Format.
3. Apply your preferred Date Format.
- Navigate to the eForm editor tab for the eForm that you would like to apply the new date formatting to.
- Prevent the existing 'Date' item from creating a resultant eForm note by selecting it, opening the 'Note Formatting' tab, and updating the 'Create a note for this item' setting to 'never'.
- Navigate to the 'Scripting and More' tab for the existing 'Date' item, and copy or write down the 'Item reference' value.
- Click the 'Paste' button to add the date format item you copied earlier (in Step 2) to your form. A scripting error will appear. This can be safely dismissed, as we will be updating the script next.
- Navigate to the 'Scripting and More' tab for the newly pasted date format item and focus on the 'Formula' field. Replace the 'date' term highlighted in the screenshot with the item reference of the original date item you copied or noted earlier (in Step 3c).
-
For example, the screenshot to the right shows the change of the 'date' value in the formula to the 'birthdate' item reference for the original date item.
Note: The exact item reference for the original date item within your exact form will vary. The term 'birthdate' was used for simplicity in this example.
- In the 'Show this field if' setting for the new date item, type 'false'. This hides this item from the person who is filling out the form.
-
Navigate to the 'General' tab of the new date item, and update the 'Caption' setting to reflect how the progress note should appear. The screenshot to the right updates the caption to 'Date of Birth' as an example.
Note: Do not remove the '$$' term from the caption. This key term is used to display the response value.
-
If you only want the note to be created when the patient inputs a date, navigate to the 'Note Formatting' tab for the new date item, and update the 'Create a note for this item' setting to 'if:'.
In the text box that appears to the right, input the item reference for the original date item (from Step 3c) followed immediately by: .r != ''
This ensures that a note is only created when a date is entered.
- Click the 'Save Changes' button.