Skip to content

Commit

Permalink
Merge branch 'develop' into 2794-support-predefined-classmappings
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsmits authored Aug 27, 2024
2 parents bc272e5 + 195a559 commit d061fd3
Show file tree
Hide file tree
Showing 48 changed files with 877 additions and 22 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ If you want to participate in this project, we're using [Git Flow][nvie] for our

> Note: Since the 5.0 release of the SDK, the branches for STU3 and newer have been combined in a single `develop` branch. This branch now contains the code for all FHIR releases from STU3 and up. We have also refactored all the common code out to projects within that branch, so the separate `common` repository (at https://github.com/FirelyTeam/firely-net-common) is no longer in use. This greatly simplifies management and creating PRs for these projects.
## Binary Compatibility
Our build pipeline automatically checks for binary compatibilty and fails when we break it. In some cases we can make an exception to break binary compatitibility.
To make sure the pipeline doesn't break, you should run ```dotnet pack /p:GenerateCompatibilitySuppressionFile=true``` locally to generate a suppression file. Please commit this file to make sure the build passes.



[common-repo]: https://github.com/FirelyTeam/firely-net-common
[netsdk-docu]: https://docs.fire.ly/projects/Firely-NET-SDK/
Expand Down
2 changes: 1 addition & 1 deletion release-notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Intro:

General improvements and bugfixes

2 changes: 1 addition & 1 deletion src/Benchmarks/Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Hl7.Fhir.Base/ElementModel/TypedElementOnSourceNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public TypedElementOnSourceNode(ISourceNode source, string? type, IStructureDefi
if (source is IExceptionSource ies && ies.ExceptionHandler == null)
ies.ExceptionHandler = (o, a) => ExceptionHandler.NotifyOrThrow(o, a);

Location = source.Name;
Location = source.Location;
ShortPath = source.Name;
_source = source;
(InstanceType, Definition) = buildRootPosition(type);
Expand Down
21 changes: 21 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/AccessToken.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#nullable enable

using System.Text.Json.Serialization;

namespace Hl7.Fhir.Model.CdsHooks;

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "ExperimentalApi")]
#else
[System.Obsolete("This function is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.")]
#endif
[CdsHookElement]
public class Authorization
{
[JsonPropertyName("access_token")] public string? AccessToken { get; set; } // we need this naming for the deserialization
[JsonPropertyName("token_type")] public string? TokenType { get; set; }
[JsonPropertyName("expires_in")] public int? ExpiresIn { get; set; }
public string? Scope { get; set; }
public string? Subject { get; set; }
public string? Patient { get; set; }
}
19 changes: 19 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/Action.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Hl7.Fhir.Model;

#nullable enable

namespace Hl7.Fhir.Model.CdsHooks;

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "ExperimentalApi")]
#else
[System.Obsolete("This function is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.")]
#endif
[CdsHookElement]
public class Action
{
public string? Type { get; set; }
public string? Description { get; set; }
public Resource? Resource { get; set; }
public string? Label { get; set; }
}
24 changes: 24 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/Card.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#nullable enable
using Hl7.Fhir.Model;
using System.Collections.Generic;

namespace Hl7.Fhir.Model.CdsHooks;

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "ExperimentalApi")]
#else
[System.Obsolete("This function is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.")]
#endif
[CdsHookElement]
public class Card
{
public string? Uuid { get; set; }
public string? Summary { get; set; }
public string? Detail { get; set; }
public string? Indicator { get; set; }
public Source? Source { get; set; }
public List<Suggestion>? Suggestions { get; set; }
public string? SelectionBehavior { get; set; }
public List<Coding>? OverrideReasons { get; set; }
public List<Link>? Links { get; set; }
}
6 changes: 6 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/CdsHookElementAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using System;

namespace Hl7.Fhir.Model.CdsHooks;

[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class CdsHookElementAttribute() : Attribute;
20 changes: 20 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/Context.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#nullable enable
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Hl7.Fhir.Model.CdsHooks;

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "ExperimentalApi")]
#else
[System.Obsolete("This function is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.")]
#endif
[CdsHookElement]
public class Context
{
public string? UserId { get; set; }
public string? PatientId { get; set; }
public string? EncounterId { get; set; }
[JsonExtensionData] public Dictionary<string, JsonElement>? Fields { get; set; }
}
16 changes: 16 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/DiscoveryResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Collections.Generic;

#nullable enable

