MyMedTracker is an Alexa skill that helps users log and retrieve medical activity records for themselves or others (e.g., children, patients, pets). It leverages AWS services including DynamoDB, SES, and the Alexa Skills Kit SDK (v2) to store and send medical records via email.
- Add Medical Events: Log events like exercises, appointments, or any custom activity.
- Add Medication Entries: Log specific medications and dosages.
- Retrieve Records by Date: Ask for medical history for a specific person on a specific date.
- Retrieve Records by Period: Retrieve all events from the past X days/weeks/months.
- Ask When Questions: Find out the last time a person did a certain activity or took a specific medicine.
- Email Delivery: Results are automatically emailed to the user’s Alexa-linked email address via AWS SES.
- Alexa Skills Kit SDK v2
- AWS DynamoDB – stores user-submitted medical activity logs
- AWS SES – sends medical history to user’s email
- AWS SDK for JavaScript
- HTTPS Requests – fetches Alexa user email securely
Logs a general medical activity and its duration.
Example:
“Alexa, log that I walked for 30 minutes.”
Logs a medicine given to a person and its dosage.
Example:
“Alexa, record that I gave John 10 milliliters of Tylenol.”
Retrieves all medical records for a specific person on a specific date.
Example:
“Alexa, what did Sarah do on July 15th?”
Retrieves records for a person over the past N days/weeks/months.
Example:
“Alexa, what did John do over the last 2 weeks?”
Finds the last time a specific activity or medicine was logged.
Example:
“Alexa, when did John last take Tylenol?”
- Fetches Alexa-linked email via Alexa Profile API.
- Emails results to the user via AWS SES.
- Note: You must verify the sender email (e.g.,
ezraakresh@gmail.com
) in SES, especially if using a sandboxed account.
To function properly, the skill must request the following permissions:
alexa::profile:email:read
You must enable this in the Alexa Developer Console and request consent during account linking.
- Table Name:
MyMedTrackerTable
- Partition Key:
userid
(e.g.,userId#name
) - Sort Key:
date
(ISO 8601-like string) - Attributes:
event
: medical activity or medication event descriptionduration
(optional): duration in minutesdosage
(optional): dosage amount
- Create DynamoDB table
MyMedTrackerTable
- Set up SES and verify sender email
- Ensure Lambda IAM role has permissions for:
- DynamoDB (read/write)
- SES (send email)
- Enable
Email
read permission in Developer Console - Configure intents, slots, and utterances to match handlers in the code
- Deploy the
index.js
code to AWS Lambda - Set the handler as
index.handler
- Ensure region is
us-east-1
- Set the endpoint to your Lambda ARN
- Enable permissions under "Permissions" tab
- Enable account linking (with permissions scope)
You can test the skill using:
- Alexa Developer Console (Test tab)
- Alexa-enabled devices
Example Test Phrases:
- “Alexa, ask My Med Tracker to log 30 minutes of yoga for John.”
- “Alexa, ask My Med Tracker when Sarah last had her Tylenol.”
- “Alexa, ask My Med Tracker for Sarah’s medical history on July 4th.”
The skill will respond with a generic fallback if an error occurs:
“Sorry, I had trouble doing what you asked. Please try again.”
- Email results are only sent to the Alexa-linked email address.
- DynamoDB
date
keys use formatted UTC timestamps. - If deploying to production, move SES out of sandbox mode.
MIT License
(c) 2025 Ezra Akresh