source: FOIAVistA/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLPAT19.m@ 1328

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

initial load of FOIAVistA 6/30/08 version

File size: 990 bytes
Line 
1HLPAT19 ;SFIRMFO/RSD Pre & Post Install for HL7 patch 19 ;11/20/98 09:54
2 ;;1.6;HEALTH LEVEL SEVEN;**19**;JUL 17, 1995
3 ;
4 ;check that conversion already run
5 I @XPDGREF@("POST") D BMES^XPDUTL("Conversion already run!") Q
6 ;convert pointer in File 772 to Date/Time
7 L +^HL(772),+^HLMA
8 S XPDIDCNT=0,XPDIDTOT=+$P(^HL(772,0),U,4)
9 N DA2,DA3,DIK,MID,MDT,WORK,X,Y
10 S (DA2,WORK)=0
11 ;find pointers to file 773 = DA3
12 F S DA2=$O(^HL(772,DA2)) Q:'DA2 S DA3=+$G(^(DA2,0)) D:DA3
13 . ;quit if pointer to 773 doesn't exist
14 . Q:'$D(^HLMA(DA3,0))
15 . S MDT=$P(^HLMA(DA3,0),U),WORK=1
16 . D CNV2(DA2)
17 . S XPDIDCNT=XPDIDCNT+1 D:'(XPDIDCNT#10) UPDATE^XPDID(XPDIDCNT)
18 ;
19 ;nothing was converted
20 I 'WORK L Q
21 ;remove all remaining entries in 773
22 S DA3=0
23 F S DA3=$O(^HLMA(DA3)) Q:DA3="" K ^HLMA(DA3)
24 ;re-index file 773
25 S DIK="^HLMA(",DIK(1)=.01 D ENALL^DIK
26 L
27 Q
28CNV2(DA) ;convert .01 field in 772 from pointer to Date/Time
29 K ^HL(772,"B",DA3,DA)
30 S $P(^HL(772,DA,0),U)=MDT,^HL(772,"B",MDT,DA)=""
31 Q
Note: See TracBrowser for help on using the repository browser.