Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
excludeRelated

Log Health Data Manager node

Log Health Data Manager node, when used along with Log Health Data node, saves health data of the user to the Orbita database.

...

Inputs

A Log Health Data Manager node will accept inputs in a predefined format that are outlined in the examples below.

Slots

Measurement Type

You can use the following measurement types in the input for the node.

...

The following image shows the slot that contains the measurement types.

...

Intents

The following intents are used in the sample flow that is shared at the end of the document.

  • LogHealthData

  • YesIntent

  • NoIntent

  • NumberIntent

  • RecordMeasurement (optional)

  • TypeOfMeasurement (optional)

LogHealthData

Create an intent and name it LogHealthData.

...

You can configure your intent as shown in the following image. The slots should be appropriately named and used in the utterances.

...

YesIntent

When a Yes/No question is triggered by Pin1, the YesIntent confirms the inputs.

...

The node sends the output to Pin2. The LogHealthData node should be connected to Pin2 to save the output.

NoIntent

When a Yes/No question is triggered by Pin1, the NoIntent will be used to discard the input value. The node will prompt a question to get the value for the measurement type that is already saved in the session.

...

User says: lets record my weight is hundred pounds
Node (Pin1): you said your weight is 100 pounds is that correct?
User says: No
Node (Pin1): what is your weight

NumberIntent

The NumberIntent lets the user provide input as a number. This will be used in specific scenarios where the node throws a reconfirmation message (from Pin1) asking for a value of the measurement type.

...

User says: lets record my weight is hundred pounds
Node (Pin1): you said your weight is 100 pounds is that correct?
User says: No
Node (Pin1): what is your weight
User says: ninety
Node (Pin1): you said your weight is 90 pounds is that correct?

Measurement Position

The toggle option for the measurement position is mandatory or not mandatory.

...

laying
laying down
lying
lying down
Position
semirecumbent
sitting
standing

None Intent

None Intent is triggered if any other utterances other than the stored utterances are used.

If the None Intent is triggered before invoking the flow, the bot will respond with a fall-back message “Sorry, I didn't understand you. Could you repeat that?”.

RecordMeasurement (Optional)

Create an intent with the name RecordMeasurement and set the state as No State.

...

User says: record a measurement
Bot says: What Measurement would you like to record?

TypeOfMeasurement (Optional)

Create an intent and name it TypeOfMeasurement. Set the state as RecordMeasurement.

...

User says: record a measurement
Bot says: What measurement would you like to record?
User says: height
Bot says: Ok, what is your height measurement?
User says: six feet
Node (Pin1): you said your height is 6 feet 0 inches tall, is that correct?

Log Health Data Flow in Experience Designer

The following image shows the flow with which you can log health data.

...

Working of the flow

User not logged in

If the user is not logged in, he/she will get the error below when they try to invoke the flow.

“Access is denied due to invalid credentials”

User logged in

If a user is logged in, the data will be stored for that user.

With Measurement type

If the utterances contain the measurement type and corresponding values, the LogHealthData intent will invoke the flow.

...

Code Block
msg.payload= 
{ "unitOfMeasurement" : "MMHG", 
  "measurementValue"  : { 
                          "diastolic" : 80, "systolic": 120 
                        }, 
  "source"            : {}, 
  "_id"               : "586c81caf43a1099dcfcb1af", 
  "user"              : "58685b4822c81018cc06e06c", 
  "recordedTime"      : "2017-01-04T05:02:02.818Z", 
  "createdAt"         : "2017-01-04T05:02:02.000Z", 
  "modifiedAt"        : "2017-01-04T05:02:02.000Z", 
  "__v"               : 0 
}

Without Measurement type (Optional)

  1. When the utterance is given without any measurement type, the bot will ask for a measurement type.

  2. Once the measurement type is given, the bot will ask for a value.

  3. This value along with the measurement type will be fed to the node.

  4. The node sends a confirmation message to Pin1.

  5. If YesIntent is triggered, the output will be sent to Pin2.

Log Health Data node

To save the input data, the log health data node should be connected to Pin2 of the log health data manager node.

Related Articles

Filter by label (Content by label)
showLabelsfalse
max5
showSpacefalse
cqllabel = "experience-designer"