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]: Update User management to add the FHIR Core App ID assignment. #1147

Closed
14 tasks
dubdabasoduba opened this issue Jan 15, 2023 · 3 comments · Fixed by #1162
Closed
14 tasks
Assignees

Comments

@dubdabasoduba
Copy link
Member

dubdabasoduba commented Jan 15, 2023

Issue Context?

  • The FHIR Core mobile application uses the Application ID to identify the Configurations to load for every user. These configurations dynamically configure the app functionality.
  • The same Application ID is used by the Access Proxy server to filter the data a user has access to from the app.
  • FHIR web needs a way to set the Application IDs for each user during creation. The list of Application Configurations supported by the deployment needs to be configurable.
  • We will be creating the ability to define these configuration ids and allow their selection every time a user is created.

Issue Implementation details?

  • FHIR web will load the Device setting parameter compositions from the FHIR Server. Here {"coding":[{"system":"http://snomed.info/sct","code":"1156600005","display":"Device setting parameter"}]} is the code to look for in the type attribute
  • Use the Compositions to generate dropdown options.
    • The identifier value e.g cha in this object {"identifier":{"use":"official","value":"cha"}} will be the dropdown value.
    • The title becomes the display name for the users to select.
    • Each composition is equivalent to one option on the dropdown.
  • Update the User creation page to add a mandatory field called Application ID. This is will have the following attributes and use the options generated above.
Field name Required Field Type Field Options Field Hint
Application ID Dropdown Options come from the Composition values are mentioned above N/A
  • On selection the values should be populated as the answer value of the fhir_core_app_id in KeyCloak. This will require hitting the attribute update endpoint on KeyCloak.
  • This field should be required and the users should not be saved if the Application ID field is not selected.
  • On editing the user, this field should be shown and a pre-selection of the initial value made.

Issue Acceptance criteria?

  • The User creation page should have the Application ID as part of the fields.
    • The field should be required.
    • It should read its values (options) from the different Device setting parameter compositions in the server.
  • Selecting an option on the Application ID should save it on the fhir_core_app_id user attribute in KeyCloak.
  • On editing the User the Application ID field should be correctly populated and selected.

FHIR resources to be used?

Composition Resource: https://www.hl7.org/fhir/composition.html

Relevant Information

Sample composition resource https://github.com/opensrp/fhir-resources/blob/main/ecbis_liberia/composition/ecbis_cha_preview.json

@peterMuriuki
Copy link
Collaborator

peterMuriuki commented Jan 20, 2023

@dubdabasoduba this composition looks weird for the purposes of this issue. I would like you to confirm if its ok and that it represents one of the options that we should show in the dropdown.
https://fhir.labs.smartregister.org/fhir/Composition/145752

{
				"resourceType": "Composition",
				"id": "145752",
				"meta": {
					"versionId": "5",
					"lastUpdated": "2022-10-14T10:37:30.790+00:00",
					"source": "#c2e14bf14f0d03b3",
					"tag": [
						{
							"system": "http://terminology.hl7.org/CodeSystem/v3-ObservationValue",
							"code": "SUBSETTED",
							"display": "Resource encoded in summary mode"
						}
					]
				},
				"identifier": {
					"use": "official",
					"value": "notice-f"
				},
				"title": "Device configurations"
			},

If it should be not an option for the fhir app id field then that means we might want to reconsider the filter for the composition resources that we want to show.

@dubdabasoduba
Copy link
Member Author

@p-netm This composition is correct. We can however filter the compositions using the following code https://github.com/opensrp/fhir-resources/blob/8f1be95b2e27ae832d898987c288d69b4e5b0f04/ecbis_liberia/composition/ecbis_cha_preview.json#LL9C2-L17C4

@dubdabasoduba
Copy link
Member Author

I will notify the FHIR Core team to update all the relevant composition resources.

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