GSoC 2018 - OAuth Module Enhancements And SMART Apps Support Project

Yep I understood now. Thanks alot :slight_smile: :smiley:

For now, the dao here is never used. So I am leaving it commented out.

@mavrk feel free to merge my code :slight_smile:

@mavrk please have a look at my pull request : https://github.com/openmrs/openmrs-module-oauth2/pull/13

Now we are able to see the registered smart app list and also able to run the selected one.

Pressing the “Run” button redirects us to the smart app’s launch url passed with two parameters, iss and launch. The launch parameter here is the launch value which is generated as we run the app and is stored in the db too.

Also I have done all the major minor changes required after analyzing my code till date.

Please review and give feedback :+1: :slight_smile:

Good work @pkatopenmrs I’ll not merge your work for now. Complete the additions to AccessConfirmationController and run a demo SMART application either from the SMART gallery or the sample SMART application I gave you :slightly_smiling_face: Then, we’ll be good to go. You have made good progress do far. The first major deliverable should be ready before the first evals :+1:

1 Like

Thank you @mavrk! :smiley: Yes I hope we complete the first deliverable soon :slight_smile:

@mavrk I added the CustomTokenEnhancer as we discussed on call today. Happy to tell you that its working fine :slight_smile: .

You can have a look at the changes here : OA-15:Returning proper Conformance Statement response and properly running SMART apps by PKatGITHUB · Pull Request #14 · openmrs/openmrs-module-oauth2 · GitHub

The pull request also contains the changes related to the correct conformance statement format.

On running the pea SMART App, now I am getting the error as :

WARN - ExceptionHandlingInterceptor.createOperationOutcome(135) |2018-06-28 21:53:21,547| Failure during REST processing: ca.uhn.fhir.rest.server.exceptions.InvalidRequestException: Invalid request: The FHIR endpoint on this server does not know how to handle GET operation[Observation] with parameters [[patient]]

I think that what this app is now requesting is not supported by the FHIR module?

Please correct me if I am wrong. :slight_smile:

I think it’d be better if you tell us what the exact request is.

http://localhost:8080/openmrs/ws/fhir/Observation?patient=39660707-574b-11e8-b5ce-a81e847f67bb

@mavrk this is the request.

@harsha89 Prabodh here is getting trouble running a SMART App which runs this FHIR query. Any ideas ? :slightly_smiling_face:

@mavrk is this request isn’t working is the problem?

Yes @harsha89 the problem is that the request is not working. This is the log :

shall we do a quick debug and see? It seems particular search pattern isn’t supported. Can you check following observation resource controller and confirm. Then we might need to add get observations by patient.

@harsha89 as you can see here : https://github.com/openmrs/openmrs-module-fhir/blob/40a0f82e6825850ed7fb37dae3405dea953f0e32/omod/src/main/java/org/openmrs/module/fhir/providers/RestfulObservationResourceProvider.java#L139

this method must help the request with “patient” as parameter. Then why the request is not working?

Most probably this can be due to HAPI FHIR version upgrades. We need to see why it’s failing with a quick debug. Let me know if you can do it. Else I might be able to check this on Sunday.

1 Like

I will update you soon

@harsha89 I tried but couldn’t figure out much about the issue. Can you please help :confused: You can try it on Sunday. I will wait :slight_smile:

@harsha89 any updates on this?

@pkatopenmrs sorry I still didn’t had a chance to look at this. Were you able to add a debug point to controller and check why it’s not getting invoked? I should be able to check this tomorrow.

@harsha89 actually the controller seems to be working fine with other type of requests. I tried but could not figure out the problem. Take your time and help me :slight_smile:

Regards

@harsha89 any updates on this?