# Medidata Rave

> Work with clinical trial data in Medidata Rave EDC: read studies, subjects, forms and the audit trail, create subjects, enter data and manage queries, and start workflows when data or queries change. The Rave user needs web services access from your Rave administrator.

App · 19 actions. Web page: https://docs.lodol.com/docs/integrations/medidata

## Actions

### Answer, close or cancel query

Answer, close or cancel a query on a field, by its query ID from the audit trail or a trigger. Sent once and never retried.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.
- Subject (`subject_name`, text, required): The subject's name (Subject ID) as Rave shows it, such as 001-002. 'List subjects' or a trigger gives it.
- Folder (`folder_oid`, text, required): The folder (visit) the form is in, such as SCREEN. Pick Subject level for forms that sit in no folder.
- Form (`form_oid`, text, required): The form, such as VS. Pick one, or give its OID.
- Field (`field_oid`, text, required): The field the query is on, such as VS.PULSE.
- Current value (`current_value`, text, required): The field's value now, exactly as entered in Rave, such as 72 or 05 MAR 2026 (a trigger's value gives it). Rave acts only when it matches.
- Query ID (`query_id`, number, required): The query's ID, from a query trigger or 'Get audit records'. At least 1.
- Action (`new_status`, text, required): What to do with the query. One of: `Answered` (Answer it), `Closed` (Close it), `Cancelled` (Cancel it).
- Answer (`response`, text): The answer to the query. Only when Action is Answer it.
- Site (`site_oid`, text): The subject's site. Leave empty to look it up from the subject.
- Folder instance (`folder_repeat_key`, number): Which instance of a repeating folder. Leave empty otherwise. At least 1.
- Form instance (`form_repeat_key`, number): Which instance of a repeating form. Defaults to 1. At least 1.
- Log line (`log_line`, number): The log line's number, for a log form. Leave empty otherwise. At least 1.

**Outputs**

- `field_oid` (text): The field
- `fields_touched` (number): How many fields Rave changed
- `file_oid` (text): The ID of the ODM document sent, as Rave's records show it
- `forms_touched` (number): How many forms Rave changed
- `log_lines_touched` (number): How many log lines Rave changed
- `query_id` (number): The query's ID
- `reference_number` (text): Rave's reference number for the change
- `status` (text): Answered, Closed or Cancelled
- `study_oid` (text): The study
- `subject_name` (text): The subject
- `subjects_touched` (number): How many subjects Rave changed
- `summary` (text): A one-line summary

**Example output**

```json
{
  "field_oid": "VS.PULSE",
  "fields_touched": 1,
  "file_oid": "3b9fea8b-e825-4e5f-bdc8-1464bdd7a664",
  "forms_touched": 1,
  "log_lines_touched": 0,
  "query_id": 135,
  "reference_number": "82e942b0-48e8-4cf4-b299-51e2b6a89a1b",
  "status": "Closed",
  "study_oid": "Mediflex(UAT)",
  "subject_name": "001-002",
  "subjects_touched": 1,
  "summary": "Query 135 on VS.PULSE closed."
}
```

### Check connection

Check that Rave Web Services is up and the connected user can sign in: its version, build, self-check and how many studies the user can reach.

**Inputs**: None.

**Outputs**

- `build_version` (text): The Rave build, such as 2026.1.0.0
- `diagnostics` (text): Rave Web Services' self-check, OK when healthy
- `healthy` (true/false): Whether the self-check said OK
- `rave_url` (text): The Rave address the connection uses
- `study_count` (number): How many studies the user can reach
- `summary` (text): A one-line summary
- `version` (text): The Rave Web Services version, such as 1.16.0

**Example output**

```json
{
  "build_version": "2026.1.0.0",
  "diagnostics": "OK",
  "healthy": true,
  "rave_url": "https://innovate.mdsol.com",
  "study_count": 3,
  "summary": "Rave Web Services 1.16.0 (build 2026.1.0.0) at innovate.mdsol.com is up; this user can reach 3 studies.",
  "version": "1.16.0"
}
```

