In our effort to realize the potential of Open Concept Lab (OCL) for the OpenMRS community, the OCL team has asked us to confirm the validation rules that should be used for concepts OCL provides a “custom validation schema” feature that allows the OCL API to perform extra validation checks on concepts. This discussion is to review and confirm the steps defined in OCL’s OpenMRS Concept Validator:
For any concept…
- Must not have more than one preferred name per locale
- All names (except short names) must be unique within the concept
- Must not have more than one short name per locale
- Short name must not be marked as locale preferred
- Only one fully specified name per locale
- At least one fully specified name (across all locales)
- Valid values for class, data type, name type, and locale
For a dictionary…
- Fully specified names must be unique across all names (except short names and index terms) in a locale
- Multiple concepts cannot share the same preferred name in the same locale
@ball and any other concept dictionary owners, can you please review the rules above and confirm they meet your expectations for rules about OpenMRS concepts?
I’ve reviewed these closely and they seem to be valid from my perspective. I’d be happy to clarify any of the above rules if folks have questions.