openmrs-module-webservices.rest icon indicating copy to clipboard operation
openmrs-module-webservices.rest copied to clipboard

RESTWS-895: Return 204 response when the patient allergy status is unknown

Open kdaud opened this issue 2 years ago • 13 comments

Description of what I changed

Issue I worked on

see https://issues.openmrs.org/browse/RESTWS-895

Checklist: I completed these to help reviewers :)

  • [x] My pull request only contains ONE single commit (the number above, next to the 'Commits' tab is 1).

    No? -> read here on how to squash multiple commits into one

  • [x] 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

  • [x] I ran mvn clean package right before creating this pull request and added 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.

  • [x] My pull request is based on the latest changes of the master branch.

    No? Unsure? -> execute command git pull --rebase upstream master

kdaud avatar Aug 11 '22 07:08 kdaud

With your changes, what happens when one requests for allergies for a patient whose status is unknown?

dkayiwa avatar Aug 11 '22 18:08 dkayiwa

Nothing is being return to the client.

kdaud avatar Aug 12 '22 07:08 kdaud

Nothing is being return to the client.

Then how are you helping the reporter of the problem on talk?

dkayiwa avatar Aug 12 '22 12:08 dkayiwa

@dkayiwa based on the responses on talk, this commit is now ok to go into master after testing it out.

kdaud avatar Aug 16 '22 06:08 kdaud

Did you see Burke's response?

dkayiwa avatar Aug 16 '22 09:08 dkayiwa

Yes!

kdaud avatar Aug 16 '22 09:08 kdaud

Did you also include the tests that i told you?

dkayiwa avatar Aug 16 '22 10:08 dkayiwa

@kdaud is there a reason why you make a million commits on pull requests like this? Am not against the concept of commit early and often. But your rate of committing on such pull requests looks like you do not first test locally before committing (Are you coding from your phone?). As a result, since am notified for each commit (and i do not want to turn this off), the noise becomes too much. 😊

dkayiwa avatar Aug 18 '22 13:08 dkayiwa

I am sorry! Now onward will be testing locally before pushing up.

kdaud avatar Aug 18 '22 14:08 kdaud

@dkayiwa have added the test however, its failing as a result of failing to locate the resource. Am using allergy as a resource path though this is failing, what could be the right resource path to be passed in the get() method?

kdaud avatar Aug 22 '22 07:08 kdaud

@kdaud your test should not be in that class. It should instead be in the PatientAllergyController2_0Test class.

dkayiwa avatar Aug 22 '22 09:08 dkayiwa

@kdaud when are you gonna finish this?

dkayiwa avatar Aug 22 '22 23:08 dkayiwa

today!

kdaud avatar Aug 23 '22 11:08 kdaud

Closing this PR in favor of pull/561

kdaud avatar Sep 15 '22 13:09 kdaud