Skip to content

Commit

Permalink
Small bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoutkramer committed Jan 29, 2025
1 parent a2347d8 commit 1aa6faf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Hl7.Fhir.Base/Model/CodeableConcept.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ public CodeableConcept()
{
}

public CodeableConcept(IEnumerable<Coding> codes, string? text = null)
{
this.Coding = codes.ToList();
this.Text = text;
}

public CodeableConcept(string system, string code, string? text = null)
{
if (!string.IsNullOrEmpty(system) || !string.IsNullOrEmpty(code))
Expand All @@ -58,6 +52,7 @@ public CodeableConcept(string system, string code, string? text = null)
}
this.Text = text;
}

public CodeableConcept(string system, string code, string display, string text)
{
if (!string.IsNullOrEmpty(system) || !string.IsNullOrEmpty(code) || !string.IsNullOrEmpty(display))
Expand All @@ -67,6 +62,11 @@ public CodeableConcept(string system, string code, string display, string text)
this.Text = text;
}

public CodeableConcept(IEnumerable<Coding> codes)
{
this.Coding = codes.ToList();
}

public CodeableConcept Add(string system, string code, string? display = null)
{
Coding.Add(new Coding(system, code, display));
Expand All @@ -93,7 +93,7 @@ bool P.IToSystemPrimitive.TryConvertToSystemType([NotNullWhen(true)] out P.Any?
return false;
}

result = new P.Concept(codes.Cast<P.Code>());
result = new P.Concept(codes.Cast<P.Code>(), this.Text);
return true;
}

Expand Down

0 comments on commit 1aa6faf

Please sign in to comment.