solving an issue for situations with only one visit type where the data frame returns as a property instead of an array