onaio / fhir-tooling

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

75 improve importer script #124

Closed TraciebelWairimu closed 5 months ago

TraciebelWairimu commented 5 months ago

IMPORTANT: Where possible all PRs must be linked to a Github issue

Fixes #75

Engineer Checklist

Wambere commented 5 months ago

The following use cases are what is implemented:

If the 'method' is == create:

If the 'method' is == update:

Is there any case that is missing above? or anything that needs correction? If we all agree with the above we can potentially eliminate the "method" column as well

dubdabasoduba commented 5 months ago

If the 'method' is == update:

  • and id existing in server is provided -> update resource with provided id
  • and a new id is provided -> use the new id to create new resource
  • and no id is provided -> generate a new id and use that to create new resource

@Wambere for the update could we throw errors instead?

From a usage perspective, if the user of the tool does an update they expect to update whatever exists. if we go ahead and create new resources we are going to have duplicated data which might lead to issues will analytics if the newly created resources are used for assignments.

dubdabasoduba commented 5 months ago

If the 'method' is == create:

  • and new ID is provided -> use the new id to create a new resource
  • and no ID is provided -> generate a new ID and use that to create a new resource

@Wambere is there a way we can save the newly created IDs somewhere so the users can reference them on their CSVs?

Wambere commented 5 months ago

@dubdabasoduba thanks for the feedback, created 2 new issues for the above