Exemple #1
0
        private void Setup()
        {
            //Standard configuration with HL7v3 code resolution
            DefaultCodeResolutionConfigurator.ConfigureCodeResolversWithTrivialDefault();

            //Separate configuration for CDA code resolution
            GenericCodeResolverRegistry cdaCodeResolverRegistry = new GenericCodeResolverRegistryImpl();

            Assembly cdaAssembly = Assembly.Load("message-builder-release-cda-ab-shr");

            cdaCodeResolverRegistry.Register(new CdaCodeResolver(
                                                 new TypedCodeFactory(),
                                                 ResourceLoader.GetResource(cdaAssembly, "/voc.xml"),
                                                 ResourceLoader.GetResource(cdaAssembly, "/vocabNameMap.xml"),
                                                 CdaCodeResolver.MODE_LENIENT
                                                 ));

            CodeResolverRegistry.RegisterCodeResolverRegistryForVersion(SpecificationVersion.CDA_AB_SHR, cdaCodeResolverRegistry);
        }