Skip to content

Conversation

@reagan-meant
Copy link

@reagan-meant reagan-meant commented May 11, 2020

}

private void buildObs(ConceptService conceptService, List<Obs> obsToCreate, String conceptId, String[] parameterValues) throws ParseException {
private void buildObs(ConceptService conceptService, List<Obs> obsToCreate, String conceptId, String[] parameterValues,HttpServletRequest request,String name) throws ParseException {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @reagan-meant thanks for the works here,do we really need this around there HttpServletRequest request,checkout that

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @HerbertYiga for the review...I have changed the approach..see new PR

} else if (param.startsWith("obs.")) {
String conceptUuid = param.substring("obs.".length());
buildObs(conceptService, obsToCreate, conceptUuid, request.getParameterValues(param));
buildObs(conceptService, obsToCreate, conceptUuid, request.getParameterValues(param),request,name.getFullName());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plus the added request here!!

@mogoodrich
Copy link
Member

Is this still a work-in-progress, or is it ready for review? Thanks!

@reagan-meant
Copy link
Author

@mogoodrich I will be pushed a better commit tomorrow for review...left with a few adjustments

@reagan-meant
Copy link
Author

@mogoodrich I need a review now...cc @dkayiwa @mks-d @Ruhanga @ibacher

Copy link
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Ruhanga ... I took a quick look... I didn't review the workings of the new functionality in detail, was basically looking for any "red flags". I added some questions inline, and a couple follow-on here:

  • Do you need to include jquery in registration app? I believe it's provided by uicommons?
  • How is this configured? It should be "opt-in" functionality that people should need to "enable". (Maybe this is how ti works, but wanted to confirm)

return new SuccessResult(redirectUrl);
SimpleObject result = SimpleObject.create("redirectUrl", redirectUrl, "uuid", patient.getUuid());
ObjectResult response = new ObjectResult(result);
return response;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this change do?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to get the patient uuid in the response since the saving of the image is done via the ajax success call back here

assertTrue(result instanceof SuccessResult);
assertThat(((SuccessResult) result).getMessage(), is("url.html?patient=" + patient.getUuid()));
assertTrue(result instanceof ObjectResult);
//assertThat(((ObjectResult) result).getMessage(), is("url.html?patient=" + patient.getUuid()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way to fix these tests instead of just commenting them out.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add a new assertion here and remove this.

@brandones
Copy link
Contributor

Closing as stale.

@brandones brandones closed this Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants