You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At present, only Appointment.SeenDate is made available through this function, so we need to add a new argument that allows a user to select the column they wish to query. Precedents:
Several functions, such as patients.address_as_of, accept a returning argument that allows a user to select a column.
patients.with_these_decision_support_values accepts an algorithm argument, which allows the user to select an algorithm (spoiler: only the Electronic Frailty Index is available).
There are several date columns on the Appointments table in TPP. Until
now, we have only exposed the SeenDate column. That is, only this
column was used for filtering, and the value in this column was returned
when the `returning` parameter was "date".
We have now added support for filtering on and returning the BookedDate
and StartDate.
Note that we do not support filtering on one column and returning the
value of another, so eg you cannot find the SeenDate of all appointments
with a BookedDate in a given range. This would be possible to do.
Addresses part of #885.
TPP's Appointments table has a Status column. Until now, we have
filtered out all records whose status does not match one of the
following:
* AppointmentStatus.ARRIVED
* AppointmentStatus.WAITING
* AppointmentStatus.IN_PROGRESS
* AppointmentStatus.FINISHED
* AppointmentStatus.PATIENT_WALKED_OUT
* AppointmentStatus.VISIT
This commit adds a parameter to patients.with_gp_consultations to allow
the default to be overridden.
Addresses part of #885.
We need to make
Appointment.BookedDate
andAppointment.StartDate
available throughpatients.with_gp_consultations
for an upcoming study that @LisaHopcroft is coordinating.At present, only
Appointment.SeenDate
is made available through this function, so we need to add a new argument that allows a user to select the column they wish to query. Precedents:patients.address_as_of
, accept areturning
argument that allows a user to select a column.patients.with_these_decision_support_values
accepts analgorithm
argument, which allows the user to select an algorithm (spoiler: only the Electronic Frailty Index is available).Lisa and I have undertaken some curation work on these columns; a notebook has been released to the
appointments-short-data-report
workspace. However, I see that we restrict the values in the status column to thesecohort-extractor/cohortextractor/tpp_backend.py
Lines 2105 to 2113 in faca1e5
from these
cohort-extractor/cohortextractor/tpp_backend.py
Lines 3813 to 3828 in faca1e5
in cohort-extractor. Our curation work hasn't explored the status column, so I'd tentatively advocate allowing a user to disable this restriction.
The text was updated successfully, but these errors were encountered: