Imaging - Medium

Resource Page Link

This is the Seymore Imaging portal where you will get your API key and see the agent complete studies in action.

https://pathfinder.automationanywhere.com/challenges/training/SeymoreImaging/index.html

Control Room Link

This is the link to the control room you will be performing all hands on activities within.

https://aa-community.cloud.automationanywhere.digital/

API Documentation Page Link

The resource below has all the API Documentation for this process.

View API Documentation (YAML)

1. Update ClaimItemFromMailbox

Steps:

  1. Navigate to Bots/BAA/SeymoreImaging/Medium/Tools/ClaimItemFromMailbox and click the name to open it. This API task pulls data from the RIS mailbox.
  2. Review the API documentation for this call by clicking the API Documentation link, clicking mailbox, and finding the POST /api-mailbox.
  3. Open the Variables sidebar and click the plus sign to create a new variable.
    • Name:
      sBody
    • Default value:
      {}
    • Leave input, output, and description empty. This variable is only used inside this task.
  4. IClick the Rest Web Services action on line 1 to open its properties. Scroll down to Custom parameters and enter the following as the value. You can type it, or press F2 and find the variable:
    $sBody$
  5. Create another variable and check Use as input.
    • Name:
      messageWorkIdNumber
    • Description:
      Optional. Work ID of a specific message to claim. Leave empty to claim the next unread message.
  6. In the Actions sidebar, click Show. Scroll down to If, expand it, and drag an If action in above the Rest call.
  7. In the If properties, set the condition:
    • In the Condition drop-down, scroll to the bottom and choose String Condition.
    • Source value: enter the following. You can also press F2 or click the (x) on the right to find it.
      $messageWorkIdNumber$
    • Operator: choose not equal to.
    • Target value: leave blank. The condition now reads “if this value isn’t blank.”
  8. In the Actions sidebar, find String, expand it, and drag an Assign action in under the If so that it is indented.
    • In Select the source string variables/value, enter the format from the API documentation:
      {"work_id_number": $messageWorkIdNumber$}
    • Assign the output to sBody.
  9. Save and close the task. It now downloads the next available item from the queue, or the specific item you ask for.

2. Update the GetDoctors Tool

Steps:

  1. Navigate to Bots/BAA/SeymoreImaging/Medium/Tools/GetDoctors and click the name to open it. The task is almost finished, but none of its variables have descriptions yet.
  2. Open the Variables sidebar and add the following descriptions:
    • APIKey:
      This API key allows the tool to make updates and access the back end of the RIS system.
    • doctorName:
      Optional. Return one doctor by exact name, e.g. Dr. Julian Bashir. Leave empty for all doctors.
    • ResponseBody:
      JSON from the RIS: count, list of every specialty in use, and the matching doctors (name, specialties, bio).
    • Speciality:
      Optional. Only return doctors with this specialty, e.g. Chest Imaging. Leave empty for all doctors.
  3. Leave the other variables alone. The agent never sees them, because they only do work inside this tool.
  4. Save and close the API task.

3. Update the Agent

Steps:

  1. Navigate to Bots/BAA/SeymoreImaging/Medium/SeymoreImagingAgent and click to open it.
  2. Click the Tools tab. Click Add tool and select API Task.
  3. In the Tool sidebar, click Choose, then click Browse. Navigate to Bots/BAA/SeymoreImaging/Medium/Tools/GetDoctors and select it.
  4. Take note that the variables you just described are pulled in here. This is what the agent sees when it chooses which tool to use.
  5. Save and close the agent.

4. Update the Process

Steps:

  1. Navigate to Bots/BAA/SeymoreImaging/Medium/SeymoreImagingProcess and click to open it. This is the process designer.
  2. On the left, open the Elements panel and find API. Drag an API element onto the line between Start and AI Agent.
  3. In the right sidebar, enter the following for both Element ID and Task name. The Element ID is how you refer to this node when mapping its variables, and the Task name appears in the audit logs.
    Get Next Message Details
  4. Click Choose and browse to Bots/BAA/SeymoreImaging/Medium/Tools/ClaimItemFromMailbox. Two input variables appear. For this mode, only use API Key and enter:
    $APIKey$
  5. Click the AI Agent node. In the properties pane, RequestDetails currently says Update Me. Delete that text, then click the (x) on the right of the field to open the Insert a value box.
    • Click Element and select Get Next Message Details.
    • Click Add expression item, open the new drop-down, and select Output.
    • Click Add expression item once more and select ResponseBody.
    • Click Insert. The value populates in RequestDetails.
  6. Save the process.

5. Run the Process

Steps:

  1. Open your profile in the Seymore Imaging portal and copy your API key. If you haven’t created an account yet, enter any username and password in the create account section.
  2. Return to SeymoreImagingProcess and click Run.
  3. Paste your API key into the input variable and click Confirm.
  4. Return to the Seymore Imaging portal and wait for the agent to complete the mailbox item. It appears in My Studies.