diff --git a/extraJars/applications-api-3.1.1-SNAPSHOT.jar b/extraJars/applications-api-3.1.2-SNAPSHOT.jar similarity index 82% rename from extraJars/applications-api-3.1.1-SNAPSHOT.jar rename to extraJars/applications-api-3.1.2-SNAPSHOT.jar index 13aa94f25..3728274dc 100644 Binary files a/extraJars/applications-api-3.1.1-SNAPSHOT.jar and b/extraJars/applications-api-3.1.2-SNAPSHOT.jar differ diff --git a/extraJars/clinical-trials-api-3.1.1-SNAPSHOT.jar b/extraJars/clinical-trials-api-3.1.2-SNAPSHOT.jar similarity index 86% rename from extraJars/clinical-trials-api-3.1.1-SNAPSHOT.jar rename to extraJars/clinical-trials-api-3.1.2-SNAPSHOT.jar index 97905f1c9..c8c5a777a 100644 Binary files a/extraJars/clinical-trials-api-3.1.1-SNAPSHOT.jar and b/extraJars/clinical-trials-api-3.1.2-SNAPSHOT.jar differ diff --git a/extraJars/products-api-3.1.1-SNAPSHOT.jar b/extraJars/products-api-3.1.2-SNAPSHOT.jar similarity index 88% rename from extraJars/products-api-3.1.1-SNAPSHOT.jar rename to extraJars/products-api-3.1.2-SNAPSHOT.jar index b54a1d374..ac5721683 100644 Binary files a/extraJars/products-api-3.1.1-SNAPSHOT.jar and b/extraJars/products-api-3.1.2-SNAPSHOT.jar differ diff --git a/gsrs-fda-substance-extension/pom.xml b/gsrs-fda-substance-extension/pom.xml index 317ec4eb9..d0548d2d6 100644 --- a/gsrs-fda-substance-extension/pom.xml +++ b/gsrs-fda-substance-extension/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT 4.0.0 @@ -110,7 +110,7 @@ gov.nih.ncats applications-api - 3.1.1-SNAPSHOT + ${gsrs.applications-api.version} org.apache.logging.log4j @@ -139,7 +139,7 @@ gov.nih.ncats products-api - 3.1.1-SNAPSHOT + ${gsrs.products-api.version} org.apache.logging.log4j @@ -168,7 +168,7 @@ gov.nih.ncats clinical-trials-api - 3.1.1-SNAPSHOT + ${gsrs.clinical-trials-api.version} org.apache.logging.log4j diff --git a/gsrs-module-substance-example/pom.xml b/gsrs-module-substance-example/pom.xml index d139403d2..a3c6b6d9f 100644 --- a/gsrs-module-substance-example/pom.xml +++ b/gsrs-module-substance-example/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT 4.0.0 @@ -339,7 +339,7 @@ commons-io commons-io - 2.11.0 + 2.14.0 org.apache.commons diff --git a/gsrs-module-substance-example/src/main/resources/application.conf b/gsrs-module-substance-example/src/main/resources/application.conf index b8e306a34..09d5102e8 100644 --- a/gsrs-module-substance-example/src/main/resources/application.conf +++ b/gsrs-module-substance-example/src/main/resources/application.conf @@ -25,8 +25,8 @@ ix.authentication.logheaders=false #logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE logging.level.gsrs.module.substance.scrubbers.basic=trace -gsrs.matchableCalculators.substances = -[ +gsrs.matchableCalculators.substances.list.CASNumberMatchableExtractor = +{ {"matchableCalculationClass" : "gsrs.dataexchange.extractors.CASNumberMatchableExtractor", "config" :{ "casCodeSystems": ["CAS", "CASNo", "CASNumber"] @@ -49,5 +49,5 @@ gsrs.matchableCalculators.substances = "codeKey": "CODE" } } -] +} diff --git a/gsrs-module-substance-example/src/main/resources/fda-extension.conf b/gsrs-module-substance-example/src/main/resources/fda-extension.conf index e53091216..72b63cc57 100644 --- a/gsrs-module-substance-example/src/main/resources/fda-extension.conf +++ b/gsrs-module-substance-example/src/main/resources/fda-extension.conf @@ -24,9 +24,11 @@ gsrs.microservice.clinicaltrialseurope.api.headers= { "auth-key"="myKey" } -gsrs.entityProcessors +={ +gsrs.entityProcessors.list.UniqueCodeGenerator = + { "entityClassName" = "ix.ginas.models.v1.Substance", "processor" = "gsrs.module.substance.processors.UniqueCodeGenerator", + "order" = 8010, "with"= { "useLegacy"=true, "codesystem"="BDNUM", @@ -39,34 +41,64 @@ gsrs.entityProcessors +={ } } -gsrs.entityProcessors += - { - "entityClassName" = "ix.ginas.models.v1.Substance", - "processor" = "gsrs.module.substance.processors.ApprovalIdProcessor", - "parameters" = { - "codeSystem" = "FDA UNII" +gsrs.entityProcessors.list.ApprovalIdProcessor = + { + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.ApprovalIdProcessor", + "order" = 6010 } + + + + + +# can we remove this section since all these are in substances-core.conf? +ix.ginas.export.exporterfactories.substances.list.FDANameExporterFactory = + { + "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDANameExporterFactory", + "order" = 1200, + "disabled" = true, + "parameters":{ + } + } +ix.ginas.export.exporterfactories.substances.list.FDACodeExporterFactory = + { + "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDACodeExporterFactory", + "order" = 1300, + "disabled" = true, + "parameters":{ } + } +ix.ginas.export.exporterfactories.substances.list.SPLValidatorXMLExporterFactory = + { + "exporterFactoryClass" = "fda.gsrs.substance.exporters.SPLValidatorXMLExporterFactory", + "order" = 1400, + "disabled" = true, + "parameters":{ + } + } +ix.ginas.export.exporterfactories.substances.list.SRSLegacyDictionaryExporterFactory = + { + "exporterFactoryClass" = "fda.gsrs.substance.exporters.SRSLegacyDictionaryExporterFactory", + "order" = 1500, + "disabled" = true, + "parameters":{ + } + } -ix.ginas.export.factories.substances = ${ix.ginas.export.factories.substances}[ - #"gsrs.module.substance.ExtraColumnsSpreadsheetExporterFactory", - "fda.gsrs.substance.exporters.FDANameExporterFactory", - "fda.gsrs.substance.exporters.FDACodeExporterFactory", - "fda.gsrs.substance.exporters.SPLValidatorXMLExporterFactory", - "fda.gsrs.substance.exporters.SRSLegacyDictionaryExporterFactory", - - # "ix.ginas.exporters.SRSLegacyDictionaryExporterFactory" -] -ix.ginas.approvalIdGenerator.generatorClass=ix.ginas.utils.UNIIGenerator -gsrs.validators.substances += { +ix.ginas.approvalIdGenerator.generatorClass=ix.ginas.utils.UNIIGenerator - "validatorClass" = "fda.gsrs.substance.validators.BdNumModificationValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - } + +gsrs.validators.substances.list.BdNumModificationValidator = + { + "validatorClass" = "fda.gsrs.substance.validators.BdNumModificationValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1010 + } diff --git a/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java b/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java index bd53ce685..1da203cc8 100644 --- a/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java +++ b/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java @@ -34,17 +34,21 @@ public void testSetup() throws IllegalAccessException, NoSuchFieldException, Jso String substanceContext = "substances"; //build up a complete configuration GsrsFactoryConfiguration config = new GsrsFactoryConfiguration(); - Map>> adapterConfig = new HashMap<>(); + Map>>> adapterConfig = new HashMap<>(); Map oneAdapter = new HashMap<>(); oneAdapter.put("importAdapterFactoryClass", "gsrs.module.substance.importers.SDFImportAdapterFactory"); + oneAdapter.put("order", 1000); + oneAdapter.put("parentKey", "SDFImportAdapterFactory"); oneAdapter.put("adapterName", "NSRS SDF Adapter"); oneAdapter.put("extensions", Arrays.asList("sdf", "sd")); oneAdapter.put("parameters", buildConfigParameters()); oneAdapter.put("stagingAreaServiceClass", gsrs.stagingarea.service.DefaultStagingAreaService.class); oneAdapter.put("entityServiceClass", "gsrs.dataexchange.SubstanceStagingAreaEntityService"); - List> adapters = new ArrayList<>(); - adapters.add(oneAdapter); - adapterConfig.put(substanceContext, adapters); + Map> adapters = new HashMap<>(); + // ix.ginas.export.exporterfactories.substances.list.SdfExporterFactory = + adapters.put("SDFImportAdapterFactory", oneAdapter); + adapterConfig.put(substanceContext, null); + adapterConfig.get(substanceContext).put("list", adapters); config.setImportAdapterFactories(adapterConfig); ConfigBasedGsrsImportAdapterFactoryFactory factoryFactory = new ConfigBasedGsrsImportAdapterFactoryFactory(); Field configField = factoryFactory.getClass().getDeclaredField("gsrsFactoryConfiguration"); //gsrs.imports.ConfigBasedGsrsImportAdapterFactoryFactory. diff --git a/gsrs-module-substance-example/src/test/java/example/imports/StagingAreaServiceTest.java b/gsrs-module-substance-example/src/test/java/example/imports/StagingAreaServiceTest.java index 4089adc72..9a7d4db74 100644 --- a/gsrs-module-substance-example/src/test/java/example/imports/StagingAreaServiceTest.java +++ b/gsrs-module-substance-example/src/test/java/example/imports/StagingAreaServiceTest.java @@ -29,39 +29,43 @@ public class StagingAreaServiceTest extends AbstractSubstanceJpaEntityTest { @BeforeEach public void setup() throws NoSuchFieldException, IllegalAccessException { + // gsrs.matchableCalculators.substances.list.KEY = + + if( stagingAreaService == null ){ log.trace("setting up staging area service"); stagingAreaService = new DefaultStagingAreaService(); stagingAreaService = AutowireHelper.getInstance().autowireAndProxy(stagingAreaService); - Map>> matchableCalculatorConfig = new HashMap<>(); - List> configs = new ArrayList<>(); + Map>>> matchableCalculatorConfig = new HashMap<>(); + Map> configs = new HashMap<>(); Map casExtractor = new HashMap<>(); casExtractor.put("matchableCalculationClass", CASNumberMatchableExtractor.class); LinkedHashMap config= new LinkedHashMap<>(); config.put("casCodeSystems", Arrays.asList("CAS", "CASNo", "CASNumber")); casExtractor.put("config", config); - configs.add(casExtractor); + configs.put("CASNumberMatchableExtractor", casExtractor); Map namesExtractor = new HashMap<>(); namesExtractor.put("matchableCalculationClass", AllNamesMatchableExtractor.class); - configs.add(namesExtractor); + configs.put("AllNamesMatchableExtractor", namesExtractor); Map defHashExtractor = new HashMap<>(); defHashExtractor.put("matchableCalculationClass", DefinitionalHashMatchableExtractor.class); - configs.add(defHashExtractor); + configs.put("DefinitionalHashMatchableExtractor", defHashExtractor); Map selectedCodesExtractor = new HashMap<>(); selectedCodesExtractor.put("matchableCalculationClass", SelectedCodesMatchableExtractor.class); LinkedHashMap config2= new LinkedHashMap<>(); config2.put("codeSystems", Arrays.asList("CAS", "ChemBL", "NCI", "NSC", "EINECS")); selectedCodesExtractor.put("config", config2); - configs.add(selectedCodesExtractor); + configs.put("SelectedCodesMatchableExtractor", selectedCodesExtractor); Map uuidExtractor = new HashMap<>(); uuidExtractor.put("matchableCalculationClass", UUIDMatchableExtractor.class); - configs.add(uuidExtractor); - matchableCalculatorConfig.put("substances", configs); - + configs.put("UUIDMatchableExtractor", uuidExtractor); + matchableCalculatorConfig.put("substances", + new HashMap>>(){{ put("list", configs);}} + ); SubstanceStagingAreaEntityService stagingAreaEntityService = new SubstanceStagingAreaEntityService(); stagingAreaEntityService = AutowireHelper.getInstance().autowireAndProxy(stagingAreaEntityService); Field factoryConfigField= stagingAreaEntityService.getClass().getDeclaredField("gsrsFactoryConfiguration"); diff --git a/gsrs-module-substance-example/src/test/java/example/substance/indexer/ExampleValueMakerTest.java b/gsrs-module-substance-example/src/test/java/example/substance/indexer/ExampleValueMakerTest.java index 4dc007f52..73d113889 100644 --- a/gsrs-module-substance-example/src/test/java/example/substance/indexer/ExampleValueMakerTest.java +++ b/gsrs-module-substance-example/src/test/java/example/substance/indexer/ExampleValueMakerTest.java @@ -114,6 +114,7 @@ public void addExternalActiveMoietyShouldResultInChildSubstanceTag(){ }) .generateNewUUID() + // test fails here, seems to be cdk layout error .build(); this.testIndexableValuesHasFacet(childSub, ExampleValueMaker.MOIETY_TYPE_FACET, ExampleValueMaker.CHILD_SUBSTANCE_RELATIONSHIP); diff --git a/gsrs-module-substance-example/src/test/java/example/substance/processor/ConfigurableMolweightProcessorTest.java b/gsrs-module-substance-example/src/test/java/example/substance/processor/ConfigurableMolweightProcessorTest.java index b3b7ab4e3..f44c3c11c 100644 --- a/gsrs-module-substance-example/src/test/java/example/substance/processor/ConfigurableMolweightProcessorTest.java +++ b/gsrs-module-substance-example/src/test/java/example/substance/processor/ConfigurableMolweightProcessorTest.java @@ -106,6 +106,7 @@ public void testComplexMwCalcProperty() throws IOException { ChemicalSubstanceBuilder builder = new ChemicalSubstanceBuilder(); builder.addName("benzene") .setStructureWithDefaultReference("C[N+](C)(C)C.[O-]C(=O)c1ccc2ncccc2c1"); + // test fails here, seems to be cdk layout error ChemicalSubstance chemical = builder.build(); processor.prePersist(chemical); Property mwProp = chemical.properties.stream() diff --git a/gsrs-module-substance-example/src/test/resources/application-test.conf b/gsrs-module-substance-example/src/test/resources/application-test.conf index fd6b9dfa9..6a882ac59 100644 --- a/gsrs-module-substance-example/src/test/resources/application-test.conf +++ b/gsrs-module-substance-example/src/test/resources/application-test.conf @@ -8,6 +8,7 @@ substance.renderer.configPath=substances-default-renderer.json approval_id_code_system="UNII from FDA" logging.level.root=error #logging.level.example.imports=trace +#logging.level.example.imports=trace #logging.level.gsrs.imports=trace #logging.level.example.substance.processor=trace #logging.level.gsrs.module.substance.processors=trace @@ -61,12 +62,15 @@ gsrs.standardizers.substances = { } } -gsrs.importAdapterFactories.substances = - [ + +# reconcile how this stuff is configured +gsrs.importAdapterFactories.substances.list = null +gsrs.importAdapterFactories.substances.list.SDFImportAdapterFactory = { "adapterName": "SDF Adapter", "importAdapterFactoryClass": "gsrs.module.substance.importers.SDFImportAdapterFactory", + "order": 1000, "stagingAreaServiceClass": "gsrs.stagingarea.service.DefaultStagingAreaService", "entityServiceClass" :"gsrs.dataexchange.SubstanceStagingAreaEntityService", "description" : "SD file importer for general users", @@ -303,7 +307,8 @@ gsrs.importAdapterFactories.substances = } ] } - }, + } +gsrs.importAdapterFactories.substances.list.DelimTextImportAdapterFactory = { "adapterName": "Delimited Text Adapter", "importAdapterFactoryClass": "gsrs.module.substance.importers.DelimTextImportAdapterFactory", @@ -436,7 +441,8 @@ gsrs.importAdapterFactories.substances = ], "lineValueDelimiter": "," } - }, + } +gsrs.importAdapterFactories.substances.list.ExcelFileImportAdapterFactory = { "adapterName": "Excel File Adapter", "importAdapterFactoryClass": "gsrs.module.substance.importers.ExcelFileImportAdapterFactory", @@ -567,7 +573,8 @@ gsrs.importAdapterFactories.substances = ], "lineValueDelimiter": "," } - }, + } +gsrs.importAdapterFactories.substances.list.GSRSJSONImportAdapterFactory = { "adapterName": "GSRS JSON Adapter", "importAdapterFactoryClass": "gsrs.module.substance.importers.GSRSJSONImportAdapterFactory", @@ -584,6 +591,4 @@ gsrs.importAdapterFactories.substances = } } - ] - -gsrs.substance.structures.saltFilePath=salt_data_public.tsv \ No newline at end of file +gsrs.substance.structures.saltFilePath=salt_data_public.tsv diff --git a/gsrs-module-substances-api/pom.xml b/gsrs-module-substances-api/pom.xml index 42b298e2a..49e2495dc 100644 --- a/gsrs-module-substances-api/pom.xml +++ b/gsrs-module-substances-api/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT 4.0.0 diff --git a/gsrs-module-substances-core/pom.xml b/gsrs-module-substances-core/pom.xml index 675a6c34c..7039b183e 100644 --- a/gsrs-module-substances-core/pom.xml +++ b/gsrs-module-substances-core/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT 4.0.0 diff --git a/gsrs-module-substances-core/src/main/java/gsrs/module/substance/datasource/DefaultCodeSystemUrlGenerator.java b/gsrs-module-substances-core/src/main/java/gsrs/module/substance/datasource/DefaultCodeSystemUrlGenerator.java index a22319c6f..13af814e4 100644 --- a/gsrs-module-substances-core/src/main/java/gsrs/module/substance/datasource/DefaultCodeSystemUrlGenerator.java +++ b/gsrs-module-substances-core/src/main/java/gsrs/module/substance/datasource/DefaultCodeSystemUrlGenerator.java @@ -30,9 +30,10 @@ public class DefaultCodeSystemUrlGenerator implements DataSet, C The JSON looks like this: [{"codeSystem":"XYZ","url":"http://some.url.com/$CODE$"}, {...}] 2) Configure like so: - gsrs.entityProcessors += { + gsrs.entityProcessors.list.CodeProcessor = { "class":"ix.ginas.models.v1.Substance", "processor":"gsrs.module.substance.processors.CodeProcessor", + "order": 1000, "with": { "class":"gsrs.module.substance.datasource.DefaultCodeSystemUrlGenerator", "json":{ diff --git a/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java b/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java index 492a010d6..6abb89049 100644 --- a/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java +++ b/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java @@ -7,6 +7,7 @@ import lombok.extern.slf4j.Slf4j; import org.junit.Assert; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; @@ -130,15 +131,23 @@ public class ChemicalUtils { @PostConstruct private void setUpSalts() { - log.warn("in setUpSalts, structureHandlingConfiguration.getSaltFilePath(): {}", structureHandlingConfiguration.getSaltFilePath()); + if( structureHandlingConfiguration.getSaltFilePath() == null ) { + log.warn("ChemicalUtils - setUpSalts not initialized"); + return; + } + log.trace("in setUpSalts, structureHandlingConfiguration.getSaltFilePath(): {}", structureHandlingConfiguration.getSaltFilePath()); saltData = new HashMap<>(); try { - File file = new File(structureHandlingConfiguration.getSaltFilePath()); - Assert.assertTrue("input salt data file must exist!", file.exists()); + String path = structureHandlingConfiguration.getSaltFilePath(); + log.info("Trying to read salt file at path: " + path); + File file = new ClassPathResource(path).getFile(); + Assert.assertTrue("input salt data file must exist! The path was: " + path, file.exists()); List lines = Files.readAllLines(file.toPath()); for (String line : lines) { - String[] lineParts = line.split("\\t"); - saltData.put(lineParts[0], lineParts[1]); + if (line.matches(".*\\w.*")) { + String[] lineParts = line.split("\\t"); + saltData.put(lineParts[0], lineParts[1]); + } } } catch (Exception ex){ diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/CodeSequentialGenerator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/CodeSequentialGenerator.java index 3ab7d235d..61aa5d826 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/CodeSequentialGenerator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/CodeSequentialGenerator.java @@ -30,7 +30,7 @@ If you don't specify a length the default will be Long.MAX_VALUE Configure like so: - gsrs.entityProcessors +={ + gsrs.entityProcessors.list.UniqueCodeGenerator = { "entityClassName" = "ix.ginas.models.v1.Substance", "processor" = "gsrs.module.substance.processors.UniqueCodeGenerator", "with"= { diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/tags/TagsValidator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/tags/TagsValidator.java index 5eba2cd4d..a7e9b9b17 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/tags/TagsValidator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/tags/TagsValidator.java @@ -44,7 +44,7 @@ public class TagsValidator extends AbstractValidatorPlugin { * * Without this setting, the validator will not be run on submission of a substance. * - * gsrs.validators.substances += { + * gsrs.validators.substances.list.TagsValidator = { * "validatorClass" = "ix.ginas.utils.validation.validators.tags.TagsValidator", * "newObjClass" = "ix.ginas.models.v1.Substance", * parameters: { diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index 81764fb00..d6eafa610 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -220,206 +220,327 @@ gsrs.standardizers.substances = { } } -gsrs.validators.substances = [ - # public Class validatorClass; - # public Class substanceClass; - # public Substance.SubstanceDefinitionType type; - +gsrs.validators.substances.list.IgnoreValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.IgnoreValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "configClass" = "SubstanceValidatorConfig" - }, + "order": 100 + } +gsrs.validators.substances.list.NullCheckValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NullCheckValidator", "newObjClass" = "ix.ginas.models.v1.Substance", - - }, + "order": 200 + } +gsrs.validators.substances.list.AutoGenerateUuidIfNeeded = { "validatorClass" = "ix.ginas.utils.validation.validators.AutoGenerateUuidIfNeeded", "newObjClass" = "ix.ginas.models.v1.Substance", - }, + "order": 300 + } +gsrs.validators.substances.list.StructuralModificationsValidator = { #validates that any structural modifications are effectively non-null "validatorClass" = "ix.ginas.utils.validation.validators.StructuralModificationsValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 400 }, +gsrs.validators.substances.list.SubstanceStatusValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.SubstanceStatusValidator", "newObjClass" = "ix.ginas.models.v1.Substance", - }, - { + "order": 500 + } +gsrs.validators.substances.list.RemovePublicIndReferences = { "validatorClass" = "ix.ginas.utils.validation.validators.RemovePublicIndReferences", "newObjClass" = "ix.ginas.models.v1.Substance", - }, + "order": 600 + } +gsrs.validators.substances.list.NamesValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NamesValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 700, "type" = "PRIMARY" "configClass" = "SubstanceValidatorConfig", "parameters"= { "caseSearchType": "Explicit" "caseSearchType": ${?SUBSTANCE_NAMES_VALIDATOR_CASE_SEARCH_TYPE} } - }, - + } +gsrs.validators.substances.list.PrimaryRelationshipsValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.PrimaryRelationshipsValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 800, "type" = "PRIMARY" "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.list.NotesValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NotesValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 900, "type" = "PRIMARY" "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.list.PrimaryDefinitionValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.PrimaryDefinitionValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1000, "type" = "PRIMARY" "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.list.AlternateDefinitionValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.AlternateDefinitionValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1100, "type" = "ALTERNATIVE" "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.list.ChemicalValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.ChemicalValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1200, "substanceClass" = "chemical", - #September 2020: additional parameter 'allow0AtomStructures' when true -> user can register blank structures; false -> no blank structures + # September 2020: additional parameter 'allow0AtomStructures' when true -> user can register blank structures; false -> no blank structures "parameters"= {"allow0AtomStructures":false, "allowV3000Molfiles": false } - "configClass" = "SubstanceValidatorConfig" - }, + "configClass" = "SubstanceValidatorConfig" + } +gsrs.validators.substances.list.MixtureValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.MixtureValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1300, "substanceClass" = "mixture" "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.list.NucleicAcidValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NucleicAcidValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1400, "substanceClass" = "nucleicAcid", "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.list.PolymerValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.PolymerValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1500, "substanceClass" = "polymer" "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.list.ProteinValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.ProteinValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1600, "substanceClass" = "protein" "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.list.StructurallyDiverseValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.StructurallyDiverseValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1700, "substanceClass" = "structurallyDiverse" "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.list.SSSG1Validator = { "validatorClass" = "ix.ginas.utils.validation.validators.SSSG1Validator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1800 "substanceClass" = "specifiedSubstanceG1", "configClass" = "SubstanceValidatorConfig" }, +gsrs.validators.substances.list.UnknownSubstanceClassValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.UnknownSubstanceClassValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - }, + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1900 + } +gsrs.validators.substances.list.NewSubstanceNonBatchLoadValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NewSubstanceNonBatchLoadValidator", "newObjClass" = "ix.ginas.models.v1.Substance", - - }, + "order": 2000 + } +gsrs.validators.substances.list.UpdateSubstanceNonBatchLoaderValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.UpdateSubstanceNonBatchLoaderValidator", "newObjClass" = "ix.ginas.models.v1.Substance", - - }, + "order": 2100 + } +gsrs.validators.substances.list.PublicDomainRefValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.PublicDomainRefValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - }, - { - "validatorClass" = "ix.ginas.utils.validation.validators.DefinitionalHashValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - }, - - # Added 9 November 2020 MAM - #make sure than a public substance has at least one public definitional reference - { - "validatorClass" = "ix.ginas.utils.validation.validators.DefinitionalReferenceValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - }, - # Validator for Relationship modifications (restrict to admins) - { - "validatorClass" = "ix.ginas.utils.validation.validators.RelationshipModificationValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - }, - #Make sure each property has a name - { - "validatorClass" = "ix.ginas.utils.validation.validators.PropertyValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - }, - - #check the mol files of chemical substances and throw errors if there are SUP s-groups. - #to remove this check comment out or delete this statement. - { - "validatorClass" = "ix.ginas.utils.validation.validators.SuperatomValidator", - "newObjClass" = "ix.ginas.models.v1.Substance", - "substanceClass" = "chemical", - "configClass" = "SubstanceValidatorConfig" - } - -# #Standardize Names; Listed here for reference. Copy and paste into your application.conf and uncomment. -# { -# "validatorClass" = "ix.ginas.utils.validation.validators.StandardNameValidator", -# "newObjClass" = "ix.ginas.models.v1.Substance", -# "configClass" = "SubstanceValidatorConfig", -# "parameters"= { -# "behaviorOnInvalidStdName": "warn" -# } -# } + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2200 + } +gsrs.validators.substances.list.DefinitionalHashValidator = + { + "validatorClass" = "ix.ginas.utils.validation.validators.DefinitionalHashValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2300, + "disabled": false + } +gsrs.validators.substances.list.DefinitionalReferenceValidator = + { + "validatorClass" = "ix.ginas.utils.validation.validators.DefinitionalReferenceValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2400 + } +gsrs.validators.substances.list.RelationshipModificationValidator = + # Validator for Relationship modifications (restrict to admins) + { + "validatorClass" = "ix.ginas.utils.validation.validators.RelationshipModificationValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2500, + "disabled": false + } +gsrs.validators.substances.list.PropertyValidator = + # Make sure each property has a name + { + "validatorClass" = "ix.ginas.utils.validation.validators.PropertyValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2600, + "disabled": false + } +gsrs.validators.substances.list.SuperatomValidator = + # Check the mol files of chemical substances and throw errors if there are SUP s-groups. + # To remove this check comment out or delete this statement. + { + "validatorClass" = "ix.ginas.utils.validation.validators.SuperatomValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2700, + "substanceClass" = "chemical", + "configClass" = "SubstanceValidatorConfig" + } + +# __aw__ including this here and not in MS, cross check with substances service +gsrs.validators.substances.list.StandardNameValidator = + #Standardize Names; Listed here for reference. Copy and paste into your application.conf and uncomment. + { + "validatorClass" = "ix.ginas.utils.validation.validators.StandardNameValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2800, + "configClass" = "SubstanceValidatorConfig", + "parameters"= { + "behaviorOnInvalidStdName": "warn" + } + } + +# __aw__ include this in substance-core.conf instead in microservice since it can now be disabled easily +# __aw__ make sure this is still consistent with FDA ??? +# Manage tags/bracketed terms in names per FDA configuration. +# In FDA's case: +# No automatic addition in tags found in names to explicit tag list. +# No automatic deletion of explicit tags missing from bracketed terms. +# Warnings off for bracket name missing from tags; warning on for explicit tag missing from names. +gsrs.validators.substances.list.TagsValidator = { + "validatorClass" = "ix.ginas.utils.validation.validators.tags.TagsValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2850, + "parameters" = { + "checkExplicitTagsExtractedFromNames": false, + "checkExplicitTagsMissingFromNames": true, + "addExplicitTagsExtractedFromNamesOnCreate": false, + "addExplicitTagsExtractedFromNamesOnUpdate": false, + "removeExplicitTagsMissingFromNamesOnCreate": false, + "removeExplicitTagsMissingFromNamesOnUpdate": false + } +} + -] ############################################## # THIS IS IMPORTANT, ADDITION OF VALIDATORS! ############################################## - -#gsrs.substance.validators -gsrs.validators.substances += { - "validatorClass" = "ix.ginas.utils.validation.validators.CodeFormatValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" +gsrs.validators.substances.list.CodeFormatValidator = + { + "validatorClass" = "ix.ginas.utils.validation.validators.CodeFormatValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2900 } - -#TODO katzelda Feb 2021: remove for now -#Check that individual moieties of a multi-moiety chemical are registered separately -gsrs.validators.substances += { +gsrs.validators.substances.list.SaltValidator = + # TODO katzelda Feb 2021: remove for now + # Check that individual moieties of a multi-moiety chemical are registered separately + { "validatorClass" = "ix.ginas.utils.validation.validators.SaltValidator", - "newObjClass" = "ix.ginas.models.v1.ChemicalSubstance" + "newObjClass" = "ix.ginas.models.v1.ChemicalSubstance", + "order": 3000 } -#check for uniqueness of several classes of substance based on definitional hashes -gsrs.validators.substances += { +gsrs.validators.substances.list.SubstanceUniquenessValidator = + # Check for uniqueness of several classes of substance based on definitional hashes + { "validatorClass" = "ix.ginas.utils.validation.validators.SubstanceUniquenessValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 3100 } - -# add check for CAS RNs -gsrs.validators.substances += { +gsrs.validators.substances.list.CASCodeValidator = + { + # add check for CAS RNs "validatorClass" = "ix.ginas.utils.validation.validators.CASCodeValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - } + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 3200 + } + +# when compariing to old branch move this block from where it is in the comparison file so it is next to here + +gsrs.validators.substances.list.SetReferenceAccess = + { + "validatorClass" = "ix.ginas.utils.validation.validators.SetReferenceAccess", + "newObjClass" = "ix.ginas.models.v1.Substance", + "configClass" = "SubstanceValidatorConfig", + "order": 3300, + "suggestedPublic": [ + "ACD", "ALANWOOD", "ALGAEBASE", "AMERICAN BOTANICAL COUNCIL", "ANNONBASE", + "ATC INN", "ATCC", "AUSTRALIAN PLANT NAME INDEX", "BAN", "BIOPHARMA", "BIOS", "BIOSYSTEMATIC DATABASE of WORLD DIPTERA", + "BLATTODEA SPECIES", "BOOK", "BRASSICACEAE", "BRITISH PHARMACOPOEIA", "CAS", "CATALOGUE OF LIFE CHINA", "CENTER FOR DISEASE CONTROL", "CFR", + "CHEBI", "CHEMBANK", "CHEMID", "CHEMSPIDER", "CHENOBASE", "CHINESE HERBAL MEDICINE", "CLINICAL PHARMACOLOGY", "CLINICAL_TRIALS.GOV", "CLINICALTRIALS", "CODEX Alimentarius", "COMBINED CHEMICAL DICTIONARY", "CONIFER DATABASE", "CTD_TOXICOGENOMICS", "CVM GREEN BOOK", "DAILYMED", "DOSE", "DOTHIDEOMYCETES", "DROSERACEAE DATABASE", "DRUG PRODUCT LABEL", "DRUGS@FDA", "EAFUS", "EC FLAVOURING SUBSTANCES", "ECHA (EC/EINECS)", "EMA LIST", "EMA REVIEW", "EP", "EPA", "EU CLINICAL TRIALS", "EUROPEAN PHARMACOPEIA", "EVMPD", "FACTS AND COMPARISIONS", "FADA BIVALVIA", "FDA APPROVED DRUG LABEL", "FDA GUIDANCE", "FEDERAL REGISTER", "FISHBASE", "FOOD LOVERS COMPANION", "GERANIUM TAXONOMIC INFORMATION SYSTEM", "GLOBAL BIODIVERSITY INFORMATION FACILITY", "GLOBAL COMPOSITAE CHECKLIST", "GLOMEROMYCOTA", "GREEN BOOK", "GRIN", "HANDBOOK OF FLAVOR INGREDIENTS", "HANDBOOK OF FLAVORS & FRAGRANCES", "HANDBOOK OF INORGANIC CHEMICALS", "HANDBOOK OF PHARMACEUTICAL ADDITIVES", "HANDBOOK OF PHARMACEUTICAL EXCIPIENTS", "HAWLEY CONDENSED CHEMICAL DICTIONARY", "HEALTH CANADA", "HERBAL MEDICINES", "HERBS OF COMMERCE", "HOMEOPATHIC PHARMACOPOEIA US", "HPE-KIBBE", "ICSAS", "ICTV", "ILDIS", "INCB", "INTELEOS", "INTERNATIONAL ORGANIZATION FOR PLANT INFORMATION", "INTERNATIONAL PLANT NAMES INDEX", "INVESTIGATOR BROCHURE", "ISO", "IT IS", "IUPHAR", "JA", "JAN", "JAPAN CHEMICAL SUBSTANCE DICTIONARY", "JAPANESE PHARMACOPOEIA", "JECFA", "JECFA: JOINT FAO/WHO COMMITTEE FOOD ADD", "KEGG", "KEW GARDENS (WCPS)", "KEW GARDENS FUNGI", "KNOVEL CONTENT", "LANDES MUSEUM BIOLOGIEZENTRUM", "LANGUAL", "LECYTHIDACEAE PAGES", "LEPINDEX", "LEUNG NATURAL INGREDIENTS", "LEUNGS ENCYLOPEDIA OF COMMON NATURAL INGREDIENTS 3RD ED.", "LEXI-COMP", "LIAS", "MANUFACTURER PRODUCT ", "MARTINDALE", "MATERIA MEDICA FOR CHINESE MEDICINE", "MDDR", "MEETING ABSTRACT", "MELASTOMATACEAE.NET", "MERCK INDEX", "MICROMEDEX", "MIRBASE", "MSDS", "MYCOBANK", "NCATS List", "NCBI", "NCI DRUG DICTIONARY", "NCI THESAURUS", "NCI_NDFRT", "NDA PUBLIC REVIEW", "NDF-RT", "NEW ZEALAND ORGANISMS REGISTER", "NIAID CHEMDB", "NIST WEBBOOK", "NLM", "NOMEN.EUMYCETOZOA.COM", "OMOP", "ORANGE BOOK", "ORPHAN DRUG", "ORTHOPTERA SPECIES FILE", "PARHOST", "PATENT", "PATTYS TOXICOLOGY", "PERSONAL CARE PRODUCTS COUNCIL", "PHARMACOPOEIA OF THE PEOPLE'S REPUBLIC OF CHINA", "PHARMAPROJECTS", "PLANT LIST", "PLANTS FOR A FUTURE", "PLOTKIN VACCINES", "PRODUCT PACKAGE INSERT", "RJB GERANIUM", "SAX DANGEROUS PROPERTIES", "SCALENET", "SIGMA-ALDRICH", "SITTIG HANDBOOK OF PESTICIDES", "SLOAN-KETT", "SOLANACEAE SOURCE", "SPECIALTY CHEMICALS", "SPIDCAT", "STN (SCIFINDER)", "SWEDISH SUBSTANCE LIST", "SWISS MEDIC", "SYSTEMA DIPTERORUM", "TIGR REPTILES", "TOBACCO KNOWLEDGE BASE", "TOX21", "TROPICOS", "UCSF-FDA TRANSPORTAL", "UNIPROT", "URMO", "USP", "USP DIETARY SUPPLEMENTS COMPENDIUM", "USP FOOD CHEMICALS CODEX", "USP HERBAL MEDICINES COMPENDIUM", "USP PHARMACOPOEIAL FORUM", "USP-MC", "USPNF", "VATC", + "WEBSITE", "WHO DRUG DICTIONARY", "WHO INTERNATIONAL PHARMACOPOEIA", + "WIKI", "WORLD BIODIVERSITY DATABASE", "WORLD PLANTS", "WORLD UMBELLIFER DATABASE", "WEB PAGE"], + "alwaysPrivate" : ["ANDA", "BLA", "EU-NCA (CBG-MEB)", "IND", "INTEGRITY SERVICES", "NDA"], + "referenceCitationPatterns" : [".*[^A-Z]IND[^A-Z]*[0-9][0-9][0-9]*.*"] + } +#removed from suggestedPublic but not yet added to alwaysPrivate: CTP and DMF + +gsrs.validators.substances.list.CodesValidator = + { + "validatorClass" = "ix.ginas.utils.validation.validators.CodesValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 3400, + "configClass" = "SubstanceValidatorConfig" + } +gsrs.validators.substances.list.ChemicalUniquenessValidator = + { + "validatorClass" = "ix.ginas.utils.validation.validators.ChemicalUniquenessValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 3500, + "configClass" = "SubstanceValidatorConfig", + "parameters"= {} + } + +# commented out do we want it but disabled? +# gsrs.validators.substances.list.CodeUniquenessValidator = +# { +# "validatorClass" = "ix.ginas.utils.validation.validators.CodeUniquenessValidator", +# "newObjClass" = "ix.ginas.models.v1.Substance", +# "order": 3600, +# "configClass" = "SubstanceValidatorConfig", +# "parameters"= {"singletonCodeSystems" =["CAS"]} +# } + + + + @@ -431,14 +552,17 @@ server.servlet-path=/loop-service server.use-forward-headers=true -ix.api.registeredfunctions =${ix.api.registeredfunctions}[ +ix.api.registeredfunctions.list.InChIRegisteredFunction = { - "class":"ix.core.util.pojopointer.extensions.InChIRegisteredFunction" - }, + "registeredFunctionClass": "ix.core.util.pojopointer.extensions.InChIRegisteredFunction", + "order": 1500 + } +ix.api.registeredfunctions.list.InChIFullRegisteredFunction = { - "class":"ix.core.util.pojopointer.extensions.InChIFullRegisteredFunction" + "registeredFunctionClass":"ix.core.util.pojopointer.extensions.InChIFullRegisteredFunction" + "order": 1600, } -] + substance.renderer.style="CONF" substance.renderer.configPath="substances-default-renderer.json" @@ -451,26 +575,78 @@ ix.gsrs.delimitedreports.inchikeysforambiguousstereo=true #if more than one Exporter supports the same file extension, #the class in the list that supports it fist wins. -ix.ginas.export.factories.substances = [ - #"gsrs.module.substance.ExtraColumnsSpreadsheetExporterFactory", - #"gsrs.module.substance.exporters.SdfExporterFactory", - "gsrs.module.substance.exporters.DefaultSubstanceSpreadsheetExporterFactory", - "gsrs.module.substance.exporters.JsonExporterFactory", - #"ix.ginas.exporters.FDANameExporterFactory", - #"ix.ginas.exporters.FDACodeExporterFactory", -# "ix.ginas.exporters.SPLValidatorXMLExporterFactory", - # "ix.ginas.exporters.SRSLegacyDictionaryExporterFactory" + +# __aw__ We need to eliminate this way of configuring exports +XXXX_ix.ginas.export.factories.substances_XXXX = [ + # "gsrs.module.substance.ExtraColumnsSpreadsheetExporterFactory", + # "gsrs.module.substance.exporters.SdfExporterFactory", + # "gsrs.module.substance.exporters.DefaultSubstanceSpreadsheetExporterFactory", + # "gsrs.module.substance.exporters.JsonExporterFactory", + # "ix.ginas.exporters.FDANameExporterFactory", + # "ix.ginas.exporters.FDACodeExporterFactory", + # "ix.ginas.exporters.SPLValidatorXMLExporterFactory", + # "ix.ginas.exporters.SRSLegacyDictionaryExporterFactory" ] -ix.ginas.export.exporterfactories.substances = [ - { - "exporterFactoryClass" : "gsrs.module.substance.exporters.SdfExporterFactory", - "parameters":{ - "approvalIDName": "UNII" - } + +# note some of these are "disabled=true" by default + +ix.ginas.export.exporterfactories.substances.list.DefaultSubstanceSpreadsheetExporterFactory = +{ + "exporterFactoryClass" = "gsrs.module.substance.exporters.DefaultSubstanceSpreadsheetExporterFactory", + "order" = 1000, + "parameters":{ } -] +} +ix.ginas.export.exporterfactories.substances.list.JsonExporterFactory = +{ + "exporterFactoryClass" = "gsrs.module.substance.exporters.JsonExporterFactory", + "order" = 1100, + "parameters":{ + } +} +ix.ginas.export.exporterfactories.substances.list.FDANameExporterFactory = +{ + "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDANameExporterFactory", + "order" = 1200, + "disabled" = true, + "parameters":{ + } +} +ix.ginas.export.exporterfactories.substances.list.FDACodeExporterFactory = +{ + "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDACodeExporterFactory", + "order" = 1300, + "disabled" = true, + "parameters":{ + } +} +ix.ginas.export.exporterfactories.substances.list.SPLValidatorXMLExporterFactory = +{ + "exporterFactoryClass" = "fda.gsrs.substance.exporters.SPLValidatorXMLExporterFactory", + "order" = 1400, + "disabled" = true, + "parameters":{ + } +} +ix.ginas.export.exporterfactories.substances.list.SRSLegacyDictionaryExporterFactory = +{ + "exporterFactoryClass" = "fda.gsrs.substance.exporters.SRSLegacyDictionaryExporterFactory", + "order" = 1500, + "disabled" = true, + "parameters":{ + } +} + +ix.ginas.export.exporterfactories.substances.list.SdfExporterFactory = +{ + "exporterFactoryClass" = "gsrs.module.substance.exporters.SdfExporterFactory", + "order" = 1600, + "parameters":{ + "approvalIDName": "UNII" + } +} substance.definitional-elements.implementations =[ { @@ -516,109 +692,150 @@ gsrs.resolvers.implementations =[ } ] -gsrs.entityProcessors=[ +gsrs.entityProcessors.list.SubstanceProcessor = + { + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.SubstanceProcessor", + "order" = 1000 + } +# gsrs.entityProcessors.list.ChemicalStructurePropertiesProcessor = +# { +# "entityClassName" = "ix.ginas.models.v1.Substance", +# "processor" = "gsrs.module.substance.processors.ChemicalStructurePropertiesProcessor", +# "order" = 1100 +# } +gsrs.entityProcessors.list.PublicTagFlagger = + { + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.PublicTagFlagger" + "order" = 1200 + } +gsrs.entityProcessors.list.ReferenceProcessor = + { + "entityClassName" = "ix.ginas.models.v1.Reference", + "processor" = "gsrs.module.substance.processors.ReferenceProcessor", + "order" = 1300 + } +gsrs.entityProcessors.list.RelationshipProcessor = + { + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.RelationshipProcessor", + "order" = 1400 + } +# gsrs.entityProcessors.list.ApprovalIdProcessor = +# { +# "entityClassName" = "ix.ginas.models.v1.Substance", +# "processor" = "gsrs.module.substance.processors.ApprovalIdProcessor", +# "order" = 1500 +# }, +gsrs.entityProcessors.list.GroupProcessor = + { + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.GroupProcessor", + "order" = 1600 + } + +# __aw__ ask Lihui if this can be here and not in application.conf +gsrs.scheduled-tasks.list.DatabaseIndexSyncTaskInitializer = + { + "scheduledTaskClass" : "gsrs.module.substance.tasks.DatabaseIndexSyncTaskInitializer", + "order" = 1010, + + "parameters" : { + "autorun": false, + "entityString" : "Code,ControlledVocabulary,Name,Reference,Substance" + } + } + +gsrs.scheduled-tasks.list.ReindexTaskInitializer = { -"entityClassName" = "ix.ginas.models.v1.Substance", -"processor" = "gsrs.module.substance.processors.SubstanceProcessor" -}, -#{ -#"entityClassName" = "ix.ginas.models.v1.Substance", -#"processor" = "gsrs.module.substance.processors.ChemicalStructurePropertiesProcessor" -#}, +"scheduledTaskClass" : "gsrs.module.substance.tasks.ReindexTaskInitializer", +"order" = 1050, +"parameters" : { +"autorun": false +} +} + +gsrs.scheduled-tasks.list.StructureRecalcTaskInitializer = { -"entityClassName" = "ix.ginas.models.v1.Substance", -"processor" = "gsrs.module.substance.processors.PublicTagFlagger" -}, +"scheduledTaskClass" : "gsrs.module.substance.tasks.StructureRecalcTaskInitializer", +"order" = 1100, +"parameters" : { +"autorun": false +} +} +gsrs.scheduled-tasks.list.RebackupTaskInitializer = { -"entityClassName" = "ix.ginas.models.v1.Reference", -"processor" = "gsrs.module.substance.processors.ReferenceProcessor" -}, +"scheduledTaskClass" : "gsrs.module.substance.tasks.RebackupTaskInitializer", +"order" = 1200, +"parameters" : { +"autorun": false, + "description" : "Re-backup all Substance entities", + "repositoryClass" : "gsrs.module.substance.repository.SubstanceRepository" + } +} +gsrs.scheduled-tasks.list.ChronicStackDumper = { -"entityClassName" = "ix.ginas.models.v1.Substance", -"processor" = "gsrs.module.substance.processors.RelationshipProcessor" -}, - -#{ -# "entityClassName" = "ix.ginas.models.v1.Substance", -# "processor" = "gsrs.module.substance.processors.ApprovalIdProcessor" -#}, + "scheduledTaskClass" : "gsrs.module.substance.tasks.ChronicStackDumper", +"order" = 1300, + "parameters" : { + "autorun": false, + "dateFormat" : "yyyy.MMMM.dd hh:mm:ss a", #any valid Java 8 DateTimeFormatter + "cron":"0 0/3 * * * ?", #every 3 mins + "outputPath" : "logs/all-running-stacktraces.log" + } +} +gsrs.scheduled-tasks.list.DataRecorder = { - "entityClassName" = "ix.ginas.models.v1.Substance", - "processor" = "gsrs.module.substance.processors.GroupProcessor" +"scheduledTaskClass" : "gsrs.module.substance.tasks.DataRecorder", +"order" = 1400, + "parameters" : { + "autorun": false, + "dateFormat" : "yyyy.MMMM.dd hh:mm:ss a", #any valid Java 8 DateTimeFormatter +"cron":"0/10 * * * * ?", #every 10 seconds + "outputPath" : "logs/datarecorder.log" +} } -] +gsrs.scheduled-tasks.list.ImportMetadataReindexTask = +{ +"scheduledTaskClass" : "gsrs.dataexchange.tasks.ImportMetadataReindexTask", +"order" = 1500, +"parameters": { + "autorun": false +} +} +gsrs.scheduled-tasks.list.SubstanceRefTaskInitializer = +{ +#fixes +"scheduledTaskClass" : "gsrs.module.substance.tasks.SubstanceRefTaskInitializer", +"order" = 1600, +"parameters" : { + "autorun": false, + "refUuidCodeSystem" :"UUID Code", + "reportFilePath" :"logs/substance_reference_report.txt", + "refApprovalIdCodeSystem" : "FDA UNII" +} +} +gsrs.scheduled-tasks.list.CalculateMatchablesScheduledTask = +{ +"scheduledTaskClass" : "gsrs.dataexchange.tasks.CalculateMatchablesScheduledTask", +"order" = 1700, +"parameters" : { + "autorun": false, + "threadCount": 5 # Use max 5 threads, if null or <1 this will use all threads available +} +} +gsrs.scheduled-tasks.list.CalculateStagingAreaMatchablesScheduledTask = +{ +"order" = 1800, +"scheduledTaskClass" : "gsrs.tasks.CalculateStagingAreaMatchablesScheduledTask", +"parameters" : { + "autorun": false, + "threadCount": 5 # Use max 5 threads, if null or <1 this will use all threads available +} +} -gsrs.scheduled-tasks.list=[ - { - "scheduledTaskClass" : "gsrs.module.substance.tasks.ReindexTaskInitializer", - "parameters" : { - "autorun": false - } - }, - { - "scheduledTaskClass" : "gsrs.module.substance.tasks.StructureRecalcTaskInitializer", - "parameters" : { - "autorun": false - } - }, - { - "scheduledTaskClass" : "gsrs.module.substance.tasks.RebackupTaskInitializer", - "parameters" : { - "autorun": false, - "description" : "Re-backup all Substance entities", - "repositoryClass" : "gsrs.module.substance.repository.SubstanceRepository" - } - }, - { - "scheduledTaskClass" : "gsrs.module.substance.tasks.ChronicStackDumper", - "parameters" : { - "autorun": false, - "dateFormat" : "yyyy.MMMM.dd hh:mm:ss a", #any valid Java 8 DateTimeFormatter - "cron":"0 0/3 * * * ?", #every 3 mins - "outputPath" : "logs/all-running-stacktraces.log" - } - }, - { - "scheduledTaskClass" : "gsrs.module.substance.tasks.DataRecorder" - "parameters" : { - "autorun": false, - "dateFormat" : "yyyy.MMMM.dd hh:mm:ss a", #any valid Java 8 DateTimeFormatter - "cron":"0/10 * * * * ?", #every 10 seconds - "outputPath" : "logs/datarecorder.log" - } - }, - { - "scheduledTaskClass" : "gsrs.dataexchange.tasks.ImportMetadataReindexTask", - "parameters": { - "autorun": false - } - }, - { - #fixes - "scheduledTaskClass" : "gsrs.module.substance.tasks.SubstanceRefTaskInitializer", - "parameters" : { - "autorun": false, - "refUuidCodeSystem" :"UUID Code", - "reportFilePath" :"logs/substance_reference_report.txt", - "refApprovalIdCodeSystem" : "FDA UNII" - } - }, - { - "scheduledTaskClass" : "gsrs.dataexchange.tasks.CalculateMatchablesScheduledTask", - "parameters" : { - "autorun": false, - "threadCount": 5 # Use max 5 threads, if null or <1 this will use all threads available - } - }, - { - "scheduledTaskClass" : "gsrs.tasks.CalculateStagingAreaMatchablesScheduledTask", - "parameters" : { - "autorun": false, - "threadCount": 5 # Use max 5 threads, if null or <1 this will use all threads available - } - } -] # turn on polymer, mixture and modifcation searches for structure searches @@ -628,69 +845,121 @@ ix.ginas.structure.search.includeModifications=true ix.ginas.structure.search.includeMixtures=true - - - -# What does this do? +# What does this do? __aw__ I don't think this is included in the code logic gsrs.indexers.includeDefaultIndexers = false -gsrs.indexers.list=[ + +# start at 3000 +gsrs.indexers.list.DeprecatedIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.DeprecatedIndexValueMaker", "class" = "ix.ginas.models.v1.Substance", -}, +"order" = 3000 +} + +# gsrs.indexers.list.ChemicalSubstanceStructureHashIndexValueMaker = # This should be unnecessary right now. May be used later -#{ -# "indexer" = "gsrs.module.substance.indexers.ChemicalSubstanceStructureHashIndexValueMaker", -#}, +# { +# "indexer" = "gsrs.module.substance.indexers.ChemicalSubstanceStructureHashIndexValueMaker", +# "order" = 3100 +# }, +gsrs.indexers.list.InchiKeyIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.InchiKeyIndexValueMaker", -}, +"order" = 3200 +} +gsrs.indexers.list.SubstanceFacetStatusIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.SubstanceFacetStatusIndexValueMaker", -}, +"order" = 3300 +} +gsrs.indexers.list.SubstanceDefinitionalHashIndexer = { "indexer" = "gsrs.module.substance.indexers.SubstanceDefinitionalHashIndexer", -}, +"order" = 3400 +} +gsrs.indexers.list.RecordAccessIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.RecordAccessIndexValueMaker", -}, +"order" = 3500 +} +gsrs.indexers.list.MolecularWeightPropertyIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.MolecularWeightPropertyIndexValueMaker", -}, +"order" = 3600 +} +gsrs.indexers.list.MoietyTypeIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.MoietyTypeIndexValueMaker", -}, +"order" = 3700 +} +gsrs.indexers.list.MixtureStructureHashIndexValueMaker = { -"indexer" = "gsrs.module.substance.indexers.MixtureStructureHashIndexValueMaker" -}, +"indexer" = "gsrs.module.substance.indexers.MixtureStructureHashIndexValueMaker", +"order" = 3800 +} +gsrs.indexers.list.ATCIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.ATCIndexValueMaker", -}, +"order" = 3900 +} +gsrs.indexers.list.BracketTermIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.BracketTermIndexValueMaker", -}, +"order" = 4000 +} +gsrs.indexers.list.SDGIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.SDGIndexValueMaker", -}, +"order" = 4100 +} +gsrs.indexers.list.SubstanceBasicsIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.SubstanceBasicsIndexValueMaker", -}, +"order" = 4200 +} +gsrs.indexers.list.UserSavedListIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.UserSavedListIndexValueMaker", -}, - {"indexer" = "gsrs.imports.indexers.MetadataSourceIndexValueMaker"}, - {"indexer" = "gsrs.imports.indexers.RawDataImportMetadataIndexValueMaker"}, - {"indexer" = "gsrs.imports.indexers.MetadataMatchCountIndexValueMaker"}, - {"indexer" = "gsrs.imports.indexers.MetadataStatusIndexValueMaker"}, - {"indexer" = "gsrs.imports.indexers.MetadataValidationIndexValueMaker"}, - {"indexer" = "gsrs.imports.indexers.ImportMetadataBasicsIndexValueMaker"} -] +"order" = 4300 +} +gsrs.indexers.list.MetadataSourceIndexValueMaker = +{ +"indexer" = "gsrs.imports.indexers.MetadataSourceIndexValueMaker", +"order" = 4400 +} +gsrs.indexers.list.RawDataImportMetadataIndexValueMaker = +{ +"indexer" = "gsrs.imports.indexers.RawDataImportMetadataIndexValueMaker", +"order" = 4500 +} +gsrs.indexers.list.MetadataMatchCountIndexValueMaker = +{ +"indexer" = "gsrs.imports.indexers.MetadataMatchCountIndexValueMaker" +"order" = 4600 +} +gsrs.indexers.list.MetadataStatusIndexValueMaker = +{ +"indexer" = "gsrs.imports.indexers.MetadataStatusIndexValueMaker" +"order" = 4700 +} +gsrs.indexers.list.MetadataValidationIndexValueMaker = +{ +"indexer" = "gsrs.imports.indexers.MetadataValidationIndexValueMaker", +"order" = 4800 +} +gsrs.indexers.list.ImportMetadataBasicsIndexValueMaker = +{ +"indexer" = "gsrs.imports.indexers.ImportMetadataBasicsIndexValueMaker", +"order" = 4900 +} + # Example report. Change the SQL and path to suit your needs -#gsrs.scheduled-tasks.list+= +# gsrs.scheduled-tasks.list.SQLReportScheduledTaskInitializer = # { # "scheduledTaskClass" : "gsrs.module.substance.tasks.SQLReportScheduledTaskInitializer", +# "order" = 1900, # "parameters" : { # "autorun": true, # "sql": "select s.uuid, dtype, s.current_version, s.created, c.code, c.code_system from ix_ginas_substance s, ix_ginas_code c where s.uuid = c.owner_uuid and c.type= 'PRIMARY'", @@ -698,15 +967,16 @@ gsrs.indexers.list=[ # "name": "Simple Code Report", # "cron":"0 0/1 * * * ?", #every 1 mins ### Datasource qualifier can be specified if needed. This is typically of the form: -### "DataSource". For example, "defaultDataSource" or "productsDataSource"/ +### "DataSource". For example, "defaultDataSource" or "productsDataSource"/ ### "dataSourceQualifier":"defaultDataSource", # } # } # Example SPL report. Change the SPL settings to suit your needs -#gsrs.scheduled-tasks.list+= +# gsrs.scheduled-tasks.list.SplExportInitializer = # { # "scheduledTaskClass" : "gsrs.module.substance.tasks.SplExportInitializer", +# "order" = 2000, # "parameters" : { # "autorun": true, # "username":"admin", @@ -719,110 +989,66 @@ gsrs.indexers.list=[ gsrs.search.substances.restrictDefaultToIdentifiers=true -gsrs.validators.substances += { - "validatorClass" = "ix.ginas.utils.validation.validators.SetReferenceAccess", - "newObjClass" = "ix.ginas.models.v1.Substance", - "configClass" = "SubstanceValidatorConfig", - - "suggestedPublic": ["ACD", "ALANWOOD", "ALGAEBASE", "AMERICAN BOTANICAL COUNCIL", "ANNONBASE", -"ATC INN", "ATCC", "AUSTRALIAN PLANT NAME INDEX", "BAN", "BIOPHARMA", "BIOS", "BIOSYSTEMATIC DATABASE of WORLD DIPTERA", -"BLATTODEA SPECIES", "BOOK", "BRASSICACEAE", "BRITISH PHARMACOPOEIA", "CAS", "CATALOGUE OF LIFE CHINA", "CENTER FOR DISEASE CONTROL", "CFR", -"CHEBI", "CHEMBANK", "CHEMID", "CHEMSPIDER", "CHENOBASE", "CHINESE HERBAL MEDICINE", "CLINICAL PHARMACOLOGY", "CLINICAL_TRIALS.GOV", "CLINICALTRIALS", "CODEX Alimentarius", "COMBINED CHEMICAL DICTIONARY", "CONIFER DATABASE", "CTD_TOXICOGENOMICS", "CVM GREEN BOOK", "DAILYMED", "DOSE", "DOTHIDEOMYCETES", "DROSERACEAE DATABASE", "DRUG PRODUCT LABEL", "DRUGS@FDA", "EAFUS", "EC FLAVOURING SUBSTANCES", "ECHA (EC/EINECS)", "EMA LIST", "EMA REVIEW", "EP", "EPA", "EU CLINICAL TRIALS", "EUROPEAN PHARMACOPEIA", "EVMPD", "FACTS AND COMPARISIONS", "FADA BIVALVIA", "FDA APPROVED DRUG LABEL", "FDA GUIDANCE", "FEDERAL REGISTER", "FISHBASE", "FOOD LOVERS COMPANION", "GERANIUM TAXONOMIC INFORMATION SYSTEM", "GLOBAL BIODIVERSITY INFORMATION FACILITY", "GLOBAL COMPOSITAE CHECKLIST", "GLOMEROMYCOTA", "GREEN BOOK", "GRIN", "HANDBOOK OF FLAVOR INGREDIENTS", "HANDBOOK OF FLAVORS & FRAGRANCES", "HANDBOOK OF INORGANIC CHEMICALS", "HANDBOOK OF PHARMACEUTICAL ADDITIVES", "HANDBOOK OF PHARMACEUTICAL EXCIPIENTS", "HAWLEY CONDENSED CHEMICAL DICTIONARY", "HEALTH CANADA", "HERBAL MEDICINES", "HERBS OF COMMERCE", "HOMEOPATHIC PHARMACOPOEIA US", "HPE-KIBBE", "ICSAS", "ICTV", "ILDIS", "INCB", "INTELEOS", "INTERNATIONAL ORGANIZATION FOR PLANT INFORMATION", "INTERNATIONAL PLANT NAMES INDEX", "INVESTIGATOR BROCHURE", "ISO", "IT IS", "IUPHAR", "JA", "JAN", "JAPAN CHEMICAL SUBSTANCE DICTIONARY", "JAPANESE PHARMACOPOEIA", "JECFA", "JECFA: JOINT FAO/WHO COMMITTEE FOOD ADD", "KEGG", "KEW GARDENS (WCPS)", "KEW GARDENS FUNGI", "KNOVEL CONTENT", "LANDES MUSEUM BIOLOGIEZENTRUM", "LANGUAL", "LECYTHIDACEAE PAGES", "LEPINDEX", "LEUNG NATURAL INGREDIENTS", "LEUNGS ENCYLOPEDIA OF COMMON NATURAL INGREDIENTS 3RD ED.", "LEXI-COMP", "LIAS", "MANUFACTURER PRODUCT ", "MARTINDALE", "MATERIA MEDICA FOR CHINESE MEDICINE", "MDDR", "MEETING ABSTRACT", "MELASTOMATACEAE.NET", "MERCK INDEX", "MICROMEDEX", "MIRBASE", "MSDS", "MYCOBANK", "NCATS List", "NCBI", "NCI DRUG DICTIONARY", "NCI THESAURUS", "NCI_NDFRT", "NDA PUBLIC REVIEW", "NDF-RT", "NEW ZEALAND ORGANISMS REGISTER", "NIAID CHEMDB", "NIST WEBBOOK", "NLM", "NOMEN.EUMYCETOZOA.COM", "OMOP", "ORANGE BOOK", "ORPHAN DRUG", "ORTHOPTERA SPECIES FILE", "PARHOST", "PATENT", "PATTYS TOXICOLOGY", "PERSONAL CARE PRODUCTS COUNCIL", "PHARMACOPOEIA OF THE PEOPLE'S REPUBLIC OF CHINA", "PHARMAPROJECTS", "PLANT LIST", "PLANTS FOR A FUTURE", "PLOTKIN VACCINES", "PRODUCT PACKAGE INSERT", "RJB GERANIUM", "SAX DANGEROUS PROPERTIES", "SCALENET", "SIGMA-ALDRICH", "SITTIG HANDBOOK OF PESTICIDES", "SLOAN-KETT", "SOLANACEAE SOURCE", "SPECIALTY CHEMICALS", "SPIDCAT", "STN (SCIFINDER)", "SWEDISH SUBSTANCE LIST", "SWISS MEDIC", "SYSTEMA DIPTERORUM", "TIGR REPTILES", "TOBACCO KNOWLEDGE BASE", "TOX21", "TROPICOS", "UCSF-FDA TRANSPORTAL", "UNIPROT", "URMO", "USP", "USP DIETARY SUPPLEMENTS COMPENDIUM", "USP FOOD CHEMICALS CODEX", "USP HERBAL MEDICINES COMPENDIUM", "USP PHARMACOPOEIAL FORUM", "USP-MC", "USPNF", "VATC", -"WEBSITE", "WHO DRUG DICTIONARY", "WHO INTERNATIONAL PHARMACOPOEIA", -"WIKI", "WORLD BIODIVERSITY DATABASE", "WORLD PLANTS", "WORLD UMBELLIFER DATABASE", "WEB PAGE"], - - "alwaysPrivate" : ["ANDA", "BLA", "EU-NCA (CBG-MEB)", "IND", "INTEGRITY SERVICES", "NDA"], - "referenceCitationPatterns" : [".*[^A-Z]IND[^A-Z]*[0-9][0-9][0-9]*.*"] - - } -#removed from suggestedPublic but not yet added to alwaysPrivate: CTP and DMF - -gsrs.validators.substances += +gsrs.scheduled-tasks.list.NameStandardizerTaskInitializer_RISN = { - "validatorClass" = "ix.ginas.utils.validation.validators.CodesValidator", - "newObjClass" = "ix.ginas.models.v1.Substance", - "configClass" = "SubstanceValidatorConfig" - +"scheduledTaskClass" : "gsrs.module.substance.tasks.NameStandardizerTaskInitializer", + "order" = 2100 +"parameters" : { + "nameStandardizerClassName": "gsrs.module.substance.standardizer.FDAFullNameStandardizer", + "autorun": false, + "regenerateNameValue":"[standardize me]", + "forceRecalculationOfAll": false, + "description" : "Regenerate standardized names, report on inconsistent standardized names without changing existing standardized names" + "cron":"0 0/0 0 1 * ?", #every } - -gsrs.validators.substances += - { - "validatorClass" = "ix.ginas.utils.validation.validators.ChemicalUniquenessValidator", - "newObjClass" = "ix.ginas.models.v1.Substance", - "configClass" = "SubstanceValidatorConfig", - "parameters"= {} } -#gsrs.validators.substances += -#{ -# "validatorClass" = "ix.ginas.utils.validation.validators.CodeUniquenessValidator", -# "newObjClass" = "ix.ginas.models.v1.Substance", -# "configClass" = "SubstanceValidatorConfig", -# "parameters"= {"singletonCodeSystems" =["CAS"]} -#} - -gsrs.scheduled-tasks.list+= { -"scheduledTaskClass" : "gsrs.module.substance.tasks.NameStandardizerTaskInitializer", - "parameters" : { - "nameStandardizerClassName": "gsrs.module.substance.standardizer.FDAFullNameStandardizer", - "autorun": false, - "regenerateNameValue":"[standardize me]", - "forceRecalculationOfAll": false, - "description" : "Regenerate standardized names, report on inconsistent standardized names without changing existing standardized names" - "cron":"0 0/0 0 1 * ?", #every - } +gsrs.scheduled-tasks.list.NameStandardizerTaskInitializer_FISN = +{ + "scheduledTaskClass" : "gsrs.module.substance.tasks.NameStandardizerTaskInitializer", + "order" = 2200, +"parameters" : { + "nameStandardizerClassName": "gsrs.module.substance.standardizer.FDAFullNameStandardizer", + "autorun": false, + "regenerateNameValue":"[standardize me]", + "forceRecalculationOfAll": true, + "disabledHistory": true, + "disabledHooks": true, + "threadCount": 5, + "description" : "Regenerate standardized names, force inconsistent standardized names to be regenerated" + "cron":"0 0/0 0 1 * ?", #every } - -gsrs.scheduled-tasks.list+= { -"scheduledTaskClass" : "gsrs.module.substance.tasks.NameStandardizerTaskInitializer", - "parameters" : { - "nameStandardizerClassName": "gsrs.module.substance.standardizer.FDAFullNameStandardizer", - "autorun": false, - "regenerateNameValue":"[standardize me]", - "forceRecalculationOfAll": true, - "disabledHistory": true, - "disabledHooks": true, - "threadCount": 5, - "description" : "Regenerate standardized names, force inconsistent standardized names to be regenerated" - "cron":"0 0/0 0 1 * ?", #every - } } ix.ginas.export.settingsPresets.substances= { - "PUBLIC_DATA_ONLY": { - "owner":"admin", - "scrubberSettings": { - "removeAllLocked":true - } - }, - "ALL_DATA": { - "owner":"admin", - "scrubberSettings":null - } +"PUBLIC_DATA_ONLY": { + "owner":"admin", + "scrubberSettings": { + "removeAllLocked":true + } +}, +"ALL_DATA": { +"owner":"admin", + "scrubberSettings":null +} } gsrs.standardizers.substances = { - "name" = { - "standardizerClass" = "gsrs.module.substance.standardizer.HtmlNameStandardizer" - }, - "stdname" = { - "standardizerClass" = "gsrs.module.substance.standardizer.HtmlNameStandardizer" - } +"name" = { + "standardizerClass" = "gsrs.module.substance.standardizer.HtmlNameStandardizer" +}, +"stdname" = { + "standardizerClass" = "gsrs.module.substance.standardizer.HtmlNameStandardizer" +} } - -#gsrs.validators.substances += -#{ -# "validatorClass" = "ix.ginas.utils.validation.validators.CodeUniquenessValidator", -# "newObjClass" = "ix.ginas.models.v1.Substance", -# "configClass" = "SubstanceValidatorConfig", -# "parameters"= {"singletonCodeSystems" =["CAS"]} -#} # ix.gsrs.sdfActions={structure_and_moieties:'gsrs.module.substance.importers.StructureExtractorActionFactory', # code_import:'gsrs.module.substance.importers.CodeExtractorActionFactory', # common_name:'gsrs.module.substance.importers.NameExtractorActionFactory'} + +#### __aw__ This was in substances-core.conf but is different than what was in application.conf # gsrs.importAdapterFactories.substances = [] # gsrs.importAdapterFactories.substances += { # "importAdapterFactoryClass" = "gsrs.module.substance.importers.SDFImportAdapterFactory", @@ -862,31 +1088,378 @@ gsrs.standardizers.substances = { # ] # } # } + # this is the length to expect the column to be # for names after truncation gsrs.substance.data.nameColumnLength=254 +#### __aw__: this was copied from application.conf for others' testing purposes +#### In future we may want this in substances-core.conf as it can be overridden +### need to reconcile the various ways this stuff is configured in different places. + + +gsrs.importAdapterFactories.substances.list.SDFImportAdapterFactory = + { + "adapterName": "SDF Adapter", + "importAdapterFactoryClass": "gsrs.module.substance.importers.SDFImportAdapterFactory", + "order": 1000, + "stagingAreaServiceClass": "gsrs.stagingarea.service.DefaultStagingAreaService", + "entityServiceClass" :"gsrs.dataexchange.SubstanceStagingAreaEntityService", + "description" : "SD file importer for general users", + "supportedFileExtensions": [ + "sdf", + "sd", + "sdfile" + ], + + "parameters": { + #the things used to instantiate a thing used to do the import + + "fileImportActions": [ + ##list of available actions for user to select from + #each action takes in a file record + a substance record to update substance record with data from file + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.NameExtractorActionFactory", + "fields": [ + { + "fieldName": "Name", + "fieldLabel": "Substance Name", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + }, + { + "fieldName": "nameType", + "fieldLabel": "Name Type", + "defaultValue": "cn", + "cv": "name_type", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + }, + { + "fieldName": "displayName", + "fieldLabel": "Display Name?", + "defaultValue": false, + "fieldType": "java.lang.Boolean", + "expectedToChange": true, + "required": false, + "lookupKey": null + } + ], + "parameters": { + "lang": "en" + }, + "actionName": "common_name", + "label":"Create Name" + }, + { + "actionName": "code_import", + "label":"Create Code", + "actionClass": "gsrs.module.substance.importers.importActionFactories.CodeExtractorActionFactory", + "fields": [ + { + "fieldName": "code", + "fieldLabel": "Code/Identifier", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + }, + { + "fieldName": "codeType", + "fieldLabel": "Primary or Alternative", + "defaultValue": "PRIMARY", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + }, + { + "fieldName": "codeSystem", + "fieldLabel": "Code System", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + } + ], + "parameters": { + } + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.NSRSCustomCodeExtractorActionFactory", + "fields": [ + { + "fieldName": "code", + "fieldLabel": "NSC Number", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + }, + { + "fieldName": "codeType", + "fieldLabel": "Primary or Alternative", + "defaultValue": "PRIMARY", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + } + ], + "parameters": { + "codeSystem": "NSC" + }, + "actionName": "nci_import", + "label":"Create NSC Code" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.StructureExtractorActionFactory", + "fields": [ + { + "fieldName": "molfile", + "fieldLabel": "Structure", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + } + ], + "parameters": { + + }, + "actionName": "structure_and_moieties", + "label":"Create Structure" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.PropertyExtractorActionFactory", + "fields": [ + { + "fieldName": "name", + "fieldLabel": "Name", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + }, + { + "fieldName": "propertyType", + "fieldLabel": "Property Type", + "defaultValue": "chemical", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + }, + { + "fieldName": "valueAverage", + "fieldLabel": "Average Value", + "defaultValue": null, + "fieldType": "java.lang.Double", + "expectedToChange": true, + "required": false, + "lookupKey": null + }, + { + "fieldName": "valueNonNumeric", + "fieldLabel": "Non-numeric Value", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + }, + { + "fieldName": "valueUnits", + "fieldLabel": "Units", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + } + ], + "parameters": { + }, + "actionName": "property_import", + "label":"Create Chemical Property" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.ReferenceExtractorActionFactory", + "fields": [ + { + "fieldName": "docType", + "fieldLabel": "Type", + "defaultValue": "OTHER", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + }, + { + "fieldName": "citation", + "fieldLabel": "Reference", + "defaultValue": "{INSERT REFERENCE CITATION HERE}", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + } + ], + "parameters": { + + }, + "actionName": "public_reference", + "label":"Create Reference" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.NotesExtractorActionFactory", + "fields": [ + { + "fieldName": "note", + "fieldLabel": "Note", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + } + ], + "parameters": { + }, + "actionName": "note_import", + "label":"Create Note" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.NoOpActionFactory", + "fields": [ + { + "fieldName": "fieldName", + "fieldLabel": "Field to ignore", + "fieldType": "java.lang.String", + "expectedToChange": true, + "lookupKey": null + } + ], + "parameters": { + }, + "actionName": "no-op", + "label":"Omit this field" + } + ] + } + } + +gsrs.importAdapterFactories.substances.list.GSRSJSONImportAdapterFactory = + { + "adapterName": "GSRS JSON Adapter", + "importAdapterFactoryClass": "gsrs.module.substance.importers.GSRSJSONImportAdapterFactory", + "order": 1100, + "stagingAreaServiceClass": "gsrs.stagingarea.service.DefaultStagingAreaService", + "entityServiceClass" :"gsrs.dataexchange.SubstanceStagingAreaEntityService", + "description" : "GSRS legacy JSON file importer", + #extensions belong here because they can override the default set within the class + "supportedFileExtensions": [ + "gsrs", + "gz" + ], + "parameters": { + } + } + + +### __aw__ is this needed? +# gsrs.defaultStagingAreaServiceClass.substances = gsrs.stagingarea.service.DefaultStagingAreaService +# gsrs.defaultStagingAreaEntityService.substances = gsrs.dataexchange.SubstanceStagingAreaEntityService +# gsrs.availableProcessActions.substances = ["gsrs.dataexchange.processingactions.CreateProcessingAction", +# "gsrs.dataexchange.processingactions.MergeProcessingAction", +# "gsrs.dataexchange.processingactions.RejectProcessingAction", +# "gsrs.dataexchange.processingactions.CreateBatchProcessingAction"] + + # This feature allows one to filter on validation message ids or message texts to -# for example change a warning to a notice for users with a given role. +# for example change a warning to a notice for users with a given role. # OverrideRule(s) could look like this: -# {"regex": "W.*", "userRoles": ["Approver","Admin"], "newMessageType": "NOTICE"} +# {"regex": "W.*", "userRoles": ["Approver","Admin"], "newMessageType": "NOTICE"} # In this sample rule, the regex determines if the messageId begins with W, implying # a warning. gsrs.processing-strategy = { - "defaultStrategy": "ACCEPT_APPLY_ALL", - "overrideRules": [ - # NamesValidator duplicateNameIsError - # {"regex": "W7431274", "newMessageType": "ERROR"}, - # {"regex": "W7439452", "newMessageType": "ERROR"}, - # SubstanceUniquenessValidator - {"regex": "E4562650", "userRoles": ["SuperUpdate", "SuperDataEntry"], "newMessageType": "WARNING"} - ] +"defaultStrategy": "ACCEPT_APPLY_ALL", +"overrideRules": [ + # NamesValidator duplicateNameIsError + # {"regex": "W7431274", "newMessageType": "ERROR"}, + # {"regex": "W7439452", "newMessageType": "ERROR"}, + # SubstanceUniquenessValidator + {"regex": "E4562650", "userRoles": ["SuperUpdate", "SuperDataEntry"], "newMessageType": "WARNING"} +] } +## __aw__ This is what mitch had for matchables, this was not included in previous substances-core.conf +## decide if this should be included after testing. +gsrs.matchableCalculators.substances.list.CASNumberMatchableExtractor = +{ + "matchableCalculationClass" : "gsrs.dataexchange.extractors.CASNumberMatchableExtractor", + "order": 1000, + "config": { + "casCodeSystems": ["CAS", "CASNo", "CASNumber"] + } +} +gsrs.matchableCalculators.substances.list.AllNamesMatchableExtractor = +{ + "matchableCalculationClass" : "gsrs.dataexchange.extractors.AllNamesMatchableExtractor", + "order": 1100, + "config" :{} +} +gsrs.matchableCalculators.substances.list.ApprovalIdMatchableExtractor = +{ + "matchableCalculationClass" : "gsrs.dataexchange.extractors.ApprovalIdMatchableExtractor", + "order": 1200, + "config" :{} +} +gsrs.matchableCalculators.substances.list.DefinitionalHashMatchableExtractor = +{ + "matchableCalculationClass" : "gsrs.dataexchange.extractors.DefinitionalHashMatchableExtractor", + "order": 1300, + "config" :{} +} +gsrs.matchableCalculators.substances.list.SelectedCodesMatchableExtractor = +{ + "matchableCalculationClass" : "gsrs.dataexchange.extractors.SelectedCodesMatchableExtractor", + "order": 1400, + "config": { + "codeSystems" :["CAS", "ChemBL", "NCI", "NSC", "EINECS"] + } +} +gsrs.matchableCalculators.substances.list.UUIDMatchableExtractor = +{ + "matchableCalculationClass" : "gsrs.dataexchange.extractors.UUIDMatchableExtractor", + "order": 1500, + "config" :{} +} +gsrs.matchableCalculators.substances.list.CodeMatchableExtractor = +{ + "matchableCalculationClass" : "gsrs.dataexchange.extractors.CodeMatchableExtractor", + "order": 1600, + "disabled": true, + "config": { + "reqCodeSystems": ["FDA UNII"], + "codeType": "PRIMARY", + "codeKey": "CODE" + } +} @@ -896,49 +1469,49 @@ gsrs.processing-strategy = { # This shows how special render settings can be applied # at a pretty deep explicit level. This is ported over largely from how # it was done in GSRS 2.8 -# -# +# +# # 1. Supports embedded JSON options definitions for the structure renderer # 2. Supports naming styles for use # 3. Supports using previously named styles and making variations of them # gsrs.renderers.list=[ { - "name" : "CLEAN", - "renderer" :{ - "preset": "USP", //Note this part - "options" : { - "PROP_KEY_DRAW_GREYSCALE" : false, - "ATOM_LABEL_FONT_FRACTION" : 0.47918, - "ATOM_LABEL_BOND_GAP_FRACTION" :1.02, - "BOND_STROKE_WIDTH_FRACTION" : 0.032, - "BOND_DOUBLE_GAP_FRACTION": 0.1995, - "BOND_STEREO_WEDGE_ANGLE" : 0.13659, - "BOND_STEREO_DASH_NUMBER" :8, - "SUBSCRIPT_Y_DISPLACEMENT_FRACTION" : 0.17, - "DRAW_WEDGE_AS_POINT" : false, - "DRAW_STEREO_WEDGE_JOIN" : true, - "DRAW_STEREO_LAST_DASH_ON_NON_SYMBOLS" : false, - "colorPalette" : { - "atomColors" : { - "C" : "FFFF0000" // red carbons (ugly) - } +"name" : "CLEAN", +"renderer" :{ + "preset": "USP", //Note this part + "options" : { + "PROP_KEY_DRAW_GREYSCALE" : false, + "ATOM_LABEL_FONT_FRACTION" : 0.47918, + "ATOM_LABEL_BOND_GAP_FRACTION" :1.02, + "BOND_STROKE_WIDTH_FRACTION" : 0.032, + "BOND_DOUBLE_GAP_FRACTION": 0.1995, + "BOND_STEREO_WEDGE_ANGLE" : 0.13659, + "BOND_STEREO_DASH_NUMBER" :8, + "SUBSCRIPT_Y_DISPLACEMENT_FRACTION" : 0.17, + "DRAW_WEDGE_AS_POINT" : false, + "DRAW_STEREO_WEDGE_JOIN" : true, + "DRAW_STEREO_LAST_DASH_ON_NON_SYMBOLS" : false, + "colorPalette" : { + "atomColors" : { + "C" : "FFFF0000" // red carbons (ugly) } - }, - "add-shadow" : true, - "add-border" : false } + }, + "add-shadow" : true, + "add-border" : false + } }, { - "name" : "MONSTRUOUS", - "renderer" :{ - "preset": "CLEAN", //Note this part - "options" : { - "BOND_STROKE_WIDTH_FRACTION" : 0.64 - }, - "add-shadow" : false, - "add-border" : false - } +"name" : "MONSTRUOUS", +"renderer" :{ + "preset": "CLEAN", //Note this part + "options" : { + "BOND_STROKE_WIDTH_FRACTION" : 0.64 + }, + "add-shadow" : false, + "add-border" : false + } } ] diff --git a/gsrs-module-substances-data-exchange/pom.xml b/gsrs-module-substances-data-exchange/pom.xml index 83bbe0082..d8f8a494d 100644 --- a/gsrs-module-substances-data-exchange/pom.xml +++ b/gsrs-module-substances-data-exchange/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT 4.0.0 diff --git a/gsrs-module-substances-dto/pom.xml b/gsrs-module-substances-dto/pom.xml index ac316f23d..99fa094a4 100644 --- a/gsrs-module-substances-dto/pom.xml +++ b/gsrs-module-substances-dto/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT diff --git a/gsrs-module-substances-spring-boot-autoconfigure/pom.xml b/gsrs-module-substances-spring-boot-autoconfigure/pom.xml index 928caa8d3..6fe68744c 100644 --- a/gsrs-module-substances-spring-boot-autoconfigure/pom.xml +++ b/gsrs-module-substances-spring-boot-autoconfigure/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT 4.0.0 diff --git a/gsrs-module-substances-spring-boot-starter/pom.xml b/gsrs-module-substances-spring-boot-starter/pom.xml index edca18a96..fe4316ab4 100644 --- a/gsrs-module-substances-spring-boot-starter/pom.xml +++ b/gsrs-module-substances-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT 4.0.0 diff --git a/gsrs-module-substances-tests/pom.xml b/gsrs-module-substances-tests/pom.xml index ed2ed85e3..f7d20f03e 100644 --- a/gsrs-module-substances-tests/pom.xml +++ b/gsrs-module-substances-tests/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT diff --git a/gsrs-ncats-substance-extension/pom.xml b/gsrs-ncats-substance-extension/pom.xml index 8ecb5ee71..7a621a89f 100644 --- a/gsrs-ncats-substance-extension/pom.xml +++ b/gsrs-ncats-substance-extension/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT diff --git a/installExtraJars.cmd b/installExtraJars.cmd index 72a00e097..b799a658c 100755 --- a/installExtraJars.cmd +++ b/installExtraJars.cmd @@ -1,4 +1,4 @@ -mvnw.cmd install:install-file -Dfile=extraJars/applications-api-3.1.1-SNAPSHOT.jar -mvnw.cmd install:install-file -Dfile=extraJars/products-api-3.1.1-SNAPSHOT.jar -mvnw.cmd install:install-file -Dfile=extraJars/clinical-trials-api-3.1.1-SNAPSHOT.jar +mvnw.cmd install:install-file -Dfile=extraJars/applications-api-3.1.2-SNAPSHOT.jar +mvnw.cmd install:install-file -Dfile=extraJars/products-api-3.1.2-SNAPSHOT.jar +mvnw.cmd install:install-file -Dfile=extraJars/clinical-trials-api-3.1.2-SNAPSHOT.jar mvnw.cmd install:install-file -Dfile=extraJars/Featureize-Nitrosamines-0.0.3-SNAPSHOT.jar diff --git a/installExtraJars.sh b/installExtraJars.sh index aafcf26cc..070fa29ea 100755 --- a/installExtraJars.sh +++ b/installExtraJars.sh @@ -1,4 +1,4 @@ -./mvnw install:install-file -Dfile=extraJars/applications-api-3.1.1-SNAPSHOT.jar -./mvnw install:install-file -Dfile=extraJars/products-api-3.1.1-SNAPSHOT.jar -./mvnw install:install-file -Dfile=extraJars/clinical-trials-api-3.1.1-SNAPSHOT.jar +./mvnw install:install-file -Dfile=extraJars/applications-api-3.1.2-SNAPSHOT.jar +./mvnw install:install-file -Dfile=extraJars/products-api-3.1.2-SNAPSHOT.jar +./mvnw install:install-file -Dfile=extraJars/clinical-trials-api-3.1.2-SNAPSHOT.jar ./mvnw install:install-file -Dfile=extraJars/Featureize-Nitrosamines-0.0.3-SNAPSHOT.jar diff --git a/pom-version.properties b/pom-version.properties index fa208adff..40490151e 100644 --- a/pom-version.properties +++ b/pom-version.properties @@ -1,4 +1,6 @@ # For use in project pom version check test -sm.pomversiontest.starterModuleVersion=3.1.1 -sm.pomversiontest.substancesModuleVersion=3.1.1.1 -sm.pomversiontest.otherModuleVersion=3.1.1-SNAPSHOT +# Need to adjust test for api versions +# mvn test -Dtest=gsrs.substances.tests.SubstancesPomsVersionTest -DdoPomCheck=true -pl gsrs-module-substances-tests +sm.pomversiontest.starterModuleVersion=3.1.2-SNAPSHOT +sm.pomversiontest.substancesModuleVersion=3.1.2-SNAPSHOT +sm.pomversiontest.otherModuleVersion=3.1.2-SNAPSHOT diff --git a/pom.xml b/pom.xml index c31aeb672..5e878302e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ gov.nih.ncats gsrs-module-substances - 3.1.1.1 + 3.1.2-SNAPSHOT GSRS Substance Module Substance Module for GSRS Spring Boot https://github.com/ncats/gsrs-spring-module-substances @@ -33,8 +33,11 @@ 1.8 Hoxton.SR1 - 3.1.1 - 3.1.1.1 + 3.1.2-SNAPSHOT + 3.1.2-SNAPSHOT + 3.1.2-SNAPSHOT + 3.1.2-SNAPSHOT + 3.1.2-SNAPSHOT 2.4.5 2.17.2