GMRGPRNT ;CISC/RM-TEXT GENERATOR RESULTS REPORTING ;1/9/92
;;3.0;Text Generator;;Jan 24, 1996
EN4 ; ENTRY IF PRIME DOCUMENT KNOWN
Q:'$D(GMRGRT)
S (GMRGUP,GMRGOUT)=0,DIC="^DPT(",DIC(0)="AEQM" W ! D ^DIC K DIC
S:$D(DTOUT)!$D(DUOUT) GMRGOUT=1 S:+Y'>0 GMRGUP=1 G Q4:GMRGOUT!GMRGUP S DFN=+Y D DEM^VADPT
S GMRGXPRT="1^0^0" D EN1^GMRGRUT3 G:GMRGPDA'>0 EN4:'GMRGOUT,Q4
D NOW^%DTC S GMRGPDT=%,GMRGLIN("-")="",$P(GMRGLIN("-"),"-",IOM)=""
D EN1^GMRGPUTL G Q4:GMRGOUT!GMRGUP,EN4
Q4 K DFN,GMRGPDA,GMRGPDT,GMRGLIN D KVAR^VADPT
Q
EN2 ; ENTRY TO GMR TEXT GENERATOR IF UNKNOWN PRIME DOCUMENT
W !
S DIC="^GMRD(124.2,",DIC(0)="AEZ",DIC("A")="Select Document from which to print patient data: ",DIC("S")="S GMRG=$O(^GMRD(124.25,""B"",""PRIME DOCUMENT"",0)) I $P(^GMRD(124.2,+Y,0),U,4)=GMRG",DIC("W")="" D ^DIC K DIC G Q2:+Y'>0
S GMRGRT=Y D EN4 G Q2:GMRGOUT,EN2
Q2 K GMRGOUT,GMRGRT,DIC,GMRG
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRGPRNT 901 printed Dec 13, 2024@01:55:30 Page 2
GMRGPRNT ;CISC/RM-TEXT GENERATOR RESULTS REPORTING ;1/9/92
+1 ;;3.0;Text Generator;;Jan 24, 1996
EN4 ; ENTRY IF PRIME DOCUMENT KNOWN
+1 if '$DATA(GMRGRT)
QUIT
+2 SET (GMRGUP,GMRGOUT)=0
SET DIC="^DPT("
SET DIC(0)="AEQM"
WRITE !
DO ^DIC
KILL DIC
+3 if $DATA(DTOUT)!$DATA(DUOUT)
SET GMRGOUT=1
if +Y'>0
SET GMRGUP=1
if GMRGOUT!GMRGUP
GOTO Q4
SET DFN=+Y
DO DEM^VADPT
+4 SET GMRGXPRT="1^0^0"
DO EN1^GMRGRUT3
if GMRGPDA'>0
if 'GMRGOUT
GOTO EN4
GOTO Q4
+5 DO NOW^%DTC
SET GMRGPDT=%
SET GMRGLIN("-")=""
SET $PIECE(GMRGLIN("-"),"-",IOM)=""
+6 DO EN1^GMRGPUTL
if GMRGOUT!GMRGUP
GOTO Q4
GOTO EN4
Q4 KILL DFN,GMRGPDA,GMRGPDT,GMRGLIN
DO KVAR^VADPT
+1 QUIT
EN2 ; ENTRY TO GMR TEXT GENERATOR IF UNKNOWN PRIME DOCUMENT
+1 WRITE !
+2 SET DIC="^GMRD(124.2,"
SET DIC(0)="AEZ"
SET DIC("A")="Select Document from which to print patient data: "
SET DIC("S")="S GMRG=$O(^GMRD(124.25,""B"",""PRIME DOCUMENT"",0)) I $P(^GMRD(124.2,+Y,0),U,4)=GMRG"
SET DIC("W")=""
DO ^DIC
KILL DIC
if +Y'>0
GOTO Q2
+3 SET GMRGRT=Y
DO EN4
if GMRGOUT
GOTO Q2
GOTO EN2
Q2 KILL GMRGOUT,GMRGRT,DIC,GMRG
+1 QUIT