In this lesson you’ll learn:
-
How to transform data using Helper Steps
-
How to format dates to match required formats
-
How to ensure smooth data transfer by cleaning up input data
Introduction
In the previous lesson, we encountered an error caused by an incorrect date format. DrChrono expects dates to follow a specific format (typically YYYY-MM-DD
), but the Jotform submission provided it in a different format (e.g., MM-DD-YYYY
).
This is a common issue, and the solution is to apply a Data Transformation to convert the date before sending it to DrChrono.
Step 1: Add a Helper Step for Date Transformation
-
In your workflow editor, click the ➕ icon before the Branch step.
-
Go to the Helpers tab and select the Date Transformation helper.
-
Configure the Helper:
-
Input Date: Map the date field from Jotform (e.g., Date of Birth).
-
Input Format: Select the format received from Jotform (e.g.,
MM-DD-YYYY
). -
Output Format: Set it to
YYYY-MM-DD
(DrChrono’s expected format). - Save the configuration
-
- Test the step to make the data available in the workflow and ensure it looks correct.
💡 Tip: You can learn more about the date formats and how to set them up in our article here.
Step 2: Use the Transformed Date in Your Action
Now that the date is transformed, make sure to use the new value:
-
In the Create/Update Patient step, click on the Date of Birth field.
-
Select the output from the Date Helper Step.
- Save the step
📌 Important: Always use the output of the Helper step, not the raw input from Jotform.
Step 3: Test the Create Patient Action Again
Run the test once more to confirm the error is resolved:
-
Select the "Create patient" action step in your workflow
-
Click the "Test step" to ensure that the date is now correctly formatted and no errors occur.
Success!
The workflow now handles date formats properly, and the data is accepted by DrChrono.
Next Lesson
While we’ve focused on fixing date formats in this lesson, you’ll often need to transform other types of data as well. For example, DrChrono expects specific values for fields like Gender, but currently, our workflow sets this field to a static value.
In the next lesson, we’ll show you how to use the Datamapper Helper to dynamically map form values like "Male" and "Female" to the correct values expected by DrChrono.
Next Lesson: Use Data mapper to Dynamically Map Field Values