source: FOIAVistA/trunk/r/HEALTH_SUMMARY-GMTS/GMTSPREI.m@ 812

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1GMTSPREI ;SLC/SBW - GMTS* Preinit ;4/18/95
2 ;;2.7;Health Summary;;Oct 20, 1995
3MAIN ; Controls branching
4 N GMI
5 W !!,"First I need to run a pre-init...."
6 W !,"Starting pre-init now...."
7 S GMTSIST=$$NOW
8 D APPGRP,RENMED
9 D DELFLD ;Entry point to delete obsolete fields in file #142
10 W !,"Pre-init successfully completed!"
11 Q
12APPGRP ; Add "GMTS" Application Group to file 60, 71, 120.51, 9999999.64,
13 ; 9001017, and 811.9. Done only if not there already.
14 N GMI
15 F GMI=60,71,120.51,9999999.64,9001017,811.9 I '$D(^DIC(GMI,"%","B","GMTS")) K DD,DO S DIC="^DIC("_GMI_",""%"",",DIC(0)="L",DA(1)=GMI,X="GMTS" D FILE^DICN K DIC,DA W:+Y>0 !!,"Adding ""GMTS"" Application Group to ^DIC("_GMI_",",!
16 Q
17RENMED ; Rename medicine summary comp. abbreviation
18 N GMDA,DA,DIE,DR
19 Q:+$D(^GMT(142.1))'>0
20 F X="MEDICINE SUMMARY" D
21 . S DIC=142.1,DIC(0)="X" D ^DIC I +Y'>0 Q
22 . S DIE=142.1,DR="3///MEDS",DA=+Y D ^DIE
23 . W !!,"** Renaming Medicine Summary Abbreviation from MED to MEDS **"
24 Q
25DELFLD ; Deletes obsolete fields in Health Summary Type (#142) file
26 N DIK,DA,GMX,DIU
27 Q:+$D(^GMT(142))'>0
28 F GMX=2,3,4,5,6 D
29 . S DA=GMX,DIK="^DD(142,"
30 . D ^DIK W !,"Deleting field # ",GMX," in the Health Summary Type (#142) file."
31 F DIU=142.02,142.05,142.06 S DIU(0)="S" D EN^DIU2
32 Q
33NOW() ; Extrinsic special variable to return current date/time
34 N %,%H,%I,X
35 D NOW^%DTC
36 Q +$G(%)
Note: See TracBrowser for help on using the repository browser.