Complete implementation guide for the Self Assessment SDK
workflow_id
(number, required): The ID of the assessment workflow to runcontainer_id
(string, required): The HTML element ID where the assessment will be renderedauth_token
(string, required): JWT authentication token for API accessrefresh_token
(string, required): Token used to refresh the auth token when it expiresparams
(object, optional): Additional parameters for the assessment (e.g., age, gender)practice_info
(object, optional): Information about the practice and patienttransaction_id
(string, optional): Unique transaction identifieronEndCallback
(function, optional): Callback function called when assessment endsonSaRedirectCallback
(function, optional): Callback function called when assessment redirectsonSaSubmitCallback
(function, optional): Callback function called when assessment is submittedonSaInitCallback
(function, optional): Callback function called when assessment is initializedcontainer_id
(string, required): The HTML element ID where the submission will be displayedauth_token
(string, required): JWT authentication token for API accessrefresh_token
(string, required): Token used to refresh the auth token when it expiresassessment_ids
(string[], required): Array of assessment IDs to displaystatus
(string, required): The status of assessments to fetch (e.g., ‘COMPLETED’, ‘PENDING’)unique_identifier
(string, required): Unique identifier for the assessmentcategory
(string, optional): Optional category filter for workflowserror_code
: Machine-readable error codedisplay_message
: User-friendly error messagemessage
: Technical error detailsAUTH_ERROR
: Authentication failedNETWORK_ERROR
: Network connection issuesFETCH_ERROR
: Data fetching failedVALIDATION_ERROR
: Invalid parametersUNKNOWN_ERROR
: Unexpected errorsrunSaApp
container_id
matches the actual HTML element IDauth_token
and refresh_token
are validworkflow_id
exists and is accessiblegetWorkflowList()
to see available workflows