-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(fix) RESTWS-908 Diagnosis resource should return formNamespace and formPath on core 2.5+ #577
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First correct the issue link.
I suppose there were db field changes that need to be updated in 2.5+
Cant seem to see the DAOs.
To make it clear i think @ibacher can give details of the database schema changes that were made in Core 2.5+.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! A few comments, but I don't think anything major is unexpected here. It might be good if we can expose a combined "formNamespaceAndPath" property (I believe there's a getter and setter for this already), as that is most likely to be useful.
webservices.rest-omod-2.5/pom.xml
Outdated
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<artifactId>webservices.rest</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: indentation
<artifactId>webservices.rest</artifactId> | |
<artifactId>webservices.rest</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to be indented correctly locally in my IDE but when i push the changes that specific section is distorted.
pom.xml
Outdated
<modules> | ||
<module>webservices.rest-omod-2.5</module> | ||
</modules> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use the profiles:
<modules> | |
<module>webservices.rest-omod-2.5</module> | |
</modules> |
webservices.rest-omod-2.5/pom.xml
Outdated
</plugins> | ||
</build> | ||
|
||
</project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
</project> | |
</project> | |
*/ | ||
@Resource(name = RestConstants.VERSION_1 | ||
+ "/patientdiagnoses", supportedClass = Diagnosis.class, supportedOpenmrsVersions = { "2.5.* - 9.*" }) | ||
public class DiagnosisResource2_5 extends DiagnosisResource2_2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also have a change to DiagnosisResource2_2 so that it's only supported up to 2.4.*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I create another ticket to resolve this?
Thanks @ibacher let me work on these changes. |
@ibacher yes there is a getter and setter for the formNamespaceAndPath. I have added the property. |
Can you also fix the link to the issue? |
THANKS @dkayiwa |
Are you able to open the jira ticket link that you included at the top of this pull request? |
@suubi-joshua did you see the build failures? |
Seeing them now. let me fix that. The Parent version was pointing at |
The build should be successful now @dkayiwa . It was successful locally. |
RESTWS-908 Diagnosis resource should return formNamespace and formPath on core 2.5+
RESTWS-908
I created a new submodule 2.5 and created a diagnosisResource class that extends the DiagnosisResource2_2 class in the 2.2 module. I added the formNamespace properties such that they can be returned.
Issue I worked on
see https://openmrs.atlassian.net/browse/RESTWS-908
Checklist: I completed these to help reviewers :)
My IDE is configured to follow the code style of this project.
No? Unsure? -> configure your IDE, format the code and add the changes with
git add . && git commit --amend
I have added tests to cover my changes. (If you refactored
existing code that was well tested you do not have to add tests)
No? -> write tests and add them to this commit
git add . && git commit --amend
I ran
mvn clean package
right before creating this pull request andadded all formatting changes to my commit.
No? -> execute above command
All new and existing tests passed.
No? -> figure out why and add the fix to your commit. It is your responsibility to make sure your code works.
My pull request is based on the latest changes of the master branch.
No? Unsure? -> execute command
git pull --rebase upstream master