This code that is supposed to skip "ICD-10 numeric codes in 10 ontology" seems like it's missing a ^ starting anchor: REGEXP_LIKE(diag.pcori_basecode, ''^[0-9].*'', ''i'' )
It's going to match any code with a digit, not just codes starting with a digit. For example:
select 1 from dual where regexp_like('S123', '[0-9].*', 'i');
This code that is supposed to skip "ICD-10 numeric codes in 10 ontology" seems like it's missing a
^
starting anchor:REGEXP_LIKE(diag.pcori_basecode, ''^[0-9].*'', ''i'' )
It's going to match any code with a digit, not just codes starting with a digit. For example:
ref https://github.com/ARCH-commons/i2p-transform/blob/master/Oracle/PCORNetLoader_ora.sql#L1302