Documentation

System Overview

Simple Case Log (SCL) is a comprehensive system for creating forms, collecting submissions, and managing workflows. The system consists of several interconnected components:

System Architecture

FormsSubmissionsWorkflowsQueuesActions

The system flow starts with creating forms, which users fill out to create submissions. Submissions can be routed through workflows, which consist of queues. Each queue can have actions that move submissions between queues.

Forms

Forms are the foundation of the system. They define the structure of data to be collected.

Key Concepts

  • Form Builder: A drag-and-drop interface for creating forms
  • Fields: Different types of inputs (text, number, select, etc.)
  • Rules: Conditional logic that controls field visibility
  • Calculations: Formulas that compute values based on other fields
  • Public Forms: Forms that can be accessed without logging in

Creating a Form

  1. Navigate to the Forms page and click "New Form"
  2. Add a title and description
  3. Drag fields from the sidebar onto the form canvas
  4. Configure field properties (label, required, validation, etc.)
  5. Add rules and calculations if needed
  6. Save the form

Public Forms

Forms can be made public, allowing anyone to access them without logging in:

  1. Edit a form and check the "Public" option
  2. Save the form
  3. A public link will be generated
  4. Click "Copy Link" on the forms list to copy the public URL

Submissions

Submissions are completed forms. They contain the data entered by users.

Key Concepts

  • Status: Submissions can be drafts or submitted
  • Values: The data entered for each field
  • Workflow Assignment: Submissions can be assigned to workflows

Creating a Submission

  1. Navigate to a form
  2. Fill out the form fields
  3. Click "Submit" to create a submission
  4. Alternatively, click "Save Draft" to save progress

Viewing Submissions

Submissions can be viewed on the Submissions page. From there, you can:

  • View submission details
  • Edit submissions (if permitted)
  • Delete submissions (if permitted)
  • Assign submissions to workflows

Workflows

Workflows define the process that submissions follow. They consist of queues and actions.

Key Concepts

  • Workflow: A collection of queues that define a process
  • Queue: A stage in the workflow where submissions wait for processing
  • Action: An operation that moves a submission from one queue to another

Creating a Workflow

  1. Navigate to Admin > Workflows
  2. Click "New Workflow"
  3. Add a name and description
  4. Create queues for the workflow
  5. Define actions for each queue
  6. Save the workflow

Assigning Submissions to Workflows

Submissions can be assigned to workflows in several ways:

  • Manually from the submission view page
  • Automatically when a form is submitted (if configured)
  • Through the API

Queues

Queues are stages in a workflow where submissions wait for processing.

Key Concepts

  • Queue: A collection of submissions at a specific stage
  • Actions: Operations that can be performed on submissions in the queue
  • Permissions: Roles that can access the queue and perform actions

Creating a Queue

  1. Navigate to Admin > Queues
  2. Click "New Queue"
  3. Add a name and description
  4. Assign roles that can access the queue
  5. Create actions for the queue
  6. Save the queue

Queue Dashboard

The dashboard shows queues that the current user has access to. From there, you can:

  • View submissions in each queue
  • Perform actions on submissions
  • Track submission progress through the workflow

Rules & Calculations

Rules and calculations add dynamic behavior to forms.

Rules

Rules control the visibility of fields based on conditions:

Rule Structure

IF [condition] THEN [action]

Conditions can be based on field values:

  • Field equals/not equals a value
  • Field contains/not contains a value
  • Field greater than/less than a value (for numbers)
  • Multiple conditions can be combined with AND/OR

Actions can be:

  • Show/hide a field
  • Enable/disable a field
  • Set a field's value

Creating a Rule

  1. In the Form Builder, select a field
  2. Click "Add Rule" in the field properties panel
  3. Define the condition(s)
  4. Define the action(s)
  5. Save the rule

Calculations

Calculations compute values based on other fields:

Calculation Structure

Formula: An expression that computes a value

Formulas can include:

  • Field references (e.g., {field_1})
  • Arithmetic operators (+, -, *, /)
  • Functions (SUM, AVG, MIN, MAX, etc.)
  • Conditional expressions (IF, THEN, ELSE)

Example: IF({field_1} > 10, {field_1} * 2, {field_1} / 2)

Creating a Calculation

  1. Add a "Calculated" field to the form
  2. In the field properties panel, click "Edit Formula"
  3. Write the formula using field references and operators
  4. Save the calculation

Advanced Examples

Conditional Visibility

Rule: IF field "Type" equals "Other" THEN show field "OtherType"

Total Calculation

Formula: {quantity} * {price} * (1 + {tax_rate} / 100)

Complex Condition

Rule: IF (field "Age" greater than 18 AND field "Consent" equals "Yes") OR field "ParentalConsent" equals "Yes" THEN show field "SensitiveQuestions"

Users & Roles

The system uses role-based access control to manage permissions.

Users

Users are individuals who can log in to the system. Each user has:

  • Username and password
  • Profile information
  • One or more roles

Roles

Roles define what users can do in the system:

  • Admin: Full access to all features
  • Form Manager: Can create and manage forms
  • Workflow Manager: Can create and manage workflows
  • Queue Worker: Can process submissions in assigned queues
  • Submitter: Can create and view their own submissions

Managing Users and Roles

Administrators can manage users and roles from the Admin section:

  • Create, edit, and delete users
  • Assign roles to users
  • Create custom roles with specific permissions

Audit Log

The audit log tracks all significant actions in the system for accountability and troubleshooting.

Logged Actions

The system logs the following types of actions:

  • Create: Creating new objects (forms, submissions, etc.)
  • Update: Modifying existing objects
  • Delete: Removing objects
  • Login/Logout: User authentication events
  • Perform: Executing actions on submissions

Audit Log Fields

Each audit log entry includes:

  • Timestamp
  • User who performed the action
  • IP address
  • Object type (form, submission, etc.)
  • Object ID
  • Action type
  • Details of changes (for updates)

Viewing the Audit Log

Administrators can view the audit log from Admin > Audit Log. The log can be filtered by:

  • Date range
  • User
  • Action type
  • Object type

API Reference

The system provides a RESTful API for integration with other systems.

Authentication

API requests require authentication using JWT tokens:

  1. Obtain a token by sending credentials to /api/auth/login
  2. Include the token in the Authorization header: Authorization: Bearer {token}

API Endpoints

The API provides endpoints for all major system functions:

Forms API
  • GET /api/forms/ - List forms
  • GET /api/forms/{id} - Get form details
  • POST /api/forms/ - Create a form
  • PUT /api/forms/{id} - Update a form
  • DELETE /api/forms/{id} - Delete a form
  • GET /api/forms/public/{token} - Get public form by token
Submissions API
  • GET /api/submissions/ - List submissions
  • GET /api/submissions/{id} - Get submission details
  • POST /api/submissions/ - Create a submission
  • PUT /api/submissions/{id} - Update a submission
  • DELETE /api/submissions/{id} - Delete a submission
Workflow API
  • GET /api/workflows/workflows/ - List workflows
  • GET /api/workflows/queues/ - List queues
  • GET /api/workflows/queues/{id}/actions - List queue actions
  • POST /api/workflows/queues/{id}/actions/{action_id}/perform - Perform an action
User API
  • GET /api/users/ - List users
  • GET /api/users/{id} - Get user details
  • POST /api/users/ - Create a user
  • PUT /api/users/{id} - Update a user
  • DELETE /api/users/{id} - Delete a user

API Documentation

For detailed API documentation, including request and response formats, refer to the API documentation.