VistA-WorldVistAEHR/r/OCCURRENCE_SCREEN-QAO/QAOSCREE.m

37 lines
1.5 KiB
Mathematica

QAOSCREE ;HISC/JES,DAD-ADD OR CHANGE VAMC SPECIFIC OCCURRENCE SCREENS ;2/4/93 08:11
;;3.0;Occurrence Screen;;09/14/1993
;THIS ROUTINE PROVIDES THE OPTION TO ADD VAMC-SPECIFIC SCREENS IN THE
;RANGE OF 201 TO 999.99, AND ALSO TO ENTER CORRESPONDING EXCEPTIONS
EDSCREE ;
R !!,"Select SCREEN: ",X:DTIME S:'$T X="^" G:(X="")!(X="^") EXIT
I X?1.N.NP,((X<101)!(X>999.99)!($P($G(^QA(741.1,+X,0)),"^",4)="N")) D G EDSCREE
. W " ??",*7,!
. W !?5,"Answer with a number from 101 to 999.99."
. W !?5,"You may not select 'NATIONAL' screens."
. Q
S (DIC,DIE)="^QA(741.1,",DIC("A")="Select SCREEN: ",DIC(0)="ELMQZ"
S DIC("S")="I $P(^(0),""^"",4)'=""N""",(DIDEL,DLAYGO)=741.1
D ^DIC K DIC("S") G:+Y=-1 EDSCREE S (QAPOINT,DA)=+Y
S DR=".01;1T;2T;100//LOCAL" D ^DIE
D:'$D(DA) KILLXCPT G:('$D(DA))!($D(Y)) EDSCREE
I $D(^QA(741.1,QAPOINT,0))#2,$P(^(0),"^",4)'>0 D EDEXCPT
G EDSCREE
EDEXCPT ;
S (DIC,DIE)="^QA(741.5,",DIC("A")="Select REASON FOR EXCEPTION: "
S DIC(0)="AELMQ",DIC("DR")="",(DIDEL,DLAYGO)=741.5
S DIC("S")="I $P(^QA(741.5,+Y,0),""^"",2)=QAPOINT"
D ^DIC K DIC("DR"),DIC("S") Q:+Y=-1
S DA=+Y,DR="1///`"_QAPOINT_";.01;.02;100//ACTIVE"
D ^DIE Q:$D(Y)
G EDEXCPT
KILLXCPT ;
S DIK="^QA(741.5,"
F QADA=0:0 S QADA=$O(^QA(741.5,"C",QAPOINT,QADA)) Q:QADA'>0 S DA=QADA D ^DIK
S DIK="^QA(741.4," F QADA(0)=0:0 S QADA(0)=$O(^QA(741.4,"AC",QAPOINT,QADA(0))) Q:QADA(0)'>0 F QADA=0:0 S QADA=$O(^QA(741.4,"AC",QAPOINT,QADA(0),QADA)) Q:QADA'>0 S DA=QADA D ^DIK
K DA,DIK,QADA
Q
EXIT ;
K DA,DIC,DIE,DIK,DR,DIDEL,DLAYGO,QAPOINT,QADA,X,Y
K %,%H,C,D0,DI,DQ,I,Y,Z,DG,DK,DL
Q