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

AQAOUSA1.m

Go to the documentation of this file.
  1. AQAOUSA1 ; IHS/ORDC/LJF - PRINT ACCESS BY OCCURRENCE ;
  1. ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
  1. ;
  1. ;This rtn print the listing of users with access to a particular
  1. ;occurrence. It is called by ^AQAOUSA.
  1. ;
  1. D INIT^AQAOUTIL S AQAOTY="USERS WITH ACCESS TO AN OCCURRENCE"
  1. D HEADING^AQAOUTIL,HDG1
  1. ;
  1. FIND ; >> find sorted user list
  1. I '$D(^TMP("AQAOUSA",$J)) W !!,"NO DATA FOUND",! Q
  1. S AQAOCAT=0
  1. F S AQAOCAT=$O(^TMP("AQAOUSA",$J,AQAOCAT)) Q:AQAOCAT="" Q:AQAOSTOP=U D
  1. .S X=$S(AQAOCAT="A":"QI STAFF",AQAOCAT="M":"QI TEAM MEMBERS",AQAOCAT="R":"PERSONAL REFERRALS",1:"TEAM REFERRALS")
  1. .S X="*** "_X_" ***" W !!?AQAOIOMX-$L(X)/2,X,!! ;category title
  1. .S AQAOUSN=0
  1. .F S AQAOUSN=$O(^TMP("AQAOUSA",$J,AQAOCAT,AQAOUSN)) Q:AQAOUSN="" Q:AQAOSTOP=U D
  1. ..S AQAOUSR=0
  1. ..F S AQAOUSR=$O(^TMP("AQAOUSA",$J,AQAOCAT,AQAOUSN,AQAOUSR)) Q:AQAOUSR="" Q:AQAOSTOP=U D
  1. ...S AQAOS=^TMP("AQAOUSA",$J,AQAOCAT,AQAOUSN,AQAOUSR)
  1. ...I $Y>(IOSL-4) D NEWPG^AQAOUTIL Q:AQAOSTOP=U D HDG1
  1. ...W AQAOUSN
  1. ...I AQAOCAT="A" W ?40,AQAOS,! Q ;qi staff level
  1. ...I AQAOCAT="M" D Q
  1. ....F I=1:2 Q:$P(AQAOS,U,I)="" W ?40,"TEAM: ",$P(AQAOS,U,I),?60,$P(AQAOS,U,I+1),! I $Y>(IOSL-4) D NEWPG^AQAOUTIL Q:AQAOSTOP=U D HDG1 ;teams & access
  1. ...;
  1. ...;PATCH 4 BEGIN
  1. ...I AQAOCAT="R" D Q ;referred by name
  1. ....F I=1:1 Q:$P(AQAOS,U,I)="" Q:AQAOSTOP=U D
  1. .....W ?40,"Referred By: ",$E($P(AQAOS,U,I),1,15),!
  1. .....I $Y>(IOSL-4) D NEWPG^AQAOUTIL Q:AQAOSTOP=U D HDG1
  1. ...;
  1. ...F I=1:3 Q:$P(AQAOS,U,I)="" Q:AQAOSTOP=U D ;referred by team
  1. ....W ?40,"Referred By: ",$E($P(AQAOS,U,I),1,15),!
  1. ....W ?40,"Referred To: ",$E($P(AQAOS,U,I+1),1,15)
  1. ....W ?60," - ",$P(AQAOS,U,I+2),!!
  1. ....I $Y>(IOSL-4) D NEWPG^AQAOUTIL Q:AQAOSTOP=U D HDG1
  1. ...;PATCH 4 END
  1. ;
  1. Q ;return to ^AQAOUSA
  1. ;
  1. ;
  1. HDG1 ; >> SUBRTN to print 2nd half of heading
  1. S X=$P(^AQAOC(AQAOIFN,0),U),X="Occurrence #"_X
  1. W ?AQAOIOMX-$L(X)/2,X,!,AQAOLINE,!
  1. Q