-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Practitioner Details implementation (#890)
* Refactor Practitioner Details implementation (#1520) * Refactor SharedPreference keys * Create custom JSON parser * Refactor SharedPreferencesHelper * Implement Practitioner Details * Add fhir-common-utils dependency * Returns null when Organization is not found * Add TODO tracker for multi Organization * Migrate practitioner endpoint url as a String extension Co-authored-by: Fikri Milano <fikrimilano1@gmail.com> Co-authored-by: maimoona.kausar <maimoonak.mk@gmail.com>
- Loading branch information
1 parent
ed887e9
commit ddbcf13
Showing
40 changed files
with
1,257 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
259 changes: 259 additions & 0 deletions
259
android/engine/src/main/assets/sample_practitioner_payload.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,259 @@ | ||
{ | ||
"resourceType": "Bundle", | ||
"id": "51d382cf-63e5-4aa8-bcb3-369d2fd300cb", | ||
"meta": { | ||
"lastUpdated": "2022-08-17T07:24:25.608+00:00" | ||
}, | ||
"type": "searchset", | ||
"total": 1, | ||
"link": [ | ||
{ | ||
"relation": "self", | ||
"url": "https://fhir.labs.smartregister.org:443/fhir/practitioner-details?keycloak-uuid=34f0d616-afc8-4446-ae87-bb60be4bdbc9" | ||
} | ||
], | ||
"entry": [ | ||
{ | ||
"fullUrl": "https://fhir.labs.smartregister.org:443/fhir/practitioner-details/34f0d616-afc8-4446-ae87-bb60be4bdbc9", | ||
"resource": { | ||
"resourceType": "practitioner-details", | ||
"id": "34f0d616-afc8-4446-ae87-bb60be4bdbc9", | ||
"meta": { | ||
"profile": [ | ||
"http://hl7.org/fhir/profiles/custom-resource" | ||
] | ||
}, | ||
"KeycloakUserDetails": { | ||
"id": "34f0d616-afc8-4446-ae87-bb60be4bdbc9", | ||
"user-bio": [ | ||
{ | ||
"identifier": "b87ff3c2-cbc6-43e6-b753-a9620756f9e4", | ||
"userName": "demo", | ||
"preferredName": "demo", | ||
"familyName": "41887", | ||
"givenName": "Demo", | ||
"emailVerified": "false" | ||
} | ||
], | ||
"user-roles": [ | ||
"ROLE_realm-admin", | ||
"ROLE_OPENMRS", | ||
"ROLE_EDIT_KEYCLOAK_USERS", | ||
"ROLE_offline_access", | ||
"ROLE_VIEW_KEYCLOAK_USERS", | ||
"ROLE_uma_authorization", | ||
"ROLE_ALL_EVENTS", | ||
"ROLE_PLANS_FOR_USER" | ||
] | ||
}, | ||
"fhir": { | ||
"id": "136252", | ||
"careteams": [ | ||
{ | ||
"resourceType": "CareTeam", | ||
"id": "136253", | ||
"meta": { | ||
"versionId": "1", | ||
"lastUpdated": "2022-07-25T16:41:45.221+00:00", | ||
"source": "#98d1c5ca256d7e8b" | ||
}, | ||
"identifier": [ | ||
{ | ||
"use": "official", | ||
"value": "46384571-ad31-4c20-8aa0-266f80ef6582" | ||
} | ||
], | ||
"status": "active", | ||
"name": "Nala Team", | ||
"participant": [ | ||
{ | ||
"member": { | ||
"reference": "Practitioner/136252" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"teams": [ | ||
{ | ||
"resourceType": "Organization", | ||
"id": "136254", | ||
"meta": { | ||
"versionId": "2", | ||
"lastUpdated": "2022-07-25T16:42:51.523+00:00", | ||
"source": "#dad854aca8ea9fcd" | ||
}, | ||
"identifier": [ | ||
{ | ||
"use": "official", | ||
"value": "e58c9509-8ff2-4664-b805-e9dd5bf0cf8a" | ||
} | ||
], | ||
"active": true, | ||
"type": [ | ||
{ | ||
"coding": [ | ||
{ | ||
"system": "http://terminology.hl7.org/CodeSystem/organization-type", | ||
"code": "prov" | ||
} | ||
] | ||
} | ||
], | ||
"name": "Nala Team", | ||
"alias": [ | ||
"nala" | ||
] | ||
} | ||
], | ||
"locations": [ | ||
{ | ||
"resourceType": "Location", | ||
"id": "136256", | ||
"meta": { | ||
"versionId": "1", | ||
"lastUpdated": "2022-07-25T16:44:38.620+00:00", | ||
"source": "#b46640c1adfc6d38" | ||
}, | ||
"identifier": [ | ||
{ | ||
"use": "official", | ||
"value": "c3bd4bcc-889e-4e3d-a72b-a0b611b8fb64" | ||
} | ||
], | ||
"status": "active", | ||
"name": "Nala Location ", | ||
"physicalType": { | ||
"coding": [ | ||
{ | ||
"system": "http://terminology.hl7.org/CodeSystem/location-physical-type", | ||
"code": "jdn", | ||
"display": "Jurisdiction" | ||
} | ||
] | ||
}, | ||
"partOf": { | ||
"reference": "Location/109211", | ||
"display": "Charlie Clinic" | ||
} | ||
} | ||
], | ||
"locationHierarchyList": [ | ||
{ | ||
"resourceType": "LocationHierarchy", | ||
"id": "Location Resource : 136256", | ||
"meta": { | ||
"profile": [ | ||
"http://hl7.org/fhir/profiles/custom-resource" | ||
] | ||
}, | ||
"LocationHierarchyTree": { | ||
"locationsHierarchy": { | ||
"listOfNodes": { | ||
"treeNodeId": "Location/136256", | ||
"treeNode": [ | ||
{ | ||
"nodeId": "Location/136256", | ||
"label": "Nala Location ", | ||
"node": { | ||
"resourceType": "Location", | ||
"id": "136256", | ||
"meta": { | ||
"versionId": "1", | ||
"lastUpdated": "2022-07-25T16:44:38.620+00:00", | ||
"source": "#b46640c1adfc6d38" | ||
}, | ||
"identifier": [ | ||
{ | ||
"use": "official", | ||
"value": "c3bd4bcc-889e-4e3d-a72b-a0b611b8fb64" | ||
} | ||
], | ||
"status": "active", | ||
"name": "Nala Location ", | ||
"physicalType": { | ||
"coding": [ | ||
{ | ||
"system": "http://terminology.hl7.org/CodeSystem/location-physical-type", | ||
"code": "jdn", | ||
"display": "Jurisdiction" | ||
} | ||
] | ||
}, | ||
"partOf": { | ||
"reference": "Location/109211", | ||
"display": "Charlie Clinic" | ||
} | ||
}, | ||
"parent": "Location/109211", | ||
"children": [ | ||
{ | ||
"childId": "Location/137151", | ||
"treeNode": { | ||
"nodeId": "Location/137151", | ||
"label": "Test Village", | ||
"node": { | ||
"resourceType": "Location", | ||
"id": "137151", | ||
"meta": { | ||
"versionId": "1", | ||
"lastUpdated": "2022-08-04T11:41:32.683+00:00", | ||
"source": "#1bb63352eef7cefc" | ||
}, | ||
"identifier": [ | ||
{ | ||
"use": "official", | ||
"value": "f7f4c729-fd05-40aa-bdc3-fccd74589264" | ||
} | ||
], | ||
"status": "active", | ||
"name": "Test Village", | ||
"description": "Test", | ||
"physicalType": { | ||
"coding": [ | ||
{ | ||
"system": "http://terminology.hl7.org/CodeSystem/location-physical-type", | ||
"code": "jdn", | ||
"display": "Jurisdiction" | ||
} | ||
] | ||
}, | ||
"partOf": { | ||
"reference": "Location/136256", | ||
"display": "Nala Location " | ||
} | ||
}, | ||
"parent": "Location/136256" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"parentChildren": [ | ||
{ | ||
"identifier": "Location/109211", | ||
"childIdentifiers": [ | ||
"Location/136256" | ||
] | ||
}, | ||
{ | ||
"identifier": "Location/136256", | ||
"childIdentifiers": [ | ||
"Location/137151" | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"locationId": "136256" | ||
} | ||
], | ||
"practitionerId": [ | ||
"136252" | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.