-
Notifications
You must be signed in to change notification settings - Fork 135
RA-121: Add picture to Registration #71
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
Conversation
| } | ||
|
|
||
| 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 { |
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.
hi @reagan-meant thanks for the works here,do we really need this around there HttpServletRequest request,checkout that
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 @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()); |
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.
plus the added request here!!
|
Is this still a work-in-progress, or is it ready for review? Thanks! |
|
@mogoodrich I will be pushed a better commit tomorrow for review...left with a few adjustments |
|
@mogoodrich I need a review now...cc @dkayiwa @mks-d @Ruhanga @ibacher |
mogoodrich
left a comment
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 @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)
.../src/main/java/org/openmrs/module/registrationapp/web/controller/patientImageController.java
Show resolved
Hide resolved
| return new SuccessResult(redirectUrl); | ||
| SimpleObject result = SimpleObject.create("redirectUrl", redirectUrl, "uuid", patient.getUuid()); | ||
| ObjectResult response = new ObjectResult(result); | ||
| return response; |
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.
What does this change do?
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.
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())); |
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.
Is there any way to fix these tests instead of just commenting them out.
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.
I will add a new assertion here and remove this.
|
Closing as stale. |
Work in progress.
https://issues.openmrs.org/browse/RA-121
Together with openmrs/openmrs-module-referenceapplication#77