def get_data_elements(category = nil, status = nil)
      if category && status
        dataElements.where(qdmCategory: category, qdmStatus: status) || []
      elsif category
        dataElements.where(qdmCategory: category) || []
      else
        dataElements || []
      end
    end
def get_data_elements(category = nil, status = nil)
      if category && status
        dataElements.where(qdmCategory: category, qdmStatus: status) || []
      elsif category
        dataElements.where(qdmCategory: category) || []
      else
        dataElements || []
      end
    end
Returns an array of elements that exist on this patient. Optionally
 takes a category and/or, which returns all elements of that QDM
 category. Example: patient.get_data_elements('encounters')
 will return all Encounter QDM data types active on the patient.