The rate book is the product
Here is the thing I got wrong at the start. I assumed the app was the product and the rate book was an input. It is the other way round.
Any competent team can rebuild the app in a few weeks. What they cannot do quickly is read the DSR correctly.
The DSR is a PDF of a printed book. Two volumes. Thousands of items across dozens of chapters, with sub items, notes, footnotes, rate qualifications, and an appendix at the back of Volume 2 carrying the cement coefficients that most bills never even claim.
The dangerous parser
Reading it is not a parsing job. It is an accuracy job, and the difference matters because of how the failures look.
A parser that crashes is fine. You see it, you fix it. The dangerous parser is the one that turns a value that is present in the book into a value that is absent in your database, and reports success. Nothing downstream can tell. The item just quietly has the wrong rate, and you find out when a bill comes back months later.
I keep a running list of these. When I first wrote this there were nine of them, across both PDF and Excel sources. A few examples:
- A chapter where the rates of sub items were wrongly linked to the main item, so the main item looked correct while every sub item was wrong.
- The cement coefficient appendix, where the meaning of the columns changes between sections. A parser that assumes one fixed layout gives values 100 times wrong.
- Codes that carry different rates for different specifications. Picking the first match is wrong almost half the time.
- Appendix rows for basic rates that look exactly like real item rows and match confidently against a schedule, putting a labour day rate where a finished item rate should be.
A second reader that checks the first
So the extraction has a second half. A separate program reads the whole book again, using a different PDF library from the one the extractor used, and checks the first one item by item. Not a test suite written against the extractor's own assumptions, but an independent reader, working against it, so that a bug in one library's handling of text layout cannot hide in both.
When I wrote this, that checker reported 5,465 of 5,465 DSR 2023 items traceable to the book. Separately, the rates were compared with an independent database built by somebody else entirely: of the 2,834 codes that could be compared, 2,815 agree, which is 99.33%. That is the closest thing to an outside audit available.
On top of that sit the 604 cement coefficients from the Volume 2 appendix, read with a reader that understands the appendix's changing columns. That single table is why we can produce a Cement Statement at all, and it is a full sheet of the bill that most software simply does not attempt.
DSR 2016 is loaded as well, because plenty of live tenders are still priced on it. Together that is 10,655 items in the product today, 5,793 from DSR 2023 and 4,862 from DSR 2016. Every item from the printed book carries its volume and page number, so the biller can check any rate against his own copy of the book. DSR 2023 has more items now than the checker counted then, because the lettered sub items are now items of their own, and CPWD's correction slips 2 to 12 added 123 more, which have no page in the printed book.
Which book is the department using?
Then the harder question: which book is this department actually using?
I could not answer that from documentation, so I collected real tenders: 21 tenders across 7 Delhi departments, plus a wider survey across other states. The findings that mattered:
- One Delhi department's tender document says DSR 2016 on its face, while its rates are clearly DSR 2023. That is not a one off, it happens again on the retender.
- The shape of the BOQ is set per tender, not per department, so you cannot hardcode a layout even within one authority.
- The 0.973 GST correction is sometimes already built into the published rates and sometimes not, with no pattern, within the same authority.
So the edition has to be worked out from the rate values themselves, not taken from the document header, and every tender has to be checked for whether the correction is already in. A document header is evidence, not truth.