Skip to content

outpatient appointments #950

Answered by rebkwok
rc16 asked this question in Q&A
Sep 12, 2022 · 3 comments · 1 reply
Discussion options

You must be logged in to vote

In order to idenitfy both the consecutive appointments and the corresponding mode, I think you'd need to define two variables for each consecutive date, one to return the date, and one to return the corresponding mode.

Something like this should work (note there's an extra returning parameter in the var_signature() function, so that you can use the same function to return the variable for the date and the appointment type.

def outpatient_appt_date_and_mode_X(name, codelist, index_date, n, return_expectations):

    def var_signature(name, codelist, on_or_after, return_expectations, returning):
        return {
            name: patients.outpatient_appointment_date(
                    wit…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by StevenMaude
Comment options

rc16
Sep 14, 2022
Collaborator Author

You must be logged in to vote
1 reply
@rebkwok
Comment options

Comment options

rc16
Sep 14, 2022
Collaborator Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants