diff --git a/content/en/apps/reference/app-settings/_index.md b/content/en/apps/reference/app-settings/_index.md index 062295f30..2f7b46d77 100644 --- a/content/en/apps/reference/app-settings/_index.md +++ b/content/en/apps/reference/app-settings/_index.md @@ -223,6 +223,7 @@ matches "mary", "Mary", "john", "John", "JOhN", etc. Not "maryjohn" | Function | Description | |----|----| | `unique(*fields)` | Returns `true` if no existing valid report has the same value for all of the listed fields. Fields are compared to those at the top level and within `fields` for every report doc. To include the form type use `'form'` as one of the fields. Eg `unique('form', 'patient_id')` checks that this form was never submitted for this patient. | +|`uniquePhone(phone_number field)`| Returns `true` if contact with the phone number already exists.| | `uniqueWithin(*fields, time_period)` | Same as `unique` but the last argument is the time period in which to search. Eg `uniqueWithin('form', 'patient_id', '1 week')` checks that the same form wasn't submitted for this patient in the past week. | | `exists(form_id, field)` | Returns `true` if a report matches the `form_id` and value for `field`. This is useful to check that a patient was registered for a service before reporting about it. Eg `exists('REG', 'patient_id')` checks that a `REG` form was already submitted for a patient. As of 2.12 most uses of this function are obsolete because checking for a valid `patient_id` is done automatically by the `accept_patient_report` transition using `registration_not_found` in the `messages.event_type`. | | `isISOWeek(weekFieldName[, yearFieldName])` | Returns `true` if the current report has a week value that is less or equal to the number of ISO weeks of the current year or the year value of the same report. The first parameter is the field name for the week and the second parameter is the field name for the year: `isISOWeek('week', 'year')`. If the second parameter is not specified, then the current year is used: `isISOWeek('week')`. |