Repository navigation
Add date expressions for first and last day of NHS financial year - #723
Conversation
| session.commit() | ||
| study = StudyDefinition( | ||
| index_date=index_date, | ||
| population=patients.with_these_clinical_events( |
There was a problem hiding this comment.
When you tested against the EMIS backend, you tested the expressions with the context of population and event_date; the former because it's special and the latter because it's not, I assume. Why not do the same here?
I'm sure there's a good reason 🙂
There was a problem hiding this comment.
I did the tpp tests first, and it made sense to just test against the patient ids that were returned. population on its own just gets you a set of patient_id in the results. I tried to do the same thing in the emis tests, but the emis backend generates patient ids (I confess I didn't look too closely at exactly what it does), so the patient ids in the results were always 0 and 1. The emis one is only that way to have some way to checking that the 2 patients it returns are the expected ones.
There was a problem hiding this comment.
Ah, of course! Yes, the EMIS backend handles patient IDs differently, making is much harder to test against just population. More here:
cohort-extractor/cohortextractor/emis_backend.py
Lines 1585 to 1596 in 84dddec
iaindillingham
left a comment
There was a problem hiding this comment.
Very clear! I feel I've learnt a lot more about cohort-extractor, just from looking at this PR.
Fixes #719