Skip to content

Commit

Permalink
Upgrade FHIR packages
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephEShook committed Sep 19, 2023
1 parent 504a430 commit 9f260ef
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageVersion Include="Google.Cloud.Storage.V1" Version="4.6.0" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="[6.0.22,7.0.11]" />
<PackageVersion Include="AspNetCoreRateLimit" Version="5.0.0" />
<PackageVersion Include="Hl7.Fhir.Specification.R4B" Version="4.3.0" />
<PackageVersion Include="Hl7.Fhir.Specification.R4B" Version="5.3.0" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="[6.0.22,7.0.11]" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageVersion Include="IdentityModel" Version="6.2.0" />
Expand Down
8 changes: 2 additions & 6 deletions Udap.Client/Rest/FhirClientWithUrlProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ namespace Udap.Client.Rest;
public class FhirClientWithUrlProvider : FhirClient
{
public FhirClientWithUrlProvider(IBaseUrlProvider baseUrlProvider, HttpClient httpClient, FhirClientSettings? settings = null, IStructureDefinitionSummaryProvider? provider = null)
: base(baseUrlProvider.GetBaseUrl(), httpClient, settings, provider)
: base(baseUrlProvider.GetBaseUrl(), httpClient, settings)
{
var requester = new HttpClientRequester(baseUrlProvider.GetBaseUrl(), Settings, httpClient);
Requester = requester;

// Expose default request headers to user.
RequestHeaders = requester.Client.DefaultRequestHeaders;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class B2BAuthorizationExtension : Dictionary<string, object>
private string? _subjectId;
private string? _subjectRole;
private string? _organizationName;
private Uri _organizationId = default!;
private string? _organizationId = default!;
private ICollection<string> _purposeOfUse = new HashSet<string>();
private ICollection<string>? _consentPolicy;
private ICollection<string>? _consentReference;
Expand Down Expand Up @@ -104,21 +104,21 @@ public string? OraganizationName
}

[JsonPropertyName(UdapConstants.B2BAuthorizationExtension.OrganizationId)]
public Uri OrganizationId
public string? OrganizationId
{
get
{
if (Uri.TryCreate(GetStandardClaim(UdapConstants.RegistrationDocumentValues.ClientUri), UriKind.Absolute, out var value))
if (_organizationId == null)
{
_organizationId = value;
_organizationId = GetStandardClaim(UdapConstants.B2BAuthorizationExtension.OrganizationId);
}

return _organizationId;
}
set
{
_organizationId = value;
this[UdapConstants.B2BAuthorizationExtension.OrganizationId] = value;
if (value != null) this[UdapConstants.B2BAuthorizationExtension.OrganizationId] = value;
}
}

Expand Down
4 changes: 2 additions & 2 deletions _tests/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<PackageVersion Include="Duende.IdentityServer" Version="6.3.3" />
<PackageVersion Include="Duende.IdentityServer.Storage" Version="6.3.4" />
<PackageVersion Include="Duende.IdentityServer.EntityFramework.Storage" Version="6.3.3" />
<PackageVersion Include="Hl7.Fhir.R4B" Version="4.3.0" />
<PackageVersion Include="Hl7.Fhir.Specification.R4B" Version="4.3.0" />
<PackageVersion Include="Hl7.Fhir.R4B" Version="5.3.0" />
<PackageVersion Include="Hl7.Fhir.Specification.R4B" Version="5.3.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="FluentAssertions.Analyzers" Version="0.24.0" />
<PackageVersion Include="IdentityModel" Version="6.2.0" />
Expand Down
6 changes: 3 additions & 3 deletions examples/FhirLabsApi/FhirLabsApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="brianpos.Fhir.R4B.DemoFileSystemFhirServer" Version="4.3.0-beta4" />
<PackageReference Include="brianpos.Fhir.R4B.WebApi.AspNetCore" Version="4.3.0-beta2" />
<PackageReference Include="brianpos.Fhir.R4B.DemoFileSystemFhirServer" Version="5.3.0-beta2" />
<PackageReference Include="brianpos.Fhir.R4B.WebApi.AspNetCore" Version="5.3.0-beta2" />
<PackageReference Include="Google.Cloud.SecretManager.V1" Version="2.1.0" />
<PackageReference Include="Hl7.Fhir.Specification.R4B" Version="4.3.0" />
<PackageReference Include="Hl7.Fhir.Specification.R4B" Version="5.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.11" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="7.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
<PackageReference Include="Hl7.Fhir.Specification.R4B" Version="5.0.0" />
<PackageReference Include="Hl7.Fhir.Specification.R4B" Version="5.3.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.11" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ public Task<IActionResult> RequestAccessTokenClientCredentials(
var b2bHl7 = new B2BAuthorizationExtension()
{
SubjectId = "urn:oid:2.16.840.1.113883.4.6#1234567890",
OrganizationId = new Uri("https://fhirlabs.net/fhir/r4"),
OrganizationId = new Uri("https://fhirlabs.net/fhir/r4").OriginalString,
OraganizationName = "FhirLabs",
PurposeOfUse = new HashSet<string>
PurposeOfUse = new List<string>
{
"urn:oid:2.16.840.1.113883.5.8#TREAT"
}
Expand Down
2 changes: 1 addition & 1 deletion migrations/UdapDb.SqlServer/UdapDb.SqlServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Hl7.Fhir.Specification.R4B" Version="4.3.0" />
<PackageReference Include="Hl7.Fhir.Specification.R4B" Version="5.3.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.11">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit 9f260ef

Please sign in to comment.