switched to Local::DB for live to use insert_or_update method; moved update_patient_demographics to own sub due to increased complexity - need insert_or_update method; bugfix for initial cml patients query - needs additional 'undef' on pd.status or has same effect as inner join instead of left join