nextgenhealthcare / connect

The swiss army knife of healthcare integration.
Other
869 stars 265 forks source link

[IDEA] import dependencies with channel #5985

Open elavy-harris opened 7 months ago

elavy-harris commented 7 months ago

Is your feature request related to a problem? Please describe. There's no convenient way to copy dependencies from one system to another. I know there's an API for loading dependencies, but that has to be managed separately from the channels, themselves. Also, the API provides no way to delete dependencies.

Describe your use case I need this feature so I can keep the dependencies on my production system in sync with my development system.

Importing a channel, either with the MC Administrator or the API, does not update dependencies on the target system. I assume this is because the dependency information is stored both on the dependent and depended-on channels, and it's not clear that the newly-loaded channel definition should take precedence over the definition of the "partner" channel.

Describe the solution you'd like I propose that a flag ("update dependencies") be added to the import, both in the API and in the Administrator. If set, the load would remove pre-existing dependencies not listed in the channel import file and would add missing dependencies listed in the channel import file, acting both on the loaded channel and the partner channel(s). In the case where the partner for a new dependency does not exist, the dependency would be ignored. The assumption would be that the partner channel would probably be loaded afterwards, and the dependency would be created then.

Describe alternatives you've considered An alternative, for the API, at least, would be to specify a list of partner channels for which the dependencies should be updated. This would eliminate the case where a pre-existing dependency gets deleted because the partner channel is unknown to the source system.

I don't see a practical way to implement this in the Administrator.

Another possibility is to allow the import of multiple channels at once, with the import respecting dependencies defined among the channels included in the set.

gaensler commented 5 months ago

In my opinion this is a bug, rather than an enhancement.

The Channel XML files exported via the API already contain the dependency information (dependentIds and dependencyIds). If a channel is being imported with dependency information and those channels (with the given IDs) exist on the server, i expected that all information in the Channel XML is being used on Import - including the dependency information.