Move prime view method to dimagi-utils