APCLRPT ; IHS/CMI/LAB - INTERACTIVE ROUTINE FOR DATA FETCHER ;
;;2.0;IHS PCC SUITE;;MAY 14, 2009
;
CREATE ; - ENTRY POINT - from menu option to create report template
S DIR(0)="FO^3:30",DIR("A")="ENTER THE NAME OF A NEW REPORT TEMPLATE",DIR("?",1)="Enter a name, 3-30 characters long for a report template. This option for",DIR("?")="creation of new report templates only." D ^DIR K DIR
I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT)!(X="") Q
S APCLA=0 F S APCLA=$O(^APCLRPT("B",X,APCLA)) Q:'APCLA I $P(^APCLRPT(APCLA,0),U,2)=DUZ W !,*7,"This option for creation of new report templates only!",! Q
G:APCLA CREATE
S DIC="^APCLRPT(",DIC("DR")=".02////"_DUZ,DIC(0)="EL",DIADD=1,DLAYGO=9001200 D ^DIC K DIC,DIADD
I Y>0 S APCLRPT=+Y D DATA
E W !,*7 Q
K APCLA
W ! G CREATE
Q
;
EDIT ; - ENTRY POINT - from menu option to modify/delete report template
S DIC="^APCLRPT(",DIC(0)="AEMQ" D ^DIC K DIC
I Y>0 S APCLRPT=+Y
E Q
D DATA
W ! G EDIT
Q
;
DATA ; Enter or edit field values
S DR=".01;1101;2101;3101",DR(2,9001200.03101)=".01;1101;2101",DA=APCLRPT,DIE="^APCLRPT(" D ^DIE K DIE,DR
K APCLRPT
Q
;
PRINT ; - ENTRY POINT - for print option from report template menu
;S DIC="^APCLRPT(",DIC(0)="AEMQ",DIC("S")="I $P(^(0),U,2)=DUZ" D ^DIC K DIC
S DIC="^APCLRPT(",DIC(0)="AEMQ" D ^DIC K DIC ;FORGET THE SCREEN IHS/OKCAO/POC 4/20/97
I Y>0 S APCLRPT=+Y
E Q
D START1^APCLASK(APCLRPT)
K APCLRPT
Q
;
APCLRPT ; IHS/CMI/LAB - INTERACTIVE ROUTINE FOR DATA FETCHER ;
+1 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
+2 ;
CREATE ; - ENTRY POINT - from menu option to create report template
+1 SET DIR(0)="FO^3:30"
SET DIR("A")="ENTER THE NAME OF A NEW REPORT TEMPLATE"
SET DIR("?",1)="Enter a name, 3-30 characters long for a report template. This option for"
SET DIR("?")="creation of new report templates only."
DO ^DIR
KILL DIR
+2 IF $DATA">DATA">DATA">DATA">DATA">DATA">DATA">DATA(DTOUT)!$DATA">DATA">DATA">DATA">DATA">DATA">DATA">DATA(DUOUT)!$DATA">DATA">DATA">DATA">DATA">DATA">DATA">DATA(DIRUT)!$DATA">DATA">DATA">DATA">DATA">DATA">DATA">DATA(DIROUT)!(X="")
QUIT
+3 SET APCLA=0
FOR
SET APCLA=$ORDER(^APCLRPT("B",X,APCLA))
IF 'APCLA
QUIT
IF $PIECE(^APCLRPT(APCLA,0),U,2)=DUZ
WRITE !,*7,"This option for creation of new report templates only!",!
QUIT
+4 IF APCLA
GOTO CREATE
+5 SET DIC="^APCLRPT("
SET DIC("DR")=".02////"_DUZ
SET DIC(0)="EL"
SET DIADD=1
SET DLAYGO=9001200
DO ^DIC
KILL DIC,DIADD
+6 IF Y>0
SET APCLRPT=+Y
DO DATA
+7 IF '$TEST
WRITE !,*7
QUIT
+8 KILL APCLA
+9 WRITE !
GOTO CREATE
+10 QUIT
+11 ;
EDIT ; - ENTRY POINT - from menu option to modify/delete report template
+1 SET DIC="^APCLRPT("
SET DIC(0)="AEMQ"
DO ^DIC
KILL DIC
+2 IF Y>0
SET APCLRPT=+Y
+3 IF '$TEST
QUIT
+4 DO DATA
+5 WRITE !
GOTO EDIT
+6 QUIT
+7 ;
DATA ; Enter or edit field values
+1 SET DR=".01;1101;2101;3101"
SET DR(2,9001200.03101)=".01;1101;2101"
SET DA=APCLRPT
SET DIE="^APCLRPT("
DO ^DIE
KILL DIE,DR
+2 KILL APCLRPT
+3 QUIT
+4 ;
PRINT ; - ENTRY POINT - for print option from report template menu
+1 ;S DIC="^APCLRPT(",DIC(0)="AEMQ",DIC("S")="I $P(^(0),U,2)=DUZ" D ^DIC K DIC
+2 ;FORGET THE SCREEN IHS/OKCAO/POC 4/20/97
SET DIC="^APCLRPT("
SET DIC(0)="AEMQ"
DO ^DIC
KILL DIC
+3 IF Y>0
SET APCLRPT=+Y
+4 IF '$TEST
QUIT
+5 DO START1^APCLASK(APCLRPT)
+6 KILL APCLRPT
+7 QUIT
+8 ;