Article ID: 20106
Date:
10/4/2004
Published: 10/12/2004
Application: MRI
Source:
Meditech
Platform: MAGIC

Where are Demo Recalled Queries Stored in MRI?

Recently, we have received customer tasks inquirying as to where the demo recalled queries are stored when they write a report in MRI.PAT.  The demo recalled queries are stored in the DPM MRI.DRC and one of two possible segments:

  1. mri.drc.custom.defined.queries - Single response queries are stored here.
  2. mri.drc.cust.def.mult.queries - Multiple response queries are stored here.

To access the query responses in a MRI.PAT report, you will need to perform a subscripting technique for a single response query, or ECB/ECE looping for multiple response queries.  For example, let's say that you wrote a report in MRI.PAT, in the detail segment mri.patient.file, and you are trying to access the following query responses:

To access a single response query named "ADMMCNO", the VAL statement in a computed field could be set up as:

xx.admmcno
DAT=FREE
LEN=12
VAL=@MRI.DRC.cd.response[medical.record,"ADMMCNO"]

This is assuming that the query response is free text and it is 12 characters in length.

To access a multiple response query named "ADMMCNO2", the following can be setup:

First, create some ECB/ECE coding on a blank detail line that assigns the query mnemonic "ADMMCNO2" to MRI.DRC.cd.query:

ECB=medical.record^MRI.DRC.medical.record,
ECB="ADMMCNO2"^MRI.DRC.cd.query,
ECB=""^MRI.DRC.cdm.seq.no,
ECB=DO{@Next(MRI.DRC.cdm.seq.no,MRI.DRC.customer.def.mult.queries) .,
ECE=.},

On the same line as the ECB/ECE coding, add a computed field to access the query response:

xx.admmcno2
DAT=FREE
LEN=40
VAL=@MRI.DRC.cdm.response

This is assuming that the query response is free text and it is 40 characters in length.