IPeople Blog

Pgm.name returns the name of the current MEDITECH NPR Procedure

Written by Gary | Jun 27, 2022 5:00:00 AM

@Pgm.name is an NPR Programming Macro that can come in handy, especially when using the Debug programs in an NPR Report Macro. 

@Pgm.name("") will return the name of the current NPR Report Macro.  For instance, assuming your NPR Report is called 'MIS.USER.zcus.report' and your NPR Report Macro is called 'detail', then @Pgm.name("") will return "MIS.USER.zcus.report.M.detail".

This can come in handy when using Meditech's standard Debug programs.

MAGIC customers can use the following line of code within an NPR Report Writer Macro: %Z.ddc(@Pgm.name(""))

C/S customers can use the following line of code within an NPR Report Writer Macro: %Z.debug(@Pgm.name(""))

The report DPM, name, and macro will all be used as the first argument for those programs and will be seen when the Debug program displays.