source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGGECSA.m@ 794

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1DGGECSA ;ALB/RMO - Auto Generate Code Sheets for MAS AMIS(s) ; 13 AUG 90 8:52 am
2 ;;5.3;Registration;;Aug 13, 1993
3 ;==============================================================
4 ;Entry Points:
5 ; ASK -Prompt user to generate AMIS code sheets
6 ; QUE -Queue generation of AMIS code sheet to default printer
7 ;==============================================================
8ASK ;Prompt user to generate AMIS code sheets
9 ; Input -- None Required
10 ; Output -- %=1 user entered 'YES'
11 ; %=2 user entered 'NO'
12 ; %<0 user timeout or entered an '^'
13 S %=0,DGCODPRT=$S($D(^DG(43,1,0)):$P(^(0),"^",25),1:"") G Q:DGCODPRT=""
14 W !!,"Do you wish to generate code sheets if segments are balanced" S %=2 D YN^DICN G Q:%<0 I '% W !!?3,"Enter 'YES' to generate code sheets, or 'NO' not to." G ASK
15 I %=1 W !!?3,"NOTE: AMIS Code Sheets will be queued to print on ",DGCODPRT,"."
16Q K DGCODPRT Q
17 ;
18QUE ;Queue generation of AMIS code sheet to default MAS code sheet printer
19 ; Input -- DGSEG Segment Number ie, 334
20 ; DGDIV Medical Ctr Div File (#40.8) IFN ie, 1
21 ; DGMYR Month/Year in internal date format ie, 2900200
22 ; Output -- Task is Queued to Generate a Code Sheet
23 S ZTRTN="START^DGGECSA",ZTDTH=$H,ZTSAVE("DGTTF")=DGSEG,ZTSAVE("DGDIV")=DGDIV,ZTSAVE("DGMYR")=DGMYR
24 S ZTDESC="GENERATE AMIS CODE SHEET"
25 S ZTIO=$S($D(^DG(43,1,0)):$P(^(0),"^",25),1:"") D ^%ZTLOAD:ZTIO'=""
26 K ZTSK,ZTDTH,ZTIO,ZTRTN,ZTSAVE,ZTDESC
27 Q
28 ;
29START ;Auto generation of AMIS code sheet
30 U IO Q:'$D(DGTTF)!('$D(DGDIV))!('$D(DGMYR))
31 S SDABORT=0,DGSTR="",DGSTA=$S('$D(^DG(40.8,+DGDIV,0)):0,$P(^(0),"^",2)'="":$P(^(0),"^",2),$D(^DIC(4,+$P(^(0),"^",7),99)):$P(^(99),"^",1),1:0)
32 I DGTTF'>399 D BLD^DGGECS,GEN^DGGECS:'SDABORT
33 I DGTTF>399 F I=401:1:420 S DGAMS(I)=""
34 I DGTTF>399 D START^DGGECS
35 K DGSTA,DGSTR,DGTTF,SDABORT,I,DGAMS
36 Q
Note: See TracBrowser for help on using the repository browser.