Article ID: 16465
Date:
5/29/2003
Published: 5/30/2003
Application: MRI
Source:
Meditech
Platform: MAGIC

Use NPR Report Writer Report with MRI Compiled ICR and COR Reports

MRI Compiled reports allow for a custom format that would be created from the NPR Report Writer.  The NPR reports created for this purpose must follow a specific setup in order to function as expected.  

Here are the steps for setting up and using an NPR Report with the MRI Compiled reports for ICR and COR types:


First, for an ICR report:
     Report DPM:
          MRI.RPT
     Detail DPM
          MRI.RPT
     Detail Segment
          mri.report.data.icr


Sort criteria:
        Sort Field            Order  Header  Trailer
     1  report                 ASC    NONE      N
     2  sort1                  ASC    NONE      N
     3  sort2                  ASC    NONE      N
     4  sort3                  ASC    NONE      N
     5  sort.icr.rec           ASC    NONE      N
     6  sort.icr.acct          ASC    NONE      N
     7  sort.icr.prefix        ASC    NONE      N


Selection:
     1  report      EQ        c.report


To allow for page breaks as the users asks for, add the following footnotes:
     AL SK2 IF{c.new.page="SORT1" %[@.new.page.pgm](0)}
     AL SK3 IF{c.new.page="SORT2" %[@.new.page.pgm](0)}
     AL SK4 IF{c.new.page="SORT3" %[@.new.page.pgm](0)}


The sort value of sort.icr.rec is equal to the field medical.record in both
MRI.PAT and MRI.DRC.  Therefore, to get patient specific data from the main
segments all that you need to do is reference fields from these two DPM's using
the full name of the field.  For instance:
     MRI.PAT.name
     MRI.DRC.soc.sec.number

In addition, the sort values have relating fields in MRI.ICR:
     sort.icr.rec             MRI.ICR.record
     sort.icr.acct            MRI.ICR.acct
     sort.icr.prefix          MRI.ICR.prefix

So again, if you want to access fields from the main segment of this DPM, all
that you need to do is use the full name of the field.  For example:
     MRI.ICR.date.complete



--------------------------------------------------------------------------------
Now, for an COR report:
     Report DPM:
          MRI.RPT
     Detail DPM
          MRI.RPT
     Detail Segment
          mri.report.data.cor


Sort criteria:
        Sort Field            Order  Header  Trailer
     1  report                 ASC    NONE      N
     2  sort1                  ASC    NONE      N
     3  sort2                  ASC    NONE      N
     4  sort3                  ASC    NONE      N
     5  sort.cor               ASC    NONE      N


Selection:
     1  report      EQ        c.report


To again allow for page breaks as the users asks for add the following
footnotes:
     AL SK2 IF{c.new.page="SORT1" %[@.new.page.pgm](0)}
     AL SK3 IF{c.new.page="SORT2" %[@.new.page.pgm](0)}
     AL SK4 IF{c.new.page="SORT3" %[@.new.page.pgm](0)}

Also, include the following footnote:
     AL START @.mri.pfx^MRI.CORR.prefix

With the AL START footnote you can use possessive fields to get information
from MRI.CORR.  For example:
     sort.cor's.name
     sort.cor's.completed.date
     sort.cor's.completed.number



--------------------------------------------------------------------------------
To attach your reports, enter into MRI.  From the Main Menu enter into number
100, Correspondence Routines.  From here, enter into number 88, Custom Forms &
Lists.  Set your type as either COR or ICR and at the MAGIC Pgm Name prompt
enter the name of your report in the format of:
     MRI.RPT.zcus.report.name.R