diff --git a/README.md b/README.md index 567a52c6a..eb9f3e94e 100755 --- a/README.md +++ b/README.md @@ -269,7 +269,7 @@ $ANDROID_HOME/build-tools/27.0.2/zipalign -v 4 /platforms/and ## Questionnaire Input Types -The questionnaire input types supported are `audio`, `checkbox`, `descriptive`, `info-screen`, `matrix-radio`, `radio`, `range-info`, `range-input`, `slider`, `text`, `date`, `time`, and `timed-test`. +The questionnaire input types supported are `audio`, `checkbox`, `descriptive`, `info-screen`, `matrix-radio`, `radio`, `range-info`, `range-input`, `slider`, `text`, `date`, `time`, `healthkit`, and `timed-test`. ### Descriptive Input Type @@ -297,6 +297,33 @@ Here is the output: +## Healthkit Input Type + +Please see `/src/app/shared/models/health.ts` for a list of supported data types. In order to add support for new data types, follow the steps below: + +### Add the New Data Type to `HealthkitDataType` + +Open the `health.ts` file and add the new data type to the `HealthkitDataType` enum. Use a descriptive key and a string value that matches the Healthkit data type. + +```typescript +export enum HealthkitDataType { + ... + VO2_MAX = 'vo2Max', +} +``` + +### Add a New Permission to HealthkitPermission +Add the corresponding permission to the `HealthkitPermission` enum. The permission should match the new data type. + +### Map the Data Type to Its Permission +Update the `HealthkitPermissionMap` object to link the new `HealthkitDataType` to its `HealthkitPermission`. + +### Add the Kafka Topic to HealthkitTopic +Add the corresponding topic to the `HealthkitTopic` enum. The topic should be a descriptive string representing the data type's usage in your system. + +### Add to the Appropriate Data Type Sets (if applicable) +Depending on the data type (e.g., numeric or string), add the new data type to the relevant set: `HealthkitFloatDataTypes` or `HealthkitStringDataTypes`. + ## Common Errors Here are some common errors you might find during installation.