Dashboard variables can be filled on the server before rendering, through the onPrepareVariables event.

Set variable values in the event.
def prepareVariables(args: StiVariablesEventArgs):
    if len(args.variables) > 0:
        args.variables['Patient'].value = 'Mary Roe'
        args.variables['Observation'].value = datetime(2024, 3, 1)
        args.variables['Visits'].value = 5

viewer.onPrepareVariables += prepareVariables

How it works. Values chosen on the server are injected into the dashboard before rendering, so the client shows data it never had to supply.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.