The only catch to using this would be that your users all need access to MIS * in their database... Based on who you deploy it to...
I've used this Index in the past and works very well!! Just thought I'd mention it incase you encounter issues when you deploy and use this code! Damian A Shepard Systems Analyst Information Systems -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jerry Beals Sent: Wednesday, July 11, 2007 3:04 PM To: [EMAIL PROTECTED]; [email protected] Subject: Re: [MEDITECH-L] Determining period a date belongs to in NPR macro Hi David, Try this: (date$6_00)^MIS.GL.PERIOD.ending.date, @Next(MIS.GL.PERIOD.ending.date,MIS.GL.PERIOD.date.x) MIS.GL.PERIOD.date.x Hope this helps, Jerry Beals Holyoke Medical Center Holyoke, MA >>> "Gibbs, David" <[EMAIL PROTECTED]> 7/11/2007 1:04:00 PM >>> Hi I am trying to figure out a way to determine what GL period a date belongs to in a macro. Before I spend a lot of time inventing the wheel, I thought I would check to see if someone else has already determined it. My selects are Xx.fromperiod ig From Period Xx.thruperiod ig Thru Period Enter.date ge /FROM Enter.date le /THRU I have a start macro that assigns /FROM and /THRU and an ID attribute on xx.fromperiod to look up the GL period I want to evaluate each record to determine which period @enter.date is in. The logic I think I want (but I get mixed up with the syntax of the DO loop in my macro) is like this: >From StartPeriod to EndPeriod set variable for previous period if enter.date > previous period end date AND enter.date < current period end date then Set variable to capture the current period Loop I know I need the fields to do this MIS.GL.PERIOD.period MIS.GL.PERIOD.ending.date[period] enter.date is a field in my Report DPM (it has DATE datatype) Can someone help me to put this logic into Magic syntax? Thanks David Gibbs Lab IS Analyst Fraser Health CONFIDENTIALITY NOTICE: This email communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents is prohibited. If you have received this communication in error, please reply to the sender immediately or by telephone at (413)534-2500 and destroy all copies of this communication and any attachments. For further information regarding Holyoke Medical Center's privacy policy, Please visit our Internet web site at http://www.holyokehealth.com <<<<GWAVAsig>>>> =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= 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 [email protected] http://mtusers.com/mailman/listinfo/meditech-l_mtusers.com DISCLAIMER: The information contained in this electronic message is legally privileged and confidential under applicable law and is intended for a particular addressee(s). If it is not clear that you are the intended recipient, you are hereby notified that you have received this transmittal in error; any review, copying or distribution or dissemination is strictly prohibited. If you suspect that you have received this transmittal in error, please notify Southwestern VT Health Care Corporation immediately by return email reply to ([EMAIL PROTECTED]), and immediately delete the transmittal and any attachments without making any copy or distribution. Thank you. =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= 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 [email protected] http://mtusers.com/mailman/listinfo/meditech-l_mtusers.com
