onaio / fhir-tooling

A command line utility to support FHIR Core content authoring
Other
2 stars 1 forks source link

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

Closed dubdabasoduba closed 3 weeks ago

dubdabasoduba commented 1 month ago

Context

Accepatance Criteria

Wambere commented 1 month ago

@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 commented 1 month ago

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 https://github.com/onaio/fhir-tooling/issues/290
AnnieMungai commented 1 week ago

v2.0.0.Rc12 When I download the service points - I can now see the inventory attached to them. LGTM!