Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added missed program rule actions #1433

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/developer/web-api/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -2525,7 +2525,7 @@ Table: programRuleAction
| name | description | Compulsory |
|---|---|---|
| programRule | The programRule that is the parent of this action. | Compulsory |
| programRule- ActionType | The type of action that is to be performed.<br> * `DISPLAYTEXT` - Displays a text in a given widget.<br> * `DISPLAYKEYVALUEPAIR` - Displays a key and value pair(like a program indicator) in a given widget.<br> * `HIDEFIELD` - Hide a specified dataElement or trackedEntityAttribute.<br> - *content* - if defined, the text in *content* will be displayed to the end user in the instance where a value is previously entered into a field that is now about to be hidden (and therefore blanked). If *content* is not defined, a standard message will be shown to the user in this instance.<br> - *dataElement* - if defined, the HIDEFIELD action will hide this dataElement when the rule is effective.<br> - *trackedEntityDataValue* - if defined, the HIDEFIELD action will hide this trackedEntityDataValue when the rule is effective.<br> * `HIDESECTION` - Hide a specified section.<br> - *programStageSection* - must be defined. This is the programStageSection that will be hidden in case the parent rule is effective.<br> * `ASSIGN` - Assign a dataElement a value(help the user calculate something or fill in an obvious value somewhere)<br> - *content* - if defined, the value in *data* is assigned to this variable. If content id defined, and thus a variable is assigned for use in other rules, it is important to also assign a *programRule.priority* to make sure the rule with an ASSIGN action runs before the rule that will in turn evaluate the assigned variable.<br> - *data* - must be defined, data forms an expression that is evaluated and assigned to either a variable(#{myVariable}), a dataElement, or both.<br> - *dataElement* - if defined, the value in *data* is assigned to this data element.<br> Either the content or dataElement must be defined for the ASSIGN action to be effective.<br> * `SHOWWARNING` - Show a warning to the user, not blocking the user from completing the event or registration.<br> - *content* - if defined, content is a static part that is displayed at the end of the error message.<br> - *data* - if defined, data forms an expression that is evaluated and added to the end of the warning message.<br> - *dataElement* - if defined, the warning message is displayed next to this data element.<br> - *trackedEntityAttribute* - if defined, the warning message is displayed next to this tracked entity attribute.<br> Either dataElement or trackedEntityAttribute must be specified.<br> * `SHOWERROR` - Show an error to the user, blocking the user from completing the event or registration.<br> - *content* - if defined, content is a static part that is displayed in the start of the error message.<br> - *data* - if defined, data forms an expression that is evaluated and added to the end of the error message.<br> - *dataElement* - if defined, the error message is linked to this data element.<br> - *trackedEntityAttribute* - if defined, the error message is linked to this tracked entity attribute.<br> Either dataElement or trackedEntityAttribute must be specified.<br> * `WARNINGONCOMPLETE` - Show a warning to the user on the "Complete form" dialog, but allowing the user to complete the event.<br> - *content* - if defined, content is a static part that is displayed at the end of the error message.<br> - *data* - if defined, data forms an expression that is evaluated and added to the end of the warning message.<br> - *dataElement* - if defined, the warning message prefixed with the name/formName of the data element.<br> * `ERRORONCOMPLETE` - Show an error to the user on in a modal window when the user tries to complete the event. The user is prevented from completing the event.<br> - *content* - if defined, content is a static part that is displayed in the start of the error message.<br> - *data* - if defined, data forms an expression that is evaluated and added to the end of the error message.<br> - *dataElement* - if defined, the error message is linked to this data element.<br> * `CREATEEVENT` - Create an event within the same enrollment.<br> - *content*<br> - *data* - if defined, contains data values to assign the created event. The format is <uid\>:<data value\>. Where several values is specified, these are separated with comma.<br> AcMrnleqHqc:100,AqK1IHqCkEE:'Polyhydramnios' - *programStage* - must be defined, and designates the program stage that the rule shall create an event of.<br> * `SETMANDATORYFIELD` - Set a field to be mandatory.<br> - *dataElement* - if defined, this data element will be set to be mandatory in the data entry form.<br> - *trackedEntityAttribute* - if defined, this tracked entity attribute will be set to mandatory in the registration form or profile.<br> * `SENDMESSAGE` - To send message at completion of event/enrollment or at data value update.<br> - *messageTemplate* - if defined, this template will be delivered either as SMS or EMAIL depending upon DeliveryChannel value in message template.<br> * `SCHEDULEMESSAGE` - To schedule message at completion of event/enrollment or at data value update.<br> - *messageTemplate* - if defined, this template will be delivered either as SMS or EMAIL depending upon DeliveryChannel value in message template.<br> - *Date to send message* - Expression which is going to be used for evaluation of scheduled date. This expression should result in Date, any other resultant will be discarded and notification will not get scheduled. | Compulsory |
| programRule- ActionType | The type of action that is to be performed.<br> * `DISPLAYTEXT` - Displays a text in a given widget.<br> * `DISPLAYKEYVALUEPAIR` - Displays a key and value pair(like a program indicator) in a given widget.<br> * `HIDEFIELD` - Hide a specified dataElement or trackedEntityAttribute.<br> - *content* - if defined, the text in *content* will be displayed to the end user in the instance where a value is previously entered into a field that is now about to be hidden (and therefore blanked). If *content* is not defined, a standard message will be shown to the user in this instance.<br> - *dataElement* - if defined, the HIDEFIELD action will hide this dataElement when the rule is effective.<br> - *trackedEntityDataValue* - if defined, the HIDEFIELD action will hide this trackedEntityDataValue when the rule is effective.<br> * `HIDESECTION` - Hide a specified section.<br> - *programStageSection* - must be defined. This is the programStageSection that will be hidden in case the parent rule is effective.<br> * `ASSIGN` - Assign a dataElement / trackedEntityAttribute / ProgramRuleVariable a value(help the user calculate something or fill in an obvious value somewhere)<br> - *content* - if defined, the value in *data* is assigned to this variable. If content id defined, and thus a variable is assigned for use in other rules, it is important to also assign a *programRule.priority* to make sure the rule with an ASSIGN action runs before the rule that will in turn evaluate the assigned variable.<br> - *data* - must be defined, data forms an expression that is evaluated and assigned to either a variable(#{myVariable}), a dataElement, or both.<br> - *dataElement* - if defined, the value in *data* is assigned to this data element.<br> Either the content or dataElement must be defined for the ASSIGN action to be effective.<br> * `SHOWWARNING` - Show a warning to the user, not blocking the user from completing the event or registration.<br> - *content* - if defined, content is a static part that is displayed at the end of the error message.<br> - *data* - if defined, data forms an expression that is evaluated and added to the end of the warning message.<br> - *dataElement* - if defined, the warning message is displayed next to this data element.<br> - *trackedEntityAttribute* - if defined, the warning message is displayed next to this tracked entity attribute.<br> Either dataElement or trackedEntityAttribute must be specified.<br> * `SHOWERROR` - Show an error to the user, blocking the user from completing the event or registration.<br> - *content* - if defined, content is a static part that is displayed in the start of the error message.<br> - *data* - if defined, data forms an expression that is evaluated and added to the end of the error message.<br> - *dataElement* - if defined, the error message is linked to this data element.<br> - *trackedEntityAttribute* - if defined, the error message is linked to this tracked entity attribute.<br> Either dataElement or trackedEntityAttribute must be specified.<br> * `WARNINGONCOMPLETE` - Show a warning to the user on the "Complete form" dialog, but allowing the user to complete the event.<br> - *content* - if defined, content is a static part that is displayed at the end of the error message.<br> - *data* - if defined, data forms an expression that is evaluated and added to the end of the warning message.<br> - *dataElement* - if defined, the warning message prefixed with the name/formName of the data element.<br> * `ERRORONCOMPLETE` - Show an error to the user on in a modal window when the user tries to complete the event. The user is prevented from completing the event.<br> - *content* - if defined, content is a static part that is displayed in the start of the error message.<br> - *data* - if defined, data forms an expression that is evaluated and added to the end of the error message.<br> - *dataElement* - if defined, the error message is linked to this data element.<br> * `CREATEEVENT` - Create an event within the same enrollment.<br> - *content*<br> - *data* - if defined, contains data values to assign the created event. The format is <uid\>:<data value\>. Where several values is specified, these are separated with comma.<br> AcMrnleqHqc:100,AqK1IHqCkEE:'Polyhydramnios'<br> - *programStage* - must be defined, and designates the program stage that the rule shall create an event of.<br> * `SETMANDATORYFIELD` - Set a field to be mandatory.<br> - *dataElement* - if defined, this data element will be set to be mandatory in the data entry form.<br> - *trackedEntityAttribute* - if defined, this tracked entity attribute will be set to mandatory in the registration form or profile.<br> * `SENDMESSAGE` - To send message at completion of event/enrollment or at data value update.<br> - *messageTemplate* - if defined, this template will be delivered either as SMS or EMAIL depending upon DeliveryChannel value in message template.<br> * `SCHEDULEMESSAGE` - To schedule message at completion of event/enrollment or at data value update.<br> - *messageTemplate* - if defined, this template will be delivered either as SMS or EMAIL depending upon DeliveryChannel value in message template.<br> - *Date to send message* - Expression which is going to be used for evaluation of scheduled date. This expression should result in Date, any other resultant will be discarded and notification will not get scheduled. <br> * `HIDEPROGRAMSTAGE` - Prevent adding new events to stage. <br> * `HIDEOPTION` - Hide option (from an optionSet). <br> * `HIDEOPTIONGROUP` - Hide option group (hide the options that belong to that option group). <br> * `SHOWOPTIONGROUP` - Show option group (show the options that belong to that option group).| Compulsory |
| location | Used for actionType DISPLAYKEYVALUEPAIR and DISPLAYTEXT to designate which widget to display the text or keyvaluepair in. Compulsory for DISPLAYKEYVALUEPAIR and DISPLAYTEXT. | See description |
| content | Used for user messages in the different actions. See the actionType overview for a detailed explanation for how it is used in each of the action types. Compulsory for SHOWWARNING, SHOWERROR, WARNINGONCOMPLETE, ERRORONCOMPLETE, DISPLAYTEXT and DISPLAYKEYVALUEPAIR. Optional for HIDEFIELD and ASSIGN. | See description |
| data | Used for expressions in the different actions. See the actionType overview for a detailed explanation for how it is used in each of the action types. Compulsory for ASSIGN. Optional for SHOWWARNING, SHOWERROR, WARNINGONCOMPLETE, ERRORONCOMPLETE, DISPLAYTEXT, CREATEEVENT and DISPLAYKEYVALUEPAIR | See description |
Expand Down