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] Add the ability to define the Product/Supply Chain List resource on the config #231

Open
2 tasks
dubdabasoduba opened this issue Jul 22, 2024 · 1 comment · Fixed by #233
Open
2 tasks
Assignees
Labels
Bug Report Something isn't working

Comments

@dubdabasoduba
Copy link
Contributor

dubdabasoduba commented Jul 22, 2024

Context

  • To sync supply chain commodities/products to the OpenSRP mobile apps, we reference the commodity/product group resources on a list resource that is then referenced in the app's composition resources.
  • The current tooling does not give the tooling user a chance to define the List resource to be used for the references.
  • It also generates a LIst with an out-generated id but tries to validate it exists. This validation always fails

    fhir-tooling/importer/main.py

    Lines 1984 to 1995 in a4a1416

    full_list_created_resources = extract_resources(created_resources, product_creation_response.text)
    if not list_resource_id:
    list_resource_id = str(uuid.uuid5(uuid.NAMESPACE_DNS, csv_file))
    current_version = get_resource(list_resource_id, "List")
    method = "create" if current_version == 0 else "update"
    resource = [["Supply Inventory List", "current", method, list_resource_id]]
    result_payload = build_payload(
    "List", resource, "json_payloads/product_list_payload.json")
    list_payload = process_resources_list(result_payload, full_list_created_resources)
    final_response = handle_request("POST", "", config.fhir_base_url, list_payload)

Implementation

  • Add the provision to define a List resource ID on the configs
  • Avoid validating the existence of the List resource if the tooling generates one
@dubdabasoduba dubdabasoduba added the Bug Report Something isn't working label Jul 22, 2024
@dubdabasoduba dubdabasoduba changed the title [Bug Report] Add the ability to define the Product/Supply Chain List resource on the config [Importer] Add the ability to define the Product/Supply Chain List resource on the config Jul 22, 2024
@Mstjamush
Copy link

Issues

  1. Location upload - Upload shows to be successful but location is available on Web
  2. Organization-Location assignment is not happening (Could be because of Location upload issue)
  3. Product upload is failing. (reference the screen shot attached)

Image

@Mstjamush Mstjamush reopened this Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants