Fixing behavior of left joins

In this version left joins behave properly, i.e. even if some data is
missing (e.g. encounter id) we will stil have new flattened obs record