Skip to content

Commit

Permalink
Merge branch 'feature/fhir-dialogue-1' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
dermatologist committed Oct 8, 2020
2 parents aa26868 + e57279a commit 0272a48
Show file tree
Hide file tree
Showing 27 changed files with 426 additions and 35 deletions.
36 changes: 36 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/FhirSearchSkillBot/bin/Debug/netcoreapp3.1/FhirSearchSkillBot.dll",
"args": [],
"cwd": "${workspaceFolder}/FhirSearchSkillBot",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
42 changes: 42 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/FhirSearchSkillBot/FhirSearchSkillBot.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/FhirSearchSkillBot/FhirSearchSkillBot.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/FhirSearchSkillBot/FhirSearchSkillBot.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
4 changes: 2 additions & 2 deletions DialogRootBot/AdapterWithErrorHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
using Microsoft.Bot.Builder.TraceExtensions;
using Microsoft.Bot.Connector.Authentication;
using Microsoft.Bot.Schema;
using Nuchange.HealthBots.SimpleRootBot.Bots;
using SimpleRootBot.Bots;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;

namespace Nuchange.HealthBots.SimpleRootBot
namespace SimpleRootBot
{
public class AdapterWithErrorHandler : BotFrameworkHttpAdapter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Threading.Tasks;
using Microsoft.Bot.Connector.Authentication;

namespace Nuchange.HealthBots.SimpleRootBot.Authentication
namespace SimpleRootBot.Authentication
{
/// <summary>
/// Sample claims validator that loads an allowed list from configuration if present
Expand Down
2 changes: 1 addition & 1 deletion DialogRootBot/Bots/RootBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;

namespace Nuchange.HealthBots.SimpleRootBot.Bots
namespace SimpleRootBot.Bots
{
public class RootBot : ActivityHandler
{
Expand Down
2 changes: 1 addition & 1 deletion DialogRootBot/Controllers/BotController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Integration.AspNet.Core;

namespace Nuchange.HealthBots.SimpleRootBot.Controllers
namespace SimpleRootBot.Controllers
{
// This ASP Controller is created to handle a request. Dependency Injection will provide the Adapter and IBot
// implementation at runtime. Multiple different IBot implementations running at different endpoints can be
Expand Down
2 changes: 1 addition & 1 deletion DialogRootBot/Controllers/SkillController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Bot.Builder.Integration.AspNet.Core;
using Microsoft.Bot.Builder.Skills;

namespace Nuchange.HealthBots.SimpleRootBot.Controllers
namespace SimpleRootBot.Controllers
{
/// <summary>
/// A controller that handles skill replies to the bot.
Expand Down
4 changes: 2 additions & 2 deletions DialogRootBot/DialogRootBot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
<AssemblyName>Nuchange.HealthBots.SimpleRootBot</AssemblyName>
<RootNamespace>Nuchange.HealthBots.SimpleRootBot</RootNamespace>
<AssemblyName>SimpleRootBot</AssemblyName>
<RootNamespace>SimpleRootBot</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion DialogRootBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace Nuchange.HealthBots.SimpleRootBot
namespace SimpleRootBot
{
public class Program
{
Expand Down
2 changes: 1 addition & 1 deletion DialogRootBot/SkillConversationIdFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Bot.Schema;
using Newtonsoft.Json;

namespace Nuchange.HealthBots.SimpleRootBot
namespace SimpleRootBot
{
/// <summary>
/// A <see cref="SkillConversationIdFactory"/> that uses an in memory <see cref="ConcurrentDictionary{TKey,TValue}"/>
Expand Down
2 changes: 1 addition & 1 deletion DialogRootBot/SkillsConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Bot.Builder.Skills;
using Microsoft.Extensions.Configuration;

namespace Nuchange.HealthBots.SimpleRootBot
namespace SimpleRootBot
{
/// <summary>
/// A helper class that loads Skills information from configuration.
Expand Down
6 changes: 3 additions & 3 deletions DialogRootBot/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
using Microsoft.Bot.Builder.Integration.AspNet.Core.Skills;
using Microsoft.Bot.Builder.Skills;
using Microsoft.Bot.Connector.Authentication;
using Nuchange.HealthBots.SimpleRootBot.Authentication;
using Nuchange.HealthBots.SimpleRootBot.Bots;
using SimpleRootBot.Authentication;
using SimpleRootBot.Bots;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

namespace Nuchange.HealthBots.SimpleRootBot
namespace SimpleRootBot
{
public class Startup
{
Expand Down
35 changes: 35 additions & 0 deletions FhirSearchSkillBot.testing/FhirSearchModelTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using Xunit;
using FhirSearchSkillBot.Models;
namespace FhirSearchSkillBot.testing
{
public class FhirSearchModelTest
{
[Fact]
public void TestModel()
{
var _fhirSearchModel = new FhirSearchModel();
// Default setting in model constructor
// _fhirSearchModel.BaseUrl = @"http://hapi.fhir.org/baseR4/";
_fhirSearchModel.Patient = "585457";
_fhirSearchModel.SearchResource = "Encounter";
_fhirSearchModel.SearchParam.Add("_date");
_fhirSearchModel.SearchQualifier.Add("=");
_fhirSearchModel.SearchValue.Add("12-03-2020");
Console.Write(_fhirSearchModel.FhirSearchString);
}

[Fact]
public void TestApi()
{
var _fhirSearchModel = new FhirSearchModel();
// _fhirSearchModel.BaseUrl = @"http://hapi.fhir.org/baseR4/";
_fhirSearchModel.Patient = "585457";
_fhirSearchModel.SearchResource = "Encounter";
_fhirSearchModel.SearchParam.Add("_date");
_fhirSearchModel.SearchQualifier.Add("=");
_fhirSearchModel.SearchValue.Add("12-03-2020");
Console.Write(_fhirSearchModel.FhirSearch);
}
}
}
20 changes: 20 additions & 0 deletions FhirSearchSkillBot.testing/FhirSearchSkillBot.testing.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="coverlet.collector" Version="1.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FhirSearchSkillBot\FhirSearchSkillBot.csproj" />
</ItemGroup>

</Project>
14 changes: 14 additions & 0 deletions FhirSearchSkillBot.testing/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using Xunit;

namespace FhirSearchSkillBot.testing
{
public class UnitTest1
{
[Fact]
public void Test1()
{

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Bot.Connector.Authentication;
using Microsoft.Extensions.Configuration;

namespace Nuchange.HealthBots.FhirSearchSkillBot.Authentication
namespace FhirSearchSkillBot.Authentication
{
/// <summary>
/// Sample claims validator that loads an allowed list from configuration if present
Expand Down
2 changes: 1 addition & 1 deletion FhirSearchSkillBot/Bots/FhirSearchBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Microsoft.Extensions.Logging;


namespace Nuchange.HealthBots.FhirSearchSkillBot.Bots
namespace FhirSearchSkillBot.Bots
{
// This IBot implementation can run any type of Dialog. The use of type parameterization is to allows multiple different bots
// to be run at different endpoints within the same project. This can be achieved by defining distinct Controller types
Expand Down
2 changes: 1 addition & 1 deletion FhirSearchSkillBot/Controllers/BotController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Integration.AspNet.Core;

namespace Nuchange.HealthBots.FhirSearchSkillBot.Controllers
namespace FhirSearchSkillBot.Controllers
{
// This ASP Controller is created to handle a request. Dependency Injection will provide the Adapter and IBot
// implementation at runtime. Multiple different IBot implementations running at different endpoints can be
Expand Down
Loading

0 comments on commit 0272a48

Please sign in to comment.