Giter VIP home page Giter VIP logo

aws-nursingskill's Introduction

Nursing Icon

AWS Alexa Nursing Skill Workshop

A set of e-health workshops to apply AWS technologies for health improving. During this workshop we will show how to develop a Nursing Skill for Alexa to ask about your health data and store into DynamoDB tables.

The conversation will 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 <>

logo

Introduction

You will learn how to build your own Alexa Skills that can be applied for e-health proposal by taking your health data. As example we provide a complete interaction to ask your name and also your blood pressure. But you will learn how to extend and create your own input interactions for:

  • Glucose
  • Emotional State
  • Weight
  • Blood Exam

Before we start: Login qwiklabs

Table of Content

1.Create Alexa Nursing Skill

This first part you will learn how to create, configure and test a new Alexa Skill using a pre-existing Lambda function as back-end. 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.

logo

Step #1: Navigate to Alexa Developer Website

Nursing Icon

Step #2.1: Create your developer.amazon.com user

Nursing Icon

Step #2.2: Accept the license

Nursing Icon

Step #2.3: Click "Save and continue"

Nursing Icon

Step #2.4: Click "Alexa" menu

Nursing Icon

Step #3: Click "Getting Started" in Alexa Skills Kit

Nursing Icon

Step 4: Click "Add a new Skill"

Nursing Icon

Step #5: Configure Skill Information

Nursing Icon

Step #6: Click on "Launch Skill Builder"

Nursing Icon

Step #7: Copy this json configuration file and paste into code editor

Nursing Icon

Step #8: Click "Save Model" and then "Build Model"

Nursing Icon

Step #9: Wait until finish..

Nursing Icon

Step #10: Click "Configuration" to setup the Lambda Function

Nursing Icon

Step #11: We need to provide the Lambda Function ARN in Global Fields. ARN is the address of some existing Lambda function.

Nursing Icon

Step #12: Let's use our existing Lambda Function with this ARN. This ARN points to our Lambda in our account.

Nursing Icon

Step #13: Your skill configuration should be like this, click "Save" and "Next"

Nursing Icon

Step #14: Time to test! Click "Go to Test Simulator"

Nursing Icon

Step #15: Enable test for this skill

Nursing Icon

Step #16: Click and hold the Mic icon to start a conversation

  • 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 <>

Nursing Icon

2.Create your own Lambda Function to your Alexa Skill

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.

Step #1: Create a new Lambda Function, click "Create Function"

Nursing Icon

Step #2: Choose "Author from scratch"

  • Name: NursingSkill
  • Runtime: NodeJS 6.10
  • Role: Custom Role
  • It will open IAM console to create the role

Nursing Icon

Step #3: Configure IAM role:

  • IAM Role: lambda_basic_execution
  • Policy Name: Create new Role Policy
  • Click Allow

Nursing Icon

Step #4: Configure the role in your function

Nursing Icon

Step #5: Add Alexa Skill Kit trigger

Nursing Icon

Step #6: Disable Skill ID verification

  • 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.

Nursing Icon

Step #7: Copy this NodeJS code and paste into code editor

Nursing Icon

Step #8: Click "Save"

Nursing Icon

Step #9: Now you can copy your own Lambda ARN to the clipboard

Nursing Icon

Step #10: Open your Alexa Developer Console and click "Configuration"

Nursing Icon

Step #11: Paste the new Lambda ARN

Nursing Icon

Step #12: Before testing, we need to create your DynamoDB table!

3.Create your own DynamoDB table

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.

Step #1: Open DynamoDB Console

Nursing Icon

Step #2: Create healthdata Table

  • Table Name: healthdata
  • Primary key: id String

Nursing Icon

Step #3: Done!

Nursing Icon

Step #4: Open IAM console to allow your Lambda to access DynamoDB, click Roles and select lambda_basic_execution

Nursing Icon

Step #5: Select Policy and Click "Attach"

Nursing Icon

Step #6: Select AmazonDynamoDBFullAccess

Nursing Icon

4.Customizing Nursing Skill

You can also create your own Alexa commands by adding new Intents and Utterances:

An Intent is a set of utterances

screenshot

Utterances may have slots where you can use as variables...

screenshot

A Lambda function will be called for each intent..

screenshot

For each intent we have a different call-back function...

screenshot

We can read the slot data this way:

screenshot

screenshot

You can try to extend you Alexa Nursing Skill by creating a new Intent and call-back function!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.