namespace Hl7.Fhir.Model.CdsHooks;

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "ExperimentalApi")]
#else
[System.Obsolete("This function is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.")]
#endif
[CdsHookElement]
public class DiscoveryResponse
{
public List<Service>? Services { get; set; }
}
20 changes: 20 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/Feedback.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.Collections.Generic;

namespace Hl7.Fhir.Model.CdsHooks;

#nullable enable

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "ExperimentalApi")]
#else
[System.Obsolete("This function is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.")]
#endif
[CdsHookElement]
public class Feedback
{
public string? Card { get; set; }
public string? Outcome { get; set; }
public List<Identifier>? AcceptedSuggestions { get; set; }
public OverrideReason? OverrideReason { get; set; }
public string? OutcomeTimeStamp { get; set; }
}
14 changes: 14 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/Identifier.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Hl7.Fhir.Model.CdsHooks;

#nullable enable

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "ExperimentalApi")]
#else
[System.Obsolete("This function is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.")]
#endif
[CdsHookElement]
public class Identifier
{
public string? Id { get; set; }
}
20 changes: 20 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/Link.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#nullable enable

using System;

namespace Hl7.Fhir.Model.CdsHooks;

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "ExperimentalApi")]
#else
[System.Obsolete("This function is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.")]
#endif
[CdsHookElement]
public class Link
{
public string? Label { get; set; }
public Uri? Url { get; set; }
public string? Type { get; set; }
public string? AppContext { get; set; }
public bool? Autolaunchable { get; set; }
}
15 changes: 15 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/OverrideReason.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#nullable enable

namespace Hl7.Fhir.Model.CdsHooks;

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "ExperimentalApi")]
#else
[System.Obsolete("This function is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.")]
#endif
[CdsHookElement]
public class OverrideReason
{
public Coding? Reason { get; set; }
public string? UserComment { get; set; }
}
23 changes: 23 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/Request.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#nullable enable
using Hl7.Fhir.Model;
using System;
using System.Collections.Generic;
using System.Text.Json;

namespace Hl7.Fhir.Model.CdsHooks;

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "ExperimentalApi")]
#else
[System.Obsolete("This function is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.")]
#endif
[CdsHookElement]
public class Request
{
public string? HookInstance { get; set; }
public Uri? FhirServer { get; set; }
public string? Hook { get; set; }
public Authorization? FhirAuthorization { get; set; }
public Context? Context { get; set; }
public Dictionary<string, Resource>? Prefetch { get; set; }
}
17 changes: 17 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/Response.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#nullable enable
using System;
using System.Collections.Generic;

namespace Hl7.Fhir.Model.CdsHooks;

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "ExperimentalApi")]
#else
[System.Obsolete("This function is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.")]
#endif
[CdsHookElement]
public class Response
{
public List<Card>? Cards { get; set; }
public List<Action>? SystemActions { get; set; }
}
21 changes: 21 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/Service.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System.Collections.Generic;

#nullable enable

namespace Hl7.Fhir.Model.CdsHooks;

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "ExperimentalApi")]
#else
[System.Obsolete("This function is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.")]
#endif
[CdsHookElement]
public class Service
{
public string? Hook { get; set; }
public string? Title { get; set; }
public string? Description { get; set; }
public string? Id { get; set; }
public Dictionary<string, string>? Prefetch { get; set; }
public string? UsageRequirements { get; set; }
}
20 changes: 20 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/Source.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Hl7.Fhir.Model;
using System;

#nullable enable

namespace Hl7.Fhir.Model.CdsHooks;

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "ExperimentalApi")]
#else
[System.Obsolete("This function is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.")]
#endif
[CdsHookElement]
public class Source
{
public string? Label { get; set; }
public Uri? Url { get; set; }
public Uri? Icon { get; set; }
public Coding? Coding { get; set; }
}
19 changes: 19 additions & 0 deletions src/Hl7.Fhir.Base/Model/CdsHooks/Suggestion.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#nullable enable
using System;
using System.Collections.Generic;

namespace Hl7.Fhir.Model.CdsHooks;

#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.Experimental(diagnosticId: "ExperimentalApi")]
#else
[System.Obsolete("This function is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.")]
#endif
[CdsHookElement]
public class Suggestion
{
public string? Label { get; set; }
public string? Uuid { get; set; }
public bool IsRecommended { get; set; }
public List<Action>? Actions { get; set; }
}
Loading

0 comments on commit d061fd3

Please sign in to comment.