Fields can be added to templates to prompt input from the person completing the report. Certain field types, like data and formula, automatically populate reports with information that’s available to Reporting.
In this article:
- Prerequisites
- Adding a text field to a template
- Adding a data field to a template
- Adding a formula field to a template
- Frequently asked questions
Prerequisites
- To add and edit fields in templates, you need to be assigned a role with all Template permissions enabled. Learn more about roles and permissions
- Formula fields are currently only available to a select group of Rad AI customers. If you'd like access, please contact support@radai.com.
Adding a text field to a template
- Select Templates > Manage from the main navigation menu on the left-hand side.
- Open your template:
- If you want to create a new template, click New Template and select the collection to which you’d like it to belong.
- If you want to edit an existing template, find it using the search bar or by browsing through your collections.
- If you want to create a new template, click New Template and select the collection to which you’d like it to belong.
- In the template editor toolbar, select Insert > Field. Or, if you’re editing an existing field in a template, click the field you want to edit.
- Go to the Properties tab on the right-hand side of the template editor. By default, the field type is already set to Text.
-
(Optional) Type a field name. This will appear in the Outline view in the template editor and report workspace.
💡 For best results with AI features, name your field so it matches the section header in the template editor. For example, if your field is in the "Reason For Exam" section of the template, name it "Reason For Exam". Learn more template best practices for Omni AI features - (Optional) Type a default text value for this field. This will appear as placeholder text to anyone filling out the template.
- If you’d like the user’s cursor to start in this field when the template is applied to a report, check the box next to Focus cursor in this field on template launch.
- If you want the field to be required, check the box next to Required field. When a field is required, anyone signing a report is notified if they try to sign the report but the field is still empty. Signing is blocked until the field is no longer empty. This behavior is the same as the required field for observations.
- Click Save.
Adding a data field to a template
Data fields populate reports with information that’s available to Rad AI Reporting through external systems, like HL7. For more information, see data fields and HL7 mappings.
- Select Templates > Manage from the main navigation menu on the left-hand side.
- Open your template:
- If you want to create a new template, click New Template and select the collection to which you’d like it to belong.
- If you want to edit an existing template, find it using the search bar or by browsing through your collections.
- If you want to create a new template, click New Template and select the collection to which you’d like it to belong.
- In the template editor toolbar, select Insert > Field. Or, if you’re editing an existing field in a template, click the field you want to edit.
- Go to the Properties tab on the right-hand side of the template editor. Click the Type drop-down and change the field type to Data.
- (Optional) Type a field name. This will appear in the Outline view in the template editor and report workspace.
- (Optional) Type a default text value for this field. This will appear as placeholder text to anyone filling out the template.
- Click the Data field drop-down and select a data property.
- If you’d like the user’s cursor to start in this field when the template is applied to a report, check the box next to Focus cursor in this field on template launch.
- Click Save. When the radiologist adds this template to a report, the formula will run and automatically populate the field—as long as the data is available. If the data isn’t available, the field is left blank.
Data fields and HL7 mappings
| Rad AI Reporting data field | Rad AI Reporting formula field | HL7 location / source | Description |
|---|---|---|---|
| Accession Number | accession() | OBR.3.1 | Returns the accession number for the active study. To show accession numbers of all associated studies, use the accessions() formula instead. |
| Admit Date | admitDate() | PV1.44 | Returns the patient's admission date to the hospital or healthcare facility. |
| Contributing Authors | contributingAuthorsNames() | N/A (derived from Rad AI Reporting) | Returns the full names of the report’s contributing authors. |
| Current Date | Date.today() | N/A (derived from Rad AI Reporting) | Returns today's date. Once inserted into a report, the value does not change. |
| Finalizing Author | finalizingAuthorName() | N/A (derived from Rad AI Reporting) | Returns the full name of the report’s finalizing author. |
| History | reason() | OBR.31.1 / OBR.31.2 | Returns the reason for the active study. If enabled for your organization, returns one reason for each associated study as a comma-separated list. |
| Ordering Provider First Name | firstName(orderingProvider()) | OBR.16 / ORC.12 | Returns the ordering practitioner’s first name. |
| Ordering Provider Last Name | lastName(orderingProvider()) | OBR.16 / ORC.12 | Returns the ordering practitioner’s last name. |
| Ordering Provider Name | friendlyFullName(orderingProvider()) | OBR.16 / ORC.12 |
Returns the ordering practitioner’s full name (first name followed by last name) |
| Patient Age | age() | Derived from PID.7 |
Returns the patient's age at the time of the exam, displayed in a friendly format. |
| Patient DOB | birthDate() | PID.7 | Returns the patient's date of birth. |
| Patient First Name | firstName(patient()) | PID.5.2 | Returns the patient's first name. |
| Patient Gender | gender() | PID.8 | Returns the patient's gender. |
| Patient Last Name | lastName(patient()) | PID.5.1 | Returns the patient's last name. |
| Patient Location | patientLocation() | PV1.3 | Returns the patient’s current care location, such as their unit, department, or point of care (when that information is available from your connected system). |
| Patient MRN | mrn() | PID.3.1 | Returns the patient's Medical Record Number. |
| Patient Name | fullName(patient()) | PID.5.1 + PID 5.2 + PID.5.3 | Returns the patient's first name, last name, and middle name (if present). |
| Procedure Code | procedureCode() | OBR.4.1 | Returns the active study's procedure code. If associated studies exist, returns one value for each study as a comma-separated list. |
| Procedures | procedureDescription() | OBR.4.2 | Returns the procedure description for the active study. If associated studies exist, returns one value for each study as a comma-separated list. |
| Reason For Study | reason() | OBR.31.1 / OBR.31.2 | Returns the reason for the active study. If enabled for your organization, returns one reason for each associated study as a comma-separated list. |
| Referring Provider Name | friendlyFullName(referringProvider()) | PV1.8 | Returns the referring practitioner’s full name (first name followed by last name) |
| Relevant Clinical Information | relevantClinicalInfo() | OBR.13 | Returns additional clinical details related to the active study. If enabled for your organization, returns one set of details for each associated study as a comma-separated list. |
| Site | siteName() | Derived from MSH.4 | Returns the site associated with the active report, based on the sending facility information from your connected system. |
| Study Date | studyDate() | OBR.7 | Returns the date the active study was completed. |
| Study Order Date | orderedOn() / studyOrderDate() | OBR.6 |
Returns the date the active study was ordered. |
| Study Order Date and Study Time |
studyDate() and studyTime() | OBR.6 / OBR.7 |
Returns the concatenated Study Order Date and Study Time |
| Study Time | studyTime() | OBR.7 | Returns the time the active study was completed. |
| N/A | accessions() | OBR.3.1 | Returns the accession numbers for all associated studies as a comma-separated list. |
| N/A | ageInYears() | Derived from PID.7 | Returns the patient's age at the time of exam, in years. |
| N/A | comparisonDate() | OBR.22 / prior DiagnosticReport comparison data | Returns the date of the prior report used for comparison. |
| N/A | friendlyFullName(patient()) | PID.5.2 + PID.5.1 | Returns the patient’s full name (first name followed by last name). |
| N/A | genderShort() | PID.8 | Returns the patient's gender, abbreviated. |
| N/A | studyOrderTime() | OBR.27.4 |
Returns the time at which the active study was ordered. |
Adding a formula field to a template
Formulas can reference data from the radiologist’s health system, such as the patient’s age or procedure description. Formulas can also reference data from external sources, like measurements provided by a third party.
- Select Templates > Manage from the main navigation menu on the left-hand side.
- Open your template:
- If you want to create a new template, click New Template and select the collection to which you’d like it to belong.
- If you want to edit an existing template, find it using the search bar or by browsing through your collections.
- If you want to create a new template, click New Template and select the collection to which you’d like it to belong.
- In the template editor toolbar, select Insert > Text Field. Or, if you’re editing an existing field in a template, click the field you want to edit.
- Click the Properties tab on the right-hand side of the template editor. Click the Type drop-down and change the field type to Formula.
- (Optional) Type a default text value for this field. This will appear as placeholder text to anyone filling out the template.
- (Optional) Type a field name. This will appear in the Outline view in the template editor and report workspace.
- Type your formula under the Formula field. See below for supported formulas.
- Click Save.
- When the radiologist adds this template to a report, the formula will run and automatically populate the field—as long as the data is available. If the data isn’t available, the field is left blank.
Supported formulas
Formulas must be manually inputted into template fields. There's a risk of data not populating if the formula is inputted incorrectly.
HL7 formulas
Most HL7 formulas are also available as data fields, which can be easily selected from a list. To see which HL7 source fields are used to populate Reporting data/formula fields, refer to data fields and HL7 mappings.
Formula |
Description |
Available as data field? |
| accession() | Returns the accession number for the active study. To show accession numbers of all associated studies, use the accessions() formula instead. |
Yes |
| accessions() |
Returns the accession numbers for all associated studies as a comma-separated list. |
No |
| admitDate() |
Returns the patient's admission date to the hospital or healthcare facility. |
Yes |
| age() | Active Patient's age at the time of exam, in a friendly format. Learn more about age ranges and display formats. |
Yes |
| ageInYears() |
Returns the patient's age at the time of exam, in years. |
No |
| birthDate() |
Returns the patient's date of birth. |
Yes |
| comparisonDate() |
Returns the date of the prior report used for comparison. |
No |
| contributingAuthorsNames() |
Returns the full names of the report’s contributing authors. |
Yes |
| finalizingAuthorName() | Returns the full name of the report’s finalizing author. |
Yes |
| firstName(orderingProvider()) |
Returns the ordering practitioner’s first name. |
Yes |
| firstName(patient()) |
Returns the patient's first name. |
Yes |
| friendlyFullName(orderingProvider()) |
Returns the ordering practitioner’s full name (first name followed by last name). |
Yes |
| friendlyFullName(patient()) |
Returns the patient’s full name (first name followed by last name). |
No |
| friendlyFullName(referringProvider()) |
Returns the ordering practitioner’s full name (first name followed by last name) |
Yes |
| fullName(patient()) |
Returns the patient's first name, last name, and middle name (if present). |
Yes |
| gender() |
Returns the patient's gender. |
Yes |
| genderShort() |
Returns the patient's gender, abbreviated. |
No |
| integrationComparison() | Returns comparison dates provided by Fuji Synapse. |
No |
| lastName(orderingProvider()) |
Returns the ordering practitioner’s last name. |
Yes |
| lastName(patient()) |
Returns the patient's last name. |
Yes |
| mrn() |
Returns the patient's Medical Record Number. |
Yes |
| observationValue(”OBSERVATION_CODE”) | Returns a FHIR or FHIRcast Observation resource value for the named code, based on the active study. Replace OBSERVATION_CODE with the matching FHIR/FHIRcast Observation resource code (case insensitive), as defined in your PACS and received via integration. |
Yes |
| orderedOn() |
Returns the date the active study was ordered. |
Yes |
| patientLocation() |
Returns the patient’s current care location, such as their unit, department, or point of care (when that information is available from your connected system). |
Yes |
| procedureCode() |
Returns the active study's procedure code. If associated studies exist, returns one value for each study as a comma-separated list. |
Yes |
| procedureDescription() | Returns the procedure description for the active study. If associated studies exist, returns one value for each study as a comma-separated list. |
Yes |
| reason() |
Returns the reason for the active study. If enabled for your organization, returns one reason for each associated study as a comma-separated list. |
Yes |
| relevantClinicalInfo() |
Returns additional clinical details related to the active study. If enabled for your organization, returns one set of details for each associated study as a comma-separated list. |
Yes |
| siteName() |
Returns the site associated with the active report, based on the sending facility information from your connected system. |
Yes |
| studyDate() | Returns the date the active study was completed. | Yes |
| studyTime() |
Returns the time the active study was completed. |
Yes |
| studyOrderDate() | Returns the date the study was ordered. |
Yes |
| studyOrderTime() | Returns the time the study was ordered. |
No |
Date and time formulas
Formula |
Description |
Available as data field? |
| concat(today(), " ", time()) |
Today's date followed by the current time
|
No |
| time() |
Current time of day
|
No |
| Date.today() |
Today's date
|
Yes |
| yesterday() |
Yesterday's date
|
No |
Age ranges and display formats
Age Range |
Display Format |
Example |
| Less than 1 day | Days | 0 days |
| 1 day - ~2 months | Days | 5 days |
| ~2 months - 2 years | Months (and days) | 4 months or 4m 12d |
| 2 years - 18 years | Years (and months) | 3 years or 3y 4m |
Logic functions
Formula |
Description |
| and() |
'And' condition, returns true if all arguments are true
|
| if() |
If-else condition
|
| not() |
'Not' condition, returns true if the argument is false
|
| or() |
'Or' condition, returns true if any argument is true
|
Math functions
Formula |
Description |
| ceil() |
Round a number up to the nearest integer.
|
| ellipsoidVolume() |
Calculate the volume of an ellipsoid from its diameters.
|
| floor() |
Round a number down to the nearest integer.
|
| max() |
Returns the highest number from all the provided numbers.
|
| min() |
Returns the lowest number from all the provided numbers.
|
| pi() |
The mathematical constant π.
|
| pow() |
Raise a base expression to a specified power.
|
| round() |
Round a number to the nearest integer.
|
| sum() | Adds together all numeric values listed inside the brackets and returns their total. |
| toFixed() |
Returns a string representing a number in fixed-point notation.
|
| toPrecision() |
Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
|
String functions
Formula |
Description |
| lowercase() |
Convert a string to lowercase
|
| uppercase() |
Convert a string to uppercase
|
| concat() |
Concatenate multiple strings
|
| join() |
Join multiple strings with a separator
|
| String.empty() |
Check if a string is empty
|
Other formulas
Formula |
Description |
| field(”FIELD_NAME”) | Reference the value of a specific field. Replace FIELD_NAME with the matching field name, viewable and editable in the field's Properties tab in the template editor. |
Frequently asked questions
How do I know which HL7 source fields are used to populate any given data field/formula in Rad AI Reporting?
Refer to the data fields and HL7 mapping table.
Why isn't my formula working?
Follow these steps to check your formula:
- Make sure you’re using a supported formula.
- If your formula is supported, check your referenced field label. E.g. observationValue("ABC")
Make sure the value label you're using (“ABC”) matches what your third-party vendor has provided. For example, if Altamont provides the label “DEXA_PREVIOUS_DATE”, you need to reference it exactly as shown.
- If your formula still isn’t working, it could indicate a missing HL7 field or one that’s incorrectly mapped to the formulas in our system. Please contact support@radai.com and we’ll investigate.
How do I know if my formula is broken?
If your formula appears to be invalid, you’ll see an error message under the formula field in the Properties tab. If you save a template with an invalid formula, that field won’t be automatically populated with data—but the rest of your template will function as expected.