source: FOIAVistA/trunk/r/QUALITY_ASSURANCE_INTEGRATION-QAQ/QAQAHOCX.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1QAQAHOCX ;HISC/DAD-AD HOC REPORTS: INTERFACE COMPILER ;7/12/95 14:57
2 ;;1.7;QM Integration Module;;07/25/1995
3 ;
4BUILD ; *** Build the Ad Hoc Report interface routine(s)
5 K ^TMP($J,"QAQROU") S (QAQLEN,QAQRTNNO,QAQTAB)=0
6 F QAQLN=0:0 S QAQLN=$O(^TMP($J,"QAQTXT",QAQLN)) Q:QAQLN'>0 D
7 . S X=^TMP($J,"QAQTXT",QAQLN,0),^TMP($J,"QAQROU",QAQLN,0)=X
8 . S QAQLEN=QAQLEN+$L(X)+2,QAQDONE='$O(^TMP($J,"QAQTXT",QAQLN))
9 . I QAQLEN'<3700!QAQDONE D
10 .. S QAQRTN=$S(QAQRTNNO=0:QAQPROG,1:$E(QAQPROG,1,8-$L(QAQRTNNO))_QAQRTNNO)
11 .. S QAQRTNXT=$S(QAQDONE:"",1:$E(QAQPROG,1,8-$L(QAQRTNNO+1))_(QAQRTNNO+1))
12 .. F QA=1:1 S X=$P($T(PROG+QA),";;",2,99) Q:X="" I @$P(X,"^") D
13 ... S X="S Y="_$P(X,"^",2,99) X X S ^TMP($J,"QAQROU",QA,0)=Y
14 ... Q
15 .. S DIE="^TMP($J,""QAQROU"",",XCN=0,X=QAQRTN X ^%ZOSF("SAVE")
16 .. K ^TMP($J,"QAQROU") S QAQLEN=0,QAQRTNNO=QAQRTNNO+1
17 .. W:QAQTAB=0 ! W ?QAQTAB,QAQRTN S QAQTAB=QAQTAB+$S(QAQTAB=70:-70,1:10)
18 .. Q
19 . Q
20 Q
21PROG ;;Include this code? (boolean) ^ Generic Ad Hoc report interface code
22 ;;1^QAQRTN_" ;HISC/DAD-AD HOC REPORT INTERFACE FOR THE "_QAQFILE(0)_" FILE (#"_QAQFILE_") ;"_QAQTODAY
23 ;;1^" ;;0.0;;;"
24 ;;1^" ;;"_$P($T(QAQAHOCX+1),";",3,4)_";;"_$P($T(QAQAHOCX+1),";",6)
25 ;;QAQRTNNO=0^" ; *** Set up required and optional variables and call Ad Hoc Rpt Gen"
26 ;;QAQRTNNO=0^" S QAQMRTN=""MENU^"_QAQRTN_""",QAQORTN=""OTHER^"_QAQRTN_""",QAQDIC="_QAQFILE
27 ;;(QAQRTNNO=0)&(QAQMHDR]"")^" S QAQMHDR="""_QAQMHDR_""""
28 ;;QAQRTNNO=0^" D ^QAQAHOC0"
29 ;;QAQRTNNO=0^" Q"
30 ;;1^"MENU ; *** Build the menu array"
31 ;;QAQRTNNO=0^" S QAQMENU=1"
32 ;;1^" F QA=1:1 S X=$P($T(TEXT+QA),"";;"",2,99) Q:X="""" S QAQMENU(QAQMENU)=X,QAQMENU=QAQMENU+1"
33 ;;1^$S(QAQRTNXT="":" Q",1:" G MENU^"_QAQRTNXT)
34 ;;QAQRTNNO=0^"OTHER ; *** Set up other (optional) EN1^DIP variables, e.g."
35 ;;QAQRTNNO=0^" ; *** DCOPIES,DHD,DHIT,DIOBEG,DIOEND,DIS(),IOP,PG"
36 ;;QAQRTNNO=0&QAQNODAT^" K QAQFOUND S QAQFOUND=0,DHIT=""S QAQFOUND=1"""
37 ;;QAQRTNNO=0&QAQNODAT^" S DIOEND=""I 'QAQFOUND W !!,""""No data found for this report !!"""""""
38 ;;QAQRTNNO=0^" Q"
39 ;;1^"TEXT ;;*** Sort Yes/No ^ Menu Text ^ ~Field # ^ DIR(0)"
Note: See TracBrowser for help on using the repository browser.