-
Notifications
You must be signed in to change notification settings - Fork 4
isCodeValid
Chuck May edited this page Apr 14, 2015
·
4 revisions
public boolean isCodeValid(String schemaId, String key, String value)
Check the code validity of a single field for a specific schema. If the schema or field do no exist, false will be returned.
Staging staging = Staging.getInstance(CsDataProvider.getInstance(CsVersion.v020550));
// bad parameters for schema or field
Assert.assertFalse(staging.isCodeValid("bad_schema_name", "site", "C509"));
Assert.assertFalse(staging.isCodeValid("testis", "bad_field_name", "C509"));
// fields that are validated with a list of value values
Assert.assertFalse(staging.isCodeValid("urethra", "year_dx", "2145"));
Assert.assertTrue(staging.isCodeValid("urethra", "year_dx", "2004"));
Assert.assertTrue(staging.isCodeValid("urethra", "year_dx", "2015"));
// fields that are validated with a table
Assert.assertTrue(staging.isCodeValid("urethra", "extension", "050"));
Assert.assertFalse(staging.isCodeValid("urethra", "extension", "025"));
Assert.assertTrue(staging.isCodeValid("urethra", "ssf1", "020"));
Assert.assertFalse(staging.isCodeValid("urethra", "ssf1", "030"));
Supported Algorithms
Getting Started
API Documentation
- findMatchingTableRow
- getInputs
- getInvolvedSchemas
- getInvolvedTables
- getOutputs
- getSchema
- getSchemaIds
- getTable
- getTableIds
- isCodeValid
- isValidHistology
- isValidSite
- lookupSchema
- stage
Technical Specifications