source: FOIAVistA/trunk/r/DSS_EXTRACTS-ECX/ECXPRO2.m@ 1452

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

initial load of FOIAVistA 6/30/08 version

File size: 3.5 KB
Line 
1ECXPRO2 ;ALB/GTS - Prosthetics Extract for DSS (Continued) ; July 16, 1998
2 ;;3.0;DSS EXTRACTS;**9,15,21,24,33**;Dec 22, 1997
3 ;
4ECXBUL(ECXLNE,ECXEBDT,ECXEEDT,ECNUM) ;* Set up the header for the exception msg
5 ;
6 ; Input
7 ; ECXLNE - The line number variable (passed by reference)
8 ; ECXEBDT - The Externally formated beginning date
9 ; ECXEEDT - The Externally formated ending date
10 ; ECNUM - The Extract reference number
11 ;
12 ; Output
13 ; ^TMP("ECX-PRO EXC",$J) - Array for the exception message
14 ; ECXLNE - The number of the next line in the msg
15 ;
16 S ^TMP("ECX-PRO EXC",$J,1)=" "
17 S ^TMP("ECX-PRO EXC",$J,2)="The DSS-Prosthetic Extract #"_ECNUM_" for "_ECXEBDT_" through "_ECXEEDT
18 S ^TMP("ECX-PRO EXC",$J,3)="has completed. The following is a list of Prosthetics records that were NOT"
19 S ^TMP("ECX-PRO EXC",$J,4)="extracted due to missing information in the Record of Pros Appliance/Repair"
20 S ^TMP("ECX-PRO EXC",$J,5)="file (#660). The Prosthetics record may be reviewed and the missing"
21 S ^TMP("ECX-PRO EXC",$J,6)="information completed. Once the missing information has been entered, it"
22 S ^TMP("ECX-PRO EXC",$J,7)="will be necessary to re-generate the Prosthetics Extract for the above noted"
23 S ^TMP("ECX-PRO EXC",$J,8)="date range."
24 S ^TMP("ECX-PRO EXC",$J,9)=" "
25 S ^TMP("ECX-PRO EXC",$J,10)="If you do not intend to transmit Prosthetics Extract #"_ECNUM_", then please"
26 S ^TMP("ECX-PRO EXC",$J,11)="purge it before generating a new extract for the same date range."
27 S ^TMP("ECX-PRO EXC",$J,12)=" "
28 S ^TMP("ECX-PRO EXC",$J,13)=" "
29 S ^TMP("ECX-PRO EXC",$J,14)=" PROSTHETICS FILE (#660) MISSING DATA"
30 S ^TMP("ECX-PRO EXC",$J,15)=" IEN ELEMENTS"
31 S ^TMP("ECX-PRO EXC",$J,16)=" "
32 S ECXLNE=15
33 Q
34 ;
35ECXMISLN(ECXMISS,ECXLNE,ECXPIEN) ;** Report Missing Lines
36 N ECXPCE,ECXFIRST,ECXFIELD
37 S ECXFIRST=1
38 F ECXPCE=1:1:11 DO
39 .I +$P(ECXMISS,"^",ECXPCE) DO
40 ..S ECXFIELD=$P($T(ECXFLD+ECXPCE),";;",2)
41 ..I 'ECXFIRST S ^TMP("ECX-PRO EXC",$J,ECXLNE)=" "_ECXFIELD
42 ..I ECXFIRST DO
43 ...S ^TMP("ECX-PRO EXC",$J,ECXLNE)=" "_ECXPIEN_" "_ECXFIELD
44 ...S ECXFIRST=0
45 ..S ECXLNE=ECXLNE+1
46 S ^TMP("ECX-PRO EXC",$J,ECXLNE)=" "
47 S ECXLNE=ECXLNE+1
48 Q
49 ;
50ECXFLD ;* Missing Required fields
51 ;;STATION
52 ;;PATIENT NAME (Invalid)
53 ;;SSN
54 ;;NAME (In Patient file - #2)
55 ;;DELIVERY DATE
56 ;;TYPE OF TRANSACTION
57 ;;SOURCE
58 ;;HCPCS
59 ;;REQUESTING STATION
60 ;;FORM REQUESTED ON
61 ;;RECEIVING STATION
62 Q
63 ;
64FEEDINFO(ECXSRCE,ECXHCPCS,ECXTYPE,ECXSTAT2,ECXRQST,ECXRCST,ECXLAB) ;Get Feeder Key and Feeder Location
65 ; Input
66 ; ECXSTAT2 - Station Number for extract
67 ; ECXTYPE - Type of Transaction work performed
68 ; ECXSRCE - Source of prosthesis
69 ; ECXHCPCS - HCPCS code for prosthesis
70 ; ECXRQST - Requesting Station
71 ; ECXRCST - Receiving Station
72 ; ECXLAB - Lab or non-Lab
73 ; Output (to be KILLed by calling routine)
74 ; ECXFELOC - Feeder Location
75 ; ECXFEKEY - Feeder Key
76 ;
77 ;* NOTE: If a Station # <> Requesting Station
78 ;* AND
79 ;* Station # <> Receiving Station,
80 ;* then Feeder Location will be NULL.
81 ;
82 S ECXFELOC=""
83 S ECXFEKEY=ECXHCPCS_$S(ECXTYPE="X":"X",1:"N")_ECXSRCE
84 ;
85 ;* If processing a Non-Lab Transaction
86 I ECXLAB="NONL" D Q
87 .S ECXFELOC=ECXSTAT2_"NONL"
88 ;
89 ;* If processing a Lab Transaction
90 I ECXLAB="LAB" D Q
91 .I ECXSTAT2=ECXRCST D
92 ..S ECXFELOC=ECXRCST_"LAB"
93 ..S ECXFEKEY=ECXFEKEY_ECXRQST_"REQ"
94 I ECXLAB="ORD" D Q
95 .I ECXSTAT2=ECXRQST D
96 ..S ECXFELOC=ECXRQST_"ORD"
97 ..S ECXFEKEY=ECXFEKEY_ECXRCST_"REC"
98 ;
99 Q
Note: See TracBrowser for help on using the repository browser.