Horse Check-in Comparison
1. Overview
This tool cross-checks the horses recorded in the HorseApp veterinary Excel export against the horses registered in Equipe. It answers a single operational question: does the vet's arrival list match the show's entry list?
Discrepancies in either direction are surfaced immediately — horses examined but not entered, and horses entered but never examined. Both are problems, and both are easy to miss when the two lists live in separate systems.
The comparison is keyed on FEI ID, which is the only identifier reliably shared between the two sources.
2. Workflow
1. Upload the HorseApp .xlsx export
2. The tool reads the sheet and indexes horses by FEI ID
3. Equipe horses are fetched via API and indexed the same way
4. The two sets are compared and rendered as a single colour-coded table
5. Optionally filter by CSI competition and export to PDF
3. Access and authentication
Launched from Equipe with a JWT token:
horse_checkin_comparison.php?token=<JWT>
- Signing algorithm: HS256
- Leeway: 60 seconds
- Payload fields used:
meeting_url,style_url, andapi_key
The token is read on the POST request that carries the uploaded file, so the token must still be valid at the moment of upload — not merely when the page was first opened.
4. Excel input format
The uploaded workbook is read from sheet index 0. The first row is treated as a header and skipped. Columns are read by letter, so the export layout must not be rearranged.
| Column | Field | Used in comparison |
|---|---|---|
| A | FEI ID | Yes — this is the matching key |
| B | Horse Name | Yes — displayed |
| G | Examination Date | Yes — displayed |
| I | Examined by | Yes — displayed |
| J | Check-Out Date | Read, not displayed |
| L | Checked-Out by | Read, not displayed |
Accepted format: .xlsx only. Uploaded files are stored in the uploads/ directory under their original filename.
Note: Columns J and L are parsed and available in the data structure but are not shown in the current output. They are retained for future check-out reporting.
5. Equipe data source
GET <meeting_url>/horses.json
Horses are indexed by fei_id. The fields used are:
fei_id— matching keyname— horse namecompetition_clabbs— comma-separated list of competitions the horse is entered in
6. Reading the results table
Every row falls into one of three states, distinguished by background colour:
| Colour | State | Meaning |
|---|---|---|
| White | Matched | Present in both Excel and Equipe. Source column shows both icons. |
| Red | Excel only | Examined by the vet but not found in Equipe. Either the FEI ID is wrong in one system, or the horse was never entered. |
| Yellow | Equipe only | Entered in Equipe but absent from the vet export. Either not yet examined, or examined under a different ID. |
The CSI Competitions column lists only competitions whose name contains CSI. Non-CSI entries are filtered out. When a horse has no CSI competitions, the cell is greyed and italicised.
For Equipe-only rows, the examination columns are merged and marked Not present in Excel.
7. Statistics
A summary block below the table reports five figures:
| Metric | Definition |
|---|---|
| Total horses in Excel | Row count of the uploaded file, minus the header |
| Total horses in Equipe | Records returned by horses.json |
| Matching entries | FEI IDs present in both sources |
| Excel only | Excel total minus matches |
| Equipe only | Equipe total minus matches |
A healthy show has small numbers in the last two rows. Large discrepancies almost always indicate an FEI ID entry problem rather than genuinely missing horses.
8. Filtering
The filter box performs a live, case-insensitive substring match against the CSI Competitions column only. It does not search horse names or FEI IDs.
Typical uses:
W2— show only horses entered in week 2 classesCSIYH— young horse classesCSI3— three-star classes
Reset Filter clears the box and restores all rows.
The filter hides rows in the DOM. Rows hidden by the filter are excluded from the PDF export, which makes filter-then-export a practical way to produce a per-competition vet list.
9. PDF export
Export to PDF renders the #pdf-content block — the heading and the table — via html2pdf.js.
| Setting | Value |
|---|---|
| Format | A4 |
| Orientation | Landscape |
| Margin | 0.3 in |
| Scale | 2× (retina-quality capture) |
| Filename | horse-comparison.pdf |
Table rows carry page-break-inside: avoid, so a horse's data is never split across two pages.
The statistics block sits outside #pdf-content and is therefore not included in the export.