diff --git a/src/components/Extension/CollectDataExtension/actions/CollectMedication/CollectMedication.tsx b/src/components/Extension/CollectDataExtension/actions/CollectMedication/CollectMedication.tsx index be1b539a..f24d6298 100644 --- a/src/components/Extension/CollectDataExtension/actions/CollectMedication/CollectMedication.tsx +++ b/src/components/Extension/CollectDataExtension/actions/CollectMedication/CollectMedication.tsx @@ -29,7 +29,7 @@ export const CollectMedication: FC = ({ (medications) => { onSubmit({ activityId: activity_id, - medicationDataAsJson: JSON.stringify(medications), + medicationData: JSON.stringify(medications), }) }, [activity_id, onSubmit] diff --git a/src/components/Extension/CollectDataExtension/actions/CollectMedication/hooks/useCollectMedication.tsx b/src/components/Extension/CollectDataExtension/actions/CollectMedication/hooks/useCollectMedication.tsx index 716a9f4d..43cb36f4 100644 --- a/src/components/Extension/CollectDataExtension/actions/CollectMedication/hooks/useCollectMedication.tsx +++ b/src/components/Extension/CollectDataExtension/actions/CollectMedication/hooks/useCollectMedication.tsx @@ -7,13 +7,14 @@ export const useCollectMedication = () => { const onSubmit = useCallback( async ({ activityId, - medicationDataAsJson, + medicationData, }: { activityId: string - medicationDataAsJson: string + medicationData: string }) => { const dataPoints: DataPoints = [ - { key: 'medicationData', value: medicationDataAsJson }, + { key: 'medicationData', value: medicationData }, // JSON data point value type + { key: 'medicationDataString', value: medicationData }, // String data point value type ] return _onSubmit(activityId, dataPoints)