This article is part of the systems administration guide. You will require administration access to view the pages mentioned in this article.
The code below will perform an assessment after a new patient is created.
- Create a New Patient Registration Form assessment with Code: PD-001
- Publish and enable the assessment - check the code matches the code above PD-001 - if not change in the trigger script to match the assessment code
- Add the trigger script via:
- Admin > Workflow > Trigger Classes > Patient > Scripts > New
- Enter the Code below
- Activate the Trigger script after adding to Trigger Script > Patient
================
CODE -START
================
// Set Assessment var assessment = patient.add_assessment('PD-001'); // Perform assessment if (assessment) { assessment.perform(); } else { console.info("New Patient Registration Form was not found or is not enabled"); }
================
CODE - END
================