Refactoring Bahmni IE Apps to provide its classes in 'api' folder

Hi guys!

Related to BAH-921 , it looks like most of the Bahmni IE Apps classes are provided in the omod section of the module. This is not quite correct, should be api.

So we are refactoring this and moving the dao, mapper, model, service and validator packages in api.

The package names won’t change (though there is something to note about this - see down below), but, if anyone already depends on this module, you should likely update your Maven dependency from:

<dependency>
  <groupId>org.bahmni.module</groupId>
  <artifactId>bahmni.ie.apps-omod</artifactId>
  <version>${bahnmiieappsVersion}</version>
</dependency>

to

<dependency>
  <groupId>org.bahmni.module</groupId>
  <artifactId>bahmni.ie.apps-api</artifactId>
  <version>${bahnmiieappsVersion}</version>
</dependency>

(unless you are using the Controllers of course, which will stay in the omod sub-project)

Note about the package naming. There is also inconsistency in the naming of the packages. In the omod folder, package name is org.openmrs.module.bahmni.ie.apps In the api folder, package name is org.bahmni.module.bahmni.ie.apps

We will change all packages to be named org.openmrs.module.bahmni.ie.apps, unless someone thinks otherwise. The rule is to usually name it org.bahmni... though, but there is ongoing work that suggests that we’ll move this module under the OpenMRS’ org.

Best,

Romain

(cc @zouchine)

1 Like

I just realize that if we change the package name to org.openmrs... it will conflict with the Maven group ID: org.bahmni.module

Maybe that’s not going to be a problem but I guess that could lead to confusion.

I guess we would better set packages as the group ID: org.bahmni... then.

@angshuonline what do you think?

1 Like

Moved to the bahmni category.

Discussed in standup call, we will name the package org.bahmni.module... to match the group ID. (cc @zouchine)

1 Like

I have identified that Bahmni Offline Sync do have dependency on the bahmni.ie.apps-omod artifact. See pom.xml and other places… Will do a PR for this soon.

@binduak also mentioned that Implementer Interface consumes Bahmni IE Apps API (mostly here). Since the controllers have not been changed in Bahmni IE Apps, Implementer Interface shouldn’t be affected by the change though. Still need to test it.