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]: Add the Practitioner Roles assignment to users during user creation. #1095

Closed
19 tasks done
dubdabasoduba opened this issue Sep 28, 2022 · 4 comments · Fixed by #1115
Closed
19 tasks done

Comments

@dubdabasoduba
Copy link
Member

dubdabasoduba commented Sep 28, 2022

Issue Context?

  • FHIR Core Is introducing a Supervisor module. This means we will be targetting 2 types of users Supervisors &Normal Practitioners`.
  • This means we would want to assign practitioner roles on HAPI FHIR through the PractitionerRole resource.
  • The PractitionerRole will be used to identify the supervisors when they login to the apps.log in

Issue Implemetation details?

  • Add a user-type radio button field above the enable user question on the user creation page. This user-type question should have the following functionality.
Field name Required Field Type Field Options Field Hint
User Type Radio Button Practitioner, Supervisor N/A
  • The Practitioner Option is always selected every time the form is opened.
  • On saving the form the following should happen
    • Generate a PractitionerRole Resource tied to the Practitioner Resource. The PracttionerRole Resource should have the following attributes.
      • resourceType -- This is static and is PractitionerRole
      • id -- Should be an auto-generated UUID.
      • identifier -- Should hold the auto-generated UUID on the official identifier and the keycloak UUID on the secondary identifier. Here is a sample. {"identifier":[{"use":"official","value":"auto-generated-d"},{"use":"secondary","value":"keycloak-uuid"}]}
      • active -- Set to true if the user is enabled and set to false if the user is disabled.
      • practitioner -- This will be Practitioner Resource created during the user creation process. Here is a sample {"reference":"Practitioner/practitioner-id"}
      • code -- This will be static for each user type.
        • Supervisors -- Use the following {"code":{"coding":[{"system":"http://snomed.info/sct","code":"236321002","display":"Supervisor (occupation)"}]}}
        • Practitioners -- Use the following {"code":{"coding":[{"system":"http://snomed.info/sct","code":"405623001","display":"Assigned practitioner"}]}}
  • Deleting the user disables the Practitioner. This should also disable the PractitionerRole, this can be done by setting the active attribute to false
  • The User-Type should also be shown on the view details page. This should be under the User Type section. The Options can be Supervisor or Practitioner

Issue Acceptance criteria?

  • The User-type question should be available on the user management page.
  • During editing all the Form fields should be correctly pre-populated.
  • On clicking save, all the Required fields should be validated.
  • A PractitionerRole resource should be created and the appropriate messages shown to the use
  • The view details sections should display the Practitioner role correctly.

FHIR resources to be used?

Relevant Information

No response

@machariamuguku
Copy link
Member

machariamuguku commented Nov 4, 2022

@dubdabasoduba could you attach a PracttionerRole resource sample?

@machariamuguku
Copy link
Member

machariamuguku commented Nov 8, 2022

@dubdabasoduba

  • the code attribute here seems to expect an array of codeable concept not a codeable concept object
  • is the occupation in "Supervisor (occupation)" supposed to be dynamic?

@dubdabasoduba
Copy link
Member Author

PracttionerRole Sample for Practitioners

{
  "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": "405623001",
          "display": "Assigned practitioner"
        }
      ]
    }
  ]
}

PractitionerRole sample for Supervisors

{
  "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)"
        }
      ]
    }
  ]
}

@dubdabasoduba
Copy link
Member Author

Yah the display and code on the codingg attribute is static.

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