source: WorldVistAEHR/trunk/r/ICR_IMMUNOLOGY_CASE_REGISTRY-IMR/IMRPRE.m@ 1482

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

initial load of WorldVistAEHR

File size: 1.2 KB
RevLine 
[613]1IMRPRE ;HCIOFO/NCA,FT-ICR Pre-Init V2.1 ;9/3/97 15:55
2 ;;2.1;IMMUNOLOGY CASE REGISTRY;;Feb 09, 1998
3 Q:+$$VERSION^XPDUTL("IMR")'>0 ;quit if virgin install
4 Q:$D(^IMR(158.8)) ;quit if pre-init has been run
5 D EN1,EN2
6 Q
7EN1 ; make file 158 data global FileMan compatible
8 D BMES^XPDUTL("Fixing ICR ACCESS VIOLATION file (158.8) data subscripts...")
9 S %X="^IMR(""SEC"",",%Y="^IMR(158.8," D %XY^%RCR K ^IMR("SEC")
10 K %X,%Y,X
11 Q
12EN2 ; postpone data extract
13 D BMES^XPDUTL("Unscheduling IMR REGISTRY DATA option while the installation is running...")
14 K IMRAR
15 S IMRDA=$O(^DIC(19,"B","IMR REGISTRY DATA",0)) Q:'IMRDA
16 D FIND^DIC(19.2,"","2","Q",IMRDA,"","B","","","IMRAR")
17 S IMRLOOP=0
18 F S IMRLOOP=$O(IMRAR("DILIST",2,IMRLOOP)) Q:'IMRLOOP D
19 .S IMRIEN=+$G(IMRAR("DILIST",2,IMRLOOP)) Q:'IMRIEN
20 .S IMRDATE=$$GET1^DIQ(19.2,IMRIEN,2,"I")
21 .S IMRFREQ=$$GET1^DIQ(19.2,IMRIEN,6,"I")
22 .Q:IMRDATE<$$NOW^XLFDT ;quit if queued time is in past
23 .Q:IMRFREQ="" ;quit if no rescheduling frequency
24 .S IMRNDATE=$$FMADD^XLFDT(IMRDATE,7) ;add 7 days to schedule date
25 .S IMR192(19.2,IMRIEN_",",2)=IMRNDATE
26 .D FILE^DIE("K","IMR192","IMRERR")
27 .Q
28 K IMR192,IMRAR,IMRDA,IMRDATE,IMRFREQ,IMRIEN,IMRLOOP,IMRNDATE,X,Y
29 Q
Note: See TracBrowser for help on using the repository browser.