Description
Return exact herd count closure and discrepancy.
Animal observations distinguish recorded events, classification tokens, count expectations and measurement residuals. A normalized score or supplied activity transition is not a diagnosis or validated behavioral interpretation. Unknown records and incomplete observation windows must remain explicit.
Return exact herd count closure and discrepancy.
When to use this tool
Use Herd Entry Exit Count Gap when checking the stated animal observation, score, count or time convention.
How to use the tool and how it works
- Enter opening, entries, exits, observedClosing. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read expectedClosingDecimal, discrepancyDecimal. Use the output convention below.
Return exact herd count closure and discrepancy. Parse nonnegative decimal integers; expectedClosing = opening+entries-exits, discrepancy = observed-expected, return signed decimal text.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| opening | Opening | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| entries | Entries | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| exits | Exits | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| observedClosing | Observed Closing | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| expectedClosingDecimal | Exact opening+entries-exits as decimal-integer text; negative balances are retained. | Required. Text; maximum UTF-16 length 8192. |
| discrepancyDecimal | Discrepancy Decimal | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"opening": "100",
"entries": "8",
"exits": "5",
"observedClosing": "104"
},
"output": {
"expectedClosingDecimal": "103",
"discrepancyDecimal": "1"
}
} Limitations and assumptions
- Negative expected closing is retained; actual animal identities, transfers, losses and welfare are not resolved.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Inspect the original animal and observation records, use an appropriate statistical model and consult qualified veterinary/husbandry professionals for health or welfare decisions.
References
Similar or alternative tools
- Herd Roster Unknown Birth Token
Return herd age only when birth token is not marked unknown.
- Animal Cohort Count Delta
Return valid cohort final count and signed change.