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

[Importer] Adding the Group Resources representing Inventories to the Inventory List entries #289

Open
1 task
dubdabasoduba opened this issue Sep 19, 2024 · 2 comments
Assignees
Labels

Comments

@dubdabasoduba
Copy link
Member

Context

  • To sync supply chain inventories to the OpenSRP mobile apps, we reference the inventory group resources and the List resources used to link the inventory to a location on a list resource that is then referenced in the app's composition resources.
    • The current tooling correctly adds the list resource holding the Inventory <> Location link to the Inventory list. It however does not add the group resource to the same list.

Accepatance Criteria

  • Add Inventory Group Resource reference to the Inventory List entries.
@Wambere
Copy link
Contributor

Wambere commented Sep 25, 2024

@dubdabasoduba for these it looks like the groups already exist, in the server, so we simply need to update the method in the csv to update instead of create, and it should work okay. I have tested with the first 5 records in the shared csv

@dubdabasoduba
Copy link
Member Author

This ticket documents how Inventory is linked to the locations. https://github.com/onaio/fhir-resources/issues/3016

We then need to link the resulting LIST and GROUP resources to the LIST defined on the Composition, i.e., the list specified on the --list_resource_id here.

What is happening right now

  1. If you use the create method the Lists linking the Inventory to locations are added to the list referenced on --list_resource_id but the Groups representing the inventory are not.
  2. If you use the update method the the Groups representing the inventory are added to the list referenced on --list_resource_id but Lists linking the Inventory to locations are not.
  3. If you import the inventory from multiple files, both the create and update methods seem to re-create the List referenced on --list_resource_id instead of adding to it
  4. We also seem to be creating duplicate Location <> Inventory Linkage lists which then throws the error defined here [Impoter] Bug fix on importing inventory using the tooling #290

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

No branches or pull requests

2 participants