Data Transformation

Configure how sampled data is transformed before it is written to your endpoint.

Privacy Schemas

Apply privacy transformation to measurements by assigning a privacy schema to the protocol.

Data transformation

CAMS supports data transformation via two concepts:
  • DataTransformer - can transform one type of Data to another type of Data.
  • DataTransformerSchema - holds a set of DataTransformers that can map from the native CARP namespace to another namespace.
To use a transformer schema, specify it in the protocolø’s endpoint config. The following protocol will save data as 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,
  ),
);
You can make you own custom transformation implementations. See Extending CAMS.

Privacy transformer schemas

To apply privacy transformations, configure a privacy schema on the protocol:
SmartphoneStudyProtocol protocol = SmartphoneStudyProtocol(
  ownerId: 'AB',
  name: 'Track patient movement',
  privacySchemaName: PrivacySchema.DEFAULT,
);
PrivacySchema.DEFAULT holds default privacy schemas and is a practical starting point. You can extend or replace it with your own schema.
The default privacy schema can be extended or replaced by your own.