### Create subject

Add a subject to a study at a site, optionally filling in fields on the enrollment form. Sent once and never retried.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.
- Site (`site_oid`, text, required): The site to add the subject at.
- Subject (`subject_name`, text, required): The new subject's name (Subject ID), such as 001-002.
- Enrollment form (`form_oid`, text): The subject-level form to fill in, usually the study's enrollment form. Leave empty to fill in nothing.
- Field values (`field_values`, object): Values for the enrollment form, one per field. Dates are written in each field's Rave format for you.

**Outputs**

- `fields_touched` (number): How many fields Rave changed
- `file_oid` (text): The ID of the ODM document sent, as Rave's records show it
- `forms_touched` (number): How many forms Rave changed
- `log_lines_touched` (number): How many log lines Rave changed
- `reference_number` (text): Rave's reference number for the change
- `site_oid` (text): The site it was added at
- `study_oid` (text): The study
- `subject_count_at_site` (number): How many subjects the site now has, if Rave says
- `subject_count_in_study` (number): How many subjects the study now has, if Rave says
- `subject_name` (text): The new subject's name
- `subjects_touched` (number): How many subjects Rave changed
- `summary` (text): A one-line summary

**Example output**

```json
{
  "fields_touched": 1,
  "file_oid": "3b9fea8b-e825-4e5f-bdc8-1464bdd7a664",
  "forms_touched": 1,
  "log_lines_touched": 0,
  "reference_number": "82e942b0-48e8-4cf4-b299-51e2b6a89a1b",
  "site_oid": "MDSOL",
  "study_oid": "Mediflex(UAT)",
  "subject_count_at_site": 55,
  "subject_count_in_study": 1103,
  "subject_name": "001-002",
  "subjects_touched": 1,
  "summary": "Subject 001-002 created at site MDSOL in Mediflex(UAT)."
}
```

### Enter or update form data

Enter or change field values on a subject's form, or add a log line. Rave records the change under the connected user. Sent once and never retried.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.
- Subject (`subject_name`, text, required): The subject's name (Subject ID) as Rave shows it, such as 001-002. 'List subjects' or a trigger gives it.
- Folder (`folder_oid`, text, required): The folder (visit) the form is in, such as SCREEN. Pick Subject level for forms that sit in no folder.
- Form (`form_oid`, text, required): The form, such as VS. Pick one, or give its OID.
- Field values (`field_values`, object, required): The values to save, one per field. Dates and times are written in each field's Rave format for you. Fields left empty are not touched.
- Site (`site_oid`, text): The subject's site. Leave empty to look it up from the subject.
- Folder instance (`folder_repeat_key`, number): Which instance of a repeating folder. Leave empty otherwise. At least 1.
- Form instance (`form_repeat_key`, number): Which instance of a repeating form. Defaults to 1. At least 1.
- Log line (`log_line`, number): The log line's number, for a log form. Leave empty otherwise. At least 1.
- Add as a new log line (`new_log_line`, true/false): Add 'Log line' as a new line instead of changing it. Rave refuses if the line exists.

**Outputs**

- `field_oids` (list): The fields sent
- `fields_touched` (number): How many fields Rave changed
- `file_oid` (text): The ID of the ODM document sent, as Rave's records show it
- `folder_oid` (text): The folder
- `form_oid` (text): The form
- `forms_touched` (number): How many forms Rave changed
- `log_lines_touched` (number): How many log lines Rave changed
- `reference_number` (text): Rave's reference number for the change
- `study_oid` (text): The study
- `subject_name` (text): The subject
- `subjects_touched` (number): How many subjects Rave changed
- `summary` (text): A one-line summary

**Example output**

