# PhilGEPS four-source crosswalk

Open the [Crosswalk tab](../crosswalk.html) or use the [JSON report](../data/crosswalk.json). Each row uses the pair of OCDS stage and slash-delimited path. The union includes all populated field mappings from the two project JSON files, the ERD comparison's populated stage rows, and the selected Open Data mappings below.

- **PhilGEPS 1.5 and mPhilGEPS** use the original source mapping labels in the two [pinned mapping projects](../data/ocds_mapping_explorer/manifest.json).
- **Open Data** uses an explicit selection of 33 documented paths, including candidates and derived values. The generator associates normalized fields with registered source headers and keeps analytical ETL targets in their own JSON property. The 33 paths are a first pass. Identifier candidates, party roles, and amount semantics still need review. [Upstream Open Data mapping specification](https://github.com/csiiiv/philgeps_data_v2/blob/1cea04429872b592f4e4cfcc9c97dc8c55003fd6/OCDS_ETL/docs/05_philgeps_ocds_mapping.md)
- **eBidding ERD** uses the [workbook comparison](ocds-mapping-analysis.md). Exact matches use the extracted table and field names. Candidates fold case and normalize spaces and underscores. Gaps include workbook names absent from the diagram, unresolved inventory references, and paths without an ERD comparison row. The JSON retains workbook and diagram evidence where available.

## Findings

The 165 stage/path rows include 105 PhilGEPS 1.5 links, 126 mPhilGEPS links, and 33 Open Data links. The ERD column contains 20 exact name matches, 15 normalized candidates, and 130 gaps.

- **Planning budget description** is the only row with links in all four columns and an exact ERD match. PhilGEPS 1.5 uses `M_Tender (Funding Source)`, Open Data uses `funding_source` as a candidate, and mPhilGEPS points to `app_line_items.source_funds` in the ERD.
- **Award ID, date, status, and amount** have links in all four columns when normalized ERD candidates are included. For `awards/value/amount`, Open Data's `contract_amount` and the candidate `awards.contract_amount` still need their amount semantics checked.
- **Tender title** has links in both workbook projects and Open Data. The workbook's `Tenders (Tender Title)` is an ERD gap because the extracted catalog has no `tenders` table.

Shared paths group source evidence for comparison. Check field meaning, record grain, identifiers, and publication rules before using the crosswalk for transformation. Codelist crosswalks are available in the [OCDS Mapping tab](../ocds.html).

## Reproduce

From the sprint directory, run this after generating `data/ocds_mapping_analysis.json`.

```bash
rtk proxy python3 scripts/build_crosswalk.py
```
