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

Quest v0.2 / G6PD : View G6PD Status on the Patient List view #777

Closed
6 tasks
f-odhiambo opened this issue Nov 22, 2021 · 11 comments · Fixed by #899
Closed
6 tasks

Quest v0.2 / G6PD : View G6PD Status on the Patient List view #777

f-odhiambo opened this issue Nov 22, 2021 · 11 comments · Fixed by #899
Assignees
Labels
Enhancement New feature or request

Comments

@f-odhiambo
Copy link
Contributor

f-odhiambo commented Nov 22, 2021

Is your feature request related to a problem? Please describe.
As a G6PD app user, I would like to view the currently enrolled patients on the G6PD Test app

Describe the solution you'd like
Post sync, I should be able to see at a glance from the Patient list view

  1. Family name
  2. Given name
  3. Age - in Year, Month or Weeks, Day format
  4. Gender - abbreviated
  5. Status

Describe alternatives you've considered
This should be done in a configurable way using compose

Additional context

  1. Screenshot of the mock

Screen Shot 2021-11-22 at 8 54 22 AM

Acceptance Criteria

  • Paginated List view
  • Paginated list view on filters search results
  • Patient Search
  • Add client for registration button
  • Menu Item to go to the menu items
  • Setting page to view sync, language switcher and log out page

Minor enhancement UX

  1. We can use Red, Amber and Green for the status Deficient, Intermediate and Normal
@f-odhiambo f-odhiambo added Enhancement New feature or request Draft G6PD labels Nov 22, 2021
@pld
Copy link
Member

pld commented Nov 23, 2021

how would this be controlled through configuration?

clearly, this wouldn't be applicable in all Quest applications.

do we have an existing configuration for the patient list view? can we add a key where the value describes additional data to show in the list view?

@f-odhiambo
Copy link
Contributor Author

f-odhiambo commented Nov 24, 2021

@pld

  1. This can be done by adding a configuration to set the list level item for the status label/ indicator
  2. The setting will be added to a new config away from the register config and can be done for also the rest of the applications

CC @ellykits

@owais-vd
Copy link
Contributor

@pld

  1. This can be done by adding a configuration to set the list level item for the status label/ indicator
  2. The setting will be added to a new config away from the register config and can be done for also the rest of the applications

CC @ellykits

@ellykits any thoughts about the above points?

@ellykits
Copy link
Collaborator

@owais-vd Here are my thoughts on the implementation:

The colored status should only be displayed for g6pd apps just like risk flag for EIR apps. This composable view is available in the register list rows which is separate from the LazyColumn compose view hence the need for new configuration that will be supplied to the composable function used to render register list item rows. Since this is specific to quest, the implementation will reside in Quest app.

Implementation

  1. Implement a data class in quest app that implements Configuration you can name it PatientRegisterRowViewConfiguration
  2. The class should have a property showG6pdStatus default false
  3. Create a new filepatient_register_row_view_configuration in asset/configurations/view
  4. Add new enum constant PATIENT_REGISTER_ROW to QuestConfigClassification
  5. Retrieve the above config from ConfigurationRegistry using PATIENT_REGISTER_ROW constant
  6. Provide to and use the config in PatientListItem

NB: EIR risk flag can use of this refactor too. Currently relying on data to hide/show the flag i.e. the flag will only show when captured.

@ellykits
Copy link
Collaborator

ellykits commented Dec 21, 2021

@owais-vd We can discuss how to provide the config to PatientListItem

@ellykits
Copy link
Collaborator

ellykits commented Dec 21, 2021

@owais-vd Here is how you can provide the configuration to PatientListItem via the PatientRegisterList composable:

  1. Inject the ConfigurationRegistry in the PatientRegisterFragment
  2. Retrieve the config to a lateinit class property in the fragment then refactor PatientRegisterList composable function's signature by adding a new parameter for the config. Do the same for the composable function used for rendering the view (PatientRow).

@owais-vd
Copy link
Contributor

Thanks, @ellykits for the detailed comments. I'll follow this. Awesome.

@pld
Copy link
Member

pld commented Dec 28, 2021

The main goal here is to do this in a manner that does not add anything g6pd specific to the code but instead pushed that all into FHIR configuration files that are loaded into the app, so this approach, specifically step (2) will not work.

How is the g6pd status being stored? What we'd like to do is, is load a PatientRegisterConfiguration file, and have that include a has something like an additionalRows map list key and the values are a list of maps, in this case the values would have one entry with two keys name: "G6PD status" and a value of something describing how to load from the patient record what to show there

@owais-vd
Copy link
Contributor

@pld based on your comment i have removed the g6pd specific status and tried to make it more generic by using the configuration filters now, getting the G6PD Status from the Condition resource by adding the patient id, and g6pd code constraints. Here is the current patient row configuration json.

[
  {
    "appId": "quest",
    "classification": "patient_register_row",
    "filters": []
  },
  {
    "appId": "g6pd",
    "classification": "patient_register_row",
    "filters": [
      {
        "resourceType": "CONDITION",
        "key": "code",
        "valueType": "CODEABLECONCEPT",
        "color": "#000000",
        "valuePrefix": " G6PD Status - ",
        "valueCoding": {
          "system": "http://snomed.info/sct",
          "code": "260372006"
        },
        "dynamicColors": [
          {
            "valueEqual": "Deficient",
            "useColor": "#FF0000"
          },
          {
            "valueEqual": "Intermediate",
            "useColor": "#FFA500"
          },
          {
            "valueEqual": "Normal",
            "useColor": "#00a000"
          }
        ]
      }
    ]
  }
]

@pld
Copy link
Member

pld commented Dec 30, 2021

that looks great!

@owais-vd
Copy link
Contributor

owais-vd commented Jan 3, 2022

here is the updated configuration that is currently being used to display G6PD statuses.

{
    "appId": "g6pd",
    "classification": "patient_register_row",
    "filters": [
      {
        "resourceType": "CONDITION",
        "key": "category",
        "label": "Optional Label",
        "valueType": "CODEABLECONCEPT",
        "valuePrefix": " G6PD Status - ",
        "valueCoding": {
          "system": "http://snomed.info/sct",
          "code": "9024005"
        },
        "properties": {
          "label": {
            "color": "#000000",
            "textSize": 20
          },
          "value": {
            "color": "#000000",
            "textSize": 20
          }
        },
        "dynamicColors": [
          {
            "valueEqual": "Deficient",
            "useColor": "#FF0000"
          },
          {
            "valueEqual": "Intermediate",
            "useColor": "#FFA500"
          },
          {
            "valueEqual": "Normal",
            "useColor": "#00a000"
          }
        ]
      }
    ]
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants