failed to import lab orderables

Hello,

I’ve installed the Order Entry module and drug orders seems to be working. However, I don’t have any lab orderables. The import of the lab orderables zip file failed

(The file was the LabOrderables-1.zip file from here: https://issues.openmrs.org/browse/OEUI-174

The tomcat log is here: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAcce - Pastebin.com )

This seems to be the same issue as How to add a lab order in the new Order Entry UI and Lab Orderables convenience set show empty even after Upload new package of orderables , but I don’t see a solution in either of those threads. One of the responses said that the poster “fixed the duplicate” and then was able to complete the import, but it doesn’t say how she fixed the duplicate. I tried removing HCT (one of the duplicates) from the XML files in LabOrderables-1.zip, but this did not seem to do anything and I assume I didn’t actually remove all of the XML related to that entry. This is a fresh install; only the demo data is loaded. Is there an updated zip file that doesn’t conflict with the demo data? Or maybe someone can tell me what I need to excise from the zip file to “fix the duplicate”? Or you can tell me how to create and configure some lab orderables by hand so I can figure out if lab orders are working correctly?

Apologies if I should have posted this under the one of the old threads; I wasn’t sure if the correct etiquette is to make a new thread or post on the old one.

Does it work if you temporarily disable validation, restart tomcat, and then try to import again?

Hi Daniel,

That got a different error; this seems like the interesting bit: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; statement executed: update concept_numeric set hi_absolute=?, hi_critical=?, hi_normal=?, low_absolute=?, low_critical=?, low_normal=?, units=?, allow_decimal=?, display_precision=? where concept_id=? (tomcat log: 2021-05-20 09:12:05,533 http-nio-8080-exec-9 ERROR Null object returned for Roll - Pastebin.com ) That was using the import option “mirror” and “skip validation”.

I’ve also tried “peer” and “prefer mine”; this seems to get the same result. (Trying the various import options with validation enabled didn’t seem to make any difference, either.)

I assume this import is basically trying to insert things into the database. One option would be to send an example of what the affected rows look like after they’ve been successfully imported, and I could stick them in the database directly.

  • Ace

Hi Daniel and all,

I managed to make it go by creating an SQL script to add the orderables. I saved the script to my github, so it’s there if anyone else wants it:

Thanks for your help!

Thanks @ace for sharing! :slight_smile: