public static ExpansionComponent Create() { var expansion = new ExpansionComponent(); expansion.TimestampElement = FhirDateTime.Now(); expansion.IdentifierElement = Uuid.Generate().AsUri(); return(expansion); }
public void ImportExpansion(ValueSet other) { other.ensureExpansion(); var combinedExpansion = ExpansionComponent.Create(); // Todo: worry about duplicates if (this.HasExpansion) { combinedExpansion.Parameter.AddRange(this.Expansion.Parameter); combinedExpansion.Contains.AddRange(this.Expansion.Contains); } combinedExpansion.Parameter.AddRange(other.Expansion.Parameter); combinedExpansion.Contains.AddRange(other.Expansion.Contains); combinedExpansion.Total = countCodes(combinedExpansion.Contains); combinedExpansion.Offset = 0; Expansion = combinedExpansion; }