public static Structure Primitive(string name, IPrimitiveValidator validator, string nsprefix = FhirNamespaceManager.Fhir) { Structure structure = new Structure(); structure.Type = name; UriHelper.SetStructureIdentification(structure, UriHelper.BASEPROFILE); Element element = new Element(); element.Path = new Path(name); element.Name = name; element.IsPrimitive = true; element.PrimitiveValidator = validator; element.Cardinality = new Cardinality { Min = "1", Max = "1" }; element.NameSpacePrefix = nsprefix; structure.Elements.Add(element); AddExtensionElement(structure, element); return structure; }
public static Structure Primitive(string name, IPrimitiveValidator validator, string nsprefix = FhirNamespaceManager.Fhir) { Structure structure = new Structure(); structure.Type = name; UriHelper.SetStructureIdentification(structure, UriHelper.BASEPROFILE); Element element = new Element(); element.Path = new Path(name); element.Name = name; element.IsPrimitive = true; element.PrimitiveValidator = validator; element.Cardinality = new Cardinality { Min = "1", Max = "1" }; element.NameSpacePrefix = nsprefix; structure.Elements.Add(element); AddExtensionElement(structure, element); return(structure); }