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

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

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1PXAICPTV ;ISL/JVS,ISA/KWP - VALADATE PROCEDURES(CPT) ;11/14/96 12:46
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**15,73,74,111,121,130**;Aug 12, 1996
3 ;
4VAL ;--VALIDATE ENOUGH DATA
5 ;----Missing a pointer to PROCEDURE(CPT) name
6 I $G(PXAA("PROCEDURE"))']"" D Q:$G(STOP)
7 .S STOP=1 ;--USED TO STOP DO LOOP
8 .S PXAERRF=1 ;--FLAG INDICATES THERE IS AN ERR
9 .S PXADI("DIALOG")=8390001.001
10 .S PXAERR(9)="PROCEDURE"
11 .S PXAERR(11)=$G(PXAA("PROCEDURE"))
12 .S PXAERR(12)="You are missing a pointer to the PROCEDURE CPT FILE#81 that represents the procedure's name"
13 ;
14 ;----NOT a pointer to PROCEDURE CPT FILE#81
15 I '$D(^ICPT($G(PXAA("PROCEDURE")),0)) D Q:$G(STOP)
16 .S STOP=1
17 .S PXAERRF=1
18 .S PXADI("DIALOG")=8390001.001
19 .S PXAERR(9)="PROCEDURE"
20 .S PXAERR(11)=$G(PXAA("PROCEDURE"))
21 .S PXAERR(12)=PXAERR(11)_" is NOT a pointer value to the CPT FILE #81"
22 ;
23 ;----Not a valid CPT
24 I '$P($$CPT^ICPTCOD(PXAA("PROCEDURE"),+^AUPNVSIT(PXAVISIT,0)),"^",7) D Q:$G(STOP)
25 .S STOP=1
26 .S PXAERRF=1
27 .S PXADI("DIALOG")=8390001.001
28 .S PXAERR(9)="PROCEDURE"
29 .S PXAERR(11)=$G(PXAA("PROCEDURE"))
30 .S PXAERR(12)=PXAERR(11)_" is NOT a valid CPT code"
31 ;
32 ;----Not a valid modifier
33 N SUB,MODIEN
34 S SUB=""
35 F S SUB=$O(PXAA("MODIFIERS",SUB)) Q:SUB=""!($G(STOP)) D
36 .;S MODIEN=$$MODP^ICPTMOD(PXAA("PROCEDURE"),SUB,"E","",0)
37 .S MODIEN=$$MODP^ICPTMOD(PXAA("PROCEDURE"),SUB,"E",+^AUPNVSIT(PXAVISIT,0),0)
38 .I $P(MODIEN,"^")>0 Q
39 .S STOP=1
40 .S PXAERRF=1
41 .S PXADI("DIALOG")=8390001.001
42 .S PXAERR(9)="MODIFIERS"_","_SUB
43 .S PXAERR(11)=""
44 .S PXAERR(12)=SUB_" is NOT a valid modifier for procedure "_$G(PXAA("PROCEDURE"))
45 ;----"Missing the number of times the procedure was performed.
46 I $G(PXAA("QTY"))<1 D
47 .S STOP=0
48 .S PXAERRF=1
49 .S PXADI("DIALOG")=8390001.002
50 .S PXAERR(9)="QTY"
51 .S PXAERR(11)=$G(PXAA("QTY"))
52 .S PXAERR(12)="If this node is empty we will assume it should be '1'. If it is a less than '1' we will delete any reference to it in the data base."
53 ;
54 ;
55 Q
56VAL04 ;---PROVIDER NARRATIVE
57 S STOP=1
58 S PXAERRF=1
59 S PXADI("DIALOG")=8390001.001
60 S PXAERR(9)="NARRATIVE"
61 S PXAERR(11)=$G(PXAA("NARRATIVE"))
62 S PXAERR(12)="We are unable to retrive a narrative from the PROVIDER NARRATIVE file #9999999.27"
63 Q
64VAL45 ;---PROVIDER NARRATIVE CATEGORY
65 S STOP=0
66 S PXAERRF=1
67 S PXADI("DIALOG")=8390001.002
68 S PXAERR(9)="CATEGORY"
69 S PXAERR(11)=$G(PXAA("CATEGORY"))
70 S PXAERR(12)="We are unable to retrieve a narrative from the PROVIDER NARRATIVE file #9999999.27"
71 Q
72 ;---------------------SUBROUTINE------------------------------
73ARRAY ;--SET ERRORS AND WARNINGS INTO AN ARRAY TO RETURN TO CALLER
74 I PXADI("DIALOG")=8390001.001 D
75 .S PXASUB=PXASUB+1
76 .S PXAPROB($J,PXASUB,"ERROR1",PXAERR(7),PXAERR(9),PXAK)=$G(PXAERR(12))
77 I PXADI("DIALOG")=8390001.002 D
78 .S PXASUB=PXASUB+1
79 .S PXAPROB($J,PXASUB,"WARNING2",PXAERR(7),PXAERR(9),PXAK)=$G(PXAERR(12))
80 I PXADI("DIALOG")=8390001.003 D
81 .S PXASUB=PXASUB+1
82 .S PXAPROB($J,PXASUB,"WARNING3","ENCOUNTER",1,"SC")=$G(PXAERR("6W"))
83 .S PXAPROB($J,PXASUB,"WARNING3","ENCOUNTER",1,"AO")=$G(PXAERR("7W"))
84 .S PXAPROB($J,PXASUB,"WARNING3","ENCOUNTER",1,"IR")=$G(PXAERR("8W"))
85 .S PXAPROB($J,PXASUB,"WARNING3","ENCOUNTER",1,"EC")=$G(PXAERR("9W"))
86 .S PXAPROB($J,PXASUB,"WARNING3","ENCOUNTER",1,"MST")=$G(PXAERR("10W"))
87 .;PX*1*111 - Add HNC
88 .S PXAPROB($J,PXASUB,"WARNING3","ENCOUNTER",1,"HNC")=$G(PXAERR("17W"))
89 .S PXAPROB($J,PXASUB,"WARNING3","ENCOUNTER",1,"CV")=$G(PXAERR("18W"))
90 I PXADI("DIALOG")=8390001.004 D
91 .S PXASUB=PXASUB+1
92 .S PXAPROB($J,PXASUB,"ERROR4","PX/DL",PXAK)=$G(PXAERR("PL1"))
93 Q
Note: See TracBrowser for help on using the repository browser.