22
33import org .apache .commons .lang3 .StringUtils ;
44import org .openmrs .annotation .OpenmrsProfile ;
5- import org .openmrs .module .billing .api .IBillableItemsService ;
5+ import org .openmrs .module .billing .api .BillableServiceService ;
66import org .openmrs .module .billing .api .model .BillableService ;
77import org .openmrs .module .initializer .Domain ;
88import org .openmrs .module .initializer .api .BaseLineProcessor ;
1111import org .springframework .beans .factory .annotation .Autowired ;
1212import org .springframework .beans .factory .annotation .Qualifier ;
1313
14- @ OpenmrsProfile (modules = { "billing:1.1 .0 - 9.*" })
14+ @ OpenmrsProfile (modules = { "billing:2.0 .0 - 9.*" })
1515public class BillableServicesCsvParser extends CsvParser <BillableService , BaseLineProcessor <BillableService >> {
1616
17- private final IBillableItemsService billableItemsService ;
17+ private final BillableServiceService billableServiceService ;
1818
1919 private final BillableServicesLineProcessor billableServicesLineProcessor ;
2020
2121 @ Autowired
22- public BillableServicesCsvParser (@ Qualifier ("billableItemsService " ) IBillableItemsService billableItemsService ,
22+ public BillableServicesCsvParser (@ Qualifier ("billableServiceService " ) BillableServiceService billableServiceService ,
2323 BillableServicesLineProcessor billableServicesLineProcessor ) {
2424 super (billableServicesLineProcessor );
25- this .billableItemsService = billableItemsService ;
25+ this .billableServiceService = billableServiceService ;
2626 this .billableServicesLineProcessor = billableServicesLineProcessor ;
2727 }
2828
@@ -35,7 +35,7 @@ public Domain getDomain() {
3535 public BillableService bootstrap (CsvLine line ) throws IllegalArgumentException {
3636 String uuid = line .getUuid ();
3737
38- BillableService billableService = billableItemsService . getByUuid (uuid );
38+ BillableService billableService = billableServiceService . getBillableServiceByUuid (uuid );
3939
4040 if (billableService == null ) {
4141 billableService = new BillableService ();
@@ -49,7 +49,7 @@ public BillableService bootstrap(CsvLine line) throws IllegalArgumentException {
4949
5050 @ Override
5151 public BillableService save (BillableService instance ) {
52- return billableItemsService . save (instance );
52+ return billableServiceService . saveBillableService (instance );
5353 }
5454
5555 @ Override
0 commit comments