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

User subject type creation #1189

Closed
Tracked by #1565
mahalakshme opened this issue Apr 7, 2024 · 4 comments
Closed
Tracked by #1565

User subject type creation #1189

mahalakshme opened this issue Apr 7, 2024 · 4 comments
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Apr 7, 2024

As an implementor, I should be able to associate an encounter or a program to a user.

Acceptance criteria:

  • Implementor should be able to create a subject type of type User
  • When no form is selected, in the empty form that will get created, do not have any default form elements like Person
  • When associating subject types to encounters or programs, User subject type should also display
  • Enable 'Allow empty location' - should be able to disable to User subject type
  • Under sync settings - Just display 'Determined based on subject type' - not editable. Sync settings should not be editable
  • On saving the form, subjects for each User need to be inserted into db
  • name of the user can be inserted as firstName in individual table for now.
  • When the number of users exceeds 50, show a warning message after saving stating 'To be able to successfully create this subject type, do bundle upload'
  • Should not be able to change the Type of subject type after creation.
  • When a user is created, and when subject type User exists as non-voided, then create subject for that user. Similarly for creating users via CSV upload.
  • registeration_date in individual table will be same as created_date_time.

Old: ignore

Acceptance criteria:

  • Subject type creation:

    • When org created, create User subject type
    • Enable 'Allow empty location' - unable to disable
    • Under sync settings - Just display 'Determined based on subject type' - not editable
    • Being able to not associate form
    Screenshot 2024-04-01 at 8 11 53 PM
  • When a user created from Admin tab, create subject for that user in individual table

  • When a user created via CSV, create subject for that user in individual table

  • Migration for existing organisations

Technical details:

  • subject id in users table - many to many
  • different table than user_subject_assignment - so that it doesn't show up in the 'user assignment', etc.,

Inputs:

  • When to create subjects for users:
    - User subject type if predefined in org - need to handle many cases, will affect stability of the app
    - so when Creating user subject type - Synchronous inserting of users
    - Show an error - exception - when more than a particular no of users(1) exist - no risk, bundle upload - lets build iteratively
    - Bundle upload handle this
    - Separate platform and product epic - usability vs - evaluate independently
    - creating subjects for all users - antithetical - cons: migration(all orgs - uuid), all orgs, backward compatibility
    - My concerns: Not intuitive that need to be solved by bundle upload, registeration_date
    - bundle upload - we are not exporting users
    - backward compatibility - can alter the existing API
  • Form - associate
    - associate empty form always - if form mappings dont exist - will affect stability
    - make the the subject type immutable
    - when no form elements associated with form do not display in Register and 'Registeration Details'
    - My concerns: The meaning of immutable is different when it comes to encounter types. Introducing new terminology and meaning not intuitive.

Out of scope:

  • Concepts of subject resgisteration form can be mentioned in CSV
@petmongrels petmongrels self-assigned this Apr 10, 2024
petmongrels added a commit to avniproject/avni-server that referenced this issue Apr 12, 2024
petmongrels added a commit that referenced this issue Apr 12, 2024
petmongrels added a commit that referenced this issue Apr 12, 2024
petmongrels added a commit to avniproject/avni-server that referenced this issue Apr 12, 2024
…ubject per user). WIP - spring batch job to create subjects on subject type creation.
@petmongrels
Copy link
Contributor

Functional notes

  • When subject type is created the background job is launched so no need to show error message for > 50 users

petmongrels added a commit to avniproject/avni-server that referenced this issue Apr 17, 2024
petmongrels added a commit to avniproject/avni-server that referenced this issue Apr 17, 2024
@AchalaBelokar
Copy link

  • created user which doesn’t have any image we need to check that.
  • and there is mandatory filed on first page are showing wrong on client app.

Image

Image

@mahalakshme
Copy link
Contributor Author

@AchalaBelokar please update the above cases based on the discussion we had

  • icon is not an issue
  • only Edit in app designer is a issue
  • mobile app related issues if any exists can be raised in the respective card, and not this card

@AchalaBelokar
Copy link

AchalaBelokar commented May 10, 2024

  • Edit screen is not showing all the value

Screen Recording 2024-05-10 at 11.19.35 AM.mov.zip

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

No branches or pull requests

4 participants