source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGRUGSEE.m@ 648

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1DGRUGSEE ;ALB/GRR - BACKGROUND CHECKER FOR MASTER FILE CHANGES ;10/19/99 11:00
2 ;;5.3;Registration;**190,381,427**;Aug 13, 1993
3 Q:'$D(^DGRU(46.11,"AC"))
4 I $D(^DGRU(46.11,"AC",2)) D ;Check for Patient SSN changes
5 .N DGFIEN S DGFIEN="" F S DGFIEN=$O(^DGRU(46.11,"AC",2,DGFIEN)) Q:DGFIEN'>0 D ;Loop through all SSN changes and call A08 builder
6 ..N SSN S SSN=$$GET1^DIQ(46.11,DGFIEN,.01,"I")
7 ..N DGOSSN S DGOSSN=$$GET1^DIQ(46.11,DGFIEN,.02,"I")
8 ..N DGDA S (DGDA,DFN)=$$GET1^DIQ(46.11,DGFIEN,.04,"I")
9 ..N DGRES S DGRES=$$BLDA08^DGRUGBJ(DFN,"","DGZZ","",DGOSSN)
10 ..S DIK="^DGRU(46.11,",DA=DGFIEN D ^DIK K DIK
11 K ^TMP($J,"DGRUGMFU")
12 S DGSENM="DGRU-RAI-MFU-SERVER",DGRSIED=$O(^ORD(101,"B",DGSENM,0))
13 D INIT^HLFNC2(DGSENM,.HL)
14 S DGRUHLP("PRIORITY")="I"
15 I $O(HL(""))']"" D Q
16 .S HLERR(1)=HL
17 S DGFILE=0 F S DGFILE=$O(^DGRU(46.11,"AC",DGFILE)) Q:DGFILE="" S DGFIEN=0 F S DGFIEN=$O(^DGRU(46.11,"AC",DGFILE,DGFIEN)) Q:DGFIEN="" D
18 .I DGFILE=36 G DEL ;p-427
19 .I DGFILE=42 S DGFNAME="WARD",DGTYPE="LOCATION",DGSEG="LOC"
20 .I DGFILE=200 G DEL ;p-427
21 .I DGFILE=405.4 S DGFNAME="ROOM-BED",DGTYPE="LOCATION",DGSEG="LOC"
22 .I $G(DGSEG)="" G DEL
23 .S DGFOUND=0,DGRNEWN=$$GET1^DIQ(46.11,DGFIEN,.01)
24 .S DGROLDN=$$GET1^DIQ(46.11,DGFIEN,.02)
25 .S DGCIEN=$$GET1^DIQ(46.11,DGFIEN,.04) G:DGCIEN="" DEL
26 .I DGFILE=42 S DGWARD=DGCIEN I '$$CHKWARD^DGRUUTL(DGCIEN) G DEL ;p-381 changed
27 .I DGFILE=405.4 S DGWARD=0 F S DGWARD=$O(^DG(405.4,DGCIEN,"W",DGWARD)) Q:DGWARD'>0 I $$CHKWARD^DGRUUTL(DGWARD) S DGFOUND=1 Q
28 .I DGFILE=405.4,'DGFOUND G DEL
29 .D ENC^DGRUUTL(DGSEG,DGTYPE,DGFILE,DGFNAME,DGROLDN,DGRNEWN,DGRSIED,DGCIEN)
30DEL .S DIK="^DGRU(46.11,",DA=DGFIEN D ^DIK K DIK
31 Q
Note: See TracBrowser for help on using the repository browser.