Hi Marge, I took a look at this and realized what's going on. BAR.PAT.ins.order is a segment, and not a subscript of a segment. The first line is causing a syntax error (however I believe subsequent lines need to be changed as well.) The assignment of ""^ins.order would translate to something like ""^$(B1)BZ[bz]M["O",bzIO] which is part of the permanent patient file (and is the reason Meditech is stopping you with a syntax error).
I would recommend changing all occurrences of ins.order to insurance.order, which is the subscript of the ins.order segment. This is assuming that you want to loop through the ins.order segment. Assuming outlook didn't change anything around; I think the following might work for you: GET.SORT ""^insurance.order^SORT, [EMAIL PROTECTED](insurance.order)_.=. "SP."^SORT, 1^/ORDER["SP"]; [EMAIL PROTECTED](insurance.order) [EMAIL PROTECTED]"."^SORT, insurance.order^/[EMAIL PROTECTED], [EMAIL PROTECTED](insurance.order)^LAST'=6 SORT_"SP."^SORT, LAST+1^/ORDER["SP"]}} Jim ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marge Sitterley Sent: Wednesday, August 08, 2007 11:44 AM To: meditech-l@mtusers.com Subject: [MEDITECH-L] I'm getting a syntax error: Syntax - ^@, ^%, ^$, ^?, ^:, ^*, ^[, ^& - not allowed on the following routine within a macroon CS LTC Platform (this code works fine in the Magic versionof the report). Would someone far more experienced than I sh I'm getting a syntax error: Syntax - ^@, ^%, ^$ <mailto:%5e@,%20%5e%25,%20%5e$> , ^?, ^:, ^*, ^[, ^& - not allowed on the following routine within a macro on CS LTC Platform (this code works fine in the Magic version of the report). Would someone far more experienced than I show me the error of my way, or show me a better way to write it. GET.SORT ""^(ins.order)^SORT, [EMAIL PROTECTED](ins.order <mailto:[EMAIL PROTECTED](ins.order> )_.=. "SP."^SORT, 1^/ORDER["SP"]; [EMAIL PROTECTED](ins.order <mailto:[EMAIL PROTECTED](ins.order> ) [EMAIL PROTECTED]"."^SORT <mailto:[EMAIL PROTECTED]> , ins.order^/[EMAIL PROTECTED], [EMAIL PROTECTED](ins.order)^LAST'=6 <mailto:[EMAIL PROTECTED](ins.order)%5eLAST'=6> SORT_"SP."^SORT, LAST+1^/ORDER["SP"]}} Thanks in advance for any suggestions/solutions. Thanks & Enjoy your day, Marge Application Manager 315-787-4045 [EMAIL PROTECTED] ********CONFIDENTIALITY NOTICE************ This message & any included attachments are intended only for the addressee. The information contained in this message is confidential & may constitute non-public information under international, federal or state laws and is intended only for the use of the addressee. Unauthorized forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Finger Lakes Health in Geneva, New York, U.S.A. at (315) 787-4040. ********************************************
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= To subscribe or unsubscribe to the meditech-l, visit http://mtusers.com/mailman/listinfo/meditech-l_mtusers.com To check the status of the meditech-l, visit MTUsers.NET For help, email [EMAIL PROTECTED] Please visit and add information to the MTUsers WikiPedia at MTUsers.NET/mwiki ______________________________________ meditech-l mailing list meditech-l@MTUsers.com http://mtusers.com/mailman/listinfo/meditech-l_mtusers.com