Skip to content

Commit

Permalink
Merge pull request #2697 from FirelyTeam/feature/move-codeablereferen…
Browse files Browse the repository at this point in the history
…ce-to-base

CodeableReference was moved to base
  • Loading branch information
ewoutkramer authored Feb 2, 2024
2 parents b78a984 + 6116a0f commit 5113eef
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 201 deletions.
3 changes: 1 addition & 2 deletions src/Hl7.Fhir.Base/Introspection/ModelInspector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,7 @@ private void extractBackbonesFromClasses(IEnumerable<Type> classTypes)

public Type? GetTypeForFhirType(string name) => FindClassMapping(name) is { } mapping ? mapping.NativeType : null;

public bool IsBindable(string type) => FindClassMapping(type) is { } mapping && mapping.IsBindable ||
type == "CodeableReference";
public bool IsBindable(string type) => FindClassMapping(type) is { } mapping && mapping.IsBindable;

public bool IsConformanceResource(string name) => GetTypeForFhirType(name) is { } type && IsConformanceResource(type);

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions src/Hl7.Fhir.Base/Model/Generated/_GeneratorLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@
// BackboneElement.cs
// BackboneType.cs
// CodeableConcept.cs
// CodeableReference.cs
// Coding.cs
// ContactDetail.cs
// ContactPoint.cs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using FluentAssertions;
using Hl7.Fhir.ElementModel;
using Hl7.Fhir.Model;
using Hl7.Fhir.Specification.Terminology;
using System.Collections.Generic;
using Xunit;

Expand Down
178 changes: 0 additions & 178 deletions src/Hl7.Fhir.R4B/Model/Generated/CodeableReference.cs

This file was deleted.

1 change: 0 additions & 1 deletion src/Hl7.Fhir.R4B/Model/Generated/_GeneratorLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@
// Address.cs
// Age.cs
// Annotation.cs
// CodeableReference.cs
// Contributor.cs
// Count.cs
// DataRequirement.cs
Expand Down
18 changes: 0 additions & 18 deletions src/Hl7.Fhir.R5/Model/CodeableReference.cs

This file was deleted.

1 change: 0 additions & 1 deletion src/Hl7.Fhir.R5/Model/Generated/_GeneratorLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@
// Age.cs
// Annotation.cs
// Availability.cs
// CodeableReference.cs
// Contributor.cs
// Count.cs
// DataRequirement.cs
Expand Down
13 changes: 13 additions & 0 deletions src/Hl7.Fhir.Support.Tests/Introspection/ModelInspectorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* available at https://raw.githubusercontent.com/FirelyTeam/firely-net-sdk/master/LICENSE
*/

using FluentAssertions;
using System.Reflection;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Hl7.Fhir.Model;
Expand Down Expand Up @@ -37,6 +38,18 @@ public void TestResourceNameResolving()
Assert.IsNull(noway);
}

[TestMethod]
public void TestIsBindable()
{
ModelInspector.Base.IsBindable("string").Should().BeTrue();
ModelInspector.Base.IsBindable("uri").Should().BeTrue();
ModelInspector.Base.IsBindable("Quantity").Should().BeTrue();
ModelInspector.Base.IsBindable("Extension").Should().BeTrue();
ModelInspector.Base.IsBindable("Coding").Should().BeTrue();
ModelInspector.Base.IsBindable("CodeableConcept").Should().BeTrue();
ModelInspector.Base.IsBindable("CodeableReference").Should().BeTrue();
ModelInspector.Base.IsBindable("integer").Should().BeFalse();
}

[TestMethod]
public void TestAssemblyInspection()
Expand Down

0 comments on commit 5113eef

Please sign in to comment.