source: WorldVistAEHR/trunk/r/AUTOMATED_INFO_COLLECTION_SYS-IBD/IBDFPE.m@ 1211

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

initial load of WorldVistAEHR

File size: 4.6 KB
RevLine 
[613]1IBDFPE ;MAF/ALB - ENCOUNTER FORMS QUEUEING PARAMETERS DISPLAY 1 31 94
2 ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
3EN ; -- main entry point for IBDF EF QUEUE PARMS
4 D EN^VALM("IBDF EF QUEUE PARMS")
5 Q
6 ;
7HDR ; -- header code
8 S VALMHDR(1)="This is the list of Print Manager's Queuing Parameters (PMQP) for your facility"
9 S VALMHDR(2)="You may enter new ones or edit those already set up."
10 Q
11 ;
12 ;
13INIT ; -- init variables and list array
14 N IBFASTXT
15 S (IBDCAT,IBDNME,IBDTYPE,VALMCNT,IBDCNT,IBDCNT1,IBFASTXT)=0
16 K ^TMP("IBDRPT",$J),^TMP("IBDIDX",$J)
17 F IBDNUM=0:0 S IBDNUM=$O(^IBD(357.09,IBDNUM)) Q:'IBDNUM F IBDNAME=0:0 S IBDNME=$O(^IBD(357.09,IBDNUM,"Q","B",IBDNME)) Q:IBDNME="" F IBDIFN=0:0 S IBDIFN=$O(^IBD(357.09,IBDNUM,"Q","B",IBDNME,IBDIFN)) Q:IBDIFN']"" D SET1
18 I '$D(^TMP("IBDRPT",$J)) D NUL
19 Q
20 ;
21 ;
22SET1 ; -- Set up List
23 S IBDNODE=$G(^IBD(357.09,1,"Q",IBDIFN,0))
24 S IBDCNT1=IBDCNT1+1
25 S X="",X=$$SETSTR^VALM1(IBDCNT1_")",X,1,3)
26 S X=$$SETSTR^VALM1($P(IBDNODE,"^",1),X,30,40) D TMP,CNTRL^VALM10(VALMCNT,1,80,IOINHI,IOINORM,0)
27 S IBDCAT($P(IBDNODE,"^",1))=IBDCNT,IBDTYPE(IBDCNT1)=IBDIFN_"^"_IBDNUM
28 S X="",X=$$SETSTR^VALM1($$LOWER^VALM1(" STARTING DATE/TIME: "),X,1,22)
29 S IBDVAL=$S($P(IBDNODE,"^",2)]"":$$FDTTM^VALM1($P(IBDNODE,"^",2)),1:"")
30 S X=$$SETSTR^VALM1(IBDVAL,X,23,17)
31 S IBDVAL=$S($P(IBDNODE,"^",7)]"":$P(IBDNODE,"^",7),1:"")
32 S X=$$SETSTR^VALM1($$LOWER^VALM1("DAYS TO PRINT AHEAD: "),X,40,21)
33 S X=$$SETSTR^VALM1($J(IBDVAL,5),X,65,5) D TMP
34 S X="",X=$$SETSTR^VALM1($$LOWER^VALM1(" ENDING DATE/TIME: "),X,1,22)
35 S IBDVAL=$S($P(IBDNODE,"^",3)]"":$$FDTTM^VALM1($P(IBDNODE,"^",3)),1:"")
36 S X=$$SETSTR^VALM1(IBDVAL,X,23,17)
37 S IBDVAL=$P(IBDNODE,"^",5)
38 S X=$$SETSTR^VALM1($$LOWER^VALM1(" ADD ONS ONLY: "),X,40,21)
39 S X=$$SETSTR^VALM1($J($S(IBDVAL=1:"YES",1:"NO"),5),X,65,5) D TMP
40 S X="",X=$$SETSTR^VALM1($$LOWER^VALM1(" CLINIC GROUPS: "),X,1,22)
41 S IBDVAL=$P($G(^IBD(357.99,+$P(IBDNODE,"^",6),0)),"^",1)
42 S X=$$SETSTR^VALM1(IBDVAL,X,23,17)
43 S X=$$SETSTR^VALM1($$LOWER^VALM1(" LAST DATE PRINTED: "),X,40,21)
44 S IBDVAL=$S($P(IBDNODE,"^",12)]"":$$FDTTM^VALM1($P(IBDNODE,"^",12)),1:"")
45 S X=$$SETSTR^VALM1(IBDVAL,X,62,17) D TMP
46 S IBDVAL=$P(IBDNODE,"^",4)
47 S IBDVAL=$$LOWER^VALM1($S(IBDVAL=2:"DIV/TERM DIG",IBDVAL=3:"DIV/CLIN/TERM DIG",1:"DIV/CLIN/PATIENT"))
48 S X="",X=$$SETSTR^VALM1($$LOWER^VALM1(" SORT BY: "),X,1,22)
49 S X=$$SETSTR^VALM1(IBDVAL,X,23,18)
50 S IBDVAL=$S($P(IBDNODE,"^",10)]"":$P(IBDNODE,"^",10),1:"")
51 S X=$$SETSTR^VALM1($$LOWER^VALM1(" PRINT PRIORITY: "),X,40,21)
52 S X=$$SETSTR^VALM1($J(IBDVAL,5),X,65,5) D TMP
53 S IBDVAL=$P(IBDNODE,"^",8)
54 S IBDVAL=$$LOWER^VALM1($S(IBDVAL="R":"RUN REGARDLESS",IBDVAL="I":"IGNORE HOLIDAYS/WEEKENDS",IBDVAL="H":"IGNORE HOLIDAYS",IBDVAL="W":"IGNORE WEEKENDS",IBDVAL="N":"NOT ACTIVE",1:"RUN TODAY"))
55 S X="",X=$$SETSTR^VALM1($$LOWER^VALM1("SPECIAL INSTRUCTIONS: "),X,1,22)
56 S X=$$SETSTR^VALM1(IBDVAL,X,23,30)
57 S X=$$SETSTR^VALM1($$LOWER^VALM1("DEVICE/TIME QUEUED: "),X,41,21)
58 S IBDVAL=$$LOWER^VALM1($E($P(IBDNODE,"^",9),1,12))_$S($P(IBDNODE,"^",13)="0000":" @",$P(IBDNODE,"^",13):" @",1:"")_$S($P(IBDNODE,"^",13)="0000":"0000",$P(IBDNODE,"^",13):$P(IBDNODE,"^",13),1:"")
59 S X=$$SETSTR^VALM1(IBDVAL,X,62,18) D TMP
60 S X="",X=$$SETSTR^VALM1(X,X,1,80) D TMP
61 Q
62 ;
63 ;
64TMP ; -- Set up Array
65 S IBDCNT=IBDCNT+1,VALMCNT=VALMCNT+1
66 S ^TMP("IBDRPT",$J,IBDCNT,0)=X,^TMP("IBDRPT",$J,"IDX",VALMCNT,IBDCNT1)=""
67 S ^TMP("IBDIDX",$J,IBDCNT)=VALMCNT_"^"_IBDIFN
68 Q
69 ;
70 ;
71JUMP ; -- Jump to a Specific Parameter Set
72 D FULL^VALM1
73 I $D(XQORNOD(0)),$P(XQORNOD(0),"^",4)]"" S X=$P(XQORNOD(0),"^",4) S X=$P(X,"=",2) I X]"" D:X?1.6N JSEL S DA(1)=1,DIC="^IBD(357.09,"_DA(1)_","_"""Q"""_",",DIC(0)="QEZ" D ^DIC G:Y<0 JMP S Y=+Y D JUMP1 Q
74JMP S DA(1)=1,DIC="^IBD(357.09,"_DA(1)_","_"""Q"""_",",DIC(0)="AEMN",DIC("A")="Select Parameter Group you wish to move to: " D ^DIC K DIC
75 I X["^" S VALMBG=1,VALMBCK="R" Q
76JUMP1 I Y<0 G JUMP
77 N IBDXCAT
78 S IBDXCAT=$P(^IBD(357.09,DA(1),"Q",+Y,0),"^",1)
79 I '$D(IBDCAT(IBDXCAT)) W !!,"There is no data listed for this Parameter Group" G JMP
80 S VALMBG=IBDCAT(IBDXCAT) S VALMBCK="R" K DA(1) Q
81 Q
82 ;
83 ;
84JSEL ; -- Convert number selected to name
85 S IBDVALM=X,X=$S($D(IBDTYPE(IBDVALM)):$P(IBDTYPE(IBDVALM),"^",1),1:"") I X]"" S DA(1)=1,X=$P(^IBD(357.09,DA(1),"Q",X,0),"^",1)
86 Q
87HELP ; -- help code
88 S X="?" D DISP^XQORM1 W !!
89 Q
90 ;
91 ;
92EXIT ; -- exit code
93 K IBDCAT,IBDNME,IBDTYPE,VALMCNT,IBDCNT,IBDCNT1,IBDNAME,IBDNUM,IBDNME,IBDIFN,IBDVAL,IBDNODE,IBFASTXT
94 K ^TMP("IBDRPT",$J),^TMP("IBDIDX",$J)
95 Q
96 ;
97NUL ; -- NULL MESSAGE
98 S ^TMP("IBDRPT",$J,1,0)=" ",^TMP("IBDRPT",$J,2,0)="There are no PARAMETER GROUPS listed.",^TMP("IBDIDX",$J,1)=1,^TMP("IBDIDX",$J,2)=2
99 Q
Note: See TracBrowser for help on using the repository browser.