SLAUGHTERHOUSE BUSINESS RULES
Jump to navigation
Jump to search
| # | OBJECT | ACTION | VALIDATION NAME | VALIDATION DESCRIPTION | VALIDATION CATEGORY | METHOD NAME | CLASS NAME | DUPLICATED IN CLASS |
| 1 | ANIMAL | GENERATE_PREMORTEM | Animal must have status different than premortem | Checks if animal has premortem status | Other | checkIfAnimalOrFlockHasAlreadyValidPreMortem | MassActions | No |
| 2 | ANIMAL | GENERATE_PREMORTEM | Animal must not have blocking diseases in premortem | Checks if animal has blocking diseases in premortem | Other | checkIfAnimalHasBlockingDiseaseInPremortemForm | MassActions | No |
| 3 | ANIMAL | GENERATE_PREMORTEM | Animal with active withdrawal period and premortem form can’t be generated | Checks if animal has withdrawal period before generated premortem form | Other | checkIfAnimalHasAnyActiveVaccEventForSpecificDisease | MassActions | Yes |
| 4 | ANIMAL | SLAUGHTERED | Animal with active withdrawal period and premortem form can’t be slaughetered | Checks if animal has withdrawal period before it’s slaugheterd | Other | checkIfAnimalHasAnyActiveVaccEventForSpecificDisease | MassActions | Yes |
| 5 | ANIMAL | SLAUGHTERED | Animal must not have campaign with specific disease before slaughter | Checks if animal has campaign with specific disease | Other | checkIfAnimalHasAnyActiveVaccEventForSpecificDisease | MassActions | Yes |
| 6 | ANIMAL | DESTROY | Animal with active withdrawal period can’t be destroyed | Checks if animal has withdrawal period before it’s destoroyed | Other | checkIfAnimalHasAnyActiveVaccEventForSpecificDisease | MassActions | Yes |
| 7 | RPE_SLAUGHT_FORM | REGISTRATION/EDIT | Premortem form is allowed for animals/flock with premortem status | Checks if animal/flock has premortem status | Other | beforeSave | OnSaveValidations | Yes |
| 8 | PRE_SLAUGHT_FORM | REGISTRATION/EDIT | Animal/flock with status postmortem is slaughetred | Checks if animal/flock is already slaughtered | Other | beforeSave | OnSaveValidations | Yes |
| 9 | PRE_SLAUGHT_FORM | REGISTRATION/EDIT | Animal/flock already have premortem form | Checks if animal/flock already has valid premortem form | Other | checkIfAnimalOrFlockHasAlreadyValidPreMortem | ValidationChecks | Yes |
| 10 | PRE_SLAUGHT_FORM | REGISTRATION/EDIT | Animal/flock has blocking disease | Check if animal/flock has blocking disease | Other | checkIfAnimalHasBlockingDiseaseInPremortemForm | ValidationChecks | No |
| 11 | PRE_SLAUGHT_FORM | REGISTRATION/EDIT | Animal has premortem form with appropriate disease | Check if animal/flock has appropriate disease in premortem form | Other | checkIfAnimalHasAppropriateDiseaseInPreOrPostSlaughtForm | ValidationChecks | Yes |
| 12 | POST_SLAUGHT_FORM | REGISTRATION/EDIT | Beehives can’t have postmortem form | Check if flock is slaughterable | Other | isFlockSlaughterable | ValidationChecks | Yes |
| 13 | POST_SLAUGHT_FORM | REGISTRATION | Animal/flock has postmortem status | Checks if animal/flock has postmortem status | Other | beforeSave | OnSaveValidations | Yes |
| 14 | POST_SLAUGHT_FORM | REGISTRATION | Manufacture date before slaughter date | Check if manufacture date is before slaughter date | Dates | beforeSave | OnSaveValidations | Yes |
| 15 | POST_SLAUGHT_FORM | EDIT | Slaughter date can’t be edited | Checks if slaughter date is edited | Othher | beforeSave | OnSaveValidations | Yes |
| 16 | POST_SLAUGHT_FORM | EDIT | Animal/flock must have postmortem status when editing post_slaugt_form | Checks if animal/flock has postmortem status | Other | checkIfAnimalOrFlockHaveStatusPostMortem | ValidationChecks | No |
| 17 | POST_SLAUGHT_FORM | REGISTRATION/EDIT | Animal has postmortem form with appropriate disease | Check if animal/flock has appropriate disease in postmortem form | Other | checkIfAnimalHasAppropriateDiseaseInPreOrPostSlaughtForm | ValidationChecks | Yes |