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

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

initial load of FOIAVistA 6/30/08 version

File size: 3.8 KB
Line 
1PXKFVST ;ISL/JVS - Fields for VISIT file ;7/29/96
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**22,56,111,130,124,164**;Aug 12, 1996
3 ;
4 ; Adding or Editing of data in a particular field can be controlled
5 ;by adding a ~ as a delimiter and the letters A and/or E to the
6 ;end of the line of text which represents what could be added
7 ;to the DR string in a DIE call.
8 ; 1. If none or all three(~AE) of these characters are added then
9 ; the data in this field can be either added or edited.
10 ; 2. If only the ~ is added then the data in this field can be
11 ; neither added or edited.
12 ; 3. IF only the ~A is added then the data can only be added to
13 ; the file for this field but not edited.
14 ; 4. If only the ~E is added the data can only be edited in
15 ; this file for this field. (not a likely possibility)
16 ;
17 ; The word "OPTION" in front of the line of text below tells the
18 ;software to determine,based on the data, the appropriateness
19 ;of using either a "///" or "////" stuff in a DIE call.
20 ;
21 ; The information on line tag 0 $P(,," * ",1) are the piece numbers
22 ;of the fields on the zero node that are required by the data
23 ;dictionary and are checked for to determine if enough data is present
24 ;to proceed without any errors. $P(,," * ",2) are the nodes and
25 ;piece numbers of the fields used to determine duplicates in the
26 ;file (node+piece (eg. 12+4)). $P(,," * ",3) is a flag use to
27 ;determine if duplicates are allowed in this visit file.
28 ;If it is set to 0 then no duplicate checks will occur. If it is
29 ;set to 1 then the file will be checked for duplicates based on
30 ;the information in $P 2.
31 ;
32 ; The following is the file's global name. Each global must have a
33 ;unique name and can not have any subscripts as part of the global root.
34GLOBAL ;;^AUPNVSIT
35 ;
36EN1 ;
37 S PXKER=""
38 S PXKER=$P($T(@PXKNOD+PXKPCE),";;",2) Q
39EN2 ;
40 S PXKFD=""
41 S PXKFD=$P($T(@PXKNOD+PXKPCE),";;",2) D
42 .I PXKFD="" S PXKPCE=PXKPCE+1 D EN2
43 Q
44ADD ;Add an entry to the file
45 Q
460 ;;1,3,5,7,8,22 * * 0
47 ;;.01///^S X=$G(~
48 ;;.02///^S X=$G(~
49 ;;.03///^S X=$G(~
50 ;;
51 ;;.05////^S X=$G(~
52 ;;.06////^S X=$G(~
53 ;;.07///^S X=$G(~
54 ;;.08////^S X=$G(~
55 ;;.09///^S X=$G(~
56 ;;
57 ;;.11///^S X=$G(~
58 ;;.12////^S X=$G(~
59 ;;.13///^S X=$G(~
60 ;;
61 ;;
62 ;;
63 ;;
64 ;;.18///^S X=$G(~
65 ;;
66 ;;
67 ;;.21////^S X=$G(~
68 ;;.22////^S X=$G(~
69 ;;.23////^S X=$G(~
70 ;;.24////^S X=$G(~
71 ;;
72 ;;.26////^S X=$G(~
7321 ;;
74 ;;2101///^S X=$G(~
75800 ;;
76 ;;80001///^S X=$G(~
77 ;;80002///^S X=$G(~
78 ;;80003///^S X=$G(~
79 ;;80004///^S X=$G(~
80 ;;80005///^S X=$G(~ ;added 6/17/98 for MST enhancement
81 ;;80006///^S X=$G(~ ;PX*1*111 - added for HNC enhancement
82 ;;80007///^S X=$G(~ ;PX*1*130
83812 ;;
84 ;;81201///^S X=$G(
85 ;;81202////^S X=$G(
86 ;;81203////^S X=$G(
87 ;
88UPD ;Up date visit file using visit tracking
89 ;--new VSIT to make sure that none are left around after call
90 N PXTMPVST
91 S PXTMPVST=VSIT("IEN")
92 N VSIT
93 S VSIT("IEN")=PXTMPVST
94 I $G(PXKAV(0,8))]"" D
95 .I PXKAV(0,8)="@" S VSIT("DSS")="@"
96 .E D
97 ..K ^UTILITY("DIQ1",$J)
98 ..S DIC=40.7,DA=+$G(PXKAV(0,8)),DIQ(0)="I",DR=1 D EN^DIQ1
99 ..S VSIT("DSS")=$G(^UTILITY("DIQ1",$J,40.7,DA,1,"I"))
100 K ^UTILITY("DIQ1",$J),DIQ,DR,DA,DIC
101 I $G(PXKAV(0,6))]"" S VSIT("INS")=$G(PXKAV(0,6))
102 I $G(PXKAV(0,18))]"" S VSIT("COD")=$G(PXKAV(0,18))
103 ;--cannot edit "ELG"
104 I $G(PXKAV(0,22))]"" S VSIT("LOC")=$G(PXKAV(0,22))
105 I $G(PXKAV(0,26))]"" S VSIT("ACT")=$G(PXKAV(0,26)) ;PX*1.0*164 Set Patient Account Number reference
106 ;Classification questions
107 N PXP,PXV,PXN
108 ;AO, IR, and EC not applicable if SC answered YES (1)
109 ;I $G(PXKAV(800,1))=1 F PXP=2:1:4 S PXKAV(800,PXP)="@"
110 F PXP=1:1:7 D
111 .S PXV=$G(PXKAV(800,PXP))
112 .S PXN=$P("SC^AO^IR^EC^MST^HNC^CV","^",PXP)
113 .I PXV'="" S VSIT(PXN)=PXV
114 D UPD^VSIT
115 K VSIT("DSS"),VSIT("COD"),VSIT("SC"),VSIT("AO"),VSIT("IR"),VSIT("EC")
116 K VSIT("LOC"),VSIT("INS"),VSIT("ELG"),VSIT("MDT")
117 ;PX*1*111 - added for HNC enhancement
118 K VSIT("MST"),VSIT("HNC"),VSIT("CV")
119 Q
120SPEC ;
121 Q
Note: See TracBrowser for help on using the repository browser.