updated version of HQMF2JS to fix episode of care counting