-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding the sync strategies documentations (#3530)
* - Adding the sync strategies documentations * Correct typos * Update tagging.mdx * correct outline hierarchy * consolidate user assignment until we have more content * update text * remove unused files * minor adjustments to text --------- Co-authored-by: pld <[email protected]>
- Loading branch information
1 parent
92601d7
commit 978d050
Showing
5 changed files
with
85 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
# Admin Dashboard | ||
|
||
We use [fhir-web](https://github.com/onaio/fhir-web) as the administrative dashboard for OpenSRP 2 projects. | ||
We use [fhir-web](https://github.com/onaio/fhir-web) as the admin dashboard for OpenSRP 2 projects. This allows you to manage users, teams and view data. See more details on the [admin dashboard features](/features/admin-dashboard-features). | ||
|
||
## Users and the FHIR Practitioner resource | ||
|
||
OpenSRP2 manages user accounts through an integrated identity and authentication management (IAM) system. Each `user` created in the IAM system has a 1-to-1 link with FHIR `Practitioner` resource in the FHIR health data store. | ||
|
||
## User Assignment | ||
|
||
User assignment consists of 4 main elements | ||
- **User (FHIR Practitioner)** - This is the person using the application to collect data and execute workflows | ||
- **CareTeam** - This is used to define a group of users that provide care as a team. | ||
- **Team (FHIR Organization)** - Teams are added to CareTeams as the `.managingOrganization`. | ||
- **Location** - Teams are assigned to Locations to define where they work. | ||
|
||
Every user must have at least 1 of the 4 elements above. These assignments affect how data is [synced down](/engineering/backend/info-gateway/data-sync) to the app. | ||
|
||
These elements are then downloaded to the app via the **PractitionerDetail** endpoint. This is a custom endpoint that aggregates data related to a user and returns as a single response. |
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
File renamed without changes.
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,57 @@ | ||
--- | ||
title: Sync Strategies | ||
--- | ||
|
||
OpenSRP 2 uses five key data elements in determining how data is synced down from the server. These elements are [added](/engineering/app/datastore/tagging) to every resource created by the OpenSRP mobile app, enabling precise synchronization. These elements are: | ||
|
||
- `care-team-tag-id` | ||
- `practitioner-tag-id` | ||
- `location-tag-id` | ||
- `organisation-tag-id` | ||
- `related-entity-location-tag-id` | ||
|
||
### Sync by Practitioner CareTeam | ||
This strategy syncs data based on the CareTeam that the logged in user (which maps 1-to-1 to a FHIR Practitioner Resource) is assigned to. All resources tagged with the same CareTeam via the `care-team-tag-id` are synced down to the device if the FHIR Practitioner mapping to the logged-in user is assigned to that CareTeam. A sample tag is provided below | ||
|
||
```json | ||
{ | ||
"system": "https://smartregister.org/care-team-tag-id", | ||
"code": "47d68cac-306f-4b75-9704-b4ed48b24f76", | ||
"display": "Practitioner CareTeam" | ||
} | ||
``` | ||
|
||
### Sync by Practitioner Team (FHIR Organization) | ||
This sync strategy is based on the team (FHIR Organization) and syncs resources tied to the specific team (FHIR Organization) associated with the logged user's FHIR Practitioner. | ||
|
||
- This sync strategy also includes data from any CareTeams that have the Organization as a [managing organization](https://hl7.org/fhir/R4B/careteam-definitions.html#CareTeam.managingOrganization). A sample tag is provided below | ||
|
||
```json | ||
{ | ||
"system": "https://smartregister.org/organisation-tag-id", | ||
"code": "ca7d3362-8048-4fa0-8fdd-6da33423cc6b", | ||
"display": "Practitioner Organization" | ||
} | ||
``` | ||
### Sync by Practitioner Location | ||
This sync strategy is based on the FHIR Location and delivers resources tagged with the Location ID of the Location that the logged in user's FHIR Practitioner is assigned to. | ||
- This sync strategy also includes data from all the subordinant locations of the Location that the Practitioner is assigned to (ie if `Location B.partOf = Location A` and we are syncing data from `Location A`, any data assigned to `Location B` is also included). A sample tag is provided below | ||
|
||
```json | ||
{ | ||
"system": "https://smartregister.org/location-tag-id", | ||
"code": "ca7d3362-8048-4fa0-8fdd-6da33423cc6b", | ||
"display": "Practitioner Location" | ||
} | ||
``` | ||
### Sync by Related Entity Location | ||
This strategy uses location information related to other entities (e.g Patient, Family / Group, Service Point), ensuring that data linked to specific locations associated with those entities is synced. | ||
- This sync strategy also includes data from all the child locations linked to the Related Entity Location. A sample tag is provided below | ||
|
||
```json | ||
{ | ||
"system": "https://smartregister.org/related-entity-location-tag-id", | ||
"code": "33f45e09-f96e-41d3-9916-fb96455a4cb2", | ||
"display": "Related Entity Location" | ||
} | ||
``` |
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