# Exporting data to SPSS

{% hint style="warning" %}
This feature was removed in 2021. If you need export functionality (e.g. for research use), please contact us.
{% endhint %}

In older versions of the 3di, the contents of patient records in the currently linked backend can be exported to an SPSS file. Whichever backend is involved (even if it resides on a removable drive) the file is saved automatically in the **SPSS** folder which sits in the same folder as your **3di** frontend – the [3di installation folder](/using-the-software/frontend-and-backends.md). The file is not opened automatically for inspection; indeed, the file can be created on a machine which does not have the SPSS application installed.

The file is given a name on the pattern

> **3di\_abcdef\_031105\_085710**

in which:

**abcdef** is the name of the backend from which the data come\
**031105** is the date in the form **yymmdd**\
**085710** is the time in the form **hhmmss**

You are free to rename (and delete) SPSS export files.

## Open the Patient Selector

* click **Export data to SPSS** on the Main Menu
* *or* click ![](/files/2M0Ari8KIDVSmfe6WOfX) on the **toolbar**
* *or* press **\<Ctrl + Shift + S>** (think of **S**-elector)

## Configuring the export

* select the patients whose data you wish to export by setting the check box in the right-hand column
* if you click a button at a column head (eg **DOB**) the patients will be sorted on that value
* a clicked button has a *pressed* appearance; a second click will *release* the button, so that patients return to their default order by name
* clicking another button will replace one sort order with another (and release the button previously pressed)
* if you click a button at a column foot, it will set or clear the check box for all the related records in the right-hand column (eg clicking **Set f** will ensure that all and only females are selected)
* click **Export selected to Spss** or **Export ASD subscales to Spss** – the latter is much faster, but exports only details from the **Case Manager** together with ASD scores (both summative eg B-scale, and contributory down to the lowest level eg B1a, B1b, and so on).
* remember that the exported file will not be opened and displayed

## SPSS variables

With the exception of Repeating Answer questions (which are not currently exported), every question in the interview is represented by one or more variables in the Spss datafile. All questions of a given type (Text, Numeric, Combo and so on) share a particular pattern of Spss variables.

