Skip to content
CARP Docs
Ask AISystemLightDark
On this page

Data transformation and privacy

Transform collected data to another format and apply privacy schemas in a CAMS study protocol.

Copy MarkdownOpen inOpen in GitHubView as MarkdownOpen in Scira AIOpen in ChatGPTOpen in ClaudeOpen in Cursor

CAMS can transform sampled data before it is written to the data endpoint, for example into another data format, and can apply privacy transformations to measurements. You configure both on the study protocol.

Data transformation

CAMS supports data transformation through two concepts:

ConceptPurpose
DataTransformerTransforms one type of Data into another type of Data.
DataTransformerSchemaHolds a set of DataTransformers that map from the native CARP namespace to another namespace.

To use a transformer schema, specify it in the protocol's data endpoint configuration: the endpoint's dataFormat property takes the schema's namespace, such as NameSpace.OMH. This protocol saves data to a file in the Open mHealth (OMH) data format:

SmartphoneStudyProtocol protocol = SmartphoneStudyProtocol(
  ownerId: 'AB',
  name: 'Track patient movement',
  dataEndPoint: FileDataEndPoint(
    bufferSize: 500 * 1000,
    zip: true,
    encrypt: false,
    dataFormat: NameSpace.OMH,
  ),
);

Note

Not all data types in CAMS have an OMH data format. If no OMH transformer is found, the data is stored in the original CARP data format.

You can write your own transformers. See Adding data and privacy transformers.

Privacy schemas

To apply privacy transformations, set a privacy schema on the protocol:

SmartphoneStudyProtocol protocol = SmartphoneStudyProtocol(
  ownerId: 'AB',
  name: 'Track patient movement',
  privacySchemaName: PrivacySchema.DEFAULT,
);

PrivacySchema.DEFAULT holds the default privacy schemas and is a practical starting point. You can extend it or replace it with your own schema.

Quick links

Page · DocumentationCARP DocumentationPage · DocumentationIntroductionPage · DocumentationQuickstartPage · DocumentationTerminologyPage · DocumentationArchitecture