Tilde(~) is not working while replacing
<assign property='target.{FT1grp(i).FT1:DiagnosisCodeFT1(1).Identifier}' value='..replace(source.superBillDetailBeanDao.GetAt(i).iCDCodes,",","~")' action='set'/>
<assign property='target.{FT1grp(i).FT1:ProcedureCode.Identifier}' value='..replace(source.superBillDetailBeanDao.GetAt(i).cPTCode,",","~")' action='set'/>
Product version: IRIS 2021.1
I thought that this would be a case of the Tilde being a special character for your target document due to its common use in HL7 for repeating fields. However, I ran a test to see what I got when trying this.
I created a transform for a PV1 segment, and attempted to set the value of PV1:1 to the output of the replace function and the input string contained a few commas:
I then ran this, and got this result:
Not only did it successfully replace the commas with tildes, but the virtual document now see's it as a repeating segment (even though the field is not repeating in it's specification).
I know this doesn't directly help you, but wanted to share my results in case it helped lead you to finding a solution. (for ref, this is from version 2022.1 of Iris For Health)