replacing characters
The doc name is formatted lname,fname. How do I replace the comma with a ^ so I get lname^fname.
Product version: Caché 2017.1
$ZV: Cache for Windows (x86-64) 2017.2.2
The doc name is formatted lname,fname. How do I replace the comma with a ^ so I get lname^fname.
<assign value='$PIECE($ZCVT(source.{ibex_medical_chart.patient_info.admdoc.name},"i","XML"),",",1)' property='target.{PV1:AdmittingDoctor(1).FamilyName}' action='set' /> <assign value='$PIECE($ZCVT(source.{ibex_medical_chart.patient_info.admdoc.name},"i","XML"),",",2)' property='target.{PV1:AdmittingDoctor(1).GivenName}' action='set' />
Or a bit more efficiently:
<assign value='$ZCVT(source.{ibex_medical_chart.patient_info.admdoc.name},"i","XML")' property='tFullName' action='set' /> <assign value='$PIECE(tFullName,",",1)' property='target.{PV1:AdmittingDoctor(1).FamilyName}' action='set' /> <assign value='$PIECE(tFullName,",",2)' property='target.{PV1:AdmittingDoctor(1).GivenName}' action='set' />
Note that this isn't actually replacing the comma character so much as it's splitting the full name value supplied in the source path on that character and assigning the individually extracted values to their associated HL7 components in the Admitting Doctor field.
could consider $Translate(Var,",","^") but I've not used it in the context in your example though
This worked, thanks