AQAOEDTA ; IHS/ORDC/LJF - STUFF PCC DATA INTO OCC ;
;;1.01;QAI MANAGEMENT;;OCT 05, 1995
;
;This rtn is called by ^AQAOEDTP if PCC visit is coded for section
;user is editing. It will stuff any or all of the PCC data items into
;the appropriate QI OCC file.
;
CHOOSE ;ENTRY POINT to ask user to add PCC data for inclusion under an occ
N AQAOX,AQAOI,DIR
K DIR S DIR(0)="LO^0:"_AQAOCNT_"^K:X#1 X"
S DIR("A")="Choose which PCC items are RELEVANT for this occurrence, if any"
S DIR("?",1)="For ease of data entry, you can choose any or all of"
S DIR("?",2)="these PCC items to be linked to your occurrence. You"
S DIR("?",3)="may choose a range (1-2 or 3,6) OR type in 0 (zero) to"
S DIR("?",4)="have ALL of these linked to your occurrence."
S DIR("?")=" " D ^DIR Q:$D(DIRUT) Q:Y=-1
;
I +Y=0 S Y="" F I=1:1:AQAOCNT S Y=Y_I_"," ;user chose ALL
S AQAOX=Y F AQAOI=1:1 S X=$P(AQAOX,",",AQAOI) Q:X="" D
.K DD,DO,DIC S DIC=AQAOGBL,DIC(0)="LZ",DLAYGO=AQAOFL,X=AQAOA(+X)
.I AQAOGBL="^AQAOCC(6," S X=X_";PSDRUG("
.S DIC("DR")=".02////"_AQAOIFN_";.03////"_AQAOPAT
.D FILE^DICN Q:Y=-1
.K DIE,DA,DR S DIE=AQAOGBL,DA=+Y,DIDEL=AQAOFL
.S DR=AQAOFLD_"-E1 FIRST]"
.D ^DIE
W ! Q
AQAOEDTA ; IHS/ORDC/LJF - STUFF PCC DATA INTO OCC ;
+1 ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
+2 ;
+3 ;This rtn is called by ^AQAOEDTP if PCC visit is coded for section
+4 ;user is editing. It will stuff any or all of the PCC data items into
+5 ;the appropriate QI OCC file.
+6 ;
CHOOSE ;ENTRY POINT to ask user to add PCC data for inclusion under an occ
+1 NEW AQAOX,AQAOI,DIR
+2 KILL DIR
SET DIR(0)="LO^0:"_AQAOCNT_"^K:X#1 X"
+3 SET DIR("A")="Choose which PCC items are RELEVANT for this occurrence, if any"
+4 SET DIR("?",1)="For ease of data entry, you can choose any or all of"
+5 SET DIR("?",2)="these PCC items to be linked to your occurrence. You"
+6 SET DIR("?",3)="may choose a range (1-2 or 3,6) OR type in 0 (zero) to"
+7 SET DIR("?",4)="have ALL of these linked to your occurrence."
+8 SET DIR("?")=" "
DO ^DIR
IF $DATA(DIRUT)
QUIT
IF Y=-1
QUIT
+9 ;
+10 ;user chose ALL
IF +Y=0
SET Y=""
FOR I=1:1:AQAOCNT
SET Y=Y_I_","
+11 SET AQAOX=Y
FOR AQAOI=1:1
SET X=$PIECE(AQAOX,",",AQAOI)
IF X=""
QUIT
Begin DoDot:1
+12 KILL DD,DO,DIC
SET DIC=AQAOGBL
SET DIC(0)="LZ"
SET DLAYGO=AQAOFL
SET X=AQAOA(+X)
+13 IF AQAOGBL="^AQAOCC(6,"
SET X=X_";PSDRUG("
+14 SET DIC("DR")=".02////"_AQAOIFN_";.03////"_AQAOPAT
+15 DO FILE^DICN
IF Y=-1
QUIT
+16 KILL DIE,DA,DR
SET DIE=AQAOGBL
SET DA=+Y
SET DIDEL=AQAOFL
+17 SET DR=AQAOFLD_"-E1 FIRST]"
+18 DO ^DIE
End DoDot:1
+19 WRITE !
QUIT