コード例 #1
0
ファイル: ValueSet.cs プロジェクト: ztfuqingvip/fhir-net-api
            public static ExpansionComponent Create()
            {
                var expansion = new ExpansionComponent();

                expansion.TimestampElement  = FhirDateTime.Now();
                expansion.IdentifierElement = Uuid.Generate().AsUri();

                return(expansion);
            }
コード例 #2
0
ファイル: ValueSet.cs プロジェクト: ztfuqingvip/fhir-net-api
        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;
        }