Skip to content

Deduplication of overrides #85

@SterArcher

Description

@SterArcher

Task:

  1. In file update.py, function append_overrides() instead of detecting duplicate overrides and failing (using exit(1)) find all rows affecting the same doctor position by looking at doctor, type, id_inst (index columns)
  2. merge the rows affecting the same doctor position by applying chronologically the latest (by looking at date_override) non-empty values (in columns accepts_override, availability_override, address, city, post, phone, website, email, orderform) on top of the earlier values.
  3. Treat address columns (in columns address, city, post) as one - always take the latest all 3 fields fields to form complete address (take all 3 latest field values even if city is empty but both other fields are provided)
  4. keep the latest date_override at each doctor position
  5. save the deduplicated data with merged rows to csv/overrides-deduplicated.csv file for easier process supervision and possibly troubleshooting.
  6. keep saving the raw (non-deduplicated) data to csv/overrides.csv as before.

Keep the edits clean (don't change unrelated stuff, but feel free to warn about possible issues), minimal (easy for review), comment the purpose of larger/more complex (non-obvious) functionality.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions