Skip to content

Commit

Permalink
Add R4 API layer (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonpollett authored May 29, 2019
1 parent 0fb9f80 commit 2918cd4
Show file tree
Hide file tree
Showing 104 changed files with 9,080 additions and 40 deletions.
39 changes: 36 additions & 3 deletions Microsoft.Health.Fhir.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{BA0D5243-C
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Health.Fhir.Api", "src\Microsoft.Health.Fhir.Api\Microsoft.Health.Fhir.Api.csproj", "{253029D6-94ED-4F49-9866-1844F263EEBE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Health.Fhir.Api.UnitTests", "src\Microsoft.Health.Fhir.Api.UnitTests\Microsoft.Health.Fhir.Api.UnitTests.csproj", "{F0639CA9-BFD6-46FF-8454-BD8A1965B31A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Health.Fhir.R4.Api.UnitTests", "src\Microsoft.Health.Fhir.Api.UnitTests\Microsoft.Health.Fhir.R4.Api.UnitTests.csproj", "{F0639CA9-BFD6-46FF-8454-BD8A1965B31A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Health.Fhir.Core", "src\Microsoft.Health.Fhir.Core\Microsoft.Health.Fhir.Core.csproj", "{26D87357-393E-4D1E-B98C-2B38726F184D}"
EndProject
Expand Down Expand Up @@ -94,11 +94,26 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Health.Fhir.Stu3.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Health.Fhir.Stu3.Api", "src\Microsoft.Health.Fhir.Stu3.Api\Microsoft.Health.Fhir.Stu3.Api.csproj", "{85428D07-39A0-473F-B3BD-0F2C98A1A5F5}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.Health.Fhir.Shared.Api", "src\Microsoft.Health.Fhir.Shared.Api\Microsoft.Health.Fhir.Shared.Api.shproj", "{4B4ABB04-42BA-461C-A202-E480A2AE538E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Health.Fhir.R4.Api", "src\Microsoft.Health.Fhir.R4.Api\Microsoft.Health.Fhir.R4.Api.csproj", "{D3D42FB0-72D6-4A67-AC58-9CA1274DBFE1}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.Health.Fhir.Shared.Api.UnitTests", "src\Microsoft.Health.Fhir.Shared.Api.UnitTests\Microsoft.Health.Fhir.Shared.Api.UnitTests.shproj", "{FCBAD356-8AF3-41B0-B578-EAAEF6A5D365}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Health.Fhir.Stu3.Api.UnitTests", "src\Microsoft.Health.Fhir.Stu3.Api.UnitTests\Microsoft.Health.Fhir.Stu3.Api.UnitTests.csproj", "{734CAC7F-D979-4639-8067-A0875C0691F2}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.Health.Fhir.Shared.Web", "src\Microsoft.Health.Fhir.Shared.Web\Microsoft.Health.Fhir.Shared.Web.shproj", "{934CA8BB-B0A7-4187-BF4D-C937FBBA1777}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Health.Fhir.R4.Web", "src\Microsoft.Health.Fhir.R4.Web\Microsoft.Health.Fhir.R4.Web.csproj", "{8B173BA3-2018-4BB7-B32A-D4A9FC7984EB}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
src\Microsoft.Health.Fhir.Shared.Tests\Microsoft.Health.Fhir.Shared.Tests.projitems*{1495bba7-07b8-47ca-b2ed-511003b57667}*SharedItemsImports = 13
src\Microsoft.Health.Fhir.Shared.Core\Microsoft.Health.Fhir.Shared.Core.projitems*{295745e2-4dd3-4aab-908d-b3dee976bf0e}*SharedItemsImports = 13
src\Microsoft.Health.Fhir.Shared.Api\Microsoft.Health.Fhir.Shared.Api.projitems*{4b4abb04-42ba-461c-a202-e480a2ae538e}*SharedItemsImports = 13
src\Microsoft.Health.Fhir.Shared.Web\Microsoft.Health.Fhir.Shared.Web.projitems*{934ca8bb-b0a7-4187-bf4d-c937fbba1777}*SharedItemsImports = 13
src\Microsoft.Health.Fhir.Shared.Core.UnitTests\Microsoft.Health.Fhir.Shared.Core.UnitTests.projitems*{df7fb46c-281a-48c9-a86e-f1f9314636e0}*SharedItemsImports = 13
src\Microsoft.Health.Fhir.Shared.Api.UnitTests\Microsoft.Health.Fhir.Shared.Api.UnitTests.projitems*{fcbad356-8af3-41b0-b578-eaaef6a5d365}*SharedItemsImports = 13
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -225,13 +240,25 @@ Global
{85428D07-39A0-473F-B3BD-0F2C98A1A5F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85428D07-39A0-473F-B3BD-0F2C98A1A5F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{85428D07-39A0-473F-B3BD-0F2C98A1A5F5}.Release|Any CPU.Build.0 = Release|Any CPU
{D3D42FB0-72D6-4A67-AC58-9CA1274DBFE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3D42FB0-72D6-4A67-AC58-9CA1274DBFE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3D42FB0-72D6-4A67-AC58-9CA1274DBFE1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D3D42FB0-72D6-4A67-AC58-9CA1274DBFE1}.Release|Any CPU.Build.0 = Release|Any CPU
{734CAC7F-D979-4639-8067-A0875C0691F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{734CAC7F-D979-4639-8067-A0875C0691F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{734CAC7F-D979-4639-8067-A0875C0691F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{734CAC7F-D979-4639-8067-A0875C0691F2}.Release|Any CPU.Build.0 = Release|Any CPU
{8B173BA3-2018-4BB7-B32A-D4A9FC7984EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8B173BA3-2018-4BB7-B32A-D4A9FC7984EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B173BA3-2018-4BB7-B32A-D4A9FC7984EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8B173BA3-2018-4BB7-B32A-D4A9FC7984EB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{253029D6-94ED-4F49-9866-1844F263EEBE} = {7457B218-2651-49B5-BED8-22233889516A}
{F0639CA9-BFD6-46FF-8454-BD8A1965B31A} = {D6F23CE5-CCF6-4B52-9BEB-72294756E6C6}
{F0639CA9-BFD6-46FF-8454-BD8A1965B31A} = {BDD93417-1C3D-4EC9-BCBB-F5AE2F785642}
{26D87357-393E-4D1E-B98C-2B38726F184D} = {7457B218-2651-49B5-BED8-22233889516A}
{1DD14407-505C-419C-A96C-4C008D74BE26} = {7457B218-2651-49B5-BED8-22233889516A}
{BC1F4876-CD3C-49D2-A469-BD530B53A0FD} = {7457B218-2651-49B5-BED8-22233889516A}
Expand Down Expand Up @@ -265,9 +292,15 @@ Global
{DF7FB46C-281A-48C9-A86E-F1F9314636E0} = {1692B8AE-80C5-408C-9B85-745F1E9A02A5}
{443ECDA6-E05B-4BB0-90D9-441FB77CD919} = {D6F23CE5-CCF6-4B52-9BEB-72294756E6C6}
{85428D07-39A0-473F-B3BD-0F2C98A1A5F5} = {D6F23CE5-CCF6-4B52-9BEB-72294756E6C6}
{4B4ABB04-42BA-461C-A202-E480A2AE538E} = {1692B8AE-80C5-408C-9B85-745F1E9A02A5}
{D3D42FB0-72D6-4A67-AC58-9CA1274DBFE1} = {BDD93417-1C3D-4EC9-BCBB-F5AE2F785642}
{FCBAD356-8AF3-41B0-B578-EAAEF6A5D365} = {1692B8AE-80C5-408C-9B85-745F1E9A02A5}
{734CAC7F-D979-4639-8067-A0875C0691F2} = {D6F23CE5-CCF6-4B52-9BEB-72294756E6C6}
{934CA8BB-B0A7-4187-BF4D-C937FBBA1777} = {8AD2A324-DAB5-4380-94A5-31F7D817C384}
{8B173BA3-2018-4BB7-B32A-D4A9FC7984EB} = {8AD2A324-DAB5-4380-94A5-31F7D817C384}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
RESX_SortFileContentOnSave = True
SolutionGuid = {E370FB31-CF95-47D1-B1E1-863A77973FF8}
RESX_SortFileContentOnSave = True
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace>Microsoft.Health.Fhir.Api.UnitTests</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="NSubstitute" Version="4.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.Health.Extensions.Xunit\Microsoft.Health.Extensions.Xunit.csproj" />
<ProjectReference Include="..\Microsoft.Health.Fhir.Core\Microsoft.Health.Fhir.Core.csproj" />
<ProjectReference Include="..\Microsoft.Health.Fhir.R4.Api\Microsoft.Health.Fhir.R4.Api.csproj" />
<ProjectReference Include="..\Microsoft.Health.Fhir.Tests.Common\Microsoft.Health.Fhir.Tests.Common.csproj" />
</ItemGroup>

<Import Project="..\Microsoft.Health.Fhir.Shared.Tests\Microsoft.Health.Fhir.Shared.Tests.projitems" Label="Shared" />

<Import Project="..\Microsoft.Health.Fhir.Shared.Api.UnitTests\Microsoft.Health.Fhir.Shared.Api.UnitTests.projitems" Label="Shared" />

</Project>
6 changes: 4 additions & 2 deletions src/Microsoft.Health.Fhir.Api/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Resources;
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.Api.UnitTests")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.Stu3.Api")]
[assembly: NeutralResourcesLanguage("en-us")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.R4.Api")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.R4.Api.UnitTests")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.Stu3.Api")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.Stu3.Api.UnitTests")]
3 changes: 3 additions & 0 deletions src/Microsoft.Health.Fhir.Core/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
// -------------------------------------------------------------------------------------------------

using System.Resources;
using System.Runtime.CompilerServices;

[assembly: NeutralResourcesLanguage("en-us")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.R4.Api.UnitTests")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.Stu3.Api.UnitTests")]
10 changes: 10 additions & 0 deletions src/Microsoft.Health.Fhir.R4.Api/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// -------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------

using System.Resources;
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.R4.Api.UnitTests")]
[assembly: NeutralResourcesLanguage("en-us")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace>Microsoft.Health.Fhir.Api</RootNamespace>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>R4</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ensure.That" Version="8.1.1" />
<PackageReference Include="FluentValidation" Version="8.1.3" />
<PackageReference Include="Hl7.Fhir.R4" Version="1.2.0" />
<PackageReference Include="MediatR" Version="6.0.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.3" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.Health.Fhir.Api\Microsoft.Health.Fhir.Api.csproj" />
<ProjectReference Include="..\Microsoft.Health.Fhir.R4.Core\Microsoft.Health.Fhir.R4.Core.csproj" />
</ItemGroup>

<Import Project="..\Microsoft.Health.Fhir.Shared.Api\Microsoft.Health.Fhir.Shared.Api.projitems" Label="Shared" />

</Project>
17 changes: 17 additions & 0 deletions src/Microsoft.Health.Fhir.R4.Api/Modules/KnownAssemblies.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// -------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------

using System.Reflection;
using Microsoft.Health.Fhir.Core;

namespace Microsoft.Health.Fhir.Api.Modules
{
public static class KnownAssemblies
{
public static Assembly Core => typeof(Clock).Assembly;

public static Assembly CoreVersionSpecific => typeof(R4ModelInfoProvider).Assembly;
}
}
2 changes: 1 addition & 1 deletion src/Microsoft.Health.Fhir.R4.Core/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.CosmosDb")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.Api")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.CosmosDb.UnitTests")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.Core.UnitTests")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.R4.Api.UnitTests")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.R4.Core.UnitTests")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.Tests.Common")]
[assembly: InternalsVisibleTo("Microsoft.Health.Fhir.Tests.E2E")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static CapabilityStatement Intersect(this ListedCapabilityStatement syste
Experimental = system.Experimental,
Publisher = system.Publisher,
Software = system.Software,
FhirVersion = system.FhirVersion,
FhirVersion = system.FhirVersion.GetValueByEnumLiteral<FHIRVersion>(),
Contact = new List<ContactDetail> { new ContactDetail { Telecom = system.Telecom?.Select(x => new ContactPoint(x.System, x.Use, x.Value)).ToList() } },

// Intersections with user configured values
Expand Down Expand Up @@ -90,7 +90,7 @@ public static CapabilityStatement Intersect(this ListedCapabilityStatement syste
var rest = new CapabilityStatement.RestComponent
{
Mode = systemRest.Mode.IntersectEnum(configuredRest.Mode, issues, "Rest.Mode"),
Documentation = systemRest.Documentation,
Documentation = new Markdown(systemRest.Documentation),
Security = systemRest.Security,
Interaction = systemRest.Interaction?.IntersectList(configuredRest.Interaction, x => x.Code, issues, $"Rest.Interaction"),
SearchParam = systemRest.SearchParam?.IntersectList(configuredRest.SearchParam, x => x.Name, issues, $"Rest.SearchParam"),
Expand Down
Loading

0 comments on commit 2918cd4

Please sign in to comment.