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

AQAOPOS2.m

Go to the documentation of this file.
  1. AQAOPOS2 ; IHS/ORDC/LJF - POST INIT CONTINUED ;
  1. ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
  1. ;
  1. ;This is a continuation of the QAI postinits. This rtn installs your
  1. ;primary facility into the QI Parameter file and sets up at least one
  1. ;user as the package administrator.
  1. ;
  1. MAIN D 3,4,5,6,7 Q ;do steps 3, 4, 5, 6, 7 and return to AQAOPOST
  1. ;
  1. 3 ; step 3 - create primary facility entry in parameter file
  1. W !!,"STEP 3 - SET UP YOUR FACILITY IN PARAMETER FILE",!!
  1. I $D(DUZ(2)),DUZ(2)>0,$D(^AQAGP(DUZ(2))) D Q
  1. .W !,$P(^DIC(4,DUZ(2),0),U)
  1. .W " is ALREADY set up in the QI Parameter file!!"
  1. ; ask user for facility name
  1. W !! K DIC S DIC="^AUTTLOC(",DIC(0)="AEMZQ"
  1. S DIC("B")=$S('$D(DUZ(2)):"",DUZ(2)<1:"",1:$P($G(^DIC(4,DUZ(2),0)),U))
  1. S DIC("A")="Select QI FACILITY NAME: " D ^DIC
  1. Q:$D(DTOUT) Q:$D(DUOUT) Q:X="" G 3:Y=-1 S AQAOFAC=+Y
  1. 31 I $D(^AQAGP(AQAOFAC)) D Q
  1. .W !!,"This facility is ALREADY set up in the QI Parameter file!!"
  1. ;
  1. SURE ; ask user if he is sure he wants to add this facility
  1. W !! K DIR,DIC S DIR(0)="YO",DIR("B")="NO"
  1. S DIR("A")="Okay to ADD this facility to the QI PARAMETER file"
  1. S DIR("?",1)="Answer YES to create an entry in the QI Parameter file"
  1. S DIR("?",2)="for the facility you selected. Answer NO to select "
  1. S DIR("?")="another facility."
  1. D ^DIR Q:$D(DIRUT) G 3:Y=0
  1. ;
  1. ADD ; set variables and call file^dicn
  1. W !! K DD,DO,DIC,DIR S DLAYGO=9002166,DIC="^AQAGP(",DIC(0)="L"
  1. S (DINUM,X)=AQAOFAC,DIC("DR")="[AQAO PARAM ADD]"
  1. L +(^AQAGP(0)):1 I '$T D Q
  1. .W !!,"CANNOT ADD; ANOTHER USER ADDING TO THIS FILE. TRY AGAIN.",!
  1. D FILE^DICN L -(^AQAGP(0))
  1. W !!,"CREATING ENTRY . . ."
  1. I Y=-1 W !!,"**ERROR** COULD NOT CREATE ENTRY IN FILE!" G 4
  1. W !!,"ENTRY CREATED!"
  1. W !!,"To ACTIVATE any of the automatic linkages, please use the option"
  1. W !,"titled EDIT PARAMETER FILE and select the same facility."
  1. W !!
  1. Q
  1. ;
  1. ;
  1. 4 ; step 4 - set up pkg administrator
  1. W !!,"STEP 4 - DEFINE QAI PACKAGE ADMINISTRATOR",!!
  1. W !,"Due to the extra security measures implemented in this package,"
  1. W !,"no one can access the main QAI menu without having the proper"
  1. W !,"entry in the QI USER file. This step will create an entry for"
  1. W !,"the QI staff person who will be responsible for all the"
  1. W !,"administrative duties involved in running this package. This"
  1. W !,"should be a QI staff member, NOT the site manager. This person"
  1. W !,"can add more package administrators, if necessary.",!!
  1. ;
  1. I $O(^AQAO(9,"AC","QA",0)) D
  1. .W !!,"You already have a PKG ADMINISTRATOR defined."
  1. .S X=0 F S X=$O(^AQAO(9,"AC","QA",X)) Q:X="" D
  1. ..W !,"Name: ",$P(^VA(200,X,0),U)
  1. .W !!,"To bypass this step, simple enter a ""^"" at the prompt.",!!
  1. ;
  1. K DIC S DIC=200,DIC(0)="AEMQZ"
  1. S DIC("S")="I $P(^VA(200,Y,0),U,3)]"""",$P(^(0),U,11)="""""
  1. S DIC("A")="Select PERSON to be PKG ADMINISTRATOR: " D ^DIC
  1. Q:$D(DTOUT) Q:$D(DUOUT) G 4:Y=-1 S AQAOX=+Y
  1. ;
  1. I $D(^AQAO(9,"AC","QA",AQAOX)) D Q
  1. .W !!,"This person is already set up as a package administrator."
  1. .W !,"Bypassing . . ."
  1. ;
  1. I $D(^AQAO(9,"B",AQAOX)) D Q
  1. .W !!,"This person is already in the QI User file but NOT as a"
  1. .W !,"package administrator."
  1. .K DIR S DIR(0)="Y",DIR("B")="NO"
  1. .S DIR("A")="Do you want to make this user a pkg administrator"
  1. .D ^DIR I Y=1 D
  1. ..S DIE="^AQAO(9,",DA=AQAOX,DR=".06////QA" D ^DIE
  1. ;
  1. W !! K DIR S DIR(0)="Y"
  1. S DIR("A")="Ready to add this person as PKG ADMINISTRATOR"
  1. D ^DIR I Y'=1 G 4
  1. K DIC,DD,DO S DIC="^AQAO(9,",DIC(0)="L",(DINUM,X)=AQAOX
  1. S DIC("DR")=".02////"_DT_";.03////"_$G(DUZ)_";.06////QA" D FILE^DICN
  1. I Y=-1 W !!,"**ERROR** Could not create entry!"
  1. W !!,"Make sure the Package Administrator is given ALL security"
  1. W !,"keys in the AQAO namespace BUT only if QAI training has been"
  1. W !,"given by the developer OR area trainer",!!
  1. Q
  1. ;
  1. ;
  1. 5 ; step 5 - add AQAOVST to PCC Visit Merge Utility
  1. W !!,"STEP 5 - UPDATE PCC VISIT MERGE UTILITY",!!
  1. W !,"I will now add an entry for QAI into the MODULE PCC LINK CONTROL"
  1. W !,"file. This insures visit merges will be reflected in those"
  1. W !,"occurrences pointing to the affected visits.",!!
  1. Q:$D(^APCDLINK("B","QAI MGT SYSTEM")) ;already exists
  1. K DD,DO S DIC="^APCDLINK(",DIC(0)="LE",DLAYGO=9001002
  1. S DIC("DR")="1////S AQAOSAV=$G(X),X=""AQAOVST"" X ^%ZOSF(""TEST"") S X=AQAOSAV K AQAOSAV I $T D MRG^AQAOVST"
  1. S X="QAI MGT SYSTEM" D FILE^DICN
  1. Q
  1. ;
  1. ;
  1. 6 ;step 6 - kill old xrefs no longer used
  1. W !!,"STEP 6 - KILL OLD CROSS-REFERENCES NO LONGER USED",!!
  1. W !,"I will now kill any cross-references used during alpha testing"
  1. W !,"that are no longer needed by the software",!!
  1. W !,"Kill ^AQAOCC(7,""AC"")" K ^AQAOCC(7,"AC")
  1. W !,"Kill ^AQAOC(""AFF"")" K ^AQAOC("AFF")
  1. Q
  1. ;
  1. 7 ; -- convert provider data to variable pointer
  1. W !!,"CONVERTING provider data to new structure. . ."
  1. NEW X,Y,DIK K ^AQAOCC(7,"B")
  1. S X=0 F S X=$O(^AQAOCC(7,X)) Q:X'=+X D
  1. . S Y=$P(^AQAOCC(7,X,0),U) Q:Y'=+Y ;already converted
  1. . S $P(^AQAOCC(7,X,0),U)=Y_";VA(200,"
  1. S DIK="^AQAOCC(7,",DIK(1)=".01^B" D ENALL^DIK
  1. Q