VistA-FOIAVistA/r/SPINAL_CORD_DYSFUNCTION-SPN/SPN22E.m

23 lines
719 B
Mathematica
Raw Normal View History

SPN22E ;SD/CM- ENVIRONMENT CHECK FOR SPN*2.0*22;7/12/2004
;;2.0;Spinal Cord Dysfunction;**22**;01/02/97
;
EN ;ENTRY
N ROU,TEST,VER,X,ZAP,P21
S ROU="SPNFMENU"
D CHK
I $G(ZAP)=1 S XPDABORT=2 W !,"***SPN*2.0*22 ABORTED***",! D EXIT Q
I $G(ZAP)=1 S XPDABORT=2 W !,"***SPN*2.0*22 ABORTED***",! D EXIT Q
W !,"***Environment is fine***",!
K ROU,TEST,VER,ZAP,P21
Q
CHK ;CHECK FOR PATCH SPN*2*21
S X="S TEST=$T(+2^"_ROU_")" X X
S VER=$P(TEST,";",3),P21=$P(TEST,";",5)
I VER="" W !,"This account is missing some SPN routines!" S ZAP=1 Q
I VER'[2 W !,"This is not the current version of Spinal Cord!" S ZAP=1 Q
I P21'[21 W !,"Routine: ",ROU," is missing patch SPN*2*21" S ZAP=1
Q
EXIT ;
K ROU,TEST,VER,ZAP,P21
Q