```json
{
  "field_oids": [
    "VS.PULSE"
  ],
  "fields_touched": 1,
  "file_oid": "3b9fea8b-e825-4e5f-bdc8-1464bdd7a664",
  "folder_oid": "SCREEN",
  "form_oid": "VS",
  "forms_touched": 1,
  "log_lines_touched": 0,
  "reference_number": "82e942b0-48e8-4cf4-b299-51e2b6a89a1b",
  "study_oid": "Mediflex(UAT)",
  "subject_name": "001-002",
  "subjects_touched": 1,
  "summary": "Saved 1 field on VS in SCREEN for subject 001-002."
}
```

### Export study data

Export a study's data from Rave's clinical views, field by field: one form or all, one version or all, or only what changed since a time.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.
- Form (`form_oid`, text): Only this form's data. Leave empty for every form.
- Version (`version_oid`, text): Only subjects on this study version. Leave empty for all.
- Values (`data_type`, text): Regular gives Rave's clinical view values; raw gives them as entered. Defaults to regular. One of: `regular` (Regular (default)), `raw`. Default: `regular`.
- Changed since (`changed_since`, date and time): Only data changed since this time. Needs the clinical views set to include inactive records.
- Most values (`max_rows`, number): The most values to return. Defaults to 5,000. From 1 to 50000. Default: `5000`.

**Outputs**

- `count` (number): How many values came back
- `items` (list): The values, with where each sits
- `study_oid` (text): The study
- `subject_count` (number): How many subjects the values are from
- `total` (number): How many values Rave sent
- `truncated` (true/false): Whether some were left out by 'Most values'
- `views_updated_at` (text): When Rave last refreshed its clinical views

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "field_oid": "VS.PULSE",
      "folder_oid": "SCREEN",
      "folder_repeat_key": "1",
      "form_oid": "VS",
      "form_repeat_key": "1",
      "item_group_oid": "VS",
      "log_line": "",
      "site_oid": "MDSOL",
      "study_oid": "Mediflex(UAT)",
      "subject_name": "001-002",
      "subject_uuid": "",
      "value": "72",
      "version_oid": "23"
    }
  ],
  "study_oid": "Mediflex(UAT)",
  "subject_count": 1,
  "total": 1,
  "truncated": false,
  "views_updated_at": "2026-10-28T09:10:00"
}
```

### Get audit records

Read a page of the study's clinical audit trail: who entered, changed, queried, reviewed or signed what, and when.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.
- Start from (`start_from`, text): Where in the audit trail to start reading. One of: `beginning` (The start of the audit trail (default)), `time` (A date and time), `audit_id` (An audit ID). Default: `beginning`.
- Since (`since`, date and time): Records from this time on. Only when Start from is A date and time.
- Audit ID (`start_id`, number): Records from this audit ID on, such as an earlier step's next_start_id. Only when Start from is An audit ID. At least 1.
- How many (`per_page`, number): How many records to read, 1 to 1,000. Defaults to 100. From 1 to 1000. Default: `100`.
- Kinds of change (`detail`, text): Enhanced and every kind add more kinds of change (Rave EDC 2022.3 and later). Defaults to standard. One of: `default` (Standard (default)), `enhanced`, `all` (Every kind of change). Default: `default`.

**Outputs**

- `count` (number): How many came back
- `has_more` (true/false): Whether Rave has more records after these
- `next_start_id` (number): The audit ID to read the next page from
- `records` (list): The audit records, oldest first
- `started_at_id` (number): The audit ID reading started at
- `study_oid` (text): The study

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_start_id": 21480,
  "records": [
    {
      "audit_id": 21479,
      "comment": null,
      "deviation": null,
      "field_oid": "VS.PULSE",
      "folder_name": "Screening",
      "folder_oid": "SCREEN",
      "folder_repeat_key": "SCREEN[1]",
      "form_oid": "VS",
      "form_repeat_key": "1",
      "frozen": null,
      "item_group_oid": "VS",
      "locked": null,
      "log_line": "",
      "occurred_at": "2026-07-14T06:55:34",
      "page_name": "Vital Signs",
      "query": {
        "id": "135",
        "recipient": "Site from System",
        "response": "",
        "status": "Open",
        "text": "Please enter the pulse."
      },
      "reason_for_change": "",
      "record_id": "8511",
      "review": null,
      "signature": null,
      "site_oid": "MDSOL",
      "specify_value": "",
      "study_oid": "Mediflex(UAT)",
      "subcategory": "QueryOpen",
      "subject_name": "001-002",
      "subject_status": "",
      "subject_uuid": "a9611217-268e-4c92-9dff-f4b697741765",
      "user": "systemuser",
      "user_site_oid": "MDSOL",
      "value": "",
      "verified": null,
      "version_oid": "23"
    }
  ],
  "started_at_id": 21400,
  "study_oid": "Mediflex(UAT)"
}
```

