source: WorldVistAEHR/trunk/r/ICR_IMMUNOLOGY_CASE_REGISTRY-IMR/IMRSOPT.m@ 1764

Last change on this file since 1764 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1IMRSOPT ;ISC-SF/JLI,HCIOFO/FT-SET UP FOR QUEUEING OF DATA COLLECTION ;1/23/98 14:53
2VER ;;2.1;IMMUNOLOGY CASE REGISTRY;;Feb 09, 1998
3 ;[IMR QUE DATA COLLECT] - Queue Registry Data Collection
4 S X="IMR REGISTRY DATA",DIC(0)="MX",DIC=19 D ^DIC I Y'>0 W:'$D(IMRPOSTI) !,$C(7),"Can't identify the 'IMR REGISTRY DATA' option in the option file",! Q
5 S %H=$H D YMD^%DTC S IMRX="T"_$S($E(%_"000000",2,5)>1745:"+1",1:"")_"@1800"
6 I '$D(^DIC(19.2,0)) D G KILL
7 .W !!,"Sorry, cannot schedule this option to run because the OPTION SCHEDULING",!,"file (19.2) doesn't exist.",!!
8 .Q
9 I $D(^DIC(19.2,0)) D
10 . N DIC,DIE,DLAYGO,DR,DA
11 . S DIC(0)="ML",DIC="^DIC(19.2,",X="IMR REGISTRY DATA",DLAYGO=19.2
12 . D ^DIC Q:Y'>0
13 . S DA=+Y S DIE="^DIC(19.2,",DR="2///"_IMRX_";6///1D;" D ^DIE
14 W:'$D(IMRPOSTI) !!,"The National Registry Data Collection has been queued to run at ",IMRX,!,"and will be automatically requeued at 24 hour intervals",!!
15KILL K DA,DR,DIE,DIC,IMRX,%,%H,Y,%DT,%I,%T,%X,%Y,D,D0,DI,DQ,I,X,DISYS,POP
16 Q
17 ;
18CHEK ; called from [IMR MENU (MANAGEMENT)] entry action
19 W:$D(IOF) @IOF W !,"ICR PACKAGE VERSION ",$P($T(VER),";",3)
20 I '$D(^XUSEC("IMRMGR",DUZ)) S IMRLOC="CHEK^IMRSOPT" D ACESSERR^IMRERR,H^XUS K IMRLOC
21 I '$D(^IMR(158.9,1,0)) W !?10,$C(7),"Site Parameter File needs to be initialized",! Q
22 S X=^IMR(158.9,1,0),X1=$P(X,U,9),X2=$P(X,U,10) I X1=""&(X2="") W !!,"The data collection option has not been run yet",!! K X,X1,X2 Q
23 I X2="",X1>0 W !,"The data collection option apparently started running for the first time ",! S X=X1 D PDATE W !! K X,X1,X2 Q
24 I X2<X1 W !,"The data collection option last finished " S X=X2 D PDATE W !?3,"and started running again " S X=X1 D PDATE W !! K X1,X2,X Q
25 I X2>X1 W !!?3,"The data collection option last was run between ",!!?5 S X=X1 D PDATE W " and " S X=X2 D PDATE W ! K X,X1,X2
26 Q
27 ;
28PDATE S %=$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3)_" ",X=$E($P(X,".",2)_"000000",1,6),%=%_$E(X,1,2)_":"_$E(X,3,4)_":"_$E(X,5,6) W % K %
29 Q
30 ;
Note: See TracBrowser for help on using the repository browser.