Skip to content
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

[FHIR Road Map] Practitioner Roles assignment enhancements #1117

Closed
4 tasks done
dubdabasoduba opened this issue Nov 14, 2022 · 7 comments · Fixed by #1150
Closed
4 tasks done

[FHIR Road Map] Practitioner Roles assignment enhancements #1117

dubdabasoduba opened this issue Nov 14, 2022 · 7 comments · Fixed by #1150

Comments

@dubdabasoduba
Copy link
Member

dubdabasoduba commented Nov 14, 2022

@machariamuguku I reviewed the work and I think I missed something while scoping this.

We are also using the PractitionerRole resource while adding Practitioners to Teams (Organization). Could we just use the same PractitionerRole payload created during practitioner creation instead of creating a new one during team assessment?

Here is a sample of a PractitonerRole used for the team assignment. Notice the organization attribute

{
  "resourceType": "PractitionerRole",
  "id": "9",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2022-09-01T12:41:06.990+00:00",
    "source": "#12924984e2337d6b"
  },
  "identifier": [
    {
      "use": "official",
      "value": "b551632c-cfe8-4436-84ff-4947022ee47f"
    }
  ],
  "active": true,
  "practitioner": {
    "reference": "Practitioner/6",
    "display": "Brown  Bag"
  },
  "organization": {
    "reference": "Organization/8",
    "display": "Brown Bag"
  }
}

Can we have the team assignment behave as follows?

  • Load the PractitionerRole resource tied to the Practitioner. This can be loaded using a search on the PractitionerRole resource filtered by practitioner.
  • Update the PractitionerRole and add the organization attribute during the user assigned to the team.
  • In case a user is un-assigned we then remove the organization attribute from the PractitionerRole.
    • This means the team assignment piece should not alter the active attribute.

Here is a sample of a PracttionerRole resource with both the team assignment and FHIR user role

{
  "resourceType": "PractitionerRole",
  "id": "",
  "identifier": [
    {
      "use": "official",
      "value": "auto-generated-d"
    },
    {
      "use": "secondary",
      "value": "keycloak-uuid"
    }
  ],
  "active": true,
  "practitioner": {
    "reference": "Practitioner/practitioner-id"
  },
  "code": [
    {
      "coding": [
        {
          "system": "http://snomed.info/sct",
          "code": "236321002",
          "display": "Supervisor (occupation)"
        }
      ]
    }
  ],
  "organization": {
    "reference": "Organization/8",
    "display": "Brown Bag"
  }
}

Originally posted by @dubdabasoduba in #1095 (comment)

@dubdabasoduba dubdabasoduba added this to the Green Lantern Corps milestone Nov 14, 2022
@dubdabasoduba dubdabasoduba changed the title [FHIR Road Map] PractitionerRole addition enhancements [FHIR Road Map] Practitioner Roles assignment enhancements Nov 14, 2022
@dubdabasoduba
Copy link
Member Author

@machariamuguku how far are we with this?

@machariamuguku
Copy link
Member

@machariamuguku how far are we with this?

@dubdabasoduba this is pending from last year. I'll prioritise this the beginning of this week

@dubdabasoduba
Copy link
Member Author

dubdabasoduba commented Jan 19, 2023

Implementation updates

  • In case the user does not have a PracttionerRole resource already created we would create a new PracttionerRole resource when adding them to a team.
    • We would then use the same PractitionerRole resource when adding a practitioner role Practitioner or Supervisor to them.
  • When we remove someone from a team assignment. We would remove the organization attribute from the Practitioner Resource.

@machariamuguku
Copy link
Member

@dubdabasoduba can a practitioner only be assigned to a single organisation?

@dubdabasoduba
Copy link
Member Author

@dubdabasoduba can a practitioner only be assigned to a single organization?

For now, this is the restriction on OpenSRP. I think that's how we have built it. Let me review this with the PMs and then get back to you.

@machariamuguku
Copy link
Member

I will also update the practitioner role created at practitioner creation to include the practitioner display name attribute for consistency

@machariamuguku
Copy link
Member

@dubdabasoduba I identified an issue idk if it's by design: after modifying a practitioner role by either modifying the (adding or removing organisation attribute) or creating a new resource, the newly modified/created practitioner role is not immediately available on the practitioner role endpoint till 35-40 seconds later. Confirmed the same by hitting the server directly with postman

endpoint: https://ecbis-preview.smartregister.org/fhir/PractitionerRole/_search?organization=organization-id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants