Exemple #1
0
        internal static StructureDefinition AddComponentLink(this StructureDefinition sd,
                                                             String url,
                                                             SDefEditor.Cardinality cardinalityLeft,
                                                             SDefEditor.Cardinality cardinalityRight,
                                                             String componentRef,
                                                             String types,
                                                             params String[] targets)
        {
            dynamic packet = new JObject();

            packet.LinkType     = SVGGlobal.ComponentType;
            packet.ShowChildren = false;
            if (cardinalityLeft != null)
            {
                packet.CardinalityLeft = cardinalityLeft.ToString();
            }
            packet.LinkTarget    = url;
            packet.ComponentHRef = componentRef;
            packet.Types         = types;
            packet.References    = new JArray(targets);
            if (cardinalityRight != null)
            {
                packet.CardinalityRight = cardinalityRight.ToString();
            }
            sd.AddExtension(Global.ResourceMapLinkUrl, new FhirString(packet.ToString()));
            return(sd);
        }
Exemple #2
0
        public static StructureDefinition AddValueSetLink(this StructureDefinition sd,
                                                          ValueSet vs,
                                                          bool showChildren)
        {
            dynamic packet = new JObject();

            packet.LinkType     = SVGGlobal.ValueSetType;
            packet.ShowChildren = showChildren;
            packet.LinkTarget   = vs.Url;
            sd.AddExtension(Global.ResourceMapLinkUrl, new FhirString(packet.ToString()));

            return(sd);
        }
Exemple #3
0
        public static StructureDefinition AddTargetLink(this StructureDefinition sd,
                                                        String url,
                                                        SDefEditor.Cardinality cardinalityLeft,
                                                        bool showChildren)
        {
            dynamic packet = new JObject();

            packet.LinkType        = SVGGlobal.TargetType;
            packet.ShowChildren    = showChildren;
            packet.CardinalityLeft = cardinalityLeft.ToString();
            packet.LinkTarget      = url;
            sd.AddExtension(Global.ResourceMapLinkUrl, new FhirString(packet.ToString()));
            return(sd);
        }
 /// <summary>
 /// Set Composable.
 /// </summary>
 public static StructureDefinition SetSectionPurpose(this StructureDefinition resource,
                                                     SectionPurporse sectionPurpose)
 {
     resource.AddExtension(SectionPurposeExtensionUri, new FhirString(sectionPurpose.ToString()));
     return(resource);
 }