July 18, 2022

How to use a MEDITECH Index File as your Detail Segment for an NPR Report

Suppose you want to produce a list of RXs for all current Inpatients.  This example will be for CS customers.

The ADM.PAT room.bed.index Table has a record for each current Inpatient.  We will use "ADM.PAT" as the Index DPM and
"room.bed.index" as the Index File.

The PHA.RX patient.x Table has a record for each RX for each patient.  We will use "PHA.RX" as the Detail DPM and "patient.x"
as the Detail Segment.  The Detail Segment field does not allow you to simply enter in the name of an Index File.  Instead,
you must type A followed by a blank space and then press <F9>.  A stands for ALL, meaning both Detail Segments and Index
Files will be made available.  You will now see "patient.x" available in the list.

ADM.PAT room.bed.index uses ADM.PAT.urn as a Subscript.  PHA.RX patient.x uses PHA.RX.patient as a Subscript.  ADM.PAT.urn
and PHA.RX.patient are equivalent, so the Report is able to link the ADM.PAT room.bed.index Table and the PHA.RX patient.x
Table.

Here are the important steps to make this work:

1.   Use PHA.RX as the Report DPM.
2.    Use PHA.RX as the Detail DPM.
3.    For the Detail Segment, type A followed by a blank space and then press <F9>.  Select patient.x from the list.
4.    Use ADM.PAT as the Index DPM.
5.    Use room.bed.index as the Index File.

For your Sort, Select, and Report Picture Fields, you can use any Field from a Table that uses any of these Fields as a
Subscript:

    ADM.PAT.facility
    ADM.PAT.room
    ADM.PAT.bed
    patient
    number
    urn

Topics: MEDITECH, Magic System, NPR Report, CS System

You Might Also Enjoy

There is an alternative method for viewing Meditech Data Definitions that will show all ...

l (that's a lowercase L) is the MAGIC function for returning the number of leading ...

The PRE Field Checks occur before the FCL Field Checks. They are executed after the ...

There are two NPR Macros that can either launch a PC-based executable or automatically ...

Sometimes a field from a Child Segment has multiple lines of free text. Let's assume the ...