Beispiel #1
0
        /// <summary>
        /// Set Composable.
        /// </summary>
        public static SectionPurporse GetSectionPurpose(this StructureDefinition resource)
        {
            Extension ns    = resource.GetExtension(SectionPurposeExtensionUri);
            String    value = ((FhirString)ns?.Value)?.Value;

            if (value == null)
            {
                return(SectionPurporse.None);
            }
            return((SectionPurporse)Enum.Parse(typeof(SectionPurporse), value));
        }
        public static bool IsFragment(this StructureDefinition sDef)
        {
            Extension e = sDef.GetExtension(PreFhirGenerator.IsFragmentUrl);

            if (e == null)
            {
                return(false);
            }
            FhirBoolean b = (FhirBoolean)e.Value;

            if (b.Value.HasValue == false)
            {
                return(false);
            }
            return(b.Value.Value);
        }