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

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

initial load of FOIAVistA 6/30/08 version

File size: 3.0 KB
Line 
1DG53665O ;ALB/BRM,LBD;DG*5.3*665 PRE-INSTALL ; 5/23/05 10:22am
2 ;;5.3;Registration;**665**;Aug 13,1993
3 ;;
4 ; This pre-install routine will transmit all Korean DMZ Agent Orange
5 ; veterans to the HEC.
6 ;
7AOQUE ; Que job to run
8 N ZTRTN,ZTDESC,ZTSAVE,ZTSK,ZTDTH,ZTQUEUED,ZTIO
9 ;
10 D BMES^XPDUTL(" This process will find all Agent Orange Veterans who have")
11 D MES^XPDUTL(" an Agent Orange Location of Korean DMZ and transmit them to")
12 D MES^XPDUTL(" the Health Eligibility Center.")
13 D MES^XPDUTL(" ")
14 ;
15 S ZTRTN="FIND^DG53665O",ZTIO="",ZTDTH=$$NOW^XLFDT()
16 S ZTDESC="DG*5.3*665 PRE-INSTALL PROCESS"
17 D ^%ZTLOAD,HOME^%ZIS
18 I '$G(ZTSK) D BMES^XPDUTL("Pre-install process was not tasked.") Q
19 D BMES^XPDUTL("Pre-install process has been tasked as Task #"_ZTSK)
20 Q
21 ;
22FIND ; entry point
23 ;
24 N DFN,X1,X2,X
25 ;
26 K ^XTMP("DG53665O")
27 S X1=DT,X2=90 D C^%DTC
28 S ^XTMP("DG53665O",0)=X_"^"_$$NOW^XLFDT_"^DG*5.3*665 PRE-INSTALL"
29 S ^XTMP("DG53665O",0,"TASK")=$G(ZTSK)
30 ;
31 S DFN=0
32 F S DFN=$O(^DPT(DFN)) Q:'DFN D
33 .S ^XTMP("DG53665O","TCNT")=$G(^XTMP("DG53665O","TCNT"))+1
34 .;
35 .; quit if patient is deceased
36 .Q:$P($G(^DPT(DFN,.35)),"^")
37 .; quit - patient does not have the AO Exposure Indicator set to 'YES'
38 .Q:$P($G(^DPT(DFN,.321)),"^",2)'="Y"
39 .; quit if the patient does not show 'Korean DMZ' as the AO Location
40 .Q:$P($G(^DPT(DFN,.321)),"^",13)'="K"
41 .; process HL7 transmission
42 .D EVENT^IVMPLOG(DFN)
43 .S ^XTMP("DG53665O","DATA",DFN)=""
44 .S ^XTMP("DG53665O","CNT")=$G(^XTMP("DG53665O","CNT"))+1
45 .Q
46 ;
47 S $P(^XTMP("DG53665O",0),"^",4)=$$NOW^XLFDT
48 ;
49 ; send message for AO job
50 D SNDMSG
51 Q
52 ;
53 ;
54SNDMSG ; Send Mailman bulletin when process completes
55 N SITE,STATN,SITENM,XMDUZ,XMSUB,XMY,XMTEXT,MSG
56 S SITE=$$SITE^VASITE,STATN=$P($G(SITE),U,3),SITENM=$P($G(SITE),U,2)
57 S:$$GET1^DIQ(869.3,"1,",.03,"I")'="P" STATN=STATN_" [TEST]"
58 S XMDUZ="AO-KOREAN DMZ TRANSMISSION JOB",XMSUB=XMDUZ_" - "_STATN
59 S XMY(DUZ)=""
60 S XMTEXT="MSG("
61 S MSG(1)="The Agent Orange Korean DMZ transmission process has completed successfully."
62 S MSG(2)="This process searched for patient records with an Agent Orange Exposure"
63 S MSG(3)="Location of Korean DMZ, and queued the record for a Z07 transmission to"
64 S MSG(4)="the Health Eligibility Center. "
65 S MSG(4.5)=""
66 S MSG(5)="Task: "_$G(^XTMP("DG53665O",0,"TASK"))
67 S MSG(6)="Site Station Number: "_STATN
68 S MSG(7)="Site Name: "_SITENM
69 S MSG(8)=""
70 S MSG(9)="Process started : "_$$FMTE^XLFDT($P($G(^XTMP("DG53665O",0)),U,2))
71 S MSG(10)="Process completed : "_$$FMTE^XLFDT($P($G(^XTMP("DG53665O",0)),"^",4))
72 S MSG(10.5)=""
73 S MSG(11)="Total Patients processed : "_+$G(^XTMP("DG53665O","TCNT"))
74 S MSG(12)="AO Korean DMZ rec. queued for transmission : "_+$G(^XTMP("DG53665O","CNT"))
75 S MSG(12.5)=""
76 S MSG(13)="For identification of the patients for whom the AO Korean DMZ job"
77 S MSG(14)=" sent a record to HEC, you can review the following global:"
78 S MSG(15)=" ^XTMP(""DG53665O"",""DATA"",DFN)"
79 S MSG(16)=" DFN = internal entry number of the Patient file (#2)."
80 D ^XMD
81 Q
Note: See TracBrowser for help on using the repository browser.