54 lines
2.7 KiB
Markdown
54 lines
2.7 KiB
Markdown
# Public price corrections, 23 October 2026
|
|
|
|
Clinic instruction: hide operations and the unoffered cosmetology direction.
|
|
Keep the rest of the current price list and consultation prices. Do not publish
|
|
an invented minimum for plastic surgery; wait for the clinic's approved amount.
|
|
|
|
## Provenance
|
|
|
|
The original workbooks D:/ЦОМ.xlsx, D:/Остео.xlsx and D:/Дана Дети.xls were
|
|
read without modification. All 2439 database price names/amounts matched source
|
|
rows (ignoring only the importer-added source labels). The legacy importers
|
|
`migrations/import/build_price_map.py` and `rebuild_price_from_1c_only.py`
|
|
generated INSERT statements with `published=true`. An internal nomenclature
|
|
item was incorrectly treated as approved public website content. Heading-based
|
|
grouping also placed surgical entries under unrelated categories such as US.
|
|
|
|
## Applied scope
|
|
|
|
`hide-nonpublic-prices-20261023.sql` is a one-time visibility-only correction.
|
|
It identifies 575 reviewed existing rows by ID plus a fingerprint of the exact
|
|
name, amount and section. It aborts on drift. No prices are changed and no rows
|
|
are deleted. The cosmetology section is unpublished. The raw catalog remains
|
|
available to administrators. Other sections, doctor profiles, appointments and
|
|
clinical records are unchanged.
|
|
|
|
The selection rules in `price_policy.py` are an audit helper, not a medical
|
|
classifier or an ongoing automatic publication rule. New or ambiguous entries
|
|
require human review; do not blindly apply these expressions to future imports.
|
|
|
|
The two legacy generators now produce draft prices and draft new sections.
|
|
They are not executed by this correction. The full-rebuild generator still
|
|
contains a historical DELETE and must never be run against production without
|
|
a separately approved replacement/backup plan.
|
|
|
|
## Verification and rollback
|
|
|
|
Run the standard-library tests from deploy/:
|
|
|
|
```sh
|
|
python3 -m unittest -v test_price_policy test_price_import_defaults
|
|
```
|
|
|
|
After the SQL change, compare every price with the pre-change snapshot. Only
|
|
the reviewed IDs may change their publication flags/updated timestamps. Public
|
|
`/api/v1/prices`, service pages and search must exclude hidden IDs; consultation
|
|
prices and unrelated price amounts must remain intact. SSR builds its cache
|
|
fingerprint from current public data, so no application restart is required.
|
|
|
|
The private task directory `/home/mikail/dana-price-publication-20261023/`
|
|
contains the before/after price snapshots and `rollback-price-visibility.sql`.
|
|
Use that rollback only after reviewing any newer manual publication edits. It
|
|
restores the previous publication flags and does not restore or overwrite
|
|
patients, appointments or price amounts. Do not restore the entire database.
|