public static IEnumerable <T> FindAll <T>(this IConformanceSource source) where T : Resource
        {
            var type = ModelInfo.GetFhirTypeNameForType(typeof(T));

            if (type != null)
            {
                var resourceType = EnumUtility.ParseLiteral <ResourceType>(type);
                var uris         = source.ListResourceUris(resourceType);
                return(uris.Select(u => source.ResolveByCanonicalUri(u) as T).Where(r => r != null));
            }
            else
            {
                return(null);
            }
        }
예제 #2
0
        public static IEnumerable <T> FindAll <T>(this IConformanceSource source) where T : Resource
        {
            var type = ModelInfo.GetFhirTypeNameForType(typeof(T));

            if (type != null)
            {
                var resourceType = EnumUtility.ParseLiteral <ResourceType>(type);
                // for some reason there is an issue with this StructureDefinition (needs fixing)
                var uris = source.ListResourceUris(resourceType).Where(u => u != "http://hl7.org/fhir/us/sdc/StructureDefinition/sdc-questionnaire");
                return(uris.Select(u => source.ResolveByCanonicalUri(u) as T).Where(r => r != null));
            }
            else
            {
                return(null);
            }
        }
예제 #3
0
 /// <summary>Returns a list of <see cref="ArtifactSummary"/> instances for resources of the specified <see cref="ResourceType"/>.</summary>
 /// <returns>A <see cref="List{T}"/> of <see cref="ArtifactSummary"/> instances.</returns>
 public static IEnumerable <ArtifactSummary> Summaries(this IConformanceSource source, ResourceType resourceType) => source.ListSummaries().OfResourceType(resourceType);
예제 #4
0
 public TimingSource(IConformanceSource source)
 {
     _source = source;
 }
예제 #5
0
 /// <summary>Returns a list of <see cref="ArtifactSummary"/> instances with error information.</summary>
 /// <returns>A <see cref="List{T}"/> of <see cref="ArtifactSummary"/> instances.</returns>
 public static IEnumerable <ArtifactSummary> Errors(this IConformanceSource source) => source.ListSummaries().Errors();