source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVXCH0.m@ 1604

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1GMRVXCH0 ;HIRMFO/RM,YH-CONVERT QUALIFIER/CATEGORY FILES ;4/22/97
2 ;;4.0;Vitals/Measurements;;Apr 25, 1997
3EN ; Driver to run both qualifier and Category Conversions
4 ;
5 ; Check to see if Conversion run
6 Q:+$G(^GMRD(120.57,1,"PHASEI"))>0
7 D BMES^XPDUTL("Running Qualifier/Category Conversion...")
8 ;
9 ; Build conversion tables (Char. and Cat.).
10 D ^GMRVXCHT
11 ;
12 ; Move data from 120.53 to 120.52 file.
13 D MOVE53^GMRVXCH2
14 ;
15 ; Kill off data in 120.53 file.
16 S GMRVZERO=$P($G(^GMRD(120.53,0)),"^",1,2)
17 I GMRVZERO="" S GMRVZERO="GMRV VITAL CATEGORY^120.53"
18 K ^GMRD(120.53) S ^GMRD(120.53,0)=GMRVZERO
19 ;
20 ; Kill of xrefs in 120.52 and 120.53 files.
21 F GMRVFILE=120.52,120.53 D
22 . S DA(1)="" F S DA(1)=$O(^GMRD(GMRVFILE,DA(1))) Q:DA(1)="" D
23 . . I DA(1)>0 S DA="A" F S DA=$O(^GMRD(GMRVFILE,DA(1),1,DA)) Q:DA="" K ^GMRD(GMRVFILE,DA(1),1,DA)
24 . . I DA(1)'>0,DA(1)'=0 K ^GMRD(GMRVFILE,DA(1))
25 . . Q
26 . Q
27 ;
28 ; Build GMRV Vital Category file from ^TMP($J,"GMRVCAT")
29 D CONV53^GMRVXCH3
30 ;
31 ; Convert GMRV Vital Qualifier entries from ^TMP($J,"GMRVCHAR")
32 D CONV52^GMRVXCH2
33 ;
34 ; Update Conversion Flag in 120.57 file.
35 S DIK="^GMRD(120.52," D IXALL^DIK
36 S DIK="^GMRD(120.53," D IXALL^DIK
37 S $P(^GMRD(120.57,1,"PHASEI"),"^")=1
38 ;
39 ; Clean up and quit
40 K ^TMP($J,"GMRVCHAR"),^TMP($J,"GMRVCAT"),DA,GMRVFILE,GMRVZERO
41 Q
42EN1 ; Post-init tasks for Qualifier and Category Conversions
43 ; Add new qualifier/categories and re-index 120.52 and 120.53 files in post-init.
44 ;
45 Q:+$G(^GMRD(120.57,1,"PHASEII"))>0
46 D ADDCAT^GMRVXCH1 D BMES^XPDUTL("Re-indexing 120.53 file...")
47 S DIK="^GMRD(120.53," D IXALL^DIK
48 D ADDCHAR^GMRVXCH1 D BMES^XPDUTL("Re-indexing 120.52 file...")
49 S DIK="^GMRD(120.52," D IXALL^DIK
50 ;CONVERT DEFAULT TEXT TO POINTER TO 120.52 IN 120.53 FILE
51 K DIK D DEFAULT^GMRVXCH3
52 Q
Note: See TracBrowser for help on using the repository browser.