This workshop demonstrates how to develop a voice interface (Nursing Skill) for Amazon Alexa to interact with e-health applications and databases.
An example conversation would be like this:
- You>> Open nursing skill
- Alexa>> Welcome to Alexa Nursing Skill, please tell me your name
- You>> My name is <>
- Alexa>> Welcome <>, you can ask me about your health
- You>> Blood Pressure Input
- Alexa>> What is your sistolic pressure <>
- My sistolic pressure is 115
- Alexa>> What is your diastolic pressure <>
- You>> My diastolic poressure is 75
- Alexa>> Thanks <>
You will learn how to build your own Alexa Skills to register your health data using voice interactions. As example we provide a complete interaction to ask your name and register your blood pressure. It can be easily customized to track Glucose, Emotional State, Weight, Blood Exam and more.
- 1. Create Alexa "Nursing Skill" using pre-configured Lambda
- 2. Create your own Lambda Function for Nursing Skill
- 3. Create your own DynamoDB table
- 4. Customizing Nursing Skill
First, let's create, configure and test a new Alexa Skill using a pre-existing Lambda function. After this step you will have your first Healthcare Skill working and then you can create your own Lambda function to customize or extend this skill to store different types of biometric data.
Step #1: Navigate to Alexa Developer Website: https://developer.amazon.com/alexa and click "Sign in"
Step #3: Navigate back to the Alexa Developer Webiste: https://developer.amazon.com/alexa and click in "Your Alexa Consoles -> Skills"
Step #7: Configure the skill using the right side "Skill Builder CheckList". The invocation name is the one used to open the Alexa Skill, ex. "Alexa Open nursing skill". By default, the invocation name is the Skill name but you can change it.
Step #8: The invocation name is the one used to open the Alexa Skill, ex. "Alexa Open nursing skill". By default, the invocation name is the Skill name but you can change it.
Step #11: Let's use our existing Lambda Function to fullfill intents in the backend. This ARN points to a pre-build Lambda function in our account.
- You>> Open nursing skill
- Alexa>> Welcome to Alexa Nursing Skill, please tell me your name
- You>> My name is <>
- Alexa>> Welcome <>, you can ask me about your health
- You>> Blood Pressure Input
- Alexa>> What is your sistolic pressure <>
- My sistolic pressure is 115
- Alexa>> What is your diastolic pressure <>
- You>> My diastolic poressure is 75
- Alexa>> Thanks <>
Now that we have our own skill using a pre-existing Lambda function that allows any skill to use it, you will learn how to create your own lambda function copying our code and then replace the Lambda ARN in your Alexa Nursing Skill.
Make sure you are using the US East (N. Virginia) AWS Region
- Name: NursingSkill
- Runtime: NodeJS 8.10
- Role: Custom Role
- It will open IAM console to create the role
- IAM Role: lambda_basic_execution
- Policy Name: Create new Role Policy
- Click Allow
- This way any skill can use trigger this Lambda. If you want to restrict you can pick you Alexa Nursing Skill ID and limit the execution for only one skill.
To finish your Nursing Skill using youtr own Lambda Function you must create a DynamoDB table and make sure that Lambda Function has the right permissions.
- Table Name: healthdata
- Primary key: id String
Step #4: Open IAM console to allow your Lambda to access DynamoDB, click Roles and select lambda_basic_execution
You can also create your own Alexa commands by adding new Intents and Utterances: