Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PRSEUTL6

PRSEUTL6.m

Go to the documentation of this file.
PRSEUTL6 ;HISC/MD-SERVICE SELECTION FROM FILE 454.1 ;2/22/94
 ;;4.0;PAID;**3,46**;Sep 21, 1995
EN1 ; SELECT SERVICE FROM OPTION PRSE-M.I. 
 N DA,Y,X I $G(^PRSP(454.1,0))="" W !,$C(7),"COST CENTER ORGANIZATION FILE IS NOT RESIDENT CANNOT CONTINUE!!"
 K POUT,^TMP("PRSESEV",$J)
 D DISP I $O(^TMP("PRSESRV",$J,0))'>0 S POUT=1
QUIT K PRSETAB,PRSE,PRSEAQ,PRSEND,DIC,PURP,PSVC,DLAYGO,I,PRSEMAX,NCTR,PDA,PRMI,PRSECLA,PRSECNT,PRSEI,PRSEMI,PRSVC,PRSW,PRX
 Q
DISP ;
 K PRSETAB,PSVC S NCTR=1,PRSVC="",PRSEMAX=0
 F I=0:0 S PRSVC=$O(^PRSP(454.1,"B",PRSVC)) Q:PRSVC=""  F DA=0:0 S DA=$O(^PRSP(454.1,"B",PRSVC,DA)) Q:DA'>0  D
 .   I '($P($G(^PRSP(454.1,+DA,0)),U)="MISCELLANEOUS")  D
 .   .   S PRSEMAX=PRSEMAX+1,PSVC(PRSEMAX)=DA_"^"_PRSVC
 .   .   Q
 .   Q
 S PRSEMAX=PRSEMAX+1,PSVC(PRSEMAX)="ALL^ALL"
 S PRSESTRT=1,(POUT,PRSEDONE)=0
 K ^TMP("PRSEGRP",$J) F  D DSP I $G(PRSEDONE)!$G(POUT) Q
 Q
DSP ;
 W @IOF S PRSEAQ=$Y
 F PRSE=PRSESTRT:2:PRSEMAX S PRSEI=PRSE D  I $Y>(IOSL+PRSEAQ-5),PRSE'=PRSEMAX S PRSESTRT=PRSE+2 Q
 .  Q:$D(PSVC(PRSEI))[0
 .  S PRSEI(0)=PRSEI+1 W ! W:$G(PSVC(PRSEI))'="" ?1,$J(PRSEI,2),". ",$P($G(PSVC(PRSEI)),U,2) W:$G(PSVC(PRSEI(0)))'="" ?40,$J(PRSEI(0),2),".",$P($G(PSVC(PRSEI(0))),U,2)
 .  Q
 S PRSEDONE=(PRSE=PRSEMAX)!(PRSE+1=PRSEMAX)
 I 'PRSEDONE W !,"<<More>>"
ASK ;
 W !,"Select SERVICE(S): " R PRX:DTIME
 S:'$T PRX="^" I "^"[PRX S:$E(PRX)="^" POUT=1 Q
 I PRX=PRSEMAX!($$UP^XLFSTR(PRX)="ALL") S PRX="1"_$S(PRSEMAX>2:"-"_(PRSEMAX-1),1:"")
 D VALENT^PRSEED7 I (PRX["?"!(PRSEBAD)) G DSP:PRX?2."?",ASK
 F PRSEI=1:1 S PRSECLA=$P(PRX,",",PRSEI) Q:PRSECLA=""  S PRSEND=$P(PRSECLA,"-",2)_"+"_PRSECLA F PRSECNT=+PRSECLA:1:PRSEND I +$G(PSVC(PRSECNT))>0 S ^TMP("PRSESRV",$J,+PSVC(PRSECNT))=""
 Q
DICS(DUZ,Y,PRSEPROG) ; SCREEN FOR STUDENT LOOKUP IN REGISTRATION/ATTENDANCE
 N PRSX S PRSX=0
 I $$EN12^PRSEUTL3($G(Y)) D
 . I DUZ(0)["@"!(+$$EN4^PRSEUTL3($G(DUZ))!('$$EN3^PRSEUTL3($G(Y))!(+$$EN3^PRSEUTL3($G(Y))=PRSESER))) S PRSX=1 Q
 . I +$$EN3^PRSEUTL3($G(DUZ))=$P(PRSEPROG(1),U,8),+$$EN6^PRSEUTL3($G(DUZ)) S PRSX=1
 . Q
 Q PRSX