### Get study version

Get a study version's design: its folders, forms, fields (with their questions, types, formats and choices) and data dictionaries. Needs Architect access in Rave.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.
- Version (`version_oid`, text): The study version. Leave empty for the newest.

**Outputs**

- `code_lists` (list): The data dictionaries
- `default_matrix_oid` (text): The study's default matrix
- `field_count` (number): How many fields
- `fields` (list): Every field of every form
- `folders` (list): The folders and their forms
- `form_count` (number): How many forms
- `forms` (list): The forms
- `primary_form_oid` (text): The form a subject is enrolled with
- `project_name` (text): The study's project name
- `version_name` (text): The version's name
- `version_oid` (text): The version's OID

**Example output**

```json
{
  "code_lists": [
    {
      "data_type": "integer",
      "items": [
        {
          "label": "Yes",
          "value": "1"
        },
        {
          "label": "No",
          "value": "0"
        }
      ],
      "name": "Yes No",
      "oid": "YES_NO"
    }
  ],
  "default_matrix_oid": "BASE",
  "field_count": 1,
  "fields": [
    {
      "active": true,
      "choices": [],
      "code_list_oid": "",
      "control_type": "Text",
      "data_type": "integer",
      "date_format": "",
      "form_oid": "VS",
      "label": "Pulse",
      "length": 3,
      "mandatory": false,
      "name": "PULSE",
      "oid": "VS.PULSE",
      "question": "Pulse (beats per minute)",
      "variable_oid": "PULSE"
    }
  ],
  "folders": [
    {
      "form_oids": [
        "VS"
      ],
      "name": "Screening",
      "oid": "SCREEN",
      "repeating": false,
      "type": "Common"
    }
  ],
  "form_count": 1,
  "forms": [
    {
      "field_count": 1,
      "name": "Vital Signs",
      "oid": "VS",
      "repeating": false
    }
  ],
  "primary_form_oid": "EN",
  "project_name": "Mediflex",
  "version_name": "2",
  "version_oid": "23"
}
```

### Get subject data

Get one subject's data from Rave's clinical views, field by field, for every form or one form.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.
- Subject (`subject_name`, text, required): The subject's name (Subject ID) as Rave shows it, such as 001-002. 'List subjects' or a trigger gives it.
- Form (`form_oid`, text): Only this form's data. Leave empty for every form.
- Values (`data_type`, text): Regular gives Rave's clinical view values; raw gives them as entered. Defaults to regular. One of: `regular` (Regular (default)), `raw`. Default: `regular`.

**Outputs**

