Update to Platform 2.7.3 and Support Java 21#13
Conversation
e3137f8 to
d7d5494
Compare
| <dependency> | ||
| <groupId>org.openmrs.module</groupId> | ||
| <artifactId>legacyui-omod</artifactId> | ||
| <version>1.22.0</version> |
api/pom.xml
Outdated
| <artifactId>groovy-all</artifactId> | ||
| <groupId>org.openmrs.module</groupId> | ||
| <artifactId>reportingcompatibility-api</artifactId> | ||
| <version>2.0.6</version> |
There was a problem hiding this comment.
Looking at this again, do you mean the calculation module depends on the reportingcompatibility module?
There was a problem hiding this comment.
PatientSetService was removed in OpenMRS Platform 2.0.0, so I used the reporting compatibility module to replace it.
Replaced:
Context.getPatientSetService().getObservations(new Cohort(cohort), whichConcept);
with
Context.getService(ReportingCompatibilityService.class).getObservations(new Cohort(cohort), whichConcept);
https://openmrs.atlassian.net/browse/TRUNK-4874
https://talk.openmrs.org/t/we-should-remove-patientsetservice-in-openmrs-core-in-platform-2-0/6173
There was a problem hiding this comment.
The calculation module is supposed to be very light weight and hence should not depend on the reporting compatibility module. The reportingcompatibilty module is being deprecated.
There was a problem hiding this comment.
@dkayiwa I removed the reporting compatibility module from this
|
We are also going to bump the major version on the master branch and create a new branch for older versions of the platform. |
should we create a separate PR for that? |
We can do the version bump as part of this pull request. What do you think about it? |
I agree. What is the name I should give for the legacy branch? For now, I created a branch called master-2.x. We could change the name if you don't like it. https://github.com/openmrs/openmrs-module-calculation/tree/master-2.x |
|
Can you follow the same branch naming convention as we have done before? |
|
I updated the name to 1.x |
| } | ||
|
|
||
| private Map<Integer, List<Obs>> getObservations(Cohort cohort, Concept concept) { | ||
| if (cohort == null || concept == null || cohort.getMemberIds().isEmpty()) { |
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.codehaus.groovy</groupId> |
There was a problem hiding this comment.
Is there a reason why you changed it from org.codehaus.groovy?
There was a problem hiding this comment.
Yes, org.codehaus.groovy has been relocated to org.apache.groovy. https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-all
There was a problem hiding this comment.
Which one are we using in platform 2.7.3?
There was a problem hiding this comment.
org.codehaus.groovy:2.4.21. Should I update it there or remove it from here?
There was a problem hiding this comment.
Can you also update the version?
| <groupId>org.apache.groovy</groupId> | ||
| <artifactId>groovy-all</artifactId> | ||
| <version>${groovyVersion}</version> | ||
| <type>jar</type> |
There was a problem hiding this comment.
The same goes for changing jar to pom
There was a problem hiding this comment.
28b876b to
bf8b10d
Compare
| return Collections.emptyMap(); | ||
| } | ||
|
|
||
| return cohort.getMemberships().stream() |
There was a problem hiding this comment.
I find this to be a very inefficient replacement when compared to the original implementation: https://github.com/openmrs/openmrs-core/blob/1.12.x/api/src/main/java/org/openmrs/api/db/hibernate/HibernatePatientSetDAO.java#L1092-L1141
There was a problem hiding this comment.
should we update this to do a Hibernate query?
There was a problem hiding this comment.
Whatever you find better than the current code.
There was a problem hiding this comment.
@dkayiwa, does performance matter much in this case since it's only used in tests?
There was a problem hiding this comment.
That is a very good point and you are indeed correct. 😊
|
@wikumChamith can you add the rest of the Java versions? |
https://openmrs.atlassian.net/browse/CALC-58