Versions Compared

Key

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

...

Symptom Triage

Excerpt
hiddentrue
nameWhy was it created?Solution Description

Why was it created?

For any provider and pharma professionals, there is a raising need for a safer, efficient, and quick solution that is responsive, easy to use, and available 24/7.

For this exact need, we have introduced a solution that uses the chatbot to do a preliminary screening of the patients by collecting information about their symptoms and triaging them based on predefined rules.

What is its purpose?

Unlike the orthodox experience of calling a nurse/doctor, going to an urgent care center, going to an emergency room, or scheduling an appointment to meet with a provider or clinician, the Symptom Triage Solutions Centers provides an intelligent, conversational, empathetic experience to help consumers define and take action on symptoms they are experiencing and directs them to the appropriate care options.

As an admin user, you will have access to the patient transcripts for further diagnosis/action and pre-built dashboards to track usage and outcomes.

How does it work?

Symptom Checker Solution assists patients in preliminary diagnosis using artificial intelligence to check the symptoms and guide patients to the appropriate medical services.

  • Recognize when patients express symptoms using natural language.

  • Guide patients to the point of the right care

    • Call Ambulance/911

    • Go to the Emergency Room

    • Schedule visit to be seen within 24 hours

    • Schedule routine visit

    • Self-care at home

...

  1. Import the below code to the Experience Designer > Bot Manager flow/tab

    Code Block
    languagejson
    [
        {
            "id": "db3f8895.c18028",
            "type": "orbita-adverse_event",
            "z": "25baf5ca.56d3aa",
            "skillConfig": "150ab083.2380ef",
            "name": "Orbita Detect",
            "utterance": "{{msg.payload.text}}",
            "x": 390,"y":840,
            "y": 840,
            "wires": [
                [
                    "fc69261a.dd45a8"
                ]
            ]
        },{"id":
        {
            "id": "fc69261a.dd45a8",
            "type": "function",
            "z": "25baf5ca.56d3aa",
            "name": "Set Namespace",
            "func": "const _ = global.get('lodash');\nconst util = global.get('orbitaUtil');\nlet projectId = util.getProjectId(node);\n_.set(msg, 'orbita.session.NAMESPACE', `symptomtriage:${projectId}`);\n\nreturn msg;",
            "outputs": 1,
            "noerr": 0,
            "x": 580,"y":840,
            "y": 840,
            "wires": [
                [
                    "7f356695.686e28"
                ]
            ]
        },{"id":
        {
            "id": "7f356695.686e28",
            "type": "function",
            "z": "25baf5ca.56d3aa",
            "name": "Check Symptoms",
            "func": "const _ = global.get('lodash');\nconst YES = \"LABEL_1\";\n\nconst NAMESPACE = _.get(msg, 'orbita.session.NAMESPACE');\nconst settings = global.get(NAMESPACE).settings;\n\n\nconst adverseEventDetected = _.get(msg, 'payload.data.adverseEvent[0].labelscore', _.get(msg, 'payload.data.adverseEvent.labelscore')) === YES;\nconst isLaunch => 0.8 && _.get(msg, `payload'payload.session.${NAMESPACE}.isLaunch`);\data.adverseEvent[0].label', _.get(msg, 'payload.data.adverseEvent.label')) === YES;\nconst isLaunch = _.get(msg, `payload.session.${NAMESPACE}.isLaunch`);\nlet symptomValue = _.get(msg, 'payload.text');\n\nlet results = _.get(msg, 'data.dynamicData.result');\nlet excludedTerms = settings.excludeUtterancesFromSymTriFlow;\nlet checkUserValue = excludedTerms.findIndex(term => term.toLowerCase() === symptomValue.toString().toLowerCase());\n\n\nif(adverseEventDetected && isLaunch && checkUserValue === -1){\n  _.set(msg, `orbita.session.${NAMESPACE}.symptomValue`, symptomValue);\n  _.set(msg, 'payload.text', 'Symptoms Checker Conversation');\n}\n\n\nreturn [msg,null];",
            "outputs": 1,
            "noerr": 0,
            "x": 790,"y":840,
            "y": 840,
            "wires": [
                [
                    "6961a47f.5949bc"
                ]
            ]
        },{"id":
        {
            "id": "6961a47f.5949bc",
            "type": "function",
            "z": "25baf5ca.56d3aa",
            "name": "Route","func":"const _ = global.get('lodash');\nconst NAMESPACE = _.get(msg, 'orbita.session.NAMESPACE');\n//const NAMESPACE = 'symptomtriage';\nconst settings = global.get(NAMESPACE).settings;\nconst symptomChecker = global.get(NAMESPACE).symptomChecker || {};\nlet symptomCheckerSessionID = symptomChecker.sessionIDStore\n    ? symptomChecker.sessionIDStore[msg.payload.sessionId]\n    : null;\n\nif (symptomCheckerSessionID) {\n    let formatId = `hbConvId:${symptomCheckerSessionID}`;\n    global.get(`hbConvId:${symptomCheckerSessionID}`, function(err, cacheData) {
            "func": "const _ = global.get('lodash');\nconst NAMESPACE = _.get(msg, 'orbita.session.NAMESPACE');\n//const NAMESPACE = 'symptomtriage';\nconst settings = global.get(NAMESPACE).settings;\nconst symptomChecker = global.get(NAMESPACE).symptomChecker || {};\nlet symptomCheckerSessionID = symptomChecker.sessionIDStore\n    ? symptomChecker.sessionIDStore[msg.payload.sessionId]\n    : null;\n\nif (symptomCheckerSessionID) {\n    let formatId = `hbConvId:${symptomCheckerSessionID}`;\n    global.get(`hbConvId:${symptomCheckerSessionID}`, function(err, cacheData) {\n        const input = typeof msg.payload.text === \"string\"\n            ? msg.payload.text.toLowerCase()\n            : msg.payload.text && msg.payload.text.message\n                ? msg.payload.text.message.toLowerCase()\n                : \"\";\n        constlet inputgenderList = typeof msg.payload.text === \"string\"\['male', 'female'];\n            ? if(typeof msg.payload.text.toLowerCase()text === 'string'){\n            :genderIdx = msg.payload.text &&genderList.findIndex(gender => gender.toLowerCase() === msg.payload.text.messagetoLowerCase()); \n        }\n        ? msg.payload.text.message.toLowerCase()let results = _.get(msg, 'data.dynamicData.result');\n        // if (results && results.length > 0) {\n     : \"\";\n   //     let genderListresult = ['male', 'female'results[0];\n           if(typeof msg.payload.text let excludedTerms === 'string'){ settings.excludeUtterancesFromSymConvFlow;\n            genderIdxlet checkUserValue = genderListexcludedTerms.findIndex(genderterm => genderterm.toLowerCase() === msginput.payloadtoString().text.toLowerCase()); \n           } if(checkUserValue >=0 ){\n             let results = _global.get(msg, 'data.dynamicData.result'set(`hbConvId:${symptomCheckerSessionID}`, undefined);\n        //  if (results && results.length > 0) { global.set(`hbConvId:${symptomCheckerSessionID}:checkboxes`, undefined);\n        //      let result = results[0]return node.send([msg, null]);\n            let excludedTerms = settings.excludeUtterancesFromSymConvFlow;\n}\n        //}\n        // switch(input) {\n       let checkUserValue// = excludedTerms.findIndex(term => term.toLowerCase() === input.toString().toLowerCase()); case \"open\":\n        //    if(checkUserValue >=0 ){ case \"mychart\":\n        //        global.set(`hbConvId:${symptomCheckerSessionID}`, undefined);case \"covid\":\n        //     case   global.set(`hbConvId:${symptomCheckerSessionID}:checkboxes`, undefined);\"covid 19\":\n        //     case \"covid-19\":\n  return node.send([msg, null]);\n    //     case \"find a }location\":\n        //}\n        // switch(input) {case \"find location\":\n        //     case \"openagent\":\n        //     case \"mychartcan i please talk with a person\":\n        //     case \"covidcan i talk to a human\":\n        //     case \"covid 19can i talk to a person\":\n        //     case \"covid-19can i talk to a real person\":\n        //     case \"find a locationcan i talk to an agent\":\n        //     case \"find locationcan i talk to someone\":\n        //     case \"agentcan i talk to the operator\":\n        //     case \"canconnect i please talk withme to a personhuman\":\n        //     case \"can i talk to a humancustomer service\":\n        //     case \"cancustomer i talk to a personservice rep\":\n        //     case \"cancustomer i talk to a real personservice representative\":\n        //     case \"canhow ito talkchat towith ana agenthuman\":\n        //     case \"canhow to ichat talkwith toan someoneagent\":\n        //     case \"canhow ito talkconncet towith thea operatoragent\":\n        //     case \"connecthow to meconncet towith a human\":\n        //     case \"customer servicehow to conncet with a real person\":\n        //     case \"customer service rephow to connect with a agent\":\n        //     case \"customer service representativehow to connect with an agent\":\n        //     case \"how to chatconnect with a humanrep\":\n        //     case \"how to chatconnect with an agentrepresentative\":\n        //     case \"how to conncettalk withto a agenthuman\":\n        //     case \"how to conncet with a  \"human\":\n        //     case \"howi toam conncethaving withtrouble apaying realmy personbill\":\n        //     case \"howi need to connecttalk withto aan agentoperator\":\n        //     case \"howi want to connecttalk withto an agent\":\n        //     case \"howi want to connecttalk withto repsomeone\":\n        //     case \"howi want to connecttalk with a representativeperson\":\n        //     case \"howlet tome talk to a human\":\n        //     case \"humanlive agent\":\n        //     case \"i am having trouble paying my billmainmenuescalate\":\n        //     case \"i need to talk towith an operatorsomeone\":\n        //     case \"iplease wantlet tome talk to ana agenthuman\":\n        //     case \"i want to talk to someonereal person\":\n        //     case \"itransfer wantme to talk with a person\":\n        //     case \"let me talk to a humancovid screener\":\n        //     case \"liveask a agentquestion\":\n        //     case \"mainmenuescalatehelp\":\n        //     case \"needcheck to talk with someonemy symptoms\":\n        //     case \"pleasestart let me talk to a humanchecking symptoms\":\n        //     case \"realsymptom personchecker\":\n        //     case   \"transfer me// tocacheData a= personnull;\":\n        //       case \"covid screener\": global.set(`hbConvId:${symptomCheckerSessionID}`, undefined);\n        //     case  \"ask a question\": global.set(`hbConvId:${symptomCheckerSessionID}:checkboxes`, undefined);\n        //     case \"help\":\    return node.send([msg, null]);\n        //     case  \"check my symptoms\":  // break;\n        //     case \"start checking symptoms\"default:\n        //     case \"symptom checker\": break;\n        // }\n        // cacheData = nullmsg.text = msg.payload.text;\n        if (cacheData) {\n   //         global.set(`hbConvId:${symptomCheckerSessionID}`, undefinedmsg.origPayload = JSON.parse(JSON.stringify(msg.payload));\n        //    var myText  =  global.set(`hbConvId:${symptomCheckerSessionID}:checkboxes`, undefined)msg.payload.text;\n        //    let formatCheckbox    return node.send([msg, null])= `hbConvId:${symptomCheckerSessionID}:checkboxes`;\n        //    var choices    // break= global.get(`hbConvId:${symptomCheckerSessionID}:checkboxes`);\n        //     default:\n     if (isNaN(myText) === //false && choices && choices.length > 0) break;{\n        // }\n       var msg.textans = msg.payload.text'';\n        if (cacheData) {\n      for(var i = 1; i < msgmyText.origPayload = JSON.parse(JSON.stringify(msg.payload));length; i++) {\n            var myText  = msg.payload.text;\n    if (myText[i]       let formatCheckbox = `hbConvId:${symptomCheckerSessionID}:checkboxes`;== \"1\") {\n            var choices = global.get(`hbConvId:${symptomCheckerSessionID}:checkboxes`);\n         var choice  if (isNaN(myText) === false && choices && choices.length > 0) {\n= choices[i-1];\n                       var ans += choice.text + ',';\n                for(var i = 1; i}\n < myText.length; i++) {\n                \n    if (myText[i] == \"1\") {\n        }\n                varif choice = choices[i-1];(ans) {\n                    ans = ans.substring(0,  ans += choice.textlength + ','- 1);\n                    }\n                if (ans === ''){ \n  // multi select check box but did not click any  button.\n   }\n                if (ans) { = 'none';\n                    ans = ans.substring(0, ans.length - 1);}\n                msg.origPayload.text = }ans;\n                if (ans === ''){   // multi select check box but did not click any button. msg.origPayload.session.recognizedText = ans;\n            }\n        }\n        if (err) {\n          ans = node.warn('noneerror');\n                }node.error(err, msg);\n            node.send([msg, null]);\n   msg.origPayload.text = ans;\n    } \n        else if(cacheData && msg.origPayload.session.recognizedText = ans;\ncacheData.hasOwnProperty('conversationId')) {\n            msg.payload = }cacheData;\n        }\n    _.set(msg,    if (err) {`payload.${NAMESPACE}.subFlowName`, 'activityFlow')\n            return node.warn('error'send([null, msg]);\n        } else if(cacheData && cacheData.state && node.error(err, msg);cacheData.state === 'start') {\n            nodeif(_.sendget([msg, null]);`payload.session.${NAMESPACE}.symptomValue`)){\n        } \n        else if(cacheData && cacheData.hasOwnProperty('conversationId')) {_.set(msg, `orbita.session.${NAMESPACE}.sexValue`, _.get(msg, 'payload.text'));\n            msg.payload = cacheData;}\n            _.set(msg, `payload.${NAMESPACE}.subFlowName`, 'activityFlowconversationFlow')\n            return node.send([null, msg]);\n        } else if(cacheData && cacheData.state && cacheData.state === 'start') { \n        \n        else if((genderIdx > -1) && \n            (_.get(msg, `payload.session.${NAMESPACE}.symptomValue`)) && \n            if(_.get(msg, `payload.session.${NAMESPACE}.symptomValue`genderAsked`))){\n              _.set(msg, `orbita.session.${NAMESPACE}.sexValue`, _.get(msg, 'payload.text'));\n            global.get(`hbConvId:${symptomCheckerSessionID}`, function(err, symptomCacheData) {\n            _.set(msg, `payload.${NAMESPACE}.subFlowName`, 'conversationFlow')\n  if (err) {\n             return   node.send([null, msg]warn('error');\n        } \n       node.error(err, msg);\n        else if((genderIdx > -1) && \n   node.send([msg, null]);\n        (_.get(msg, `payload.session.${NAMESPACE}.symptomValue`)) && \n   }         (_.get(msg, `payload.session.${NAMESPACE}.genderAsked`))else if(symptomCacheData && symptomCacheData.state && symptomCacheData.state === 'start'){\n                _.set(msg, `orbita`payload.session.${NAMESPACE}.sexValue`subFlowName`, _.get(msg, 'payload.text'));\n'conversationFlow')\n              global.get(`hbConvId:${symptomCheckerSessionID}`, function(err, symptomCacheData) {  return node.send([null, msg]);\n              if (err) {}\n                node.warn('error'});\n        }\n        node.error(err, msg);else {\n              return  node.send([msg, null]);\n        }\n      });\n} else if(symptomCacheData && symptomCacheData.state && symptomCacheData.state === 'start'){\n                _.set(msg, `payload.${NAMESPACE}.subFlowName`, 'conversationFlow')\nreturn node.send([msg, null]);   \n}\n",
            "outputs": 2,
            return node.send([null, msg]);\n"noerr": 0,
            "x": 990,
        }\n    "y": 840,
          });\n  "wires": [
        }\n        else[
    {\n             return node.send([msg, null]);\n  "6367ec18.d48104"
          }\n    });\n} else {\n],
       return node.send([msg, null]);   \n}\n","outputs":2,"noerr":0,"x":990,"y":840,"wires":[["6367ec18.d48104"],[       [
                    "346a7253.36fb4e"
                ]
            ]
        },
        {
            "id": "150ab083.2380ef",
            "type": "alexa-skill-config",
            "skillname": "Symptom-Triage",
            "projectId": "607ee6aa02ca46007aef1752",
            "intents": "[]",
            "skillstate": "fromsession, useSymptomChecker, escalation, flowManager,flow, test,FlowStudio, testState, bill,escalation,confirm_escalation,help,emergency, Reminder, sanity, flow_stud,webWeight,fromSession,flowMngr,scheduleride,aMedication,Survey,whyhelpmessage,medication,callorcomeby,Januvia,survey2,glucose,faqquestion,DailySurveyInProgress,HeadacheSurveyInProgress,MonthlySurveyInProgress,FeedbackSurveyInProgress,AllReportsDone,AskedForChangeResponse,AskedForChangeTwice,MigraineTrackerQuestions1,MigraineTrackerQuestions2,MigraineTrackerQuestions3,StudyQuestions1,StudyQuestions2,StudyQuestions3,Help1,Help2,Help3,AskedForHeadacheStart,AskedForHeadacheStartYesterday,AskedForHeadacheStartTime,AskedForHeadacheEndTime,AskedForHeadacheTimeCorrectness,AskedForHeadacheChangeStartTime,AskedForHeadacheEndDate,InvalidHeadacheTime,AskedForContinuePartial,MaxRecognitionError,ServicePhoneNumber,ConfirmGoHome,ConfirmStop,ConfirmPause,ConfirmCancel,FORTESTING,testState,setup, startup, Survey,flowManager, survey, flowMngr,eventSurvey, whyhelpmessage, HeadacheSurveyInProgress, MonthlySurveyInProgress, FeedbackSurveyInProgress, AllReportsDone, AskedForChangeResponse, AskedForChangeTwice, MigraineTrackerQuestions1, MigraineTrackerQuestions2, MigraineTrackerQuestions3, StudyQuestions1, StudyQuestions2, StudyQuestions3, Help1, Help2, Help3, AskedForHeadacheStart, AskedForHeadacheStartYesterday, AskedForHeadacheStartTime, AskedForHeadacheEndTime, AskedForHeadacheTimeCorrectness, AskedForHeadacheChangeStartTime, AskedForHeadacheEndDate, InvalidHeadacheTime, AskedForContinuePartial, MaxRecognitionError, ServicePhoneNumber, ConfirmGoHome, ConfirmStop, ConfirmPause, ConfirmCancel,pain,dual,TreatmentSurgery,plateletsflow,password,changeappointmentList,MedicalHeart,chooseLocation,cancelAppointment,plateletsFlow, reminder, CheckUser, fromSession, plateletsFlow, cancelAppointment,PlateletsChangeOption,MedicalHemochromatosis, MedicalHeart,LifestyleSTD,setDateOrTimeIntent, FAQ,setTimelanding,setDatelanding,FAQ, fromsession, mayoKB, orbitaKB, askAnother, afterAssessment, phonePrompt, awaitingPhone, confirmPhone, finalPhonePrompt, inChunkedAnswer, appointmentPhonePrompt,reminder,CheckUser,Reminder,sanity,SymptomTriage"
        },
        {
            "id": "slots",
            "type": "slots",
            "z": "",
            "slots": []
        }
    ]

    1. Copy the above code.

    2. Go to Experience Designer > Bot Manager Flow > Hamburger Menu > Import > Clipboard.

  2. The above import will add 4 nodes to the Bot Manager tab as shown below.

  3. Connect the nodes as described below screenshot:

    1. Add “http in” node with the “Post” Method to the “Orbita Detect” node.

    2. The first output pin of the “Route” function node should be connected to the “Bot provider v2” node.

    3. Disconnect the “http in” node with the “Post” Method and Bot Provider V2.

    4. Drag and drop a Link out node to the Bot Manager tab and name it.

    5. Connect the second output pin of the “Route” function node to the Link out node.

  4. Double click on the “Bot Provider V2” node and add the below code to the “Bot In Parser” section.

    Code Block
    var _ = global.get('lodash');
    const NAMESPACE = _.get(msg, 'orbita.session.NAMESPACE');
    let symptomValue = _.get(msg, 'orbita.session.${NAMESPACE}.symptomValue');
    if(symptomValue){
        _.set(msg, 'payload.originalRequest.data.symptomValue', 
        symptomValue);
    }
  5. Go to the “Modules” tab

    1. Add a Link In node and name it.

    2. Connect the Link In node with the input pin of symptomstriage sub-flow.

    3. This “Link In” node should be connected to the “Link Out” node which you added in the “Bot Manager” tab.
      In the “Link In” node edit window, select the Link out node you added earlier.
      Refer

  6. Now Deploy the flow and validate it.

...