Skip to content

Commit

Permalink
Merge pull request #5 from opensafely/iaindillingham/bump-to-ehrql-v1
Browse files Browse the repository at this point in the history
Bump to ehrQL v1
  • Loading branch information
iaindillingham authored Mar 13, 2024
2 parents 80b70c9 + 2510f74 commit 3e59989
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'onCreateCommand' to run commands after the container is started for the first time.
"onCreateCommand": "pip3 install --user -r .devcontainer/requirements.in && opensafely exec ehrql:v0 dump-example-data",
"onCreateCommand": "pip3 install --user -r .devcontainer/requirements.in && opensafely exec ehrql:v1 dump-example-data",
// Configure tool-specific properties.
"customizations": {
"vscode": {
Expand Down
10 changes: 5 additions & 5 deletions dataset_definition.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from ehrql import case, codelist_from_csv, create_dataset, days, when
from ehrql.tables.beta.core import medications, patients
from ehrql.tables.beta.tpp import (
from ehrql.tables.core import medications, patients
from ehrql.tables.tpp import (
addresses,
apcs,
clinical_events,
hospital_admissions,
practice_registrations,
)

Expand Down Expand Up @@ -76,8 +76,8 @@
# outcome variable

dataset.date_first_admitted = (
hospital_admissions.where(hospital_admissions.admission_date.is_after(index_date))
.sort_by(hospital_admissions.admission_date)
apcs.where(apcs.admission_date.is_after(index_date))
.sort_by(apcs.admission_date)
.first_for_patient()
.admission_date
)
2 changes: 1 addition & 1 deletion project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expectations:

actions:
generate_dataset:
run: ehrql:v0 generate-dataset --output dataset.csv.gz dataset_definition.py
run: ehrql:v1 generate-dataset --output dataset.csv.gz dataset_definition.py
outputs:
highly_sensitive:
dataset: dataset.csv.gz

0 comments on commit 3e59989

Please sign in to comment.