OpenMRS

Improve Java 8 streams usage on Cohort.getActiveMembership(Patient)

In this method we do filter -> collect -> get.

Instead this should do filter -> findFirst -> get. (This would be potentially a bit more efficient.)

[https://github.com/openmrs/openmrs-core/blob/2.1.3/api/src/main/java/org/openmrs/Cohort.java#L215]

Task tags

  • coding
  • java

Students who completed this task

Fungucide

Task type

  • code Code
close

2018