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); } }
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); } }
/// <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);
public TimingSource(IConformanceSource source) { _source = source; }
/// <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();