Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ECXPRO2

ECXPRO2.m

Go to the documentation of this file.
  1. ECXPRO2 ;ALB/GTS - Prosthetics Extract for DSS (Continued) ;3/26/15 16:38
  1. ;;3.0;DSS EXTRACTS;**9,15,21,24,33,127,132,154**;Dec 22, 1997;Build 13
  1. ;
  1. ECXBUL(ECXLNE,ECXEBDT,ECXEEDT,ECNUM) ;* Set up the header for the exception msg
  1. ;
  1. ; Input
  1. ; ECXLNE - The line number variable (passed by reference)
  1. ; ECXEBDT - The Externally formatted beginning date
  1. ; ECXEEDT - The Externally formatted ending date
  1. ; ECNUM - The Extract reference number
  1. ;
  1. ; Output
  1. ; ^TMP("ECX-PRO EXC",$J) - Array for the exception message
  1. ; ECXLNE - The number of the next line in the msg
  1. ;
  1. S ^TMP("ECX-PRO EXC",$J,1)=" "
  1. S ^TMP("ECX-PRO EXC",$J,2)="The DSS-Prosthetic Extract #"_ECNUM_" for "_ECXEBDT_" through "_ECXEEDT
  1. S ^TMP("ECX-PRO EXC",$J,3)="has completed. The following is a list of Prosthetics records that were NOT"
  1. S ^TMP("ECX-PRO EXC",$J,4)="extracted due to missing information in the Record of Pros Appliance/Repair"
  1. S ^TMP("ECX-PRO EXC",$J,5)="file (#660). The Prosthetics record may be reviewed and the missing"
  1. S ^TMP("ECX-PRO EXC",$J,6)="information completed. Once the missing information has been entered, it"
  1. S ^TMP("ECX-PRO EXC",$J,7)="will be necessary to re-generate the Prosthetics Extract for the above noted"
  1. S ^TMP("ECX-PRO EXC",$J,8)="date range."
  1. S ^TMP("ECX-PRO EXC",$J,9)=" "
  1. S ^TMP("ECX-PRO EXC",$J,10)="If you do not intend to transmit Prosthetics Extract #"_ECNUM_", then please"
  1. S ^TMP("ECX-PRO EXC",$J,11)="purge it before generating a new extract for the same date range."
  1. S ^TMP("ECX-PRO EXC",$J,12)=" "
  1. S ^TMP("ECX-PRO EXC",$J,13)=" "
  1. S ^TMP("ECX-PRO EXC",$J,14)=" PROSTHETICS FILE (#660) MISSING DATA"
  1. S ^TMP("ECX-PRO EXC",$J,15)=" IEN ELEMENTS"
  1. S ^TMP("ECX-PRO EXC",$J,16)=" "
  1. S ECXLNE=15
  1. Q
  1. ;
  1. ECXMISLN(ECXMISS,ECXLNE,ECXPIEN) ;** Report Missing Lines
  1. N ECXPCE,ECXFIRST,ECXFIELD
  1. S ECXFIRST=1
  1. F ECXPCE=1:1:11 DO
  1. .I +$P(ECXMISS,"^",ECXPCE) DO
  1. ..S ECXFIELD=$P($T(ECXFLD+ECXPCE),";;",2)
  1. ..I 'ECXFIRST S ^TMP("ECX-PRO EXC",$J,ECXLNE)=" "_ECXFIELD
  1. ..I ECXFIRST DO
  1. ...S ^TMP("ECX-PRO EXC",$J,ECXLNE)=" "_ECXPIEN_" "_ECXFIELD
  1. ...S ECXFIRST=0
  1. ..S ECXLNE=ECXLNE+1
  1. S ^TMP("ECX-PRO EXC",$J,ECXLNE)=" "
  1. S ECXLNE=ECXLNE+1
  1. Q
  1. ;
  1. ECXFLD ;* Missing Required fields
  1. ;;STATION
  1. ;;PATIENT NAME (Invalid)
  1. ;;SSN
  1. ;;NAME (In Patient file - #2)
  1. ;;DELIVERY DATE
  1. ;;TYPE OF TRANSACTION
  1. ;;SOURCE
  1. ;;HCPCS
  1. ;;REQUESTING STATION
  1. ;;FORM REQUESTED ON
  1. ;;RECEIVING STATION
  1. Q
  1. ;
  1. FEEDINFO(ECXSRCE,ECXHCPCS,ECXTYPE,ECXSTAT2,ECXRQST,ECXRCST,ECXLAB,ECXNPPDC) ;Get Feeder Key and Feeder Location
  1. ; Input
  1. ; ECXSTAT2 - Station Number for extract
  1. ; ECXTYPE - Type of Transaction work performed
  1. ; ECXSRCE - Source of prosthesis
  1. ; ECXHCPCS - HCPCS code for prosthesis
  1. ; ECXRQST - Requesting Station
  1. ; ECXRCST - Receiving Station
  1. ; ECXLAB - Lab or non-Lab
  1. ; ECXNPPDC - NPPD Code
  1. ; Output (to be KILLed by calling routine)
  1. ; ECXFELOC - Feeder Location
  1. ; ECXFEKEY - Feeder Key
  1. ;
  1. ;* NOTE: If a Station # <> Requesting Station
  1. ;* AND
  1. ;* Station # <> Receiving Station,
  1. ;* then Feeder Location will be NULL.
  1. ;
  1. S ECXFELOC=""
  1. S ECXFEKEY=ECXHCPCS_$S(ECXTYPE="X":"X",ECXTYPE=5:"R",1:"N")_ECXSRCE
  1. ;
  1. ;* If processing a Non-Lab Transaction
  1. I ECXLAB="NONL" S ECXFELOC=ECXSTAT2_$S(ECXNPPDC[800:"HO2",1:"NONL")
  1. ;
  1. ;* If processing a Lab Transaction
  1. I ECXLAB="LAB" D ;154 Removed Q so processing continues
  1. .I ECXSTAT2=ECXRCST D
  1. ..S ECXFELOC=ECXRCST_"LAB"
  1. ..S ECXFEKEY=ECXFEKEY_ECXRQST_"REQ"
  1. I ECXLAB="ORD" D ;154 Removed Q so processing continues
  1. .I ECXSTAT2=ECXRQST D
  1. ..S ECXFELOC=ECXRQST_"ORD"
  1. ..S ECXFEKEY=ECXFEKEY_ECXRCST_"REC"
  1. S ECXFEKEY=ECXFEKEY_$S($P($G(ECXFORM),U,2)=11:"S",$P($G(ECXFORM),U,2)=12:"I",1:"") ;154 If form requested on is stock, add "S", if inventory add "I"
  1. ;
  1. Q