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

AQAOCHK3.m

Go to the documentation of this file.
  1. AQAOCHK3 ; IHS/ORDC/LJF - TICKLER BY USER OR TEAM ;
  1. ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
  1. ;
  1. ;This rtn is the main entry point from the Tickler Report option.
  1. ;If user is QI staff member, user is given choice to print tickler
  1. ;for one user, for one team, or for all occurrences needing review.
  1. ;This rtn then calls ^AQAOCHK once user or team identity is defined.
  1. ;
  1. CHECK ; >> go to ^AQAOCHK1 if not qi staff member
  1. I $P(AQAOUA("USER"),U,6)="" D ^AQAOCHK1 Q
  1. K AQAOXYZ K ^TMP("AQAOCHK",$J) ;start out clean
  1. ;
  1. ASK ; >> print for user, team or all
  1. W !! K DIR S DIR(0)="NO^1:3"
  1. S DIR("A")=" Choose One",DIR("A",1)=" Print TICKLER Report"
  1. S DIR("A",2)=" 1. For a USER"
  1. S DIR("A",3)=" 2. For a QI TEAM"
  1. S DIR("A",4)=" 3. For ALL"
  1. S DIR("?",1)="As a QI Staff member, you have the choice to print the"
  1. S DIR("?",2)="Tickler report to show occurrences needing review for"
  1. S DIR("?",3)="a particular USER, or for a particular QI TEAM, or for"
  1. S DIR("?",4)="ALL occurrences which is how it prints when you first"
  1. S DIR("?",5)="enter the QAI Mgt System menu."
  1. S DIR("?")="Choose by number: 1, 2, or 3."
  1. D ^DIR G END^AQAOCHK2:Y<1 S AQAOCHC=Y
  1. ;
  1. I AQAOCHC<3 D G ASK:Y<1
  1. .W !! K DIC S DIC=$S(AQAOCHC=1:"^VA(200,",1:"^AQAO1(1,")
  1. .S DIC(0)="AEMQZ" D ^DIC
  1. S AQAODUZ=$S(AQAOCHC=1:+Y,AQAOCHC=2:0,1:DUZ) ;reset duz
  1. I AQAOCHC=2 S AQAOXYZ(1,+Y)="",AQAOY=+Y ;set team variables
  1. ;
  1. S AQAOSUB=$S(AQAOCHC=1:"USER",AQAOCHC=2:"TEAM",1:"ALL")
  1. D @AQAOSUB
  1. ;I '$D(AQAOXYZ)#2,'$D(AQAOXYZ(1)) W !!,"*** NO INDICATORS FOUND ***" G ASK ;PATCH 4
  1. D OCC^AQAOCHK Q
  1. ;
  1. ;
  1. USER ; >> SUBRTN to find indicator access for user
  1. W !!,"Using identity of ",$P(^VA(200,AQAODUZ,0),U)," . . .",!
  1. I $P($G(^AQAO(9,AQAODUZ,0)),U,6)]"" S AQAOXYZ="ALL"
  1. S AQAOX=0 ;find teams user has write access to
  1. F S AQAOX=$O(^AQAO(9,AQAODUZ,"TM",AQAOX)) Q:AQAOX'=+AQAOX D
  1. .Q:$P(^AQAO(9,AQAODUZ,"TM",AQAOX,0),U,2)'=2 ;need write access
  1. .S AQAOY=$P(^AQAO(9,AQAODUZ,"TM",AQAOX,0),U),AQAOXYZ(1,AQAOY)=""
  1. .D TEAM
  1. Q
  1. ;
  1. TEAM ; >> SUBRTN to find indicators for team selected
  1. S AQAOIND=0 ;find all indicators for this team
  1. F S AQAOIND=$O(^AQAO(2,"AC",AQAOY,AQAOIND)) Q:AQAOIND="" D
  1. .S AQAOXYZ(2,AQAOIND)=""
  1. Q
  1. ;
  1. ALL ; >> SUBRTN to set access level of ALL
  1. S AQAOXYZ="ALL" Q