A few things in this PR, mainly to get the concepts to work with duckdb. This builds off #1529 / @SphtKr. However #1529 has the conversion for MIMIC-III, whereas here I've converted MIMIC-IV. It should be straightforward to adapt for MIMIC-III, but I can't explain the parsing errors I'm getting when running it over that folder, so I've left it for a future PR.
Added build scripts for mimic-iii in duckdb
Added build scripts for mimic-iv in duckdb
Added a mimic_utils package that converts files/folders between SQL dialects.
Use this package to re-convert the postgresql scripts, and remove the old bash script system for MIMIC-IV
Moved the mapping folder from mimic-iv/concepts/mapping to mimic-iv/mapping
Thanks for the review! Fixed the typos; regarding some unaddressed points:
Consistent formatting - sqlfluff does this now via the action, but it only lints newly changed files.
Renaming SQL to remove db name - for mimic-iv I did this, for mimic-iii I left all the scripts with their dialect prefixes (postgres ..., duckdb ...).
We don't need to manually tweak any outputs for MIMIC-IV (though this is because there are Python patches written to parse some unsupported BigQuery functions). For MIMIC-III, I didn't put in the effort to make it all work, but it mostly works I think.
A few things in this PR, mainly to get the concepts to work with duckdb. This builds off #1529 / @SphtKr. However #1529 has the conversion for MIMIC-III, whereas here I've converted MIMIC-IV. It should be straightforward to adapt for MIMIC-III, but I can't explain the parsing errors I'm getting when running it over that folder, so I've left it for a future PR.
I also overhauled the READMEs a bit for clarity.