Initializer to be extended to handle data (not just metadata)

Hi @mksd @mksrom,

We should probably continue this conversation about whether Iniz should itself be extended to handle data import. It’s working just fine as is (in my branches), but if we would rather not, I think there are two good alternatives:

  • Fork Iniz, so that Iniz can stay purely configuration-focused and not have to worry about anything downstream. This is on the assumption that Iniz may in the future develop in ways that are more practically specialized to configuration loading (i.e., that wouldn’t make sense w.r.t. data import).
  • Build off Iniz. Unless my analysis from early on in the project is mistaken (not unlikely), Iniz would have to be modified somewhat in order to become extensible with new CSV parsers. This would be preferable if future changes to Iniz are likely to make sense for data import as well (e.g., the introduction of config-file configuration). This involves the expectation that Mekom/Iniz will strive to maintain a somewhat stable public interface.

Let me know what your thoughts are.

Hi @bistenes,

I think it is ok for Iniz to support the couple of core data imports that you started to introduce on your branches: patients, visits, encounters and obs. I think you have convinced me that it was a useful add-on to Iniz, while being -it’s true- a little out of its “core business”.

Please don’t take my hindering slowness as a silent no. A couple of weeks can easily go by that don’t let me do tech work, or barely.

As we have resumed work on Iniz on our end (to support programs and soon HFE), this will give me an opportunity to dig in. Is it ok for now for you to keep your work as it is? Or is it causing you issues within PIH?

No worries, @mksd. This isn’t blocking my work. At this point it’s just a matter of sharing this data import mechanism with the OpenMRS community.

It is a little annoying to have to rebase each of my branches each time I make a change upstream (e.g., if I make a change to the patients loader, it will happen on the patients branch, and I’ll rebase it to the encounters, obs, and enrollments branches. Would it be fine for you if I flattened everything into one enormous PR?

Also, patient-programs, aka program enrollments, are now a part of data import. I hope that’s welcome as well.

Yes sure, do things so that they make your life easier until I can get down to reviewing the PR.

Thanks @bistenes!