Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions src/Microsoft.Health.Fhir.CodeGen/Language/Firely/CSharpFirely2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1535,8 +1535,6 @@ private void WriteInterfaceComponent(

string fhirTypeConstructor = $"\"{complexName}\",\"{complex.cgUrl()}\"";

//_writer.WriteLineIndented($"[FhirType({fhirTypeConstructor}, IsResource=true)]");

StructureDefinition? parentInterface = _info.GetParentInterface(complex.Structure);

if (parentInterface == null)
Expand Down Expand Up @@ -1868,15 +1866,7 @@ private void WriteComponent(
WriteSerializable();

string fhirTypeConstructor = $"\"{complexName}\",\"{complex.cgUrl()}\"";

if (isResource)
{
_writer.WriteLineIndented($"[FhirType({fhirTypeConstructor}, IsResource=true)]");
}
else
{
_writer.WriteLineIndented($"[FhirType({fhirTypeConstructor})]");
}
_writer.WriteLineIndented($"[FhirType({fhirTypeConstructor})]");

var isPatientClass = false;

Expand Down Expand Up @@ -2646,16 +2636,10 @@ private void WriteBackboneComponent(
*/

bool useConcatenationInName = complex.Structure.Name == "Citation";

string explicitNamePart = string.IsNullOrEmpty(explicitName)
? complex.cgName(NamingConvention.PascalCase, useConcatenationInName, useConcatenationInName)
: explicitName;
string componentName = parentExportName + "#" + explicitNamePart;
string componentName = complex.Element.Path;

WriteSerializable();
_writer.WriteLineIndented($"[FhirType(\"{componentName}\", IsNestedType=true)]");

_writer.WriteLineIndented($"[BackboneType(\"{complex.Element.Path}\")]");
_writer.WriteLineIndented($"[FhirType(\"{componentName}\", IsBackboneType=true)]");

_writer.WriteLineIndented(
$"public partial class" +
Expand Down