Derivation
variable: idspouse (table[s]: all_spouse_pairs_clean_summarised [derived table])
Data from all_spouse_pairs_clean_summarised is converted to a wide listing of spouses per person with start and end dates, this is merged into the episode data and spouse ids assigned to the record where they were current spouses