Also exported are all the computed outcomes of the **3di** – for example, the Children’s Communication Checklist scores, the Autistic Spectrum Disorders scores, and the results of the [Comorbidities Tool](/using-the-software/comorbidities.md). See [below](/using-the-software/spss.md#export-of-computed-values).

Each exported *question* has an Spss variable, here termed the question’s **base variable**, whose name may be derived from the question’s ID within the **3di** system as follows:

* determine the question’s ID – one way is to hover the mouse pointer over a question’s interview number (eg 5.2.8) on the interview form;
* write the ID as a four-digit number by prefixing zeroes as necessary
* prefix the result with **q** (for **q**-uestion)

For example:

| 3di system ID (Qid) | Name of Spss variable |
| ------------------- | --------------------- |
| 6                   | q0006                 |
| 25                  | q0025                 |
| 564                 | q0564                 |

The further details of this variable, and of any further variables associated with a question, depend upon the question’s type, as follows:

## Text

The base variable:

| property of variable | property value/s                                                                                                                                                                | note                                                                                                                                                                                                                                                                                                                                                                                                                         |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name                 | <p>qnnnn<br>(eg q0178)</p>                                                                                                                                                      | see [Spss base variable](#the-values-exported-and-the-spss-variables-which-receive-them) on the naming of a question’s base variable                                                                                                                                                                                                                                                                                         |
| label                | text of question                                                                                                                                                                | tokens (such as *%name* for the patient’s name) remain unsubstituted                                                                                                                                                                                                                                                                                                                                                         |
| value                | <p><em>if text has been entered</em></p><p>text of response</p><p><em>otherwise, whichever one of the following is appropriate:</em></p><p>-ToDo-</p><p>-NotApp-</p><p>-Dk-</p> | <p>Spss does not provide a missing values device for String variables; the export system provides a work-around by inserting special text values for null text boxes.</p><p>-Dk- can appear only where the question is provided with a <em>‘<strong>?</strong>’</em> option button as well as a text box</p><p>-NotApp- can appear only where the question may be disabled as the result of responses to other questions</p> |
| value labels         |                                                                                                                                                                                 | Spss does not provide value labels for String variables                                                                                                                                                                                                                                                                                                                                                                      |
| missing values       |                                                                                                                                                                                 | Spss does not provide a missing values device for String variables; but see note above on the value property                                                                                                                                                                                                                                                                                                                 |

Questions of type Text have no additional Spss variables.

## Numeric

The base variable:

| property of variable | property value/s                                           | note                                                                                                                                                                                                    |
| -------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name                 | <p>qnnnn<br>(eg q0019)</p>                                 | see [Spss base variable](#the-values-exported-and-the-spss-variables-which-receive-them) on the naming of a question’s base variable                                                                    |
| value                | the numeric value entered                                  |                                                                                                                                                                                                         |
| label                | text of question                                           | tokens (such as *%name* for the patient’s name) remain unsubstituted                                                                                                                                    |
| value labels         | <p>ToDo</p><p>NotApp</p><p>Dk</p>                          | <p>values are mapped to labels as follows:</p><p>Note that Dk is included only where the question is provided with a <em>‘<strong>?</strong>’</em> option button as well as a box for numeric input</p> |
| missing values       | <p>-1</p><p>-2</p><p>-3 (but see note on value labels)</p> | ie ToDo, NotApp and Dk are treated as missing values                                                                                                                                                    |

Questions of type Numeric have no additional Spss variables.

## Age

The base variable:

| property of variable | property value/s                                                                               | note                                                                                                                                                                                                           |
| -------------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name                 | <p>qnnnn<br>(eg q0113)</p>                                                                     | see [Spss base variable](#the-values-exported-and-the-spss-variables-which-receive-them) on the naming of a question’s base variable                                                                           |
| value                | the age entered in the separate dropdowns for years and months converted into an age in months | for example, an age entered as 3 years 5 months would be exported to Spss as the value 41 (ie 3 x 12 plus 5)                                                                                                   |
| label                | text of question                                                                               | tokens (such as *%name* for the patient’s name) remain unsubstituted                                                                                                                                           |
| value labels         | <p>ToDo</p><p>NotApp</p><p>Dk</p>                                                              | <p>values are mapped to labels as follows:</p><p>Note that Dk is included only where the question is provided with a <em>‘<strong>?</strong>’</em> option button as well as dropdowns for years and months</p> |
| missing values       | <p>-1</p><p>-2</p><p>-3 (but see note on value labels)</p>                                     | ie ToDo, NotApp and Dk are treated as missing values                                                                                                                                                           |

Questions of type Age have no additional Spss variables.

## Date

The base variable:

| property of variable | property value/s                                                                                                                   | note                                                                                                                                 |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| name                 | <p>qnnnn<br>(eg q0615)</p>                                                                                                         | see [Spss base variable](#the-values-exported-and-the-spss-variables-which-receive-them) on the naming of a question’s base variable |
| label                | text of question                                                                                                                   | tokens (such as *%name* for the patient’s name) remain unsubstituted                                                                 |
| value                | <p><em>if a date has been entered:</em><br>date entered, in the format dd-MMM-yy<br><em>otherwise</em><br>no value is exported</p> | eg 04-JUN-97                                                                                                                         |
| value labels         |                                                                                                                                    | No practical use can be made of value labels for dates                                                                               |
| missing values       |                                                                                                                                    | Spss does not provide a missing values device for Date variables                                                                     |

Questions of type Date have no additional Spss variables.

## Time

The base variable:

| property of variable | property value/s                                                                                                                 | note                                                                                                                                 |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| name                 | <p>qnnnn<br>(eg q0024)</p>                                                                                                       | see [Spss base variable](#the-values-exported-and-the-spss-variables-which-receive-them) on the naming of a question’s base variable |
| label                | text of question                                                                                                                 | tokens (such as *%name* for the patient’s name) remain unsubstituted                                                                 |
| value                | <p><em>if a time has been entered</em><br>time entered, in the format hh:mm:ss<br><em>otherwise</em><br>no value is exported</p> | eg 21:30:00                                                                                                                          |
| value labels         |                                                                                                                                  | No practical use can be made of value labels for times                                                                               |
| missing values       |                                                                                                                                  | Spss does not provide a missing values device for Time variables                                                                     |

Questions of type Time have no additional Spss variables.

## Combo and OptionGroup

The base variable:

| property of variable | property value/s                                                                                                                                                                                                                                                | note                                                                                                                                 |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| name                 | <p>qnnnn<br>(eg q0248)</p>                                                                                                                                                                                                                                      | see [Spss base variable](#the-values-exported-and-the-spss-variables-which-receive-them) on the naming of a question’s base variable |
| value                | the **3di**’s numeric encoding for the selected item                                                                                                                                                                                                            |                                                                                                                                      |
| label                | text of question                                                                                                                                                                                                                                                | tokens (such as *%name* for the patient’s name) remain unsubstituted                                                                 |
| value labels         | <p><em>the precise text of the items from which a single selection is made (combo box dropdown text items or option button labels)</em></p><p>option\_1</p><p>option\_2</p><p>…</p><p>option\_n</p><p><em><strong>and</strong></em></p><p>ToDo</p><p>NotApp</p> | <p><em>for example</em>:</p><p><em>and</em></p>                                                                                      |
| missing values       | <p>-1</p><p>-2</p>                                                                                                                                                                                                                                              | ie ToDo and NotApp are treated as missing values                                                                                     |

Questions of type Combo or OptionGroup have no additional Spss variables.

## ListMulti

The base variable:

| property of variable | property value/s                                                                                                               | note                                                                                                                                 |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| name                 | <p>qnnnn<br>(eg q0853)</p>                                                                                                     | see [Spss base variable](#the-values-exported-and-the-spss-variables-which-receive-them) on the naming of a question’s base variable |
| value                | the count of items selected from the list box *except that if ‘none applies’ has been selected, then a count of 0 is exported* | thus any value greater than 0 means a ‘positive’ response to the question; and the larger the value the ‘stronger’ the response      |
| label                | text of question                                                                                                               | tokens (such as *%name* for the patient’s name) remain unsubstituted                                                                 |
| value labels         | <p>ToDo</p><p>NotApp</p>                                                                                                       | v3eASWBhtVni                                                                                                                         |
| missing values       | <p>-1</p><p>-2</p>                                                                                                             | ie ToDo and NotApp are treated as missing values                                                                                     |

Questions of the type ListMulti have additional Spss variables. In addition to the base variable for the ListMulti question, one variable for each item in the list box is present, built on the following pattern:

| property of variable | property value/s                                                                                                                     | note                                                                                                                                                                                        |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name                 | <p>qnnnn<strong>#NN</strong><br>(eg q0853#01)</p>                                                                                    | **NN** runs from ‘01’ to the number of items in the list box; the variable **qnnnn#01** always corresponds to the ‘**none applies**’ item which appears first in every list box             |
| value                | <p><em>if item #NN has not been selected</em></p><p>0</p><p><em>otherwise</em></p><p>1</p>                                           |                                                                                                                                                                                             |
| label                | text of question                                                                                                                     | tokens (such as *%name* for the patient’s name) remain unsubstituted                                                                                                                        |
| value labels         | <p>two labels, as follows:</p><ol><li><em><code>-</code> (ie the dash character)</em></li><li>text of item #NN in list box</li></ol> | *for example*:                                                                                                                                                                              |
| missing values       | none assigned                                                                                                                        | ToDo and NotApp are conveyed by the base variable for the question; where either of these applies, nothing is exported to the ‘item’ variables (which therefore appear as ‘system missing’) |

## Export of computed values

As well as the responses to individual questions, many *computed* outcomes of the **3di** are exported to SPSS. These include the Children’s Communication Checklist scores, the Autistic Spectrum Disorders scores, and some results from the [Comorbidities Tool](/using-the-software/comorbidities.md).

The SPSS variables which receive the exported outcomes are fully described by their SPSS labels: hover the pointer over the variable name at the head of a column in the SPSS data file to see the label (or switch to variable view in SPSS).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ixdx.org/using-the-software/spss.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
