public static Conformance.ResourceComponent AddSearchType(Conformance.ResourceComponent resourcecomp) { var type = Conformance.TypeRestfulInteraction.SearchType; var interaction = ConformanceBuilder.AddSingleResourceInteraction(resourcecomp, type); resourcecomp.Interaction.Add(interaction); return(resourcecomp); }
public static Conformance.ResourceInteractionComponent AddSingleResourceInteraction( Conformance.ResourceComponent resourcecomp, Conformance.TypeRestfulInteraction type) { var interaction = new Conformance.ResourceInteractionComponent(); interaction.Code = type; return(interaction); }
public static Conformance.ResourceComponent AddAllResourceInteractions(Conformance.ResourceComponent resourcecomp) { foreach (Conformance.TypeRestfulInteraction type in Enum.GetValues(typeof(Conformance.TypeRestfulInteraction))) { var interaction = AddSingleResourceInteraction(resourcecomp, type); resourcecomp.Interaction.Add(interaction); } return(resourcecomp); }
public static Conformance AddSingleResourceComponent(this Conformance conformance, String resourcetype, Boolean readhistory, Boolean updatecreate, Conformance.ResourceVersionPolicy versioning, ResourceReference profile = null) { var resource = new Conformance.ResourceComponent(); resource.Type = Hacky.GetResourceTypeForResourceName(resourcetype); resource.Profile = profile; resource.ReadHistory = readhistory; resource.UpdateCreate = updatecreate; resource.Versioning = versioning; conformance.Server().Resource.Add(resource); return(conformance); }
public static Conformance.ResourceComponent AddCoreSearchParamsResource(Conformance.ResourceComponent resourcecomp) { var parameters = ModelInfo.SearchParameters.Where(sp => sp.Resource == resourcecomp.Type.GetLiteral()) .Select(sp => new Conformance.SearchParamComponent { Name = sp.Name, Type = sp.Type, Documentation = sp.Description, }); resourcecomp.SearchParam.AddRange(parameters); return(resourcecomp); }
public static Conformance AddSingleResourceComponent(this Conformance conformance, string resourcetype, bool readhistory, bool updatecreate, Conformance.ResourceVersionPolicy versioning, ResourceReference profile = null) { var resource = new Conformance.ResourceComponent { Type = (ResourceType)Enum.Parse(typeof(ResourceType), resourcetype, true), Profile = profile, ReadHistory = readhistory, UpdateCreate = updatecreate, Versioning = versioning }; conformance.Server().Resource.Add(resource); return(conformance); }
public static Conformance.ResourceComponent AddCoreSearchParamsResource(Conformance.ResourceComponent r, IEnumerable <ModelInfo.SearchParamDefinition> availableModelInfo) { if (availableModelInfo != null) { var parameters = availableModelInfo.Where(sp => sp.Resource == r.Type.GetLiteral()) .Select(sp => new Conformance.SearchParamComponent { Name = sp.Name, Type = sp.Type, Documentation = sp.Description }); r.SearchParam.AddRange(parameters); } return(r); }
public Conformance.ResourceComponent Metadata() { var patientConformance = new Conformance.ResourceComponent(); patientConformance.Type = ResourceType.Patient; patientConformance.ReadHistory = false; patientConformance.Interaction = new System.Collections.Generic.List <Conformance.ResourceInteractionComponent> { // supported functions new Conformance.ResourceInteractionComponent { Code = Conformance.TypeRestfulInteraction.Read }, new Conformance.ResourceInteractionComponent { Code = Conformance.TypeRestfulInteraction.SearchType } }; return(patientConformance); }