get_analysis_date function

Derive analysis date for interim/final analysis given multiple conditions