Skip to content

Instantly share code, notes, and snippets.

@kitsao
Last active August 29, 2015 14:14
Show Gist options
  • Save kitsao/13db16ff55edd3d12b4c to your computer and use it in GitHub Desktop.
Save kitsao/13db16ff55edd3d12b4c to your computer and use it in GitHub Desktop.
Update existing specimen records for accepted_by/rejected_by to have user_id!=0 to avoid breaking patient report
update specimens set accepted_by=10 where accepted_by=0 and rejection_reason_id is null;
update specimens set rejected_by=10 where rejected_by=0 and rejection_reason_id is not null;
-- ID 160 is not available, set it to 8 - wasike
update specimens set accepted_by=8 where accepted_by=160 and rejection_reason_id is null;
update specimens set rejected_by=8 where rejected_by=160 and rejection_reason_id is not null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment