private IEnumerable <StructureDefinition> findConstraintStrucDefs()
        {
            var testSDs = _testSource.ListConformanceResources().Where(ci => ci.Type == ResourceType.StructureDefinition);

            foreach (var sdInfo in testSDs)
            {
                // [WMR 20160721] Select all profiles in profiles-others.xml
                var fileName = Path.GetFileNameWithoutExtension(sdInfo.Origin);
                if (fileName == "profiles-others")
                {
                    var sd = _testSource.GetStructureDefinition(sdInfo.Url);

                    if (sd == null)
                    {
                        throw new InvalidOperationException(("Source listed canonical url {0} [source {1}], " +
                                                             "but could not get structure definition by that url later on!").FormatWith(sdInfo.Url, sdInfo.Origin));
                    }

                    if (sd.IsConstraint || sd.IsExtension)
                    {
                        yield return(sd);
                    }
                }
            }
        }
        public void GetConceptMaps()
        {
            var conceptMapUrls = source.ListConformanceResources().Where(info => info.Type == ResourceType.ConceptMap).Select(info => info.Url);
            var conceptMaps = conceptMapUrls.Select( url => (ConceptMap)source.LoadConformanceResourceByUrl(url));

            Assert.IsTrue(conceptMaps.Count() > 0);
            Assert.IsTrue(conceptMaps.Any(cm => cm.Id == "v2-address-use"));
        }
示例#3
0
        private IEnumerable <StructureDefinition> findConstraintStrucDefs()
        {
            var sdsInSpec = _source.ListConformanceResources().Where(ci => ci.Type == ResourceType.StructureDefinition);

            foreach (var sdInfo in sdsInSpec)
            {
                var sd = _source.GetStructureDefinition(sdInfo.Url);

                if (sd == null)
                {
                    throw new InvalidOperationException(("Source listed canonical url {0} [source {1}], " +
                                                         "but could not get structure definition by that url later on!").FormatWith(sdInfo.Url, sdInfo.Origin));
                }

                if (sd.IsConstraint)
                {
                    yield return(sd);
                }
            }
        }