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

WITH is a Field Attribute that determines when a field should be evaluated during a ...

SUB is a Field Attribute not documented on Meditech's website. It allows you to define ...

BFI stands for Before Input. BFI attributes can come in pairs, just like FCL attributes. ...

When picking Select Fields, Sort Fields, or Report Fields, users can press for a lookup ...

MV (Multi-Value) Arrays allow for the creation of our own "multiples". Often the MV array ...