コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
        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);
        }
コード例 #4
0
        public static void AddSystemInteraction(this Conformance conformance, Conformance.SystemRestfulInteraction code)
        {
            var interaction = new Conformance.SystemInteractionComponent();

            interaction.Code = code;

            conformance.Rest().Interaction.Add(interaction);
        }
コード例 #5
0
        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);
        }