SOUNDEX function in IRIS or Caché?
Is there a way to access a SOUNDEX function from ObjectScript? There is such a function in the multivalue basic dialect and also one used by Patient Index.
Product version: IRIS 2021.1
Discussion (1)1
Comments
See MultiValue Basic | Caché Alternative Exists for SOUNDEX()
Workaround:
Class dc.test [ Abstract ]
{
ClassMethod Test()
{
w ..SOUNDEX("M"),!
;or
&sql(select SOUNDEX('McD') into :r)
w r,!
}
ClassMethod SOUNDEX(s) As %String [ Language = mvbasic, SqlName = SOUNDEX, SqlProc ]
{
RETURN SOUNDEX(s)
}
}
Result:
USER>d ##class(dc.test).Test()
M000
M230