Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/lint_sqlfluff.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
name: SQLFluff

# Lints changed mimic-iv/concepts/*.sql on pull requests and posts GitHub
# annotations. Fork PRs skip Annotate — GITHUB_TOKEN cannot create check runs
# from forks (Resource not accessible by integration / 403).
on:
- pull_request

jobs:
lint-mimic-iv:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- name: checkout
uses: actions/checkout@v7
Expand Down Expand Up @@ -35,8 +41,14 @@ jobs:
shell: bash
run: sqlfluff lint --format github-annotation --annotation-level failure --nofail ${{ steps.get_files_to_lint.outputs.lintees }} > annotations.json
- name: Annotate
# Same-repo PRs only: fork tokens get 403 creating check runs, and
# ignore-unauthorized-error does not treat that as unauthorized.
if: >
steps.get_files_to_lint.outputs.lintees != '' &&
github.event.pull_request.head.repo.full_name == github.repository
uses: yuzutech/annotations-action@v0.6.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
title: "SQLFluff Lint"
input: "./annotations.json"
input: "./annotations.json"
ignore-unauthorized-error: true
2 changes: 1 addition & 1 deletion mimic-iii/concepts/severityscores/lods.sql
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ left join `physionet-data.mimiciii_derived.labs_first_day` labs
(
select
cohort.*
-- Below code calculates the component scores needed for SAPS
-- Below code calculates the component scores needed for LODS

-- neurologic
, case
Expand Down
2 changes: 1 addition & 1 deletion mimic-iii/concepts_postgres/severityscores/lods.sql
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ WITH cpap AS (
ON ie.icustay_id = labs.icustay_id
), scorecomp AS (
SELECT
cohort.*, /* Below code calculates the component scores needed for SAPS */ /* neurologic */
cohort.*, /* Below code calculates the component scores needed for LODS */ /* neurologic */
CASE
WHEN mingcs IS NULL
THEN NULL
Expand Down
2 changes: 1 addition & 1 deletion mimic-iv/concepts/score/lods.sql
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ WITH cpap AS (
, scorecomp AS (
SELECT
cohort.*
-- Below code calculates the component scores needed for SAPS
-- Below code calculates the component scores needed for LODS

-- neurologic
, CASE
Expand Down
2 changes: 1 addition & 1 deletion mimic-iv/concepts_postgres/score/lods.sql
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ WITH cpap AS (
ON ie.stay_id = labs.stay_id
), scorecomp AS (
SELECT
cohort.*, /* Below code calculates the component scores needed for SAPS */ /* neurologic */
cohort.*, /* Below code calculates the component scores needed for LODS */ /* neurologic */
CASE
WHEN gcs_min IS NULL
THEN NULL
Expand Down
Loading