Exemple #1
0
 /// <summary>Initializes a new instance of the <see cref="FhirValueSet"/> class.</summary>
 /// <param name="name">           The name.</param>
 /// <param name="id">             The identifier.</param>
 /// <param name="version">        The version.</param>
 /// <param name="title">          The title.</param>
 /// <param name="url">            The URL.</param>
 /// <param name="standardStatus"> The standard status.</param>
 /// <param name="description">    The description.</param>
 /// <param name="composeIncludes">The compose includes.</param>
 /// <param name="composeExcludes">The compose excludes.</param>
 /// <param name="expansion">      The expansion.</param>
 /// <param name="concepts">       The resolved concepts.</param>
 /// <param name="referencedCodeSystems">The list of code systems referenced by this value set.</param>
 private FhirValueSet(
     string name,
     string id,
     string version,
     string title,
     string url,
     string standardStatus,
     string description,
     List <FhirValueSetComposition> composeIncludes,
     List <FhirValueSetComposition> composeExcludes,
     FhirValueSetExpansion expansion,
     List <FhirConcept> concepts,
     HashSet <string> referencedCodeSystems,
     FhirElement.ElementDefinitionBindingStrength?strongestBinding)
     : this(
         name,
         id,
         version,
         title,
         url,
         standardStatus,
         description,
         composeIncludes,
         composeExcludes,
         expansion)
 {
     _valueList        = concepts;
     _codeSystems      = referencedCodeSystems;
     _strongestBinding = strongestBinding;
 }
Exemple #2
0
        /// <summary>Deep copy.</summary>
        /// <param name="resolveRules">(Optional) True to resolve rules.</param>
        /// <returns>A FhirValueSet.</returns>
        public object Clone()
        {
            List <FhirValueSetComposition> includes = new List <FhirValueSetComposition>();

            if (ComposeIncludes != null)
            {
                includes = ComposeIncludes.Select(i => (FhirValueSetComposition)i.Clone()).ToList();
            }

            List <FhirValueSetComposition> excludes = new List <FhirValueSetComposition>();

            if (ComposeExcludes != null)
            {
                excludes = ComposeExcludes.Select(e => (FhirValueSetComposition)e.Clone()).ToList();
            }

            FhirValueSetExpansion expansion = null;

            if (Expansion != null)
            {
                expansion = (FhirValueSetExpansion)Expansion.Clone();
            }

            List <FhirConcept> concepts = null;

            if (Concepts != null)
            {
                concepts = Concepts.Select(c => (FhirConcept)c.Clone()).ToList();
            }

            HashSet <string> codeSystems = new HashSet <string>();

            if (_codeSystems != null)
            {
                foreach (string val in _codeSystems)
                {
                    codeSystems.Add(val);
                }
            }

            return(new FhirValueSet(
                       Name,
                       Id,
                       Version,
                       Title,
                       URL,
                       StandardStatus,
                       Description,
                       includes,
                       excludes,
                       expansion,
                       concepts,
                       codeSystems,
                       _strongestBinding));
        }
Exemple #3
0
 /// <summary>Initializes a new instance of the <see cref="FhirValueSet"/> class.</summary>
 /// <param name="name">           The name.</param>
 /// <param name="id">             The identifier.</param>
 /// <param name="version">        The version.</param>
 /// <param name="title">          The title.</param>
 /// <param name="url">            The URL.</param>
 /// <param name="standardStatus"> The standard status.</param>
 /// <param name="description">    The description.</param>
 /// <param name="composeIncludes">The compose includes.</param>
 /// <param name="composeExcludes">The compose excludes.</param>
 /// <param name="expansion">      The expansion.</param>
 public FhirValueSet(
     string name,
     string id,
     string version,
     string title,
     string url,
     string standardStatus,
     string description,
     List <FhirValueSetComposition> composeIncludes,
     List <FhirValueSetComposition> composeExcludes,
     FhirValueSetExpansion expansion)
 {
     Name              = name;
     Id                = id;
     Version           = version;
     Title             = title;
     URL               = url;
     StandardStatus    = standardStatus;
     Description       = description;
     ComposeIncludes   = composeIncludes;
     ComposeExcludes   = composeExcludes;
     Expansion         = expansion;
     _strongestBinding = null;
 }