# Issues with OCL iniz-based imports - Nov 2022

**URL:** https://talk.openmrs.org/t/issues-with-ocl-iniz-based-imports-nov-2022/37953
**Category:** Development
**Tags:** ohri, ocl, o3
**Created:** [November 17, 2022, 2:24pm UTC](https://talk.openmrs.org/t/issues-with-ocl-iniz-based-imports-nov-2022/37953 "2022-11-17T14:24:09Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![grace](https://talk.openmrs.org/user_avatar/talk.openmrs.org/grace/32/16942_2.png) [@grace](https://talk.openmrs.org/u/grace)
#### Post date: [November 17, 2022, 2:24pm UTC](https://talk.openmrs.org/t/issues-with-ocl-iniz-based-imports-nov-2022/37953/1 "2022-11-17T14:24:09Z")

</div>

Thank you @samuel34 for calling this out today at the O3 Squad call: [DemoQueueConcepts](https://app.openconceptlab.org/#/orgs/openmrs/collections/DemoQueueConcepts/) is not properly yielding concepts in the O3 refapp.

Upon review - seems we have 2 problems:

1. **Incomplete OCL JSON Export:** The JSON export from OCL for our [DemoQueueConcepts file](https://github.com/openmrs/openmrs-distro-referenceapplication/blob/main/distro/configuration/ocl/DemoQueueConcepts_1.zip) was basically empty - the 19 concepts weren’t actually in the JSON!! Even though the OCL UI shows those 19 concepts were included in the v1 release.

For some reason when I re-released a new version (v2), with no concept changes, the JSON export _does_ show concepts now. @samuel34 I have made a PR to introduce this updated version that actually does have concepts - can you merge this, and see if you are still seeing the same errors even with this updated version?

> <https://github.com/openmrs/openmrs-distro-referenceapplication/pull/659>
>
> From: https://app.openconceptlab.org/#/orgs/openmrs/collections/DemoQueueConcept…s/versions
> 
> It seems v1 for some reason had no concepts in the json export. 
> 
> Created a new release, v2; v2 \*\*does\*\* have concepts (even though I have made no changes), so let's add that here and re-try.

1. **Iniz warnings:** @samuel34 mentioned he is seeing warnings from the Initializer Module; some kind of warning that concepts are not present or not being imported properly. @samuel34 can you share this here? And can you see if those errors resolve when you use the updated config from the PR above?

---

<div class="post-metadata">

### Author: ![samuel34](https://talk.openmrs.org/user_avatar/talk.openmrs.org/samuel34/32/17813_2.png) [@samuel34](https://talk.openmrs.org/u/samuel34)
#### Post date: [November 17, 2022, 2:38pm UTC](https://talk.openmrs.org/t/issues-with-ocl-iniz-based-imports-nov-2022/37953/2 "2022-11-17T14:38:27Z")

</div>

Thanks Grace for the PR. (Looking into reproducing the original error log)

---

<div class="post-metadata">

### Author: ![grace](https://talk.openmrs.org/user_avatar/talk.openmrs.org/grace/32/16942_2.png) [@grace](https://talk.openmrs.org/u/grace)
#### Post date: [November 17, 2022, 2:49pm UTC](https://talk.openmrs.org/t/issues-with-ocl-iniz-based-imports-nov-2022/37953/3 "2022-11-17T14:49:25Z")

</div>

FWIW I have also filed a bug in relation to issue #1 above with the OCL global good team:

> <https://github.com/OpenConceptLab/ocl_issues/issues/1434>
>
> Strangely, it seems sometimes our Exports from OCL do not contain any concepts, …even though they are clearly there in the OCL UI. One concrete example: 
> \*\*\[Demo Queue Concepts\](https://app.openconceptlab.org/#/orgs/openmrs/collections/DemoQueueConcepts/versions)\*\* Collection
> v1: Export contains metadata, but none of the 19 concepts! 
> \[DemoQueueConcepts\_1.20220301052308 (2).zip\](https://github.com/OpenConceptLab/ocl\_issues/files/10032591/DemoQueueConcepts\_1.20220301052308.2.zip)
> v2: Re-released without changing any of the concepts. This export does successfully contain concepts. 
> \[DemoQueueConcepts\_2.20220301052308.zip\](https://github.com/OpenConceptLab/ocl\_issues/files/10032592/DemoQueueConcepts\_2.20220301052308.zip)
> 
> 
> TBH this has caused some concern in the OMRS community; would be great if someone could review what happened in version 1 of this export and let us know what happened. If it was due to an old bug that has since been fixed then that would be reassuring to know. It would also be helpful to know if there are any tests set up so that this might not happen again. It would be best for users to not have to double-check the content of all exports.

Hopefully they can figure out what happened. CC @jamlung

---

<div class="post-metadata">

### Author: ![jamlung](https://talk.openmrs.org/user_avatar/talk.openmrs.org/jamlung/32/16119_2.png) [@jamlung](https://talk.openmrs.org/u/jamlung)
#### Post date: [December 9, 2022, 3:14pm UTC](https://talk.openmrs.org/t/issues-with-ocl-iniz-based-imports-nov-2022/37953/4 "2022-12-09T15:14:46Z")

</div>

@grace or anyone else, has this issue been fixed? Sunny left a [reply on the OCL ticket](https://github.com/OpenConceptLab/ocl_issues/issues/1434#issuecomment-1319513892) saying that he could not recreate the issue. I don’t think I could recreate it either. Just want to make sure we know how to help if the problem is persisting.

---

<div class="post-metadata">

### Author: ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)
#### Post date: [December 9, 2022, 3:36pm UTC](https://talk.openmrs.org/t/issues-with-ocl-iniz-based-imports-nov-2022/37953/5 "2022-12-09T15:36:42Z")

</div>

If I had to make a guess, it’s a confusion over what qualifies as an export from OCL that can be imported. E.g., if I go to a collection, there is this option to download a ZIP:

 ![Screenshot 2022-12-09 at 10.31.36](https://talk.openmrs.org/uploads/default/original/3X/1/7/17ee49b1a59e4dd142aae26dcf027643cd1b90cd.png)

The ZIP downloaded here, however, will only contain the JSON describing the data stored for the collection (“metadata”) and none of the actual concepts or mappings. I think there’s an expectation, at least from OpenMRS users, that these download buttons would give you the same content as the version export.

---

<div class="post-metadata">

### Author: ![jamlung](https://talk.openmrs.org/user_avatar/talk.openmrs.org/jamlung/32/16119_2.png) [@jamlung](https://talk.openmrs.org/u/jamlung)
#### Post date: [December 9, 2022, 3:55pm UTC](https://talk.openmrs.org/t/issues-with-ocl-iniz-based-imports-nov-2022/37953/6 "2022-12-09T15:55:15Z")

</div>

Oh interesting. I hadn’t thought of people trying to use that option to export a source. I wonder if it’d be helpful to change that label to “Download Collection Metadata” or something like that so that it might reduce confusion.

---

<div class="post-metadata">

### Author: ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)
#### Post date: [December 9, 2022, 4:01pm UTC](https://talk.openmrs.org/t/issues-with-ocl-iniz-based-imports-nov-2022/37953/7 "2022-12-09T16:01:35Z")

</div>

Yeah, I think that would help a lot!
