VistA-WorldVistAEHR/r/ICR_IMMUNOLOGY_CASE_REGISTR.../IMRSPRAM.m

26 lines
1.4 KiB
Mathematica

IMRSPRAM ;ISC-SF/JLI-SET UP SITE PARAMETERS ;7/10/98 08:24
;;2.1;IMMUNOLOGY CASE REGISTRY;**3,8**;Feb 09, 1998
Q
IMR ;[IMR SPF ENTER/EDIT] - Enter/Edit Immunology Study Site Parameter
I $O(^IMR(158.9,0))'>0 D STN I $O(^IMR(158.9,0))'>0 W !!,$C(7),"MUST HAVE A VALID STATION NUMBER FROM THE INSTITUTION FILE",!! G KILL
I '$D(^XUSEC("IMRMGR",DUZ)) S IMRLOC="IMRSPRAM" D ACESSERR^IMRERR,H^XUS
S IMRANS="",DA=1,DR=".07:1;4:10",DIE="^IMR(158.9,",DIE("P")=158.9 D ^DIE S:$D(DTOUT) IMRANS="^" G:IMRANS="^" KILL D LAB1
D KILL
Q
LAB ;[IMR LAB TEST ENTRY] - Link Local Lab to National Lab File
D LAB1,KILL Q
LAB1 ; Enter/Edit Link Local Lab to National Lab File
I $O(^IMR(158.9,0))'>0 D STN
S IMRLFLG=1 F IMRI=0:0 S IMRI=$O(^IMR(158.95,IMRI)) Q:IMRI'>0 I '$D(^IMR(158.9,1,3,"B",IMRI)) S X=$P(^IMR(158.95,IMRI,0),U),DLAYGO=158.9,DIC(0)="ML",DIC="^IMR(158.9,1,3,",DA(1)=1,DIC("P")=158.93 D ^DIC
K DIC,DIE,DA
S IMRANS="" F IMRI=0:0 S DIC="^IMR(158.9,1,3,",DA(1)=1,DIC(0)="AEQM" D ^DIC S:$D(DTOUT)!($D(DUOUT)) IMRANS="^" Q:IMRANS="^"!(Y<1) S DA=+Y,DR="1;",DIE=DIC D ^DIE S:$D(DTOUT) IMRANS="^"
K IMRLFLG,DIC,DIE,DA,DR
Q
STN ; Get/Create Station Number for Site Parameter file
S DIC="^DIC(4,",DIC(0)="AEQM" D ^DIC
Q:'Y K DIC S X=$P(Y,U,2),DIC="^IMR(158.9,",DLAYGO=158.9,DIC(0)="ML" D ^DIC,KILL
Q
KILL ; Kill variables used
K DLAYGO,DIC,X,X1,DIE,DR,DA,DTOUT,DUOUT,IMRI,D1,IMRANS,IMRLOC,I,%,%H,D0,DI,DQ,Y,D,DISYS,%Y,POP
Q