diff --git a/samples/healthcare-ai-chatbot/.gitignore b/samples/healthcare-ai-chatbot/.gitignore new file mode 100644 index 00000000..717973a5 --- /dev/null +++ b/samples/healthcare-ai-chatbot/.gitignore @@ -0,0 +1,8 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# msbuild output directories +/bin +/obj + +# MSBuild Binary and Structured Log +*.binlog diff --git a/samples/healthcare-ai-chatbot/README.md b/samples/healthcare-ai-chatbot/README.md new file mode 100644 index 00000000..f183c437 --- /dev/null +++ b/samples/healthcare-ai-chatbot/README.md @@ -0,0 +1,94 @@ +# Healthcare AI Chatbot + +## Summary + +This sample uses a Power Virtual Agents chatbot to diagnose and suggest a fitting doctor based on the user's inputted symptoms. +NOTE: "healthAlde" is a placeholder brand name for the bot & the Power Pages portal + +![picture of the sample](assets/portal-chatbot.PNG) + +## Applies to + +![Power Apps](https://img.shields.io/badge/Power%20Apps-No-red "No") +![Power Automate](https://img.shields.io/badge/Power%20Automate-Yes-green "Yes") +![Power BI](https://img.shields.io/badge/Power%20BI-No-red "No") +![Power Pages](https://img.shields.io/badge/Power%20Pages-Yes-green "Yes") +![Power Virtual Agents](https://img.shields.io/badge/Power%20Virtual%20Agents-Yes-green "Yes") +![Dataverse](https://img.shields.io/badge/Dataverse-Yes-green "Yes") + +## Compatibility + +![Premium License](https://img.shields.io/badge/Premium%20License-Required-green.svg "Premium license required") +![Experimental Features](https://img.shields.io/badge/Experimental%20Features-No-red.svg "Does not rely on experimental features") + +## Contributors +* [Miguel Espiritu](https://github.com/thepersonwho) + +## Version history + +Version|Date|Comments +-------|----|-------- +1.0.0.1|Sept. 27, 2023|Initial release + +## Prerequisites + +* A Dataverse user account with access to System Admin Security Role +* AI Builder capacity (could be trial) +* An existing Power Pages site (optional, files will be provided in the "powerpages-portalfiles" folder) + +## Data Sources + +* Dataverse + +## Minimal Path to Awesome + +* Download the **(./solution/healthcare-ai-chatbot.zip)** solution `.zip` from the `solution` folder +* Within ****, import the solution `.zip` file via **Solutions** > **Import solution** > **Browse** and select the `.zip` file you just downloaded +* Click next +* Click Import +* Go to the Chatbot and either import it your existing Power Pages site (optional), or open it on a demo website +![picture of the pa flow](assets/pva-custom-demo.PNG) + +## Features + +The PVA chatbot lets the user input their current symptoms to let the Chatbot diagnose the user via generative answers located in the of the chatbot's topic. + +![picture of the pva step](assets/pva-generativeanswers.PNG) + +After that, the chatbot displays an adaptive card asking for a specific date & time + +![picture of the pva step](assets/pva-adaptive-card.PNG) + +From there, a Power Automate flow in the same topic uses AI to check the user's symptoms for any key words/phrases, then uses that to determine which doctor is the best fit for them based on their specialization. It also checks whether the doctor wil lbe available based on the user's selected date & time on the previous step. + +![picture of the pa flow](assets/pa-flow-steps.PNG) + + +There are also 2 alternate topics in the chatbot: +* One for directly setting up a consultation with a specific doctor by specifying the requested doctor and date & time of the appointment + +![picture of the consultation pva topic](assets/pva-consultation-1.PNG) + +![picture of the consultation pva topic](assets/pva-consultation-2.PNG) + +* And another one for requesting an ambulance on demand + +![picture of the ambulance pva topic](assets/pva-ambulance-1.PNG) + +![picture of the ambulance pva topic](assets/pva-ambulance-2.PNG) + +## Help + +We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues. + +If you encounter any issues while using this sample, you can [create a new issue](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=bug-report.yml&sample=healthcare-ai-chatbot&authors=@thepersonwho&title=healthcare-ai-chatbot%20-%20). + +For questions regarding this sample, [create a new question](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=healthcare-ai-chatbot&authors=@thepersonwho&title=healthcare-ai-chatbot%20-%20). + +Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=healthcare-ai-chatbot&authors=@thepersonwho&title=healthcare-ai-chatbot%20-%20). + +## Disclaimer + +**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/assets/pa-flow-steps.PNG b/samples/healthcare-ai-chatbot/assets/pa-flow-steps.PNG new file mode 100644 index 00000000..7a09dc14 Binary files /dev/null and b/samples/healthcare-ai-chatbot/assets/pa-flow-steps.PNG differ diff --git a/samples/healthcare-ai-chatbot/assets/portal-chatbot.PNG b/samples/healthcare-ai-chatbot/assets/portal-chatbot.PNG new file mode 100644 index 00000000..dc2efdef Binary files /dev/null and b/samples/healthcare-ai-chatbot/assets/portal-chatbot.PNG differ diff --git a/samples/healthcare-ai-chatbot/assets/pva-adaptive-card.PNG b/samples/healthcare-ai-chatbot/assets/pva-adaptive-card.PNG new file mode 100644 index 00000000..25a9af5b Binary files /dev/null and b/samples/healthcare-ai-chatbot/assets/pva-adaptive-card.PNG differ diff --git a/samples/healthcare-ai-chatbot/assets/pva-ambulance-1.PNG b/samples/healthcare-ai-chatbot/assets/pva-ambulance-1.PNG new file mode 100644 index 00000000..3837b5d6 Binary files /dev/null and b/samples/healthcare-ai-chatbot/assets/pva-ambulance-1.PNG differ diff --git a/samples/healthcare-ai-chatbot/assets/pva-ambulance-2.PNG b/samples/healthcare-ai-chatbot/assets/pva-ambulance-2.PNG new file mode 100644 index 00000000..a2363029 Binary files /dev/null and b/samples/healthcare-ai-chatbot/assets/pva-ambulance-2.PNG differ diff --git a/samples/healthcare-ai-chatbot/assets/pva-consultation-1.PNG b/samples/healthcare-ai-chatbot/assets/pva-consultation-1.PNG new file mode 100644 index 00000000..1f52eb1c Binary files /dev/null and b/samples/healthcare-ai-chatbot/assets/pva-consultation-1.PNG differ diff --git a/samples/healthcare-ai-chatbot/assets/pva-consultation-2.PNG b/samples/healthcare-ai-chatbot/assets/pva-consultation-2.PNG new file mode 100644 index 00000000..0d994d7c Binary files /dev/null and b/samples/healthcare-ai-chatbot/assets/pva-consultation-2.PNG differ diff --git a/samples/healthcare-ai-chatbot/assets/pva-custom-demo.PNG b/samples/healthcare-ai-chatbot/assets/pva-custom-demo.PNG new file mode 100644 index 00000000..1de8a103 Binary files /dev/null and b/samples/healthcare-ai-chatbot/assets/pva-custom-demo.PNG differ diff --git a/samples/healthcare-ai-chatbot/assets/pva-generativeanswers.PNG b/samples/healthcare-ai-chatbot/assets/pva-generativeanswers.PNG new file mode 100644 index 00000000..587a67cc Binary files /dev/null and b/samples/healthcare-ai-chatbot/assets/pva-generativeanswers.PNG differ diff --git a/samples/healthcare-ai-chatbot/assets/sample.json b/samples/healthcare-ai-chatbot/assets/sample.json new file mode 100644 index 00000000..a213b33a --- /dev/null +++ b/samples/healthcare-ai-chatbot/assets/sample.json @@ -0,0 +1,68 @@ +[ + { + "$schema": "https://developer.microsoft.com/en-us/json-schemas/pnp/samples/v1.0/metadata-schema.json", + "name": "pnp-powerplatform-samples-healthcare-ai-chatbot", + "version": "1.0.0.0", + "source": "pnp", + "creationDateTime": "2023-09-27T00:00:00.000Z", + "updateDateTime": "2023-09-27T00:00:00.000Z", + "title": "Healthcare AI Chatbot", + "shortDescription": "This sample uses a Power Virtual Agents chatbot to diagnose and suggest a fitting doctor based on the user's inputted symptoms.", + "longDescription": [ + "This sample uses a Power Virtual Agents chatbot to diagnose and suggest a fitting doctor based on the user's inputted symptoms." + ], + "url": "https://github.com/pnp/powerplatform-samples/tree/main/samples/healthcare-ai-chatbot", + "products": [ + "Power Virtual Agents", + "Power Platform" + ], + "tags": [ + "Chatbot", + "Healthcare" + ], + "categories": [ + "POWERAPPS" + ], + "metadata": [ + { + "key": "POWERVIRTUALAGENTS-EXPERIMENTAL", + "value": "No" + }, + { + "key": "POWERVIRTUALAGENTS-PREMIUM", + "value": "Yes" + }, + { + "key": "POWERPLATFORM-CUSTOMCONNECTOR", + "value": "No" + } + ], + "thumbnails": [ + { + "type": "image", + "order": 100, + "url": "https://github.com/pnp/powerplatform-samples/blob/main/samples/healthcare-ai-chatbot/assets/portal-chatbot.png?raw=true", + "alt": "Preview" + } + ], + "authors": [ + { + "gitHubAccount": "thepersonwho", + "name": "Miguel Espiritu", + "pictureUrl": "https://github.com/thepersonwho.png" + } + ], + "references": [ + { + "name": "Power Virtual Agents overview", + "description": "Power Virtual Agents overview", + "url": "https://learn.microsoft.com/en-us/power-virtual-agents/fundamentals-what-is-power-virtual-agents" + }, + { + "name": "AI-based chatbot authoring overview", + "description": "AI-based chatbot authoring overview", + "url": "https://learn.microsoft.com/en-us/power-virtual-agents/nlu-gpt-overview" + } + ] + } +] diff --git a/samples/healthcare-ai-chatbot/solution/healthcare-ai-chatbot.zip b/samples/healthcare-ai-chatbot/solution/healthcare-ai-chatbot.zip new file mode 100644 index 00000000..151b3614 Binary files /dev/null and b/samples/healthcare-ai-chatbot/solution/healthcare-ai-chatbot.zip differ diff --git a/samples/healthcare-ai-chatbot/sourcecode/Assets/botcomponent_workflowset.xml b/samples/healthcare-ai-chatbot/sourcecode/Assets/botcomponent_workflowset.xml new file mode 100644 index 00000000..564c894a --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Assets/botcomponent_workflowset.xml @@ -0,0 +1,8 @@ + + + 1 + + + 1 + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/Entity.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/Entity.xml new file mode 100644 index 00000000..07ff95e2 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/Entity.xml @@ -0,0 +1,1113 @@ + + + cr961_doctors + + + + + + + + + + + + + + nvarchar + cr961_availability + cr961_availability + none + ValidForForm|ValidForGrid + auto + 1 + 1 + 1 + 1 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + text + 100 + 200 + + + + + + + + + primarykey + cr961_doctorsid + cr961_doctorsid + systemrequired + ValidForAdvancedFind|RequiredForGrid + auto + 0 + 1 + 1 + 0 + 0 + 0 + 1.0 + 1 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 1 + 1 + 0 + + + + + + + + + nvarchar + cr961_email + cr961_email + none + ValidForForm|ValidForGrid + auto + 1 + 1 + 1 + 1 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + email + 100 + 200 + + + + + + + + + nvarchar + cr961_name + cr961_name + none + PrimaryName|ValidForAdvancedFind|ValidForForm|ValidForGrid|RequiredForForm + auto + 1 + 1 + 1 + 1 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 1 + 0 + 1 + 0 + text + 100 + 200 + + + + + + + + + nvarchar + cr961_phonenumber + cr961_phonenumber + none + ValidForForm|ValidForGrid + auto + 1 + 1 + 1 + 1 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + phone + 100 + 200 + + + + + + + + + nvarchar + cr961_specialization + cr961_specialization + none + ValidForForm|ValidForGrid + auto + 1 + 1 + 1 + 1 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + text + 100 + 200 + + + + + + + + + lookup + createdby + createdby + none + ValidForAdvancedFind|ValidForForm|ValidForGrid + auto + 0 + 1 + 0 + 0 + 0 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + single + + + + + + + + + + datetime + createdon + createdon + none + ValidForAdvancedFind|ValidForForm|ValidForGrid + inactive + 0 + 1 + 0 + 0 + 0 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 1 + 1 + 0 + datetime + 0 + 1 + + + + + + + + + lookup + createdonbehalfby + createdonbehalfby + none + ValidForAdvancedFind|ValidForForm|ValidForGrid + auto + 0 + 1 + 0 + 0 + 0 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + single + + + + + + + + + + nvarchar + hhp_availabilityday + hhp_availabilityday + none + ValidForAdvancedFind|ValidForForm|ValidForGrid + auto + 1 + 1 + 1 + 1 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + text + 100 + 200 + + + + + + + + + nvarchar + hhp_availabilityendtime + hhp_availabilityendtime + none + ValidForAdvancedFind|ValidForForm|ValidForGrid + auto + 1 + 1 + 1 + 1 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + text + 100 + 200 + + + + + + + + + nvarchar + hhp_availabilitystarttime + hhp_availabilitystarttime + none + ValidForAdvancedFind|ValidForForm|ValidForGrid + auto + 1 + 1 + 1 + 1 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + text + 100 + 200 + + + + + + + + + int + importsequencenumber + importsequencenumber + none + ValidForAdvancedFind + disabled + 0 + 1 + 1 + 0 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + + -2147483648 + 2147483647 + + + + + + + + + lookup + modifiedby + modifiedby + none + ValidForAdvancedFind|ValidForForm|ValidForGrid + auto + 0 + 1 + 0 + 0 + 0 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + single + + + + + + + + + + datetime + modifiedon + modifiedon + none + ValidForAdvancedFind|ValidForForm|ValidForGrid + inactive + 0 + 1 + 0 + 0 + 0 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 1 + 1 + 0 + datetime + 0 + 1 + + + + + + + + + lookup + modifiedonbehalfby + modifiedonbehalfby + none + ValidForAdvancedFind|ValidForForm|ValidForGrid + auto + 0 + 1 + 0 + 0 + 0 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + single + + + + + + + + + + datetime + overriddencreatedon + overriddencreatedon + none + ValidForAdvancedFind|ValidForGrid + inactive + 0 + 1 + 1 + 0 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + date + 0 + 1 + + + + + + + + + owner + ownerid + ownerid + systemrequired + ValidForAdvancedFind|ValidForForm|ValidForGrid|RequiredForForm + auto + 1 + 1 + 1 + 0 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 1 + 0 + 0 + single + + 8 + 9 + + + + + + + + + + lookup + owningbusinessunit + owningbusinessunit + none + ValidForAdvancedFind|ValidForForm|ValidForGrid + auto + 0 + 1 + 0 + 0 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 1 + 0 + 0 + single + + + + + + + + + + lookup + owningteam + owningteam + none + auto + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + single + + + + + + + + + + lookup + owninguser + owninguser + none + auto + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + single + + + + + + + + + + state + statecode + statecode + systemrequired + ValidForAdvancedFind|ValidForForm|ValidForGrid + auto + 1 + 1 + 0 + 0 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 1 + 0 + 0 + + state + 1.0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + status + statuscode + statuscode + none + ValidForAdvancedFind|ValidForForm|ValidForGrid + auto + 1 + 1 + 1 + 0 + 1 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + + status + 1.0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + int + timezoneruleversionnumber + timezoneruleversionnumber + none + auto + 1 + 1 + 1 + 0 + 0 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + + -1 + 2147483647 + + + + + + + + + int + utcconversiontimezonecode + utcconversiontimezonecode + none + auto + 1 + 1 + 1 + 0 + 0 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 1 + 1 + 0 + + 0 + 0 + 0 + 0 + + -1 + 2147483647 + + + + + + + + + cr961_doctorses + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + UserOwned + 0 + 0 + 0 + 0 + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + 1 + 1 + 0 + 0 + 1.0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 0 + 0 + 1 + 0 + 0 + + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/card/{0f523f83-6276-48f3-aac3-47e0ea3d27b1}.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/card/{0f523f83-6276-48f3-aac3-47e0ea3d27b1}.xml new file mode 100644 index 00000000..da5497be --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/card/{0f523f83-6276-48f3-aac3-47e0ea3d27b1}.xml @@ -0,0 +1,112 @@ + + + + {0f523f83-6276-48f3-aac3-47e0ea3d27b1} + 1.0 + 1 + 1 +
+ + + + + + + +
+ + +
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ 1 + 1 + + + + + + +
+
\ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/card/{0f523f83-6276-48f3-aac3-47e0ea3d27b1}_managed.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/card/{0f523f83-6276-48f3-aac3-47e0ea3d27b1}_managed.xml new file mode 100644 index 00000000..bbea4ab4 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/card/{0f523f83-6276-48f3-aac3-47e0ea3d27b1}_managed.xml @@ -0,0 +1,112 @@ + + + + {0f523f83-6276-48f3-aac3-47e0ea3d27b1} + 1.0 + 1 + 1 +
+ + + + + + + +
+ + +
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ 1 + 1 + + + + + + +
+
\ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/main/{c64d0c12-0e95-4e1b-9b64-e6f2286d81c2}.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/main/{c64d0c12-0e95-4e1b-9b64-e6f2286d81c2}.xml new file mode 100644 index 00000000..285bdcf9 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/main/{c64d0c12-0e95-4e1b-9b64-e6f2286d81c2}.xml @@ -0,0 +1,116 @@ + + + + {c64d0c12-0e95-4e1b-9b64-e6f2286d81c2} + 1.0 + 1 + 1 +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + +
+ + + +
+ 1 + 1 + + + + + + +
+
\ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/main/{c64d0c12-0e95-4e1b-9b64-e6f2286d81c2}_managed.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/main/{c64d0c12-0e95-4e1b-9b64-e6f2286d81c2}_managed.xml new file mode 100644 index 00000000..2fcc4e3c --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/main/{c64d0c12-0e95-4e1b-9b64-e6f2286d81c2}_managed.xml @@ -0,0 +1,116 @@ + + + + {c64d0c12-0e95-4e1b-9b64-e6f2286d81c2} + 1.0 + 1 + 1 +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + +
+ + + +
+ 1 + 1 + + + + + + +
+
\ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/quick/{940812c7-f494-478a-a1b7-0f8d4cb644b9}.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/quick/{940812c7-f494-478a-a1b7-0f8d4cb644b9}.xml new file mode 100644 index 00000000..4c26f7b8 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/quick/{940812c7-f494-478a-a1b7-0f8d4cb644b9}.xml @@ -0,0 +1,52 @@ + + + + {940812c7-f494-478a-a1b7-0f8d4cb644b9} + 1.0 + 1 + 1 +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ 1 + 1 + + + +
+
\ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/quick/{940812c7-f494-478a-a1b7-0f8d4cb644b9}_managed.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/quick/{940812c7-f494-478a-a1b7-0f8d4cb644b9}_managed.xml new file mode 100644 index 00000000..e41dcf46 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/FormXml/quick/{940812c7-f494-478a-a1b7-0f8d4cb644b9}_managed.xml @@ -0,0 +1,52 @@ + + + + {940812c7-f494-478a-a1b7-0f8d4cb644b9} + 1.0 + 1 + 1 +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ 1 + 1 + + + +
+
\ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/RibbonDiff.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/RibbonDiff.xml new file mode 100644 index 00000000..6b56f485 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/RibbonDiff.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{3d5752e0-06c1-44ea-8210-eba72c4f4e6a}.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{3d5752e0-06c1-44ea-8210-eba72c4f4e6a}.xml new file mode 100644 index 00000000..e6d12e46 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{3d5752e0-06c1-44ea-8210-eba72c4f4e6a}.xml @@ -0,0 +1,37 @@ + + + + 1 + 0 + 0 + 0 + 1 + {3d5752e0-06c1-44ea-8210-eba72c4f4e6a} + + + + + + + + + 2 + + + + + + + + + + + + + + 1.0 + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{790178a7-7619-466f-b722-a38ae94f0d92}.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{790178a7-7619-466f-b722-a38ae94f0d92}.xml new file mode 100644 index 00000000..11df9bb6 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{790178a7-7619-466f-b722-a38ae94f0d92}.xml @@ -0,0 +1,37 @@ + + + + 1 + 0 + 0 + 0 + 0 + {790178a7-7619-466f-b722-a38ae94f0d92} + + + + + + + + + 0 + + + + + + + + + + + + + + 1.0 + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{8c4595f3-88e1-434a-98b0-12e78456ad49}.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{8c4595f3-88e1-434a-98b0-12e78456ad49}.xml new file mode 100644 index 00000000..83706ae5 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{8c4595f3-88e1-434a-98b0-12e78456ad49}.xml @@ -0,0 +1,34 @@ + + + + 1 + 0 + 0 + 0 + 1 + {8c4595f3-88e1-434a-98b0-12e78456ad49} + + + + + + + + + 1 + + + + + + + + + + + 1.0 + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{ae7f68c4-e2df-4015-b62d-d74cf6af1ad3}.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{ae7f68c4-e2df-4015-b62d-d74cf6af1ad3}.xml new file mode 100644 index 00000000..f28ab938 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{ae7f68c4-e2df-4015-b62d-d74cf6af1ad3}.xml @@ -0,0 +1,40 @@ + + + + 1 + 0 + 1 + 0 + 1 + {ae7f68c4-e2df-4015-b62d-d74cf6af1ad3} + + + + + + + + + 4 + + + + + + + + + + + + + + + + + 1.0 + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{e18b0a15-c97f-46f1-b990-47b9ccbb2177}.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{e18b0a15-c97f-46f1-b990-47b9ccbb2177}.xml new file mode 100644 index 00000000..9c72bff1 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{e18b0a15-c97f-46f1-b990-47b9ccbb2177}.xml @@ -0,0 +1,36 @@ + + + + 1 + 0 + 0 + 0 + 1 + {e18b0a15-c97f-46f1-b990-47b9ccbb2177} + + + + + + + + + 64 + + + + + + + + + + + + + 1.0 + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{e1eac0e9-8d21-4f32-8cbc-a9c059bd818a}.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{e1eac0e9-8d21-4f32-8cbc-a9c059bd818a}.xml new file mode 100644 index 00000000..8b4df59f --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{e1eac0e9-8d21-4f32-8cbc-a9c059bd818a}.xml @@ -0,0 +1,37 @@ + + + + 1 + 0 + 0 + 0 + 1 + {e1eac0e9-8d21-4f32-8cbc-a9c059bd818a} + + + + + + + + + 0 + + + + + + + + + + + + + + 1.0 + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{e2c3ad5c-0c59-ee11-be6e-000d3a31c0e8}.xml b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{e2c3ad5c-0c59-ee11-be6e-000d3a31c0e8}.xml new file mode 100644 index 00000000..af626b50 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Entities/cr961_doctors/SavedQueries/{e2c3ad5c-0c59-ee11-be6e-000d3a31c0e8}.xml @@ -0,0 +1,30 @@ + + + + 1 + 1 + 0 + 0 + 1 + {e2c3ad5c-0c59-ee11-be6e-000d3a31c0e8} + 8192 + + + + + + + + + + + + 1.0 + + + + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Other/Customizations.xml b/samples/healthcare-ai-chatbot/sourcecode/Other/Customizations.xml new file mode 100644 index 00000000..58f2fb16 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Other/Customizations.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + Microsoft Dataverse HackatonHealthcareSolution-a7589 + /providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps + 1 + 0 + 1 + + + + 1033 + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships.xml b/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships.xml new file mode 100644 index 00000000..8f9ee62e --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships/BusinessUnit.xml b/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships/BusinessUnit.xml new file mode 100644 index 00000000..4b6860c4 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships/BusinessUnit.xml @@ -0,0 +1,23 @@ + + + + OneToMany + 1 + 1.0 + 0 + cr961_doctors + BusinessUnit + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + OwningBusinessUnit + + + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships/Owner.xml b/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships/Owner.xml new file mode 100644 index 00000000..58271d56 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships/Owner.xml @@ -0,0 +1,23 @@ + + + + OneToMany + 1 + 1.0 + 0 + cr961_doctors + Owner + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + OwnerId + + + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships/SystemUser.xml b/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships/SystemUser.xml new file mode 100644 index 00000000..a6b26b03 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships/SystemUser.xml @@ -0,0 +1,63 @@ + + + + OneToMany + 1 + 1.0 + 0 + cr961_doctors + SystemUser + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + CreatedBy + + + + + + + + OneToMany + 1 + 1.0 + 0 + cr961_doctors + SystemUser + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + ModifiedBy + + + + + + + + OneToMany + 1 + 1.0 + 0 + cr961_doctors + SystemUser + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + OwningUser + + + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships/Team.xml b/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships/Team.xml new file mode 100644 index 00000000..f64e1c41 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Other/Relationships/Team.xml @@ -0,0 +1,23 @@ + + + + OneToMany + 1 + 1.0 + 0 + cr961_doctors + Team + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + NoCascade + OwningTeam + + + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Other/Solution.xml b/samples/healthcare-ai-chatbot/sourcecode/Other/Solution.xml new file mode 100644 index 00000000..d192f3b0 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Other/Solution.xml @@ -0,0 +1,89 @@ + + + + HealthcareHackathonAISolution + + + + + 1.0.0.1 + 2 + + HackathonHealthcarePublisher + + + + + + + + + hhp + 81504 + +
+ 1 + 1 + + + + + + + + + + + + + + + + 1 + + + + + + + + +
+
+ 2 + 1 + + + + + + + + + + + + + + + + 1 + + + + + + + + +
+
+
+ + + + + + +
+
\ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Workflows/Checkdoctorsschedule-9DA85DD8-F65B-EE11-BE6F-000D3A338C5D.json b/samples/healthcare-ai-chatbot/sourcecode/Workflows/Checkdoctorsschedule-9DA85DD8-F65B-EE11-BE6F-000D3A338C5D.json new file mode 100644 index 00000000..52631b62 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Workflows/Checkdoctorsschedule-9DA85DD8-F65B-EE11-BE6F-000D3A338C5D.json @@ -0,0 +1,203 @@ +{ + "properties": { + "connectionReferences": { + "shared_commondataserviceforapps": { + "runtimeSource": "embedded", + "connection": { + "connectionReferenceLogicalName": "hhp_sharedcommondataserviceforapps_a7589" + }, + "api": { + "name": "shared_commondataserviceforapps" + } + } + }, + "definition": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "$connections": { + "defaultValue": {}, + "type": "Object" + }, + "$authentication": { + "defaultValue": {}, + "type": "SecureObject" + } + }, + "triggers": { + "manual": { + "metadata": { + "operationMetadataId": "63239468-cefc-497a-81a2-a44d88ecaa67" + }, + "type": "Request", + "kind": "VirtualAgent", + "inputs": { + "schema": { + "type": "object", + "properties": { + "text": { + "title": "Date", + "type": "string", + "x-ms-dynamically-added": true, + "description": "Input", + "x-ms-content-hint": "TEXT" + }, + "text_1": { + "title": "Time", + "type": "string", + "x-ms-dynamically-added": true, + "description": "Please enter your input", + "x-ms-content-hint": "TEXT" + }, + "text_2": { + "title": "DoctorName", + "type": "string", + "x-ms-dynamically-added": true, + "description": "Please enter your input", + "x-ms-content-hint": "TEXT" + } + }, + "required": [ + "text_2" + ] + } + } + } + }, + "actions": { + "Return_value(s)_to_Power_Virtual_Agents": { + "runAfter": { + "Condition": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "2932e726-d249-4c65-8ba7-bbd0361c9d98" + }, + "type": "Response", + "kind": "VirtualAgent", + "inputs": { + "statusCode": 200, + "body": { + "isavailable": "@{variables('IsAvailable')}" + }, + "schema": { + "type": "object", + "properties": { + "isavailable": { + "title": "IsAvailable", + "x-ms-dynamically-added": true, + "type": "boolean" + } + } + } + } + }, + "List_rows": { + "runAfter": { + "Get_Date_Day": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "6377a572-98e3-4430-aed8-874e915fcd88" + }, + "type": "OpenApiConnection", + "inputs": { + "host": { + "connectionName": "shared_commondataserviceforapps", + "operationId": "ListRecords", + "apiId": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps" + }, + "parameters": { + "entityName": "cr961_doctorses", + "$filter": "cr961_name eq '@{triggerBody()['text_2']}' and hhp_availabilityday eq '@{outputs('Get_Date_Day')}'" + }, + "authentication": "@parameters('$authentication')" + } + }, + "Get_Date_Day": { + "runAfter": {}, + "metadata": { + "operationMetadataId": "307f38f7-66db-4060-a769-08c6cf24e000" + }, + "type": "Compose", + "inputs": "@formatDateTime(triggerBody()?['text'], 'dddd')" + }, + "Initialize_variable_2": { + "runAfter": { + "Initialize_variable": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "9415736c-6ef6-4a00-b41e-8ee382777067" + }, + "type": "InitializeVariable", + "inputs": { + "variables": [ + { + "name": "NoOfDoctors", + "type": "integer", + "value": "@length(outputs('List_rows')?['body/value'])" + } + ] + } + }, + "Condition": { + "actions": { + "Set_variable": { + "runAfter": {}, + "metadata": { + "operationMetadataId": "306c0dc9-2f49-46fa-b6cf-56b7395cfd49" + }, + "type": "SetVariable", + "inputs": { + "name": "IsAvailable", + "value": true + } + } + }, + "runAfter": { + "Initialize_variable_2": [ + "Succeeded" + ] + }, + "expression": { + "greaterOrEquals": [ + "@variables('NoOfDoctors')", + 1 + ] + }, + "metadata": { + "operationMetadataId": "7f2c4048-a3db-4f16-8980-247933e60997" + }, + "type": "If" + }, + "Initialize_variable": { + "runAfter": { + "List_rows": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "a862d4df-ab61-42c3-b3cf-b694842e4834" + }, + "type": "InitializeVariable", + "inputs": { + "variables": [ + { + "name": "IsAvailable", + "type": "boolean", + "value": false + } + ] + } + } + }, + "outputs": {} + }, + "templateName": "c9cd2c4e691a4646adc8aa592c88489b" + }, + "schemaVersion": "1.0.0.0" +} \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Workflows/Checkdoctorsschedule-9DA85DD8-F65B-EE11-BE6F-000D3A338C5D.json.data.xml b/samples/healthcare-ai-chatbot/sourcecode/Workflows/Checkdoctorsschedule-9DA85DD8-F65B-EE11-BE6F-000D3A338C5D.json.data.xml new file mode 100644 index 00000000..1fd2bf97 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Workflows/Checkdoctorsschedule-9DA85DD8-F65B-EE11-BE6F-000D3A338C5D.json.data.xml @@ -0,0 +1,29 @@ + + + /Workflows/Checkdoctorsschedule-9DA85DD8-F65B-EE11-BE6F-000D3A338C5D.json + 1 + 0 + 5 + 0 + 4 + 0 + 0 + 0 + 0 + 0 + 1 + 2 + 1 + 1 + 1.0 + 1 + 0 + 1 + none + + + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Workflows/ExtractsymptomsandsuggestDoctor-94672084-1659-EE11-BE6F-000D3A338C5D.json b/samples/healthcare-ai-chatbot/sourcecode/Workflows/ExtractsymptomsandsuggestDoctor-94672084-1659-EE11-BE6F-000D3A338C5D.json new file mode 100644 index 00000000..ab127970 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Workflows/ExtractsymptomsandsuggestDoctor-94672084-1659-EE11-BE6F-000D3A338C5D.json @@ -0,0 +1,696 @@ +{ + "properties": { + "connectionReferences": { + "shared_commondataserviceforapps": { + "runtimeSource": "embedded", + "connection": { + "connectionReferenceLogicalName": "hhp_sharedcommondataserviceforapps_a7589" + }, + "api": { + "name": "shared_commondataserviceforapps" + } + } + }, + "definition": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "$connections": { + "defaultValue": {}, + "type": "Object" + }, + "$authentication": { + "defaultValue": {}, + "type": "SecureObject" + } + }, + "triggers": { + "manual": { + "metadata": { + "operationMetadataId": "36cb8e45-cc58-4557-b5fd-be1418f677bc" + }, + "type": "Request", + "kind": "VirtualAgent", + "inputs": { + "schema": { + "type": "object", + "properties": { + "text": { + "title": "Symptoms", + "type": "string", + "x-ms-dynamically-added": true, + "description": "Please enter your input", + "x-ms-content-hint": "TEXT" + }, + "text_1": { + "title": "Date", + "type": "string", + "x-ms-dynamically-added": true, + "description": "Please enter your input", + "x-ms-content-hint": "TEXT" + }, + "text_2": { + "title": "Time", + "type": "string", + "x-ms-dynamically-added": true, + "description": "Please enter your input", + "x-ms-content-hint": "TEXT" + } + }, + "required": [ + "text" + ] + } + } + } + }, + "actions": { + "Extract_the_key_phrases_from_text": { + "runAfter": { + "Get_Selected_Date_Day": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "e2fdfabe-8385-4072-aec7-5bbb5da303a6", + "flowSystemMetadata": { + "portalOperationId": "aibuilderpredict_keyphraseextraction", + "portalOperationGroup": "aibuilder", + "portalOperationApiDisplayNameOverride": "AI Builder", + "portalOperationIconOverride": "https://content.powerapps.com/resource/makerx/static/pauto/images/designeroperations/aiBuilderNew.51dbdb6b.png", + "portalOperationBrandColorOverride": "#0A76C4", + "portalOperationApiTierOverride": "Standard" + } + }, + "type": "OpenApiConnection", + "inputs": { + "host": { + "connectionName": "shared_commondataserviceforapps", + "operationId": "aibuilderpredict_keyphraseextraction", + "apiId": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps" + }, + "parameters": { + "item/requestv2/language": "en", + "item/requestv2/text": "@triggerBody()['text']" + }, + "authentication": "@parameters('$authentication')" + } + }, + "Initialize_variable": { + "runAfter": {}, + "metadata": { + "operationMetadataId": "8c44dcbe-3301-457e-b403-95b431ca7096" + }, + "type": "InitializeVariable", + "inputs": { + "variables": [ + { + "name": "Specialization", + "type": "string" + } + ] + } + }, + "Initialize_Doctor_Name": { + "runAfter": { + "Initialize_variable": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "c041e4d2-888f-4c49-a665-21ee2a3b62e0" + }, + "type": "InitializeVariable", + "inputs": { + "variables": [ + { + "name": "DoctorName", + "type": "string" + } + ] + } + }, + "Get_Selected_Date_Day": { + "runAfter": { + "Initialize_Doctor_Name": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "287800e0-2e6e-41b4-89a6-65534031068f" + }, + "type": "Compose", + "inputs": "@formatDateTime(triggerBody()?['text_1'], 'dddd')" + }, + "Hematology": { + "foreach": "@outputs('Extract_the_key_phrases_from_text')?['body/responsev2/predictionOutput/results']", + "actions": { + "Key_phrase_contains_blood": { + "actions": { + "Set_variable_-_Hematology": { + "runAfter": {}, + "metadata": { + "operationMetadataId": "e86579b4-1c02-4aaf-a0a3-f9f495f79941" + }, + "type": "SetVariable", + "inputs": { + "name": "Specialization", + "value": "Hematology" + } + } + }, + "runAfter": {}, + "expression": { + "contains": [ + "@items('Hematology')?['phrase']", + "blood" + ] + }, + "metadata": { + "operationMetadataId": "92390cf7-db67-4691-9752-4f4c57f58057" + }, + "type": "If" + } + }, + "runAfter": { + "Extract_the_key_phrases_from_text": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "9b6250c4-1126-46e8-8ee0-65c0ef7f839f" + }, + "type": "Foreach" + }, + "Allergy_and_Immunology": { + "foreach": "@outputs('Extract_the_key_phrases_from_text')?['body/responsev2/predictionOutput/results']", + "actions": { + "Key_phrase_contains_allergy,_allergic": { + "actions": { + "Set_variable_-_Allergy_and_Immunology": { + "runAfter": {}, + "metadata": { + "operationMetadataId": "7b5d4b60-6abf-4a84-b599-5a2b36fa1a39" + }, + "type": "SetVariable", + "inputs": { + "name": "Specialization", + "value": "Allergy and Immunology" + } + } + }, + "runAfter": {}, + "expression": { + "or": [ + { + "contains": [ + "@items('Allergy_and_Immunology')?['phrase']", + "allergy" + ] + }, + { + "contains": [ + "@items('Allergy_and_Immunology')?['phrase']", + "allergic" + ] + } + ] + }, + "metadata": { + "operationMetadataId": "33a7f08e-b028-4098-9d80-3eda7bca2bc5" + }, + "type": "If" + } + }, + "runAfter": { + "Extract_the_key_phrases_from_text": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "a0bcb077-eb02-4f07-b34c-cf8ce6dc3423" + }, + "type": "Foreach" + }, + "Dermatology": { + "foreach": "@outputs('Extract_the_key_phrases_from_text')?['body/responsev2/predictionOutput/results']", + "actions": { + "Key_phrase_contains_skin,_rash,_itchy": { + "actions": { + "Set_variable_-_Dermatology": { + "runAfter": {}, + "metadata": { + "operationMetadataId": "63e47f1e-ceae-4419-9f8c-71c878b3b3fb" + }, + "type": "SetVariable", + "inputs": { + "name": "Specialization", + "value": "Dermatology" + } + } + }, + "runAfter": {}, + "expression": { + "or": [ + { + "contains": [ + "@items('Dermatology')?['phrase']", + "skin" + ] + }, + { + "contains": [ + "@items('Dermatology')?['phrase']", + "rash" + ] + }, + { + "contains": [ + "@items('Dermatology')?['phrase']", + "itchy" + ] + } + ] + }, + "metadata": { + "operationMetadataId": "8451a4e1-5651-4a2b-a9af-a334f4c2f5fd" + }, + "type": "If" + } + }, + "runAfter": { + "Extract_the_key_phrases_from_text": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "7b774f3a-786d-44c9-b3e0-181d653aca7c" + }, + "type": "Foreach" + }, + "Gastroenterology": { + "foreach": "@outputs('Extract_the_key_phrases_from_text')?['body/responsev2/predictionOutput/results']", + "actions": { + "Key_phrase_contains_food,_stomach,_intestinal": { + "actions": { + "Set_variable_-_Gastroenterology": { + "runAfter": {}, + "metadata": { + "operationMetadataId": "eccff3fd-612a-4a18-a0fa-eb4b86538531" + }, + "type": "SetVariable", + "inputs": { + "name": "Specialization", + "value": "Gastroenterology" + } + } + }, + "runAfter": {}, + "expression": { + "and": [ + { + "contains": [ + "@items('Gastroenterology')?['phrase']", + "food" + ] + }, + { + "contains": [ + "@items('Gastroenterology')?['phrase']", + "stomach" + ] + }, + { + "contains": [ + "@items('Gastroenterology')?['phrase']", + "intestinal" + ] + } + ] + }, + "metadata": { + "operationMetadataId": "32de2039-9a54-40fb-8b1e-39da92bd389c" + }, + "type": "If" + } + }, + "runAfter": { + "Extract_the_key_phrases_from_text": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "b8c47e36-d4d9-4886-9169-8e865078038a" + }, + "type": "Foreach" + }, + "Endocrinology": { + "foreach": "@outputs('Extract_the_key_phrases_from_text')?['body/responsev2/predictionOutput/results']", + "actions": { + "Key_phrase_contains_hormones": { + "actions": { + "Set_variable_-_Endocrinology": { + "runAfter": {}, + "metadata": { + "operationMetadataId": "774d365a-d6e0-4301-bc93-ec899179b514" + }, + "type": "SetVariable", + "inputs": { + "name": "Specialization", + "value": "Endocrinology" + } + } + }, + "runAfter": {}, + "expression": { + "or": [ + { + "contains": [ + "@items('Endocrinology')?['phrase']", + "hormones" + ] + }, + { + "contains": [ + "@items('Endocrinology')?['phrase']", + "hormone" + ] + } + ] + }, + "metadata": { + "operationMetadataId": "5656e480-0966-4849-b52e-c5c6a1defb4a" + }, + "type": "If" + } + }, + "runAfter": { + "Extract_the_key_phrases_from_text": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "ef0ebe3e-5c6f-4116-bc8b-4771f6841996" + }, + "type": "Foreach" + }, + "Cardiology": { + "foreach": "@outputs('Extract_the_key_phrases_from_text')?['body/responsev2/predictionOutput/results']", + "actions": { + "Key_phrase_contains_heart,_chest": { + "actions": { + "Set_variable_-_Cardiology": { + "runAfter": {}, + "metadata": { + "operationMetadataId": "76d6fb32-94a6-47f7-898a-d6d24a707d54" + }, + "type": "SetVariable", + "inputs": { + "name": "Specialization", + "value": "Cardiology" + } + } + }, + "runAfter": {}, + "expression": { + "or": [ + { + "contains": [ + "@items('Cardiology')?['phrase']", + "heart" + ] + }, + { + "contains": [ + "@items('Cardiology')?['phrase']", + "chest" + ] + } + ] + }, + "metadata": { + "operationMetadataId": "c21a37de-d0c1-4610-b251-8b84a7e0e9f4" + }, + "type": "If" + } + }, + "runAfter": { + "Extract_the_key_phrases_from_text": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "d5a2cb61-07fb-4e0b-a79d-0a5ae1cc083d" + }, + "type": "Foreach" + }, + "Infectious_Disease": { + "foreach": "@outputs('Extract_the_key_phrases_from_text')?['body/responsev2/predictionOutput/results']", + "actions": { + "Key_phrase_contains_infectious,_infection": { + "actions": { + "Set_variable_-_Infectious_Disease": { + "runAfter": {}, + "metadata": { + "operationMetadataId": "8949e4d6-bf5c-490b-beec-69dff8274307" + }, + "type": "SetVariable", + "inputs": { + "name": "Specialization", + "value": "Infectious Disease" + } + } + }, + "runAfter": {}, + "expression": { + "or": [ + { + "contains": [ + "@items('Infectious_Disease')?['phrase']", + "infectious" + ] + }, + { + "contains": [ + "@items('Infectious_Disease')?['phrase']", + "infection" + ] + } + ] + }, + "metadata": { + "operationMetadataId": "c7125983-b35b-40af-a1df-04930b24d024" + }, + "type": "If" + } + }, + "runAfter": { + "Extract_the_key_phrases_from_text": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "fe3f5cba-1154-483c-a29a-bfb74b60b254" + }, + "type": "Foreach" + }, + "Neonatology": { + "foreach": "@outputs('Extract_the_key_phrases_from_text')?['body/responsev2/predictionOutput/results']", + "actions": { + "Condition": { + "actions": { + "Set_variable_-_Neonatology": { + "runAfter": {}, + "metadata": { + "operationMetadataId": "eadcbb19-a3a1-4537-b107-a12cc2eaafc1" + }, + "type": "SetVariable", + "inputs": { + "name": "Specialization", + "value": "Neonatology" + } + } + }, + "runAfter": {}, + "expression": { + "or": [ + { + "contains": [ + "@items('Neonatology')?['phrase']", + "baby" + ] + }, + { + "contains": [ + "@items('Neonatology')?['phrase']", + "infant" + ] + } + ] + }, + "metadata": { + "operationMetadataId": "98963052-72d6-49b3-aa50-279d27b972b6" + }, + "type": "If" + } + }, + "runAfter": { + "Extract_the_key_phrases_from_text": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "a11a71d7-52b2-4f35-b6b5-443cfe1ff08c" + }, + "type": "Foreach" + }, + "No_Specilalization": { + "actions": { + "Set_variable_-_Internal_Medicine": { + "runAfter": {}, + "metadata": { + "operationMetadataId": "98fd9b2b-5308-4ab7-97f2-aa2dbc3a35ce" + }, + "type": "SetVariable", + "inputs": { + "name": "Specialization", + "value": "Internal Medicine" + } + } + }, + "runAfter": { + "Neonatology": [ + "Succeeded" + ], + "Hematology": [ + "Succeeded" + ], + "Dermatology": [ + "Succeeded" + ], + "Allergy_and_Immunology": [ + "Succeeded" + ], + "Gastroenterology": [ + "Succeeded" + ], + "Endocrinology": [ + "Succeeded" + ], + "Cardiology": [ + "Succeeded" + ], + "Infectious_Disease": [ + "Succeeded" + ] + }, + "expression": { + "equals": [ + "@variables('Specialization')", + "@null" + ] + }, + "metadata": { + "operationMetadataId": "19d70582-cf77-42b1-a682-83b400596251" + }, + "type": "If" + }, + "Scope": { + "actions": { + "List_relevant_Doctors": { + "runAfter": {}, + "metadata": { + "operationMetadataId": "55b097ac-771c-465c-b47a-7661763d8e1c" + }, + "type": "OpenApiConnection", + "inputs": { + "host": { + "connectionName": "shared_commondataserviceforapps", + "operationId": "ListRecords", + "apiId": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps" + }, + "parameters": { + "entityName": "cr961_doctorses", + "$filter": "cr961_specialization eq '@{variables('Specialization')}' and hhp_availabilityday eq '@{outputs('Get_Selected_Date_Day')}'", + "$top": 3 + }, + "authentication": "@parameters('$authentication')" + } + }, + "Apply_to_each_2": { + "foreach": "@outputs('List_relevant_Doctors')?['body/value']", + "actions": { + "Set_Doctor_Name": { + "runAfter": {}, + "metadata": { + "operationMetadataId": "f4994b55-2517-4940-9f1f-ab4ffaddef60" + }, + "type": "SetVariable", + "inputs": { + "name": "DoctorName", + "value": "@items('Apply_to_each_2')?['cr961_name']" + } + } + }, + "runAfter": { + "List_relevant_Doctors": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "5bcdbd52-be2b-4919-8d55-a2fb3913901c" + }, + "type": "Foreach" + }, + "Return_value(s)_to_Power_Virtual_Agents": { + "runAfter": { + "Apply_to_each_2": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "5c4f25ba-0609-47b7-8814-8f775e091e0c" + }, + "type": "Response", + "kind": "VirtualAgent", + "inputs": { + "statusCode": 200, + "body": { + "doctorname": "@variables('DoctorName')", + "specialization": "@variables('Specialization')" + }, + "schema": { + "type": "object", + "properties": { + "doctorname": { + "title": "DoctorName", + "x-ms-dynamically-added": true, + "type": "string" + }, + "specialization": { + "title": "Specialization", + "x-ms-dynamically-added": true, + "type": "string" + } + } + } + } + } + }, + "runAfter": { + "No_Specilalization": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "f3556ba4-7685-442f-acb9-0400176fb631" + }, + "type": "Scope" + } + }, + "outputs": {} + }, + "templateName": "c9cd2c4e691a4646adc8aa592c88489b" + }, + "schemaVersion": "1.0.0.0" +} \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/Workflows/ExtractsymptomsandsuggestDoctor-94672084-1659-EE11-BE6F-000D3A338C5D.json.data.xml b/samples/healthcare-ai-chatbot/sourcecode/Workflows/ExtractsymptomsandsuggestDoctor-94672084-1659-EE11-BE6F-000D3A338C5D.json.data.xml new file mode 100644 index 00000000..6b6f8bb7 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/Workflows/ExtractsymptomsandsuggestDoctor-94672084-1659-EE11-BE6F-000D3A338C5D.json.data.xml @@ -0,0 +1,29 @@ + + + /Workflows/ExtractsymptomsandsuggestDoctor-94672084-1659-EE11-BE6F-000D3A338C5D.json + 1 + 0 + 5 + 0 + 4 + 0 + 0 + 0 + 0 + 0 + 1 + 2 + 1 + 1 + 1.0.0.0 + 1 + 0 + 1 + none + + + + + + + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Ambulance/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Ambulance/botcomponent.xml new file mode 100644 index 00000000..3e8f2841 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Ambulance/botcomponent.xml @@ -0,0 +1,10 @@ + + 9 + 0 + Ambulance + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Ambulance/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Ambulance/data new file mode 100644 index 00000000..3ee03142 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Ambulance/data @@ -0,0 +1,49 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnRecognizedIntent + id: main + intent: + displayName: Untitled + triggerQueries: + - call an ambulance + - roadside assistance + - I need help + - send me an ambulance + - im in an accident + - send help + + actions: + - kind: Question + id: question_AdsWd5 + interruptionPolicy: + allowInterruption: true + + variable: init:Topic.Name + prompt: What is your name? + entity: PersonNamePrebuiltEntity + + - kind: Question + id: question_XPG91t + interruptionPolicy: + allowInterruption: true + + variable: init:Topic.Location + prompt: What is your current location? + entity: CityPrebuiltEntity + + - kind: Question + id: question_kb8SxB + interruptionPolicy: + allowInterruption: true + + variable: init:Topic.Phone + prompt: What's the phone number where we can reach you? + entity: PhoneNumberPrebuiltEntity + + - kind: SendActivity + id: sendActivity_kV79k8 + activity: Hang on {Topic.Name}. Help is on the way. An ambulance is enroute your location. Please remain calm and wait for the paramedics. + + - kind: SendActivity + id: sendActivity_6EipAl + activity: _Prank and fraudulent calls are punishable under the law._ \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Consultation/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Consultation/botcomponent.xml new file mode 100644 index 00000000..804fd3c6 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Consultation/botcomponent.xml @@ -0,0 +1,10 @@ + + 9 + 0 + Consultation + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Consultation/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Consultation/data new file mode 100644 index 00000000..aaec109d --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Consultation/data @@ -0,0 +1,138 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnRecognizedIntent + id: main + intent: + displayName: Untitled + triggerQueries: + - I'd like to schedule + - Consult with doctor + - Doctor's appointment + - Schedule an appointment + - book an appointment + - schedule a visit + + actions: + - kind: Question + id: question_QSFTqh + interruptionPolicy: + allowInterruption: true + + variable: init:Topic.Name + prompt: I see that you are trying to schedule an appointment. May I know your name? + entity: StringPrebuiltEntity + + - kind: Question + id: question_f8eGcG + interruptionPolicy: + allowInterruption: true + + variable: init:Topic.DoctorName + prompt: Which doctor would you like to schedule an appointment with? + entity: StringPrebuiltEntity + + - kind: SendActivity + id: sendActivity_Ynczzh + activity: When would you like to set your consultation? + + - kind: AdaptiveCardPrompt + id: YT7MKa + card: |- + { + "type": "AdaptiveCard", + "body": [ + { + "type": "TextBlock", + "text": "Set your schedule here:", + "wrap": true, + "size": "Large", + "weight": "Bolder" + }, + { + "type": "Input.Date", + "id": "dateInput", + "label": "Date" + }, + { + "type": "Input.Time", + "id": "timeInput", + "label": "Time" + }, + { + "type": "Input.ChoiceSet", + "id": "choiceOne", + "style": "expanded", + "isMultiSelect": false, + "value": "1", + "choices": [ + { + "title": "Online", + "value": "online" + }, + { + "title": "On Site", + "value": "on site" + } + ] + } + ], + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "version": "1.2", + "actions": [ + { + "type": "Action.Submit", + "title": "Submit", + "style": "positive" + } + ] + } + output: + binding: + actionSubmitId: Topic.actionSubmitId + choiceOne: Topic.choiceOne + dateInput: Topic.dateInput + timeInput: Topic.timeInput + + outputType: + properties: + actionSubmitId: String + choiceOne: String + dateInput: String + timeInput: String + + - kind: SendActivity + id: sendActivity_3Uw1Nl + activity: _Checking doctor's availability..._ + + - kind: InvokeFlowAction + id: invokeFlowAction_o65kxW + input: + binding: + text: =Topic.dateInput + text_1: =Topic.timeInput + text_2: =Topic.DoctorName + + output: + binding: + isavailable: Topic.IsAvailable + + flowId: 9da85dd8-f65b-ee11-be6f-000d3a338c5d + + - kind: ConditionGroup + id: conditionGroup_0bApRH + conditions: + - id: conditionItem_wBerIl + condition: =Topic.IsAvailable = true + actions: + - kind: SendActivity + id: sendActivity_n619VC + activity: We have scheduled your {Topic.choiceOne} appointment with Dr. {Topic.DoctorName}   . + + elseActions: + - kind: SendActivity + id: sendActivity_AnS5K5 + activity: Sorry, but there are no avaialable Doctors based on your parameters. + + - kind: GotoAction + id: fJT9j8 + actionId: question_f8eGcG \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ConversationStart/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ConversationStart/botcomponent.xml new file mode 100644 index 00000000..846dc1c2 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ConversationStart/botcomponent.xml @@ -0,0 +1,11 @@ + + 9 + This system topic triggers when the bot receives an Activity indicating the beginning of a new conversation. If do not want the bot to initiate the conversation, disable this topic. + 0 + Conversation Start + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ConversationStart/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ConversationStart/data new file mode 100644 index 00000000..fca1d397 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ConversationStart/data @@ -0,0 +1,8 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnConversationStart + id: main + actions: + - kind: SendActivity + id: sendActivity_NKduiq + activity: Hello, I’m the healthAlde Bot. How can I help? \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Diagnosis/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Diagnosis/botcomponent.xml new file mode 100644 index 00000000..a0ab692c --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Diagnosis/botcomponent.xml @@ -0,0 +1,10 @@ + + 9 + 0 + Diagnosis + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Diagnosis/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Diagnosis/data new file mode 100644 index 00000000..efb869c3 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Diagnosis/data @@ -0,0 +1,198 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnRecognizedIntent + id: main + intent: + displayName: Diagnosis + triggerQueries: + - What is wrong with me? + - What is my diagnosis? + - Do I have a diagnosis? + - What is the diagnosis? + - Can you diagnose me? + - Can you tell me what's wrong with me? + - I need a diagnosis + - I need to know my diagnosis + - Give me a diagnosis + - Help diagnose my condition + + actions: + - kind: Question + id: question_3rDr2G + interruptionPolicy: + allowInterruption: true + + variable: init:Topic.Name + prompt: I'll try my best to assist you. What's your name? + entity: PersonNamePrebuiltEntity + + - kind: Question + id: Question_ngW4wC + variable: Topic.Symptoms + prompt: I'm sorry that you are not feeling well, {Topic.Name}. Could you please describe in detail the symptoms you are currently experiencing? + entity: StringPrebuiltEntity + + - kind: SearchAndSummarizeContent + id: searchAndSummarizeContent_T39HuC + userInput: =Topic.Symptoms + publicDataSource: + kind: PublicSiteSearchDataSource + sites: + - "https://www.mayoclinic.org/" + - "https://www.healthline.com/" + - "https://www.webmd.com/" + + sharePointSearchDataSource: {} + customDataSource: {} + + - kind: SendActivity + id: sendActivity_WfocQw + activity: It's best that you consult with one of our doctors. When are you free? + + - kind: AdaptiveCardPrompt + id: jve4Fs + card: |- + { + "type": "AdaptiveCard", + "body": [ + { + "type": "TextBlock", + "text": "Set your schedule here:", + "wrap": true, + "size": "Large", + "weight": "Bolder" + }, + { + "type": "Input.Date", + "id": "dateInput", + "label": "Date" + }, + { + "type": "Input.Time", + "id": "timeInput", + "label": "Time" + }, + { + "type": "Input.ChoiceSet", + "id": "choiceOne", + "style": "expanded", + "isMultiSelect": false, + "value": "1", + "choices": [ + { + "title": "Online", + "value": "online" + }, + { + "title": "On Site", + "value": "on site" + } + ] + } + ], + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "version": "1.2", + "actions": [ + { + "type": "Action.Submit", + "title": "Submit", + "style": "positive" + } + ] + } + output: + binding: + actionSubmitId: Topic.actionSubmitId + choiceOne: Topic.choiceOne + dateInput: Topic.dateInput + timeInput: Topic.timeInput + + outputType: + properties: + actionSubmitId: String + choiceOne: String + dateInput: String + timeInput: String + + - kind: SendActivity + id: SendActivity_qd9sud + activity: Give me sometime to check for doctor's availability. + + - kind: InvokeFlowAction + id: invokeFlowAction_S7SL2i + input: + binding: + text: =Topic.Symptoms + text_1: =Topic.dateInput + text_2: =Topic.timeInput + + output: + binding: + doctorname: Topic.DoctorName + specialization: Topic.Specialization + + flowId: 94672084-1659-ee11-be6f-000d3a338c5d + + - kind: Question + id: question_uTqNMH + interruptionPolicy: + allowInterruption: true + + variable: init:Topic.Var1 + prompt: Dr. {Topic.DoctorName}-{Topic.Specialization}     is the best doctor aligned for your condition and your selected schedule. Would you like to schedule an appointment now? + entity: + kind: EmbeddedEntity + definition: + kind: ClosedListEntity + items: + - id: Yes + displayName: Yes + + - id: No + displayName: No + + - kind: ConditionGroup + id: conditionGroup_9kdhkp + conditions: + - id: conditionItem_IO9oba + condition: =Topic.Var1 = 'cr961_hackathonHealthcareBot.topic.Diagnosis.main.question_uTqNMH'.Yes + actions: + - kind: SendActivity + id: sendActivity_Bu3EvN + activity: OK, we've set your {Topic.choiceOne} appointment with Dr. {Topic.DoctorName}  . + + - kind: Question + id: question_hF2rqo + interruptionPolicy: + allowInterruption: true + + variable: init:Topic.Var2 + prompt: Is there anything else we can help you with? + entity: + kind: EmbeddedEntity + definition: + kind: ClosedListEntity + items: + - id: Yes + displayName: Yes + + - id: No + displayName: No + + displayName: EmbeddedEntity-dOG6Hk + + - kind: ConditionGroup + id: conditionGroup_UfQyVH + conditions: + - id: conditionItem_Gbnhe3 + condition: =Topic.Var2 = 'cr961_hackathonHealthcareBot.topic.Diagnosis.main.question_hF2rqo'.Yes + actions: + - kind: EndDialog + id: pcDoM2 + + - id: conditionItem_Zg0DOd + condition: =Topic.Var1 = 'cr961_hackathonHealthcareBot.topic.Diagnosis.main.question_uTqNMH'.No + + - kind: BeginDialog + id: iuaN7r + dialog: cr961_hackathonHealthcareBot.topic.Goodbye \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.EndofConversation/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.EndofConversation/botcomponent.xml new file mode 100644 index 00000000..a887df12 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.EndofConversation/botcomponent.xml @@ -0,0 +1,12 @@ + + 9 + This system topic is only triggered by a redirect action, +and guides the user through rating their conversation with the bot. + 0 + End of Conversation + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.EndofConversation/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.EndofConversation/data new file mode 100644 index 00000000..5119ace1 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.EndofConversation/data @@ -0,0 +1,75 @@ +kind: AdaptiveDialog +startBehavior: CancelOtherTopics +beginDialog: + kind: OnSystemRedirect + id: main + actions: + - kind: Question + id: 41d42054-d4cb-4e90-b922-2b16b37fe379 + conversationOutcome: ResolvedImplied + alwaysPrompt: true + variable: init:Topic.SurveyResponse + prompt: Did that answer your question? + entity: BooleanPrebuiltEntity + + - kind: ConditionGroup + id: condition-0 + conditions: + - id: condition-0-item-0 + condition: =Topic.SurveyResponse = true + actions: + - kind: CSATQuestion + id: csat_1 + conversationOutcome: ResolvedConfirmed + + - kind: SendActivity + id: sendMessage_8r29O0 + activity: Thanks for your feedback. + + - kind: Question + id: question_1 + alwaysPrompt: true + variable: init:Topic.Continue + prompt: Can I help with anything else? + entity: BooleanPrebuiltEntity + + - kind: ConditionGroup + id: condition-1 + conditions: + - id: condition-1-item-0 + condition: =Topic.Continue = true + actions: + - kind: SendActivity + id: sendMessage_4eOE6h + activity: Go ahead. I'm listening. + + elseActions: + - kind: SendActivity + id: yHBz55 + activity: Ok, goodbye. + + - kind: EndConversation + id: jh1GMT + + elseActions: + - kind: Question + id: PM68ot + alwaysPrompt: true + variable: init:Topic.TryAgain + prompt: Sorry I wasn't able to help better. Would you like to try again? + entity: BooleanPrebuiltEntity + + - kind: ConditionGroup + id: KNxYBf + conditions: + - id: DPveFP + condition: =Topic.TryAgain = false + actions: + - kind: BeginDialog + id: cngqi4 + dialog: cr961_hackathonHealthcareBot.topic.Escalate + + elseActions: + - kind: SendActivity + id: GrVHEW + activity: Go ahead. I'm listening. \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Escalate/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Escalate/botcomponent.xml new file mode 100644 index 00000000..b25a825d --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Escalate/botcomponent.xml @@ -0,0 +1,13 @@ + + 9 + This system topic is triggered when the user indicates they would like to speak to a human agent. +You can configure how the bot will handle human hand-off scenarios in the bot settings. +If your bot does not handle escalations, this topic should be disabled. + 0 + Escalate + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Escalate/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Escalate/data new file mode 100644 index 00000000..eed0bb6b --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Escalate/data @@ -0,0 +1,60 @@ +kind: AdaptiveDialog +startBehavior: CancelOtherTopics +beginDialog: + kind: OnEscalate + id: main + intent: + displayName: Escalate + includeInOnSelectIntent: false + triggerQueries: + - Talk to agent + - Talk to a person + - Talk to someone + - Call back + - Call customer service + - Call me please + - Call support + - Call technical support + - Can an agent call me + - Can I call + - Can I get in touch with someone else + - Can I get real agent support + - Can I get transferred to a person to call + - Can I have a call in number Or can I be called + - Can I have a representative call me + - Can I schedule a call + - Can I speak to a representative + - Can I talk to a human + - Can I talk to a human assistant + - Can someone call me + - Chat with a human + - Chat with a representative + - Chat with agent + - Chat with someone please + - Connect me to a live agent + - Connect me to a person + - Could some one contact me by phone + - Customer agent + - Customer representative + - Customer service + - I need a manager to contact me + - I need customer service + - I need help from a person + - I need to speak with a live argent + - I need to talk to a specialist please + - I want to talk to customer service + - I want to proceed with live support + - I want to speak with a consultant + - I want to speak with a live tech + - I would like to speak with an associate + - I would like to talk to a technician + - Talk with tech support member + + actions: + - kind: SendActivity + id: sendMessage_s39DCt + conversationOutcome: Escalated + activity: |- + Escalating to a live agent is not currently configured for this bot, however this is where the bot could provide information about how to get in touch with someone another way. + + Is there anything else I can help you with? \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Fallback/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Fallback/botcomponent.xml new file mode 100644 index 00000000..d6379779 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Fallback/botcomponent.xml @@ -0,0 +1,11 @@ + + 9 + This system topic triggers when the user's utterance does not match any existing topics. + 0 + Fallback + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Fallback/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Fallback/data new file mode 100644 index 00000000..4fc035de --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Fallback/data @@ -0,0 +1,19 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnUnknownIntent + id: main + actions: + - kind: ConditionGroup + id: conditionGroup_LktzXw + conditions: + - id: conditionItem_tlGIVo + condition: =System.FallbackCount < 3 + actions: + - kind: SendActivity + id: sendMessage_QZreqo + activity: I'm sorry, I'm not sure how to help with that. Can you try rephrasing? + + elseActions: + - kind: BeginDialog + id: 5aXj5M + dialog: cr961_hackathonHealthcareBot.topic.Escalate \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Goodbye/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Goodbye/botcomponent.xml new file mode 100644 index 00000000..44d85ab6 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Goodbye/botcomponent.xml @@ -0,0 +1,11 @@ + + 9 + This topic triggers when the user says goodbye. By default, it does not end the conversation. If you would like to end the conversation when the user says goodbye, you can add an "End of Conversation" action to this topic, or redirect to the "End of Conversation" system topic. + 0 + Goodbye + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Goodbye/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Goodbye/data new file mode 100644 index 00000000..7c307b57 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Goodbye/data @@ -0,0 +1,39 @@ +kind: AdaptiveDialog +startBehavior: CancelOtherTopics +beginDialog: + kind: OnRecognizedIntent + id: main + intent: + displayName: Goodbye + includeInOnSelectIntent: false + triggerQueries: + - Bye + - Bye for now + - Bye now + - Good bye + - No thank you. Goodbye. + - See you later + + actions: + - kind: Question + id: question_zf2HhP + variable: Topic.EndConversation + prompt: Would you like to end our conversation? + entity: BooleanPrebuiltEntity + + - kind: ConditionGroup + id: condition_DGc1Wy + conditions: + - id: condition_DGc1Wy-item-0 + condition: =Topic.EndConversation = true + actions: + - kind: BeginDialog + id: dn94DC + dialog: cr961_hackathonHealthcareBot.topic.EndofConversation + + - id: condition_DGc1Wy-item-1 + condition: =Topic.EndConversation = false + actions: + - kind: SendActivity + id: sendMessage_LdLhmf + activity: Go ahead. I'm listening. \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Greeting/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Greeting/botcomponent.xml new file mode 100644 index 00000000..a1128426 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Greeting/botcomponent.xml @@ -0,0 +1,11 @@ + + 9 + This topic is triggered when the user greets the bot. + 0 + Greeting + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Greeting/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Greeting/data new file mode 100644 index 00000000..c4c2099a --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Greeting/data @@ -0,0 +1,25 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnRecognizedIntent + id: main + intent: + displayName: Greeting + includeInOnSelectIntent: false + triggerQueries: + - Good afternoon + - Good morning + - Hello + - Hey + - Hi + + actions: + - kind: SendActivity + id: sendMessage_abmysR + activity: + text: + - Hello, how can I help you today? + speak: + - Hello, how can I help? + + - kind: CancelAllDialogs + id: cancelAllDialogs_01At22 \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson1/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson1/botcomponent.xml new file mode 100644 index 00000000..91123030 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson1/botcomponent.xml @@ -0,0 +1,10 @@ + + 9 + 0 + Lesson 1 - A simple topic + + cr961_hackathonHealthcareBot + + 1 + 2 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson1/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson1/data new file mode 100644 index 00000000..27955122 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson1/data @@ -0,0 +1,32 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnRecognizedIntent + id: main + intent: + displayName: Lesson 1 - A simple topic + triggerQueries: + - When are you closed + - When are you open + - Store hours + - Daily open hours + + actions: + - kind: SendActivity + id: Ystyaa + activity: I'm happy to help with store hours. + + - kind: SendActivity + id: 6Jn5pw + activity: |- + The Redmond hours are: + - Mon-Fri: 9am to 6pm + - Sat: 10am to 4pm + - Sun: Closed + + The Seattle hours are: + - Mon-Fri: 9am to 6pm + - Sat-Sun: 10am to 4pm + + - kind: BeginDialog + id: Dj0B0N + dialog: cr961_hackathonHealthcareBot.topic.EndofConversation \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson2/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson2/botcomponent.xml new file mode 100644 index 00000000..4df9c82c --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson2/botcomponent.xml @@ -0,0 +1,10 @@ + + 9 + 0 + Lesson 2 - A simple topic with a condition and variable + + cr961_hackathonHealthcareBot + + 1 + 2 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson2/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson2/data new file mode 100644 index 00000000..83cfa4a4 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson2/data @@ -0,0 +1,65 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnRecognizedIntent + id: main + intent: + displayName: Lesson 2 - A simple topic with a condition and variable + triggerQueries: + - Find my nearest store + - Check store location + - Find a store + - Find me your nearest location + - Store near me + + actions: + - kind: SendActivity + id: qvduia + activity: I'd be glad to help find a store near you. + + - kind: Question + id: LbWwpD + alwaysPrompt: true + variable: init:Topic.StoreLocation + prompt: Which location are you interested in? + entity: + kind: EmbeddedEntity + definition: + kind: ClosedListEntity + smartMatchingEnabled: true + items: + - id: Redmond + displayName: Redmond + + - id: Seattle + displayName: Seattle + + - id: Kirkland + displayName: Kirkland + + - kind: ConditionGroup + id: HE6JRU + conditions: + - id: 6G9Hhn + condition: =Topic.StoreLocation = 'cr961_hackathonHealthcareBot.topic.Lesson2.main.LbWwpD'.'Redmond' + actions: + - kind: SendActivity + id: khIIPE + activity: "Check out the Company Store at our Visitor Center. The address is: 4567 Main St., Redmond, 26132." + + - id: dqf7pu + condition: =Topic.StoreLocation = 'cr961_hackathonHealthcareBot.topic.Lesson2.main.LbWwpD'.'Seattle' + actions: + - kind: SendActivity + id: X7eulp + activity: "Our {Topic.StoreLocation} store is located in the U District in the University Village. The address is: 1234 E. University Village St., Seattle, 34567." + + - id: 1QMrFE + condition: =Topic.StoreLocation = 'cr961_hackathonHealthcareBot.topic.Lesson2.main.LbWwpD'.'Kirkland' + actions: + - kind: SendActivity + id: jtQo0O + activity: "Our {Topic.StoreLocation} is located in downtown Kirkland. The address is: 1234 Central Way, Kirkland, 98321." + + - kind: BeginDialog + id: mJXqqY + dialog: cr961_hackathonHealthcareBot.topic.EndofConversation \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson3/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson3/botcomponent.xml new file mode 100644 index 00000000..029bca27 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson3/botcomponent.xml @@ -0,0 +1,10 @@ + + 9 + 0 + Lesson 3 - A topic with a condition, variables and a pre-built entity + + cr961_hackathonHealthcareBot + + 1 + 2 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson3/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson3/data new file mode 100644 index 00000000..5e453bf1 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Lesson3/data @@ -0,0 +1,116 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnRecognizedIntent + id: main + intent: + displayName: Lesson 3 - A topic with a condition, variables and a pre-built entity + triggerQueries: + - Buy items + - Buy online + - Buy product + - Purchase item + - Order product + + actions: + - kind: SendActivity + id: Sjghab + activity: I am happy to help you place your order. + + - kind: Question + id: eRH3BJ + alwaysPrompt: false + variable: init:Topic.State + prompt: To what state will you be shipping? + entity: StatePrebuiltEntity + + - kind: ConditionGroup + id: sEzulE + conditions: + - id: pbR5LO + condition: =Topic.State = "California" || Topic.State = "Washington" || Topic.State = "Oregon" + + elseActions: + - kind: SendActivity + id: X7BFUC + activity: There will be an additional shipping charge of $27.50. + + - kind: Question + id: 6lyBi8 + alwaysPrompt: false + variable: init:Topic.ShippingRateAccepted + prompt: Is that acceptable? + entity: BooleanPrebuiltEntity + + - kind: ConditionGroup + id: 9BR57P + conditions: + - id: BW47C4 + condition: =Topic.ShippingRateAccepted = true + + elseActions: + - kind: SendActivity + id: LMwySU + activity: Thank you and please come again. + + - kind: BeginDialog + id: 26GAbP + dialog: cr961_hackathonHealthcareBot.topic.EndofConversation + + - kind: Question + id: mgz1sJ + alwaysPrompt: true + variable: init:Topic.Item + prompt: What item are you interested in purchasing? We are focused on a few quality items. + entity: + kind: EmbeddedEntity + definition: + kind: ClosedListEntity + smartMatchingEnabled: true + items: + - id: Desktop Computer + displayName: Desktop Computer + + - id: Laptop Computer + displayName: Laptop Computer + + - id: Gaming Computer + displayName: Gaming Computer + + - kind: ConditionGroup + id: 0qsIib + conditions: + - id: 1WP5jv + condition: =Topic.Item = 'cr961_hackathonHealthcareBot.topic.Lesson3.main.mgz1sJ'.'Desktop Computer' + actions: + - kind: SendActivity + id: PjNoWL + activity: Great choice for the desktop publisher! + + - id: qI8gc3 + condition: =Topic.Item = 'cr961_hackathonHealthcareBot.topic.Lesson3.main.mgz1sJ'.'Laptop Computer' + actions: + - kind: SendActivity + id: vj6Vbx + activity: Great choice for the on-the-go road warrior! + + - id: d7d1mq + condition: =Topic.Item = 'cr961_hackathonHealthcareBot.topic.Lesson3.main.mgz1sJ'.'Gaming Computer' + actions: + - kind: SendActivity + id: 25VVXi + activity: Go get 'em tiger! Sudoku helps keep the mind active. + + - kind: SendActivity + id: L3bEHg + activity: I am adding {Topic.Item} to your cart. + + - kind: SendActivity + id: 529q62 + activity: |- + To complete your order, please go to your cart. + + Thank you! + + - kind: BeginDialog + id: wn9EyA + dialog: cr961_hackathonHealthcareBot.topic.EndofConversation \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.MultipleTopicsMatched/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.MultipleTopicsMatched/botcomponent.xml new file mode 100644 index 00000000..83ef0ee4 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.MultipleTopicsMatched/botcomponent.xml @@ -0,0 +1,11 @@ + + 9 + This system topic triggers when the bot matches multiple Topics with the incoming message and needs to clarify which one should be triggered. + 0 + Multiple Topics Matched + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.MultipleTopicsMatched/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.MultipleTopicsMatched/data new file mode 100644 index 00000000..7f7d3396 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.MultipleTopicsMatched/data @@ -0,0 +1,37 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnSelectIntent + id: main + actions: + - kind: SetVariable + id: setVariable_M6434i + variable: init:Topic.IntentOptions + value: =System.Recognizer.IntentOptions + + - kind: EditTable + id: sendMessage_g5Ls09 + changeType: Add + itemsVariable: Topic.IntentOptions + value: "={ DisplayName: \"None of these\", TopicId: \"NoTopic\", TriggerId: \"NoTrigger\", Score: 1.0 }" + + - kind: Question + id: question_zf2HhP + interruptionPolicy: + allowInterruption: false + + alwaysPrompt: true + variable: System.Recognizer.SelectedIntent + prompt: "To clarify, did you mean:" + entity: + kind: DynamicClosedListEntity + items: =Topic.IntentOptions + + - kind: ConditionGroup + id: conditionGroup_60PuXb + conditions: + - id: conditionItem_rs7GgM + condition: =System.Recognizer.SelectedIntent.TopicId = "NoTopic" + actions: + - kind: ReplaceDialog + id: YZXRDb + dialog: cr961_hackathonHealthcareBot.topic.Fallback \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.OnError/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.OnError/botcomponent.xml new file mode 100644 index 00000000..d4a80d96 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.OnError/botcomponent.xml @@ -0,0 +1,11 @@ + + 9 + This system topic triggers when the bot encounters an error. When using the test chat pane, the full error description is displayed. + 0 + On Error + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.OnError/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.OnError/data new file mode 100644 index 00000000..a5c01c31 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.OnError/data @@ -0,0 +1,44 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnError + id: main + actions: + - kind: SetVariable + id: setVariable_timestamp + variable: init:Topic.CurrentTime + value: =Text(Now(), DateTimeFormat.UTC) + + - kind: ConditionGroup + id: condition_1 + conditions: + - id: bL4wmY + condition: =System.Conversation.InTestMode = true + actions: + - kind: SendActivity + id: sendMessage_XJBYMo + activity: |- + Error Message: {System.Error.Message} + Error Code: {System.Error.Code} + Conversation Id: {System.Conversation.Id} + Time (UTC): {Topic.CurrentTime} + + elseActions: + - kind: SendActivity + id: sendMessage_dZ0gaF + activity: + text: + - |- + An error has occurred. + Error code: {System.Error.Code} + Conversation Id: {System.Conversation.Id} + Time (UTC): {Topic.CurrentTime}. + speak: + - An error has occurred, please try again. + + - kind: LogCustomTelemetryEvent + id: 9KwEAn + eventName: OnErrorLog + properties: "={ErrorMessage: System.Error.Message, ErrorCode: System.Error.Code, TimeUTC: Topic.CurrentTime, ConversationId: System.Conversation.Id}" + + - kind: CancelAllDialogs + id: NW7NyY \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ResetConversation/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ResetConversation/botcomponent.xml new file mode 100644 index 00000000..e5988c0d --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ResetConversation/botcomponent.xml @@ -0,0 +1,10 @@ + + 9 + 0 + Reset Conversation + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ResetConversation/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ResetConversation/data new file mode 100644 index 00000000..452405bf --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ResetConversation/data @@ -0,0 +1,16 @@ +kind: AdaptiveDialog +startBehavior: UseLatestPublishedContentAndCancelOtherTopics +beginDialog: + kind: OnSystemRedirect + id: main + actions: + - kind: SendActivity + id: sendMessage_OPsT1O + activity: What can I help you with? + + - kind: ClearAllVariables + id: clearAllVariables_73bTFR + variables: ConversationScopedVariables + + - kind: CancelAllDialogs + id: cancelAllDialogs_12Gt21 \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Search/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Search/botcomponent.xml new file mode 100644 index 00000000..d59bf42e --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Search/botcomponent.xml @@ -0,0 +1,11 @@ + + 9 + Create generative answers from data sources. + 0 + Conversational boosting + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Search/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Search/data new file mode 100644 index 00000000..f034f9f1 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Search/data @@ -0,0 +1,26 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnUnknownIntent + id: main + priority: -1 + actions: + - kind: SearchAndSummarizeContent + id: search-content + userInput: =System.Activity.Text + variable: Topic.Answer + publicDataSource: + kind: PublicSiteSearchDataSource + sites: + - "https://www.mayoclinic.org/" + - "https://www.healthline.com/" + - "https://www.webmd.com/" + + - kind: ConditionGroup + id: has-answer-conditions + conditions: + - id: has-answer + condition: =!IsBlank(Topic.Answer) + actions: + - kind: EndDialog + id: end-topic + clearTopicQueue: true \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Signin/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Signin/botcomponent.xml new file mode 100644 index 00000000..c646bf40 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Signin/botcomponent.xml @@ -0,0 +1,11 @@ + + 9 + This system topic triggers when the bot needs to sign in the user or require the user to sign in + 0 + Sign in + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Signin/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Signin/data new file mode 100644 index 00000000..7fead1c9 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.Signin/data @@ -0,0 +1,19 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnSignIn + id: main + actions: + - kind: ConditionGroup + id: conditionGroup_ypjGKL + conditions: + - id: conditionItem_7XYIIR + condition: =System.SignInReason = SignInReason.SignInRequired + actions: + - kind: SendActivity + id: sendMessage_1jHUNO + activity: Hello! To be able to help you, I'll need you to sign in. + + - kind: OAuthInput + id: gOjhZA + title: Login + text: To continue, please login \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.StartOver/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.StartOver/botcomponent.xml new file mode 100644 index 00000000..8d75b032 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.StartOver/botcomponent.xml @@ -0,0 +1,10 @@ + + 9 + 0 + Start Over + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.StartOver/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.StartOver/data new file mode 100644 index 00000000..d342e4d0 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.StartOver/data @@ -0,0 +1,35 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnRecognizedIntent + id: main + intent: + displayName: Start Over + includeInOnSelectIntent: false + triggerQueries: + - let's begin again + - start over + - start again + - restart + + actions: + - kind: Question + id: question_zguoVV + alwaysPrompt: false + variable: init:Topic.Confirm + prompt: Are you sure you want to restart the conversation? + entity: BooleanPrebuiltEntity + + - kind: ConditionGroup + id: conditionGroup_lvx2zV + conditions: + - id: conditionItem_sVQtHa + condition: =Topic.Confirm = true + actions: + - kind: BeginDialog + id: 0YKYsy + dialog: cr961_hackathonHealthcareBot.topic.ResetConversation + + elseActions: + - kind: SendActivity + id: sendMessage_lk2CyQ + activity: Ok. Let's carry on. \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ThankYou/botcomponent.xml b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ThankYou/botcomponent.xml new file mode 100644 index 00000000..c546e5f8 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ThankYou/botcomponent.xml @@ -0,0 +1,11 @@ + + 9 + This topic triggers when the user says thank you. + 0 + Thank you + + cr961_hackathonHealthcareBot + + 0 + 1 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ThankYou/data b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ThankYou/data new file mode 100644 index 00000000..2363ef95 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/botcomponents/cr961_hackathonHealthcareBot.topic.ThankYou/data @@ -0,0 +1,17 @@ +kind: AdaptiveDialog +beginDialog: + kind: OnRecognizedIntent + id: main + intent: + displayName: Thank you + includeInOnSelectIntent: false + triggerQueries: + - thanks + - thank you + - thanks so much + - ty + + actions: + - kind: SendActivity + id: sendMessage_9iz6v7 + activity: You're welcome. \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/bots/cr961_hackathonHealthcareBot/bot.xml b/samples/healthcare-ai-chatbot/sourcecode/bots/cr961_hackathonHealthcareBot/bot.xml new file mode 100644 index 00000000..9f8ad570 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/bots/cr961_hackathonHealthcareBot/bot.xml @@ -0,0 +1,31 @@ + + 1 + 0 + iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAR9SURBVHgB7Zs/SBtRHMd/aSvVwYLSDuqmghEd/YOik38GB8FJiqKrg4uogwWlk9ns4iB0UnDQoQEHB7U4xEnjIBh00UFIBCkKZohb2+/BXV8ul5zJ797lKL+PBC53uYf3ye/93nu/u4QWWhZ+k1Ayb0hgIQKZiEAmIpCJCGQiApmIQCYikIkIZCICmYhAJiKQiQhkIgKZiEAmIpCJCGQiApmIQCYikIkIZCICmbwjTdQ01FDHWIfjscujS7q/vndrgvqn+6myujJn/1PyieLROAUBbQJntmaotqHW8djw7DCtdK5QJp3Jez7kjy6N5j2OL+hw/ZDKjbYunE+eSdWHKtb5EBgEtEWgCrqsGm3n0XN6TD4WPCe2FTPOqQvXWfsawg1U31pPQcIXgXuRPSNvFUPmOUOxzVjWvqHZocAJlFGYiQhkIgKZiEAmIpCJCGQiApmIQCa+TKTLAYoQ5nKx2El8Mfx3ArFSQRGiqavJ2odl483pjVF88Fqmti6s/qNeLfzVdpxEoIIzF53LkgdQmOgc6zQqRF4XIbQJTF4nrW37BZWK2k7qKpV1DGLGI+NZ+17SL1nvIRISq6oLV4KKQZvA29Nba9sLgWhDLXGp7QNVHqJzY2qDljuXaTG8aBQzTNBG33QfeYU2gWrFGBffNtBGHNSLtpfHEH3qlwR5yHkmqOqoxdf2gXbyCm0CUY5SJSJCSs0/KO2rF41aoYoamejaTrXGs+iZte1lSUzrPBBdx4wUTClKSeL20j6+FHv3fQ1uFfBS0SoQUbi7tGu9N5N4vptNKpjHjX4ZzcltTvdB1IhDdDV2NeZ8Ro1g+wDE4W3vx96vpJGH2wcK/f0zcxQioX2w3XqPCFVHS1w8BE9+m8zKa+bA4NQ9cb46yGA7dZ0yzsEX0fO5h0bmR6zP76/tG8e9IOTXrzWRx1CSzzeFgMh8xxAxm7ObBe+jQBqi2w1IXR1YJa/QHoEmdxd3dLF/YUSgUxKveF+Rsw+Rdfz9mLbntwveAgUQgxeiu9BnEMVubRVDqBy/FzbmYlN91NTdRPXhbJmQlrxKUuJnguI/4kVfLNpGpKt5Fm1iKoOXl/JAqNw/uFa7HrpoZCBCXoA2zRy6s7Sj7UkGKWcxKbtAr7uU35Rf4PM/gchfXi301Qm721MQHMouECOjGoV1rXXEBfLU5d39lfuTYKUSiByYOEpY23hyiwvmnCYoKuhME4EQaK/cOC3FXguiT6386H6OMBACESVq+Qnr31JzIc41u68fD2IGZhpjL3oWW7nBmhfy1PXzwfoB6ca3pZwb6V9pY8XQ0t9ivK/+VE1tg23GPreFP7r8xNoEhfvD1j7IO9k6Id2UfSViB4MIlmIqmIZABpZ45s0kRFxzd7OR7+y3DNBtsfrwg8AJBG6Vm0Ig8vx8djqQAoFTUaAQ5n1fdTDyg8AKNIFI5EJ0VWybAwu6Mro2yvv2UdxPAi8w6Eg1hokIZCICmYhAJiKQiQhkIgKZiEAmIpCJCGQiApmIQCYikIkIZCICmYhAJn8AQ2m8vaoIeaMAAAAASUVORK5CYII= + 0 + 1033 + healthAlde Bot + 0 + { + "contentVersion": 2, + "lastFinishedPublishOperation": { + "userId": "0544f2ab-5621-4b34-b93f-df84627e4c27", + "operationStart": "2023-09-27T07:51:43.1408373Z", + "operationEnd": "2023-09-27T07:51:47.431219Z", + "status": "Succeeded" + }, + "lastPublishedUserId": "0544f2ab-5621-4b34-b93f-df84627e4c27", + "lastPublishedOnUtc": "2023-09-27T07:51:46Z", + "currentSynchronizationState": { + "botRegistration": { + "applicationId": "bf1118b8-2645-4942-8d8c-55eb3423c877", + "isAppAvailableInTenant": true + }, + "provisioningStatus": "Provisioned", + "state": "Synchronized" + }, + "lastSynchronizedOnUtc": "2023-09-27T07:52:02.1885585Z" +} + + 4 + \ No newline at end of file diff --git a/samples/healthcare-ai-chatbot/sourcecode/bots/cr961_hackathonHealthcareBot/configuration.json b/samples/healthcare-ai-chatbot/sourcecode/bots/cr961_hackathonHealthcareBot/configuration.json new file mode 100644 index 00000000..9e47fec1 --- /dev/null +++ b/samples/healthcare-ai-chatbot/sourcecode/bots/cr961_hackathonHealthcareBot/configuration.json @@ -0,0 +1,3 @@ +{ + "$kind": "BotConfiguration" +} \ No newline at end of file