source: FOIAVistA/trunk/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/PXAIIMM.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1PXAIIMM ;ISL/PKR - Set the IMMUNIZATION nodes. ;12/18/97
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**45,124**;Aug 12, 1996
3 ;
4IMM ;Main entry point.
5 ;
6 K PXAERR
7 S PXAERR(8)=PXAK
8 S PXAERR(7)="IMMUNIZATION"
9 ;
10 N IND,PXAA
11 S IND=""
12 F S IND=$O(@PXADATA@("IMMUNIZATION",PXAK,IND)) Q:IND="" D
13 . S PXAA(IND)=@PXADATA@("IMMUNIZATION",PXAK,IND)
14 ;
15 ;Validate the data.
16 N STOP
17 D VAL^PXAIIMMV
18 I $G(STOP) Q
19 ;
20SETVARA ;Set the after visit variables.
21 N AFTER0,AFTER12,AFTER811,AFTER812
22 S $P(AFTER0,U,1)=$G(PXAA("IMMUN"))
23 I $G(PXAA("DELETE")) S $P(AFTER0,U,1)="@"
24 S $P(AFTER0,U,2)=$G(PATIENT)
25 S $P(AFTER0,U,3)=$G(PXAVISIT)
26 S $P(AFTER0,U,4)=$G(PXAA("SERIES"))
27 S $P(AFTER0,U,6)=$G(PXAA("REACTION"))
28 S $P(AFTER0,U,7)=$G(PXAA("CONTRAINDICATED"))
29 S $P(AFTER0,U,8)=$G(PXAA("DIAGNOSIS"))
30 S $P(AFTER0,U,9)=$G(PXAA("DIAGNOSIS 2"))
31 S $P(AFTER0,U,10)=$G(PXAA("DIAGNOSIS 3"))
32 S $P(AFTER0,U,11)=$G(PXAA("DIAGNOSIS 4"))
33 S $P(AFTER0,U,12)=$G(PXAA("DIAGNOSIS 5"))
34 S $P(AFTER0,U,13)=$G(PXAA("DIAGNOSIS 6"))
35 S $P(AFTER0,U,14)=$G(PXAA("DIAGNOSIS 7"))
36 S $P(AFTER0,U,15)=$G(PXAA("DIAGNOSIS 8"))
37 S $P(AFTER12,U,1)=$G(PXAA("EVENT D/T"))
38 S $P(AFTER12,U,4)=$G(PXAA("ENC PROVIDER"))
39 S $P(AFTER811,U,1)=$G(PXAA("COMMENT"))
40 ;
41 ;--PACKAGE AND SOURCE
42 S $P(AFTER812,"^",2)=$G(PXAPKG)
43 S $P(AFTER812,"^",3)=$G(PXASOURC)
44 ;
45 S ^TMP("PXK",$J,"IMM",PXAK,0,"AFTER")=AFTER0
46 S ^TMP("PXK",$J,"IMM",PXAK,12,"AFTER")=AFTER12
47 S ^TMP("PXK",$J,"IMM",PXAK,811,"AFTER")=AFTER811
48 S ^TMP("PXK",$J,"IMM",PXAK,812,"AFTER")=AFTER812
49 ;
50SETVARB ;Set the before variables.
51 N BEFOR0,BEFOR12,BEFOR811,BEFOR812
52 N IENB,PXAAX,PXBCNT,PXBKY,PXBSKY,PXBSAM
53 D IMM^PXBGIMM(PXAVISIT)
54 ;
55 S IENB=""
56 I PXBCNT>0 D
57 . S PXAAX("IMMUN")=$P($G(^AUTTIMM(PXAA("IMMUN"),0)),U,1)
58 . S IENB=$O(PXBKY(PXAAX("IMMUN"),IENB))
59 I $G(IENB) D
60 . S BEFOR0=$G(^AUPNVIMM(IENB,0))
61 . S BEFOR12=$G(^AUPNVIMM(IENB,12))
62 . S BEFOR811=$G(^AUPNVIMM(IENB,811))
63 . S BEFOR812=$G(^AUPNVIMM(IENB,812))
64 E S (BEFOR0,BEFOR11,BEFOR12,BEFOR811,BEFOR812)=""
65 ;
66 S ^TMP("PXK",$J,"IMM",PXAK,0,"BEFORE")=BEFOR0
67 S ^TMP("PXK",$J,"IMM",PXAK,12,"BEFORE")=BEFOR12
68 S ^TMP("PXK",$J,"IMM",PXAK,811,"BEFORE")=BEFOR811
69 S ^TMP("PXK",$J,"IMM",PXAK,812,"BEFORE")=BEFOR812
70 S ^TMP("PXK",$J,"IMM",PXAK,"IEN")=IENB
71 ;
72 Q
Note: See TracBrowser for help on using the repository browser.