My IPeople

Community discussion for IPeople products and services
Welcome to My IPeople Sign in | Help
in
Home Blogs Forums

How to Access NPR Segments that are not available as Detail Segments

Last post 11-21-2007, 9:38 AM by Brian. 0 replies.
Sort Posts: Previous Next
  •  11-21-2007, 9:38 AM 592

    How to Access NPR Segments that are not available as Detail Segments

    Sometimes Meditech does not make a segment available as a Detail Segment in their NPR Report Writer.  The NPR Segments
    are stored in their own DPM called NPR.SEG.  There is a field attached to each segment called cust.rw.access which
    determines whether or not the segment will be available as a Detail Segment.

    We can still access these segments but in a less user-friendly manner.  Here is an example showing how to print out a list
    of all of these segments.  They come from a DPM called NPR.SEG:

    1) Create a report with Report DPM NPR.SEG (Do not select a Detail DPM, Detail Segment, Index DPM, or Index File)
    2) Add the following Line Attributes to your Detail Line:

    ECB=""^dpm,
    ECB=DO{@Next(dpm) ""^name,
    ECB=DO{@Next(name) IF{"Y"'=@cust.rw.access 1,
    ECE=1}}},

    3) Create two fields with the following attributes and put them on your Detail Line:

    xx.dpm
    DAT=FREE
    LEN=30
    VAL=dpm

    xx.name
    DAT=FREE
    LEN=30
    VAL=name

    4) File and translate your report.  It is now ready to be run.

    ECB is a Line Attribute that stands for Extra Code Beginning.  It allows users to run whatever code they like before the
    current line begins printing.  ECE stands for Extra Code Ending and allows code to be run after the current line finishes
    printing.

    In this case, the ECB performs what is called a DO Loop through the Subscripts of the segment.  This particular segment has
    two subscripts: dpm and name.  Also, an IF statement is performed so that only those records whose cust.rw.access field is
    not equal to "Y" are included on the report.

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems