Posts:
Replies:
John Klahn · Apr 29
John Klahn · Apr 29
Thank you for your solution Vitaliy! I believe that this would go into a class?
John Klahn · Apr 29
Hi Jeffrey,
Thank you for this code! Unfortunately I don't have access to Studio right now but once I do I will go your code a go. Cheers!
John
Followers:
John has no followers yet.
Following:
John has not followed anybody yet.
Global Masters badges:
John has no Global Masters badges yet.
Hi Jeffrey,
I get compile errors with this code. Granted, I'm very new to using functions in DTLs so I suspect that I'm missing some very basic things that are causing the errors. Sorry if this is obvious, but it is confusing to me.
Here is what I input:
set tSSN source.{PID:SSNNumberPatient}
set target.{PID:SSNNumberPatient} $E(tSSN,1,3)_"-"_$E(tSSN,4,5)_”-“_$E(tSSN,6,9)
And this is the Compile results:
Compilation started on 04/29/2022 18:27:15 with qualifiers 'k'
Compiling class SANDBOXPKG.JKlahnProduction.JKlahnProduction.EpicADT.Sandbox.ADTTransformCapitalization
Compiling routine SANDBOXPKG.JKlahnProduction.JKlahnProduction.EpicADT.Sandbox.ADTTransformCapitalization.1
ERROR: SANDBOXPKG.JKlahnProduction.JKlahnProduction.EpicADT.Sandbox.ADTTransformCapitalization.cls(Transform+52) #1054: Invalid expression : 'tSC1=target.SetValueAt($E(tSSN,1,3)_"-"_$E(tSSN,4,5)_”-“_$E(tSSN,6,9),"PID:SSNNumberPatient","set","")' : Offset:66 [zTransform+51^SANDBOXPKG.JKlahnProduction.JKlahnProduction.EpicADT.Sandbox.ADTTransformCapitalization.1]
TEXT: Try { Set tSC1=target.SetValueAt($E(tSSN,1,3)_"-"_$E(tSSN,4,5)_”-“_$E(tSSN,6,9),"PID:SSNNumberPatient","set","") } Catch ex { Set tSC1 = ex.AsStatus() }
ERROR: SANDBOXPKG.JKlahnProduction.JKlahnProduction.EpicADT.Sandbox.ADTTransformCapitalization.cls(Transform+65) #1043: QUIT argument not allowed : 'tSCTrans' : Offset:108 [zTransform+64^SANDBOXPKG.JKlahnProduction.JKlahnProduction.EpicADT.Sandbox.ADTTransformCapitalization.1]
TEXT: If ('tSCTrans) Do ##class(Ens.Util.Log).LogStatus($classname(),"Transform",tSCTrans) Quit:(''tSC) tSCTrans
ERROR: SANDBOXPKG.JKlahnProduction.JKlahnProduction.EpicADT.Sandbox.ADTTransformCapitalization.cls(Transform+67) #1043: QUIT argument not allowed : '}' : Offset:11 [zTransform+66^SANDBOXPKG.JKlahnProduction.JKlahnProduction.EpicADT.Sandbox.ADTTransformCapitalization.1]
TEXT: Quit tSC }
Detected 3 errors during compilation in 0.092s.