IHTSDO / rf2-to-rf1-conversion

A utility for converting an RF2 archive into RF1 without reliance on additional information such as a compatibility package
Other
0 stars 1 forks source link

Tool is not working for may 2021 onwards snomed update #6

Open NaveenSatheesh opened 3 years ago

NaveenSatheesh commented 3 years ago

Hitting an exception whilst running go.bat

Exception in thread "main" java.lang.RuntimeException: Failed to execute SQL Statement: -- Where the term has been created and there is immediate inactivation indicator UPDATE rf21_COMPONENTHISTORY ch -- Either find an inactivation indicator, or work the status out from the description and concept status SET STATUS = SELECT magicNumberFor(s.linkedComponentId) FROM rf2_crefset_sv s WHERE s.refsetId = @DESC_INACT_RS AND s.active = 1 AND s.referencedComponentId = ch.componentId AND s.effectiveTime = ch.releaseVersion WHERE isConcept = false AND changeType = @ADDED AND EXISTS ( SELECT 1 FROM rf2_crefset_sv s WHERE s.refsetId = @DESC_INACT_RS AND s.active = 1 AND s.referencedComponentId = ch.componentId AND s.effectiveTime = ch.releaseVersion) at org.ihtsdo.snomed.rf2torf1conversion.DBManager$StatementRunner.run(DBManager.java:194) at org.ihtsdo.snomed.rf2torf1conversion.DBManager.runStatement(DBManager.java:159) at org.ihtsdo.snomed.rf2torf1conversion.DBManager.executeResource(DBManager.java:95) at org.ihtsdo.snomed.rf2torf1conversion.ConversionManager.convert(ConversionManager.java:490) at org.ihtsdo.snomed.rf2torf1conversion.ConversionManager.doRf2toRf1Conversion(ConversionManager.java:288) at org.ihtsdo.snomed.rf2torf1conversion.ConversionManager.main(ConversionManager.java:206) Caused by: org.h2.jdbc.JdbcSQLException: Scalar subquery contains more than one row; SQL statement: -- Where the term has been created and there is immediate inactivation indicator UPDATE rf21_COMPONENTHISTORY ch -- Either find an inactivation indicator, or work the status out from the description and concept status SET STATUS = SELECT magicNumberFor(s.linkedComponentId) FROM rf2_crefset_sv s WHERE s.refsetId = @DESC_INACT_RS AND s.active = 1 AND s.referencedComponentId = ch.componentId AND s.effectiveTime = ch.releaseVersion WHERE isConcept = false AND changeType = @ADDED AND EXISTS ( SELECT 1 FROM rf2_crefset_sv s WHERE s.refsetId = @DESC_INACT_RS AND s.active = 1 AND s.referencedComponentId = ch.componentId AND s.effectiveTime = ch.releaseVersion) [90053-193] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:179) at org.h2.message.DbException.get(DbException.java:155) at org.h2.message.DbException.get(DbException.java:144) at org.h2.expression.Subquery.getValue(Subquery.java:39) at org.h2.command.dml.Update.update(Update.java:121) at org.h2.command.CommandContainer.update(CommandContainer.java:98) at org.h2.command.Command.executeUpdate(Command.java:258) at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:184) at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:158) at org.ihtsdo.snomed.rf2torf1conversion.DBManager$StatementRunner.run(DBManager.java:183) ... 5 more

pgwilliams commented 3 years ago

Hi @NaveenSatheesh thanks for getting in touch. I didn't realise that anyone was still using this tool. I see I've not touched it since 2018. The tool continues to become more obsolete as we've moved to using OWL for our stated form in 2019, and with the move to include support for Concrete Values in the July 2021 edition, the inferred view will now be incomplete when expressed as RF1.

I highly recommend that you look at moving to use the RF2 format, which has been available since 2011.