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

PSORTSUT.m

Go to the documentation of this file.
PSORTSUT ;BIRM/MFR - Return To Stock Utilities ;06/07/05
 ;;7.0;OUTPATIENT PHARMACY;**408**;DEC 1997;Build 100
 ; 
LOGRTS(RXIEN,RXFILL) ; Log Return to Sock Transaction
 ; Input: RXIEN - PRESCRIPTION file (#52) IEN
 ;        RXFILL - Fill Number ("0":Original,"1"..:Refill #1...,"P1"...: Partial #1...)
 N RTSINFO,PSOMW
 S RTSINFO(52.07,"+1,"_RXIEN_",",.01)=$$NOW^XLFDT                     ;.01 RETURN TO STOCK DATE/TIME
 S RTSINFO(52.07,"+1,"_RXIEN_",",1)=RXFILL                            ; 1 FILL NUMBER
 S RTSINFO(52.07,"+1,"_RXIEN_",",2)=$$RXFLDT^PSOBPSUT(RXIEN,RXFILL)   ; 2 FILL DATE
 S RTSINFO(52.07,"+1,"_RXIEN_",",3)=$$RXQTY^PSOBPSUT(RXIEN,RXFILL)    ; 3 QUANTITY
 S RTSINFO(52.07,"+1,"_RXIEN_",",4)=$$RXDAYSUP^PSOBPSUT(RXIEN,RXFILL) ; 4 DAYS SUPPLY
 S RTSINFO(52.07,"+1,"_RXIEN_",",5)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,17,1.2,.042,0) ; 5 UNIT PRICE OF DRUG
 S PSOMW="W" I RXFILL'["P" S:$$MWC^PSOBPSU2(RXIEN,RXFILL)'="W" PSOMW="M"
 S RTSINFO(52.07,"+1,"_RXIEN_",",6)=PSOMW                             ; 6 MAIL/WINDOW
 S RTSINFO(52.07,"+1,"_RXIEN_",",7)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,12,3,.03,0) ; 7 REMARKS
 S RTSINFO(52.07,"+1,"_RXIEN_",",8)=$$RXRPH^PSOBPSUT(RXIEN,RXFILL)    ; 8 PHARMACIST
 S RTSINFO(52.07,"+1,"_RXIEN_",",9)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,24,5,.06,0) ; 9 LOT #
 S RTSINFO(52.07,"+1,"_RXIEN_",",10)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,0,6,10,0) ; 10 CLERK CODE
 S RTSINFO(52.07,"+1,"_RXIEN_",",11)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,21,7,.08,0) ; 11 LOGIN DATE
 S RTSINFO(52.07,"+1,"_RXIEN_",",12)=$$RXSITE^PSOBPSUT(RXIEN,RXFILL)  ; 12 DIVISION
 S RTSINFO(52.07,"+1,"_RXIEN_",",13)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,106,9,13,0) ; 13 IB NUMBER
 S RTSINFO(52.07,"+1,"_RXIEN_",",14)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,106.6,9.1,0,0) ; 14 COPAY EXCEEDING CAP
 S RTSINFO(52.07,"+1,"_RXIEN_",",15)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,25,10.1,7.5,0) ; 15 DISPENSED DATE
 S RTSINFO(52.07,"+1,"_RXIEN_",",16)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,27,11,1,1) ; 16 NDC
 S RTSINFO(52.07,"+1,"_RXIEN_",",17)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,28,12,2,1) ; 17 MANUFACTURER
 S RTSINFO(52.07,"+1,"_RXIEN_",",18)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,29,13,12,1) ; 18 DRUG EXPIRATION DATE
 S RTSINFO(52.07,"+1,"_RXIEN_",",19)=$$RXPRV^PSOBPSUT(RXIEN,RXFILL)   ; 19 PROVIDER
 S RTSINFO(52.07,"+1,"_RXIEN_",",20)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,14,23,0,0)   ; 20 ADMINISTERED IN CLINC
 S RTSINFO(52.07,"+1,"_RXIEN_",",21)=$$RXRLDT^PSOBPSUT(RXIEN,RXFILL)  ; 21 RELEASE DATE/TIME
 S RTSINFO(52.07,"+1,"_RXIEN_",",22)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,30,16,7,0) ; 22 GENERIC PROVIDER
 S RTSINFO(52.07,"+1,"_RXIEN_",",23)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,32.3,18,9,0) ; 23 BINGO BOARD WAIT TIME
 S RTSINFO(52.07,"+1,"_RXIEN_",",24)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,38.1,19,10,0) ; 24 FILLING PERSON
 S RTSINFO(52.07,"+1,"_RXIEN_",",25)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,38.2,20,11,0) ; 25 CHECKING PHARMACIST
 S RTSINFO(52.07,"+1,"_RXIEN_",",26)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,125,21,0,0) ; 26 PFSS ACCOUNT REFERENCE
 S RTSINFO(52.07,"+1,"_RXIEN_",",27)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,126,22,0,0) ; 27 PFSS CHARGE ID
 S RTSINFO(52.07,"+1,"_RXIEN_",",28)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,81,81,0,0) ; 28 DAW CODE
 S RTSINFO(52.07,"+1,"_RXIEN_",",29)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,83,83,0,0) ; 29 DATE/TIME NDC VALIDATED
 S RTSINFO(52.07,"+1,"_RXIEN_",",30)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,84,84,0,0) ; 30 NDC VALIDATED BY
 S RTSINFO(52.07,"+1,"_RXIEN_",",31)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,85,85,0,0) ; 31 BILLING ELIGIBILITY INDICATOR
 S RTSINFO(52.07,"+1,"_RXIEN_",",32)=$$VALUE^PSOBPSUT(RXIEN,RXFILL,85,85,0,0) ; 32 EPHARMACY SUSPENSE HOLD DATE
 D UPDATE^DIE("","RTSINFO")
 Q