This post duplicates another one, that I moved to the Bahmni category: Getting "Integrity Error" while create new record