-
Notifications
You must be signed in to change notification settings - Fork 59
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
[Client Side] implement the practitioner details endpoint. #857
Comments
Is there anything needed here that we can architect to be reusable in a supervisor app that fetches the details of a set of practitioners? |
We tried the possibility to add a custom UserDetails Resource class
But you see we need to extend getResourceType() method and it can only use ResourceType which is only available in the Fhir library. Even if we want make modifications into extending resource type we need to use pre-defined ResourceType. |
@RaaziaTarique As discussed, we need to register our custom Resource Provider in the FHIR. On the server-side, we achieve this by creating a new class with the Following is the example of custom resource provider:
} Since the work is in progress. It is likely to be changed. |
@RaaziaTarique The error may also occur due to the server-side work not being deployed yet. It is throwing a |
This makes sense. @rehammuzzamil when can we have bits of this done? |
@dubdabasoduba we can get an initial API PR ready by EOD Friday. |
The server-side PR is ready for review opensrp/hapi-fhir-opensrp-extensions#12 |
I have used this PR's Resource classes and I am still getting same error as previous
My code for registering custom classes (currently a sample payload is being used as the server side PR is still not merged)
|
@RaaziaTarique Please use this Parameter resources sample to hold the Practitioner resource linkage.
|
@f-odhiambo Library for Practitioner details API models is deployed but the API is currently working locally only. @rehammuzzamil needs to check logs inorder to investigate the reason of failure of the API on FHIR. Meanwhile I have removed the models that I copied in the project and used the ones that are deployed here https://oss.sonatype.org/content/repositories/snapshots/org/smartregister/fhir-common-utils/0.0.1-SNAPSHOT/. I will continue working on this after finalising issue #981 |
While saving the custom resources |
@dubdabasoduba
At the current implementation #890, it's actually saving both, with different shared preference key. So my question is. |
@FikriMilano I think the first one was added as a stopgap since we didn't have the practitioner details. I would say let's deprecate the first one. Let's also deprecate that API call. i.e we can have the following flow
|
Yes that would be ideal. But from what I see, the first API call is the only way to get the keycloakUuid which is needed to call the practitioner details API. |
@dubdabasoduba |
@FikriMilano good catch. is the payload returned after login? If not does login return anything else when successful? |
@dubdabasoduba After successful login it returns only these folks:
So, no keycloakUuid. |
I think the first API call only supposed to return a working dummy keycloakUuid. Perhaps something like: We are using this endpoint for login |
@dubdabasoduba @f-odhiambo EDIT: resolved |
@FikriMilano Do you mind explaining why the custom extension is needed? The Payload only has 2 custom data models i.e keycloak details and the LocationHeirarchy I think I am a bit lost by the Organization and CareTeam ones. |
This makes sense. It just seems like a duplication of effort to call both and return the keycloak details. |
Yeah, we need those custom extension for parsing purpose. Basically, any custom resource needs to be registered to the fhirParser. And I wasn't able to access those 2 classes. |
No worries. |
@dubdabasoduba |
@FikriMilano I think we can have both the calls for now. I will be creating another issue to enhance this. In that issue we will remove the keycloak response from the practitioner details. This |
@dubdabasoduba I would request for https://keycloak-stage.smartregister.org/auth/realms/FHIR_Android/protocol/openid-connect/userinfo to return this keycloak Also, in the payload I request for the |
I don't think it's possible to update it on my end. So I need your help with those. |
@FikriMilano I don't think you need to request for the |
@dubdabasoduba What I mean is, this current Organization/ That's why I request it to be updated to |
Unless that's intentional, then it's ok. |
@FikriMilano That's okay we can change the assignment from FHiR web |
This issue is just handling the saving and reading of the practitioner-related data. After these ones are complete then the fetching of data based on what you save here will be completed |
Yeah that's right, thanks |
TODOs:
|
We discussed to save the IDs directly into the SharedPreference, this helps us to avoid too many searches when using Parameters resource. Refer to this discussion #857 (comment)
I am using hapi-fhir-jpaserver-starter, and I'm a bit confused about where these resources will be created in the folder structure. I don't seem to see resource definition files. @dubdabasoduba @FikriMilano |
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Getting data
Saving data
ResourceEntity
table.Using data
- Should be able to get all demographics
- Should be able to get all the roles assigned to the user.
- This can be generic i.e give it the
practitioner-id
andresource type
then it returns the exact resource required.Additional context
The text was updated successfully, but these errors were encountered: