18 lines
884 B
Mathematica
18 lines
884 B
Mathematica
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
|