public static Conformance AddAllInteractionsForAllResources(this Conformance conformance) { foreach (var r in conformance.Rest.FirstOrDefault().Resource.ToList()) { conformance.Rest().Resource.Remove(r); conformance.Rest().Resource.Add(AddAllResourceInteractions(r)); } return(conformance); }
public static Conformance AddCoreSearchParamsAllResources(this Conformance conformance) { foreach (var r in conformance.Rest.FirstOrDefault().Resource.ToList()) { conformance.Rest().Resource.Remove(r); conformance.Rest().Resource.Add(AddCoreSearchParamsResource(r)); } return(conformance); }
public static Conformance AddSearchTypeInteractionForResources(this Conformance conformance) { var firstOrDefault = conformance.Rest.FirstOrDefault(); if (firstOrDefault != null) { foreach (var r in firstOrDefault.Resource.ToList()) { conformance.Rest().Resource.Remove(r); conformance.Rest().Resource.Add(AddSearchType(r)); } } return(conformance); }
public static void AddSystemInteraction(this Conformance conformance, Conformance.SystemRestfulInteraction code) { var interaction = new Conformance.SystemInteractionComponent(); interaction.Code = code; conformance.Rest().Interaction.Add(interaction); }
public static Conformance AddCoreSearchParamsAllResources(this Conformance conformance, IEnumerable <IFhirService> services) { var fhirStarterServices = services as IFhirService[] ?? services.ToArray(); var firstOrDefault = conformance.Rest.FirstOrDefault(); if (firstOrDefault != null) { foreach (var r in firstOrDefault.Resource.ToList()) { foreach (var service in fhirStarterServices) { var resourceService = service; if (resourceService != null) { conformance.Rest().Resource.Remove(r); conformance.Rest().Resource.Add(AddCoreSearchParamsResource(r, resourceService.SearchParameters())); } } } } return(conformance); }