Skip to content

Drop response_source_codes; fix pipeline step lettering + smoke test#6

Open
jacobmpeters wants to merge 1 commit into
mainfrom
chore/drop-response-source-codes
Open

Drop response_source_codes; fix pipeline step lettering + smoke test#6
jacobmpeters wants to merge 1 commit into
mainfrom
chore/drop-response-source-codes

Conversation

@jacobmpeters

Copy link
Copy Markdown
Contributor

Per the plan to have the Usagi source-code prep maintained downstream, this repo's OMOP responsibility now ends at response_unique_id on relational.responses.

Drops response_source_codes (SQL + every reference: run_pipeline.sh, docs/omop_run_protocol.md, docs/omop_source_codes.md, sql/omop/README.md).

Also fixes two inconsistencies flagged earlier:

  • run_pipeline.sh step lettering — drops the removed "type value columns" step (typing is inlined in the unpivots) and the create-view step; re-lettered A–G. Validation now runs on responses (n_unique_id == n_distinct_responses, out_of_omop_range == 0).
  • smoke_test_omop_hash.py — rewritten around the response_unique_id UDF contract (computes the id directly in DuckDB + Python, asserts equality / OMOP range / determinism / uniqueness); drops the surfaced response_hash_id the pipeline no longer produces.

Smoke test passes; run_pipeline.sh syntax-checks clean. No production data read.

The Usagi source-code projection is now maintained downstream by the OMOP
mapping owner, so this repo's OMOP responsibility ends at response_unique_id on
relational.responses.

- Remove sql/omop/response_source_codes.sql and every reference to it
  (run_pipeline.sh, docs/omop_run_protocol.md, docs/omop_source_codes.md,
  sql/omop/README.md).
- run_pipeline.sh: drop the create-view step and the stale "type value columns"
  step (typing was already inlined into the unpivot inserts); re-letter A–G;
  validate response_unique_id on `responses` (n_unique_id == n_distinct_responses,
  out_of_omop_range == 0) instead of the removed view.
- omop_run_protocol.md: retarget to response_unique_id on responses; validate on
  responses; fix governance (response_value_as_string) and rollback (drop the
  --view command; add responses/UDF rollback).
- smoke_test_omop_hash.py: rewrite around the response_unique_id UDF contract —
  compute the id directly (SHA-256 -> first-15-hex -> +offset) in DuckDB and
  Python and assert equality/range/determinism/uniqueness; drop the surfaced
  response_hash_id column that the pipeline no longer produces.

Smoke test passes; run_pipeline.sh syntax-checks clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant