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

RMPRPIXC.m

Go to the documentation of this file.
RMPRPIXC ;HINCIO/ODJ - APIs for 660 file ;3/8/01
 ;;3.0;PROSTHETICS;**61**;Feb 09, 1996
 Q
 ;
 ;***** GET - read in 660 patient 2319 record
GET(RMPR60,RMPR11) ;
 N RMPRI,RMPRA,RMPRFME,RMPRERR,RMPRLIN,RMPRC
 S RMPRERR=0
 I $G(RMPR60("IEN"))="" S RMPRERR=1 G GETX
 S RMPRI=RMPR60("IEN")_","
 D GETS^DIQ(660,RMPRI,"*","","RMPRA","RMPRFME")
 I $D(RMPRFME) S RMPRERR=99 G GETX
 S RMPR60("ENTRY DATE")=RMPRA(660,RMPRI,.01)
 S RMPR60("PATIENT")=RMPRA(660,RMPRI,.02)
 S RMPR60("REQ DATE")=RMPRA(660,RMPRI,1)
 S RMPR60("ISSUE TYPE")=RMPRA(660,RMPRI,2)
 S RMPR60("IFCAP ITEM")=RMPRA(660,RMPRI,4)
 S RMPR60("QUANTITY")=RMPRA(660,RMPRI,5)
 S RMPR11("UNIT")=RMPRA(660,RMPRI,78)
 S RMPR60("UNIT")=RMPRA(660,RMPRI,78)
 S RMPR60("VENDOR")=RMPRA(660,RMPRI,7)
 S RMPR11("STATION")=RMPRA(660,RMPRI,8)
 S RMPR60("SERIAL NUM")=RMPRA(660,RMPRI,9)
 S RMPR60("DELIV DATE")=RMPRA(660,RMPRI,10)
 S RMPR60("REQ TYPE")=RMPRA(660,RMPRI,11)
 S RMPR11("SOURCE")=RMPRA(660,RMPRI,12)
 S RMPR60("COST")=RMPRA(660,RMPRI,14)
 S RMPR60("REMARKS")=RMPRA(660,RMPRI,16)
 S RMPR11("CPT CODE")=RMPRA(660,RMPRI,4.1)
 S RMPR60("LOT NUM")=RMPRA(660,RMPRI,21)
 S RMPR60("USER")=RMPRA(660,RMPRI,27)
 ;
 ; for the type 1 rec.
 S RMPR11("SHORT DESC")=RMPRA(660,RMPRI,24)
 S RMPR11("IEN")=RMPRA(660,RMPRI,4.5)
 S RMPR60("CPT MOD")=RMPRA(660,RMPRI,4.7)
 ;S RMPR60("TRANS IEN")=RMPRA(660,RMPRI,4.6)
 S RMPR60("TRANS IEN")=$P(^RMPR(660,RMPR60("IEN"),1),"^",5)
 ;
 ; for the type 2 rec.
 S RMPR11("HCPCS-ITEM")=RMPRA(660,RMPRI,37)
 S RMPR11("DESCRIPTION")=RMPRA(660,RMPRI,38)
 ;
 ; for the type AM rec.
 S RMPR60("PAT CAT")=RMPRA(660,RMPRI,62)
 S RMPR60("SPEC CAT")=RMPRA(660,RMPRI,63)
 ;
 ; for the type AMS rec.
 S RMPR60("AMIS GROUPER")=RMPRA(660,RMPRI,68)
 ;
 ; 'DES'
 S RMPRLIN="",RMPRC=0
 F  S RMPRLIN=$O(RMPRA(660,RMPRI,28,RMPRLIN)) Q:RMPRLIN=""  D
 . S RMPRC=RMPRC+1
 . S RMPR60("DES",RMPRC)=RMPRA(660,RMPRI,28,RMPRLIN)
 . Q
GETX Q RMPRERR
 ;
 ;***** ETOI - convert external to internal form
ETOI(RMPR60,RMPR11,RMPR60I,RMPR11I) ;
 N RMPRERR,RMPRFDA,RMPRFDI,RMPRFME,RMPRI,X,Y,DA
 S RMPRERR=0
 S RMPRI=RMPR60("IEN")_","
 D GETS^DIQ(660,RMPRI,"*","I","RMPRFDI","RMPRFME")
 I $D(RMPRFME) S RMPRERR=99 G ETOIX
 S RMPR60I("ENTRY DATE")=RMPRFDI(660,RMPRI,.01,"I")
 S RMPR60I("PATIENT")=RMPRFDI(660,RMPRI,.02,"I")
 S RMPR60I("REQ DATE")=RMPRFDI(660,RMPRI,1,"I")
 S RMPR60I("ISSUE TYPE")=RMPRFDI(660,RMPRI,2,"I")
 S RMPR60I("IFCAP ITEM")=$P(^RMPR(660,RMPR60("IEN"),0),"^",6) ;FM problem
 S RMPR60I("QUANTITY")=RMPRFDI(660,RMPRI,5,"I")
 S RMPR11I("UNIT")=RMPRFDI(660,RMPRI,78,"I")
 S RMPR60I("UNIT")=RMPRFDI(660,RMPRI,78,"I")
 S RMPR60I("VENDOR")=RMPRFDI(660,RMPRI,7,"I")
 S RMPR11I("STATION")=RMPRFDI(660,RMPRI,8,"I")
 S RMPR60I("SERIAL NUM")=RMPRFDI(660,RMPRI,9,"I")
 S RMPR60I("DELIV DATE")=RMPRFDI(660,RMPRI,10,"I")
 S RMPR60I("REQ TYPE")=RMPRFDI(660,RMPRI,11,"I")
 S RMPR11I("SOURCE")=RMPRFDI(660,RMPRI,12,"I")
 S RMPR60I("COST")=RMPRFDI(660,RMPRI,14,"I")
 S RMPR60I("REMARKS")=RMPRFDI(660,RMPRI,16,"I")
 S RMPR11I("CPT IEN")=RMPRFDI(660,RMPRI,4.1,"I")
 S RMPR60I("LOT NUM")=RMPRFDI(660,RMPRI,21,"I")
 ;
 ; for the type 1 rec.
 S RMPR11I("SHORT DESC")=RMPRFDI(660,RMPRI,24,"I")
 S RMPR11I("IEN")=RMPRFDI(660,RMPRI,4.5,"I")
 S RMPR60I("CPT MOD")=RMPRFDI(660,RMPRI,4.7,"I")
 ;
 ; for the type AM rec.
 S RMPR60I("PAT CAT")=RMPRFDI(660,RMPRI,62,"I")
 S RMPR60I("SPEC CAT")=RMPRFDI(660,RMPRI,63,"I")
ETOIX Q RMPRERR