... | ... | @@ -22,7 +22,50 @@ The PEP (support) team can configure the type or types of data to import from Ca |
|
|
|
|
|
## Data format
|
|
|
|
|
|
Castor data are stored in PEP as JSON, which is [a data format](https://www.json.org/) that associates keys with values.
|
|
|
Castor data are stored in PEP as JSON, which is [a data format](https://www.json.org/) that associates keys with values. Imported Castor JSON data always consist of a `crf` and a `reports` node at the top level.
|
|
|
|
|
|
- Castor question identifiers serve as the JSON keys.
|
|
|
- The (raw) answers entered into Castor are stored in the JSON value nodes. |
|
|
- The `crf` node's value is an object containing the data entered into Castor.
|
|
|
- Keys in this object correspond with Castor question IDs.
|
|
|
- Values contain the (raw) answer entered into Castor.
|
|
|
- The `reports` node contains (a JSON array containing) any Castor reports associated with the imported data, e.g. due to a CRF containing [repeated measurements](https://helpdesk.castoredc.com/article/191-the-repeated-measure-field).
|
|
|
|
|
|
For example, the following data might be stored in PEP:
|
|
|
|
|
|
```
|
|
|
{
|
|
|
"crf": {
|
|
|
"DiagParkYear": "1960",
|
|
|
"PrefHand": "##USER_MISSING_97##",
|
|
|
"FirstSympYear": "1950",
|
|
|
"DiagParkMonth": "3",
|
|
|
"WatchSide": "1",
|
|
|
"PreferLeg": "3",
|
|
|
"FirstSympMonth": "3",
|
|
|
"MostAffSide": "2",
|
|
|
"WalkingAid": {
|
|
|
"0": "true",
|
|
|
"1": "false",
|
|
|
"2": "false",
|
|
|
"3": "false",
|
|
|
"4": "false",
|
|
|
"5": "false",
|
|
|
"6": "false"
|
|
|
},
|
|
|
"DiagParkNeurologist": "Piet Paulusma",
|
|
|
"DiagParkDay": "3"
|
|
|
},
|
|
|
"reports": ""
|
|
|
}
|
|
|
```
|
|
|
|
|
|
In the sample data:
|
|
|
|
|
|
- the `DiagParkYear` node contains a value of `1960`, indicating that the answer `1960` was entered for a question with this ID.
|
|
|
- the `WalkingAid` node (apparently) contains the answers to a [checkbox](https://helpdesk.castoredc.com/article/185-create-a-field-with-option-groups-radio-button-checkbox-and-dropdown)-type question.
|
|
|
- the `reports` node contains no entries, indicating that no repeated measurements are associated with these Castor data. Perhaps the Castor configuration contained no questions of that type, or there were 0 (zero) repeated measurements to report.
|
|
|
|
|
|
## Castor steps as a unit
|
|
|
|
|
|
PEP imports data for individual Castor (CRF) [steps](https://helpdesk.castoredc.com/article/18-create-edit-and-delete-phases-and-steps) into separate PEP columns. Since [access to PEP is controlled](Access-control) at the level of columns, the implication is that PEP can distribute Castor data with a granularity of CRF steps. PEP users can be granted access to (answers to) individual Castor steps, but not to smaller units (e.g. individual questions). This should be taken into account when configuring a Castor study meant for PEP integration. Questions should only be put together into a single step if their answers should always be distributed together.
|
|
|
|
|
|
An equivalent principle applies to the import of Castor survey data: answers to a single survey step end up in a single PEP column. Surveys should therefore also be configured in such a way that their data are chunked appropriately. |
|
|
\ No newline at end of file |