source: WorldVistAEHR/trunk/r/GEN_MED_REC_GENERATOR-GMRG/GMRGPRNT.m@ 1361

Last change on this file since 1361 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 884 bytes
Line 
1GMRGPRNT ;CISC/RM-TEXT GENERATOR RESULTS REPORTING ;1/9/92
2 ;;3.0;Text Generator;;Jan 24, 1996
3EN4 ; ENTRY IF PRIME DOCUMENT KNOWN
4 Q:'$D(GMRGRT)
5 S (GMRGUP,GMRGOUT)=0,DIC="^DPT(",DIC(0)="AEQM" W ! D ^DIC K DIC
6 S:$D(DTOUT)!$D(DUOUT) GMRGOUT=1 S:+Y'>0 GMRGUP=1 G Q4:GMRGOUT!GMRGUP S DFN=+Y D DEM^VADPT
7 S GMRGXPRT="1^0^0" D EN1^GMRGRUT3 G:GMRGPDA'>0 EN4:'GMRGOUT,Q4
8 D NOW^%DTC S GMRGPDT=%,GMRGLIN("-")="",$P(GMRGLIN("-"),"-",IOM)=""
9 D EN1^GMRGPUTL G Q4:GMRGOUT!GMRGUP,EN4
10Q4 K DFN,GMRGPDA,GMRGPDT,GMRGLIN D KVAR^VADPT
11 Q
12EN2 ; ENTRY TO GMR TEXT GENERATOR IF UNKNOWN PRIME DOCUMENT
13 W !
14 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
15 S GMRGRT=Y D EN4 G Q2:GMRGOUT,EN2
16Q2 K GMRGOUT,GMRGRT,DIC,GMRG
17 Q
Note: See TracBrowser for help on using the repository browser.