Skip to content

Commit

Permalink
Add documentation for Program Enrolment (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
kajambiya authored Jan 23, 2024
1 parent 93108bc commit 35978dd
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions pages/docs/technical-implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,30 @@ NOTE: We can also use the old way of linking post actions we didn't support conf
"usePreviousValueDisabled": "true"
}
```

## Program Enrolment
The `ProgramEnrollmentSubmissionAction` is a generic post submission action that automatically enrols a patient to a specified program upon successful submission of an enncounter. This is passed through the form JSON and the action can either be enabled or disabled based on the expression passed as the `enabled` flag. Below is an example of TB Program enrolment in the TB Case enrolment Form.
```json copy
"postSubmissionActions": [
{
"actionId": "ProgramEnrollmentSubmissionAction",
"enabled":"tbProgramType === '160541AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'",
"config": {
"enrollmentDate": "tbRegDate",
"programUuid": "58005eb2-4560-4ada-b7bb-67a5cffa0a27",
"completionDate": "outcomeTBRx"
}
},
{
"actionId": "ProgramEnrollmentSubmissionAction",
"enabled":"tbProgramType === '160052AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'",
"config": {
"enrollmentDate": "tbRegDate",
"programUuid": "00f37871-0578-4ebc-af1d-e4b3ce75310d",
"completionDate": "outcomeTBRx"
}
}
]
```
We can add as many post submission actions as we want to one form and only those whose `enabled` flag evaluates to true will be processed.

0 comments on commit 35978dd

Please sign in to comment.