- `count` (number): How many values came back
- `items` (list): Every value, with where it sits
- `site_oid` (text): The subject's site
- `study_oid` (text): The study
- `subject_name` (text): The subject
- `values` (object): Each field's first value by field OID, such as VS.PULSE
- `views_updated_at` (text): When Rave last refreshed its clinical views

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "field_oid": "VS.PULSE",
      "folder_oid": "SCREEN",
      "folder_repeat_key": "1",
      "form_oid": "VS",
      "form_repeat_key": "1",
      "item_group_oid": "VS",
      "log_line": "",
      "site_oid": "MDSOL",
      "study_oid": "Mediflex(UAT)",
      "subject_name": "001-002",
      "subject_uuid": "",
      "value": "72",
      "version_oid": "23"
    }
  ],
  "site_oid": "MDSOL",
  "study_oid": "Mediflex(UAT)",
  "subject_name": "001-002",
  "values": {
    "VS.PULSE": "72"
  },
  "views_updated_at": "2026-10-28T09:10:00"
}
```

### List comments

List the comments left on the study's data in Rave.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.

**Outputs**

- `comments` (list): The comments
- `count` (number): How many came back
- `study_oid` (text): The study

**Example output**

```json
{
  "comments": [
    {
      "active": true,
      "datapoint_id": "2289046",
      "field_oid": "PULSE",
      "folder_instance_id": "192317",
      "folder_name": "Screening",
      "form_oid": "VS",
      "page_id": "662516",
      "page_name": "Vitals",
      "record_position": "0",
      "site_number": "TESTSITE",
      "subject_id": "32114",
      "subject_name": "001-002",
      "text": "Taken after the second dose.",
      "updated": "10/7/2026 3:50:18 PM",
      "updated_at": "2026-10-07T15:50:18"
    }
  ],
  "count": 1,
  "study_oid": "Mediflex(UAT)"
}
```

### List data dictionaries

List the study's data dictionaries: each coded value Rave stores and the text users see for it.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.

**Outputs**

- `count` (number): How many entries came back
- `dictionaries` (list): The dictionaries' names
- `entries` (list): Every coded value
- `study_oid` (text): The study

**Example output**

```json
{
  "count": 1,
  "dictionaries": [
    "AE Severity"
  ],
  "entries": [
    {
      "coded_value": "3",
      "crf_version_id": "18",
      "dictionary": "AE Severity",
      "user_value": "Severe"
    }
  ],
  "study_oid": "Mediflex(UAT)"
}
```

### List folders

List the folders (visits) of every study version and matrix, including the extra matrices a study version's design leaves out.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.

**Outputs**

- `count` (number): How many came back
- `folders` (list): The folders
- `study_oid` (text): The study

**Example output**

```json
{
  "count": 1,
  "folders": [
    {
      "is_default_matrix": true,
      "matrix_oid": "BASE",
      "name": "Screening",
      "oid": "SCREEN",
      "order": 1,
      "repeating": false,
      "type": "Common",
      "version_name": "2",
      "version_oid": "23"
    }
  ],
  "study_oid": "Mediflex(UAT)"
}
```

### List protocol deviations

List the protocol deviations recorded on the study's data, with their class and code.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.

**Outputs**

- `count` (number): How many came back
- `deviations` (list): The protocol deviations
- `study_oid` (text): The study

**Example output**

```json
{
  "count": 1,
  "deviations": [
    {
      "active": true,
      "code": "Deviation",
      "datapoint_id": "2289046",
      "deviation_class": "Incl/Excl Criteria not met",
      "field_oid": "PULSE",
      "folder_instance_id": "192317",
      "folder_name": "Screening",
      "form_oid": "VS",
      "page_id": "662516",
      "page_name": "Vitals",
      "record_position": "0",
      "site_number": "TESTSITE",
      "subject_id": "32114",
      "subject_name": "001-002",
      "text": "Inclusion criteria not met.",
      "updated": "10/7/2026 3:50:18 PM",
      "updated_at": "2026-10-07T15:50:18"
    }
  ],
  "study_oid": "Mediflex(UAT)"
}
```

### List signature definitions

List the study's signature definitions: what each signature means and the statement the signer affirms.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.

**Outputs**

- `count` (number): How many came back
- `project_name` (text): The study's project name
- `signatures` (list): The signature definitions

**Example output**

```json
{
  "count": 1,
  "project_name": "Mediflex",
  "signatures": [
    {
      "legal_reason": "I hereby confirm that all data is accurate to the best of my knowledge.",
      "meaning": "Approval",
      "methodology": "Electronic",
      "oid": "2866",
      "study": "Mediflex"
    }
  ]
}
```

### List sites

List a study's sites with their numbers and the study version each uses.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.

**Outputs**

- `count` (number): How many sites came back
- `sites` (list): The sites
- `study_oid` (text): The study

**Example output**

```json
{
  "count": 1,
  "sites": [
    {
      "active": true,
      "current_version_oid": "23",
      "name": "Uxbridge Medical Centre",
      "oid": "MDSOL",
      "study_site_number": "",
      "type": "Site",
      "versions": [
        {
          "effective_date": "2009-04-20",
          "study_oid": "Mediflex(UAT)",
          "study_site_number": "",
          "version_oid": "23"
        }
      ]
    }
  ],
  "study_oid": "Mediflex(UAT)"
}
```

### List studies

List the studies and environments the connected Rave user can reach, such as Mediflex(Prod) and Mediflex(UAT).

**Inputs**

- Environments (`environment`, text): Which environments to list. Defaults to all. One of: `all` (All environments (default)), `production` (Production only), `non_production` (Test environments only (not Prod)). Default: `all`.

**Outputs**

- `count` (number): How many studies came back
- `studies` (list): The studies

**Example output**

```json
{
  "count": 1,
  "studies": [
    {
      "environment": "UAT",
      "is_production": false,
      "name": "Mediflex (UAT)",
      "oid": "Mediflex(UAT)",
      "project_type": "Project",
      "protocol_name": "Mediflex"
    }
  ]
}
```

### List study users

List the Rave users in a study with their roles, groups and sites, optionally only those at one site.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.
- Site (`site_oid`, text): Only users at this site. Leave empty for all.

**Outputs**

- `count` (number): How many users came back
- `study_oid` (text): The study
- `users` (list): The users

**Example output**

```json
{
  "count": 1,
  "study_oid": "Mediflex(UAT)",
  "users": [
    {
      "active": true,
      "display_name": "Jane Smith",
      "email": "jane.smith@example.com",
      "first_name": "Jane",
      "full_name": "Jane Smith",
      "last_name": "Smith",
      "login": "jsmith",
      "oid": "jsmith",
      "role": "CRA",
      "site_group": "World",
      "site_oids": [
        "MDSOL"
      ],
      "user_group": "Monitors",
      "user_type": "Other"
    }
  ]
}
```

### List study versions

List a study's published versions (CRF versions), newest first, or its drafts in Architect.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.
- Which (`which_versions`, text): Published versions or drafts. Defaults to versions. One of: `versions` (Published versions (default)), `drafts` (Drafts in Architect). Default: `versions`.

**Outputs**

- `count` (number): How many came back
- `newest_oid` (text): The newest one's OID, empty if none
- `project_name` (text): The study's project name
- `versions` (list): The versions, newest first
- `which_versions` (text): versions or drafts

**Example output**

```json
{
  "count": 2,
  "newest_oid": "23",
  "project_name": "Mediflex",
  "versions": [
    {
      "name": "2",
      "oid": "23"
    },
    {
      "name": "1",
      "oid": "16"
    }
  ],
  "which_versions": "versions"
}
```

### List subjects

List a study's subjects with their site, UUID, link into Rave and workflow status flags (such as ready to lock).

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.
- Include (`also_include`, text): Which subjects to list. Defaults to active ones. One of: `none` (Active subjects only (default)), `inactive` (Also inactive subjects), `deleted` (Also deleted subjects), `inactiveAndDeleted` (Also inactive and deleted subjects). Default: `none`.
- Site (`site_oid`, text): Only subjects at this site. Leave empty for all.

**Outputs**

- `count` (number): How many came back
- `study_oid` (text): The study
- `subjects` (list): The subjects

**Example output**

```json
{
  "count": 1,
  "study_oid": "Mediflex(UAT)",
  "subjects": [
    {
      "active": true,
      "deleted": false,
      "flags": {
        "empty": false,
        "frozen": false,
        "incomplete": false,
        "locked": false,
        "non_conformant": false,
        "overdue": false,
        "pending_review": false,
        "ready_for_freeze": false,
        "ready_for_lock": false,
        "requires_answer_query": false,
        "requires_close_query": false,
        "requires_coding": false,
        "requires_pending_answer_query": false,
        "requires_pending_close_query": false,
        "requires_reconciliation": false,
        "requires_review": false,
        "requires_second_pass": false,
        "requires_signature": false,
        "requires_translation": false,
        "requires_verification": false,
        "reviewed": false,
        "signature_current": false,
        "signed": false,
        "sticky_placed": false,
        "touched": true,
        "verified": false
      },
      "link": "https://innovate.mdsol.com/MedidataRAVE/HandleLink.aspx?page=SubjectPage.aspx?ID=849",
      "name": "001-002",
      "site_number": "001",
      "site_oid": "MDSOL",
      "status": "",
      "study_oid": "Mediflex(UAT)",
      "uuid": "e983f330-c108-45ab-8f16-b4a566c7089c",
      "version_oid": "23"
    }
  ]
}
```

### Open query

Open a query on a field for the site to answer. Rave opens it only if the field still holds the value given. Sent once and never retried.

**Inputs**

- Study (`study_oid`, text, required): The study and environment, such as Mediflex(Prod) or Mediflex(UAT). Pick one, or give its OID from an earlier step.
- Subject (`subject_name`, text, required): The subject's name (Subject ID) as Rave shows it, such as 001-002. 'List subjects' or a trigger gives it.
- Folder (`folder_oid`, text, required): The folder (visit) the form is in, such as SCREEN. Pick Subject level for forms that sit in no folder.
- Form (`form_oid`, text, required): The form, such as VS. Pick one, or give its OID.
- Field (`field_oid`, text, required): The field the query is on, such as VS.PULSE.
- Current value (`current_value`, text, required): The field's value now, exactly as entered in Rave, such as 72 or 05 MAR 2026 (a trigger's value gives it). Rave acts only when it matches.
- Query (`query_text`, text, required): What the site should check, such as Please confirm the pulse.
- Send to (`recipient`, text): The marking group to send it to, as named in Rave. Defaults to Site from System. Default: `Site from System`.
- Needs an answer (`requires_response`, true/false): Whether the site must answer it. Defaults to yes. Default: `true`.
- Site (`site_oid`, text): The subject's site. Leave empty to look it up from the subject.
- Folder instance (`folder_repeat_key`, number): Which instance of a repeating folder. Leave empty otherwise. At least 1.
- Form instance (`form_repeat_key`, number): Which instance of a repeating form. Defaults to 1. At least 1.
- Log line (`log_line`, number): The log line's number, for a log form. Leave empty otherwise. At least 1.

**Outputs**

- `field_oid` (text): The field queried
- `fields_touched` (number): How many fields Rave changed
- `file_oid` (text): The ID of the ODM document sent, as Rave's records show it
- `form_oid` (text): The form
- `forms_touched` (number): How many forms Rave changed
- `log_lines_touched` (number): How many log lines Rave changed
- `recipient` (text): The marking group it was sent to
- `reference_number` (text): Rave's reference number for the change
- `study_oid` (text): The study
- `subject_name` (text): The subject
- `subjects_touched` (number): How many subjects Rave changed
- `summary` (text): A one-line summary

**Example output**

```json
{
  "field_oid": "VS.PULSE",
  "fields_touched": 1,
  "file_oid": "3b9fea8b-e825-4e5f-bdc8-1464bdd7a664",
  "form_oid": "VS",
  "forms_touched": 1,
  "log_lines_touched": 0,
  "recipient": "Site from System",
  "reference_number": "82e942b0-48e8-4cf4-b299-51e2b6a89a1b",
  "study_oid": "Mediflex(UAT)",
  "subject_name": "001-002",
  "subjects_touched": 1,
  "summary": "Query opened on VS.PULSE for subject 001-002, sent to Site from System."
}
```
