The emrapi module now points to OpenMRS release 1.9.9 and we have conditional resources specified for 1.10 / 1.11 and 1.12. Its been a bit difficult to maintain this as it introduces duplicates.
It looks like all of the code we have in the api-1.10 is duplicated in
api-1.11 and api-1.12. Why are we doing this? This can’t be the right
way, is it @raff?
@raff I was hoping to address the exact problem @mseaton is talking about. Is there a better way to do this? It’ll be great to understand how other OpenMRS modules support backward compatibility.
Sorry for responding late! I had to revert your code because it broke the freeText functionality we had implemented for 1.12 version of OpenMRS and we were very close to giving out a release build. I’ll definitely have a look and try to understand the changes better.
Thanks a lot for taking the time out and doing this!
Cool. I’ve added a comment on the issue about the revert. Feel free to pick it up and reapply the change when you have some time to work on that. You got the idea.
For what it’s worth, I’d been having trouble running the 1.11 tests (specifically EmrEncounterController_1_11_Test), which I assume might be do the setup issues… this somehow magically cleared up, but it had been a blocker for me in terms of making sure I write adequately tests for a (small) change I want to make to the EncounterTransaction.
Happy to have a call to discuss this, but I wonder if it would be most efficient if someone can summarize the actual problem, prior to having a call. (From messages earlier this thread I guess that @raff did 90(?)% of the refactoring, but missed something related to 1.12, so we reverted that code. It would be helpful to see what actually broke there.)
For the specific refactorings you mention in bullet points, I have gone ahead and created JIRA tickets for the first two: