public int addOneItemRecord(BillingItemData val) throws ParseException {
   BillingONItem item = new BillingONItem();
   item.setCh1Id(Integer.parseInt(val.ch1_id));
   item.setTranscId(val.transc_id);
   item.setRecId(val.rec_id);
   item.setServiceCode(val.service_code);
   item.setFee(val.fee);
   item.setServiceCount(val.ser_num);
   item.setServiceDate(dateformatter.parse(val.service_date));
   item.setDx(val.dx);
   item.setDx1(val.dx1);
   item.setDx2(val.dx2);
   item.setStatus(val.status);
   BillingONItem returnItem = itemDao.saveEntity(item);
   return returnItem.getId(); // return ID
 }
  public boolean addItemRecord(List lVal, int id) {

    boolean retval = true;
    for (int i = 0; i < lVal.size(); i++) {
      BillingItemData val = (BillingItemData) lVal.get(i);

      BillingONItem b = new BillingONItem();
      b.setCh1Id(id);
      b.setTranscId(val.transc_id);
      b.setRecId(val.rec_id);
      b.setServiceCode(val.service_code);
      b.setFee(val.fee);
      b.setServiceCount(val.ser_num);
      if (val.service_date.length() > 0)
        try {
          b.setServiceDate(dateformatter.parse(val.service_date));
        } catch (ParseException e) {
          /*empty*/
        }
      b.setDx(val.dx);
      b.setDx1(val.dx1);
      b.setDx2(val.dx2);
      b.setStatus(val.status);

      itemDao.persist(b);
      val.setId(b.getId().toString());
    }
    return retval;
  }