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

ACRFESS.m

Go to the documentation of this file.
ACRFESS ;IHS/OIRM/DSD/THL,AEF - EDIT SUPPLY/SERVICE ITEM; [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;ROUTINE TO ALLOW EDIT OF SUPPLY/SERVICE ITEMS
EN D GATHER
 D DDS^ACRFDIC
 I '$D(ACRSCREN) D  S ACRQUIT="" K ACROBJC Q
 .S ACROBJC=$P(ACRSS0,U,4)
 .Q:'ACROBJC
 .S ACROBJC=$P($G(^AUTTOBJC(ACROBJC,0)),U)
 .Q:$E(ACROBJC,1,2)'=31
 .S DA=ACRSSDA
 .S DIE="^ACRSS("
 .S DR="[ACR CAPITALIZED EQUIPMENT]"
 .D DDS^ACRFDIC
 .Q:$P($G(^ACRSS(ACRSSDA,"DT")),U,15)<3
 .S DA=ACRSSDA
 .S DIE="^ACRSS("
 .S DR="[ACR REPLACEMENT EQUIPMENT]"
 .D DDS^ACRFDIC
 I $G(ACRTXDA)=35,$D(ACRSCREN) D  S ACRQUIT="" Q
 .S DIE="^ACRSS("
 .S DR="[ACR CREDIT CARD ITEM]"
 .D DIE^ACRFDIC
 K ACRSCREN
 I $D(ACRNEWSS) D DIE^ACRFDIC K ACRNEWSS
 N ACRX,ACRSS0,ACRSS1,ACRSSDT,ACRFLDS,ACRY,ACR,ACRSSDSC,ACRJ,ACRJJ
 D FIELDS
 F  D EN1 Q:$D(ACRQUIT)
EXIT K ACROBJC,ACRSSSPC
 Q
EN1 ;
 D DISP
 S DIR(0)="LO^1:7"
 S DIR("A")="      Edit which fields"
 D DIR^ACRFDIC
 I +Y<1 S ACRQUIT="" Q
 S ACRFLDS=ACRY
 W !
 F ACRJJ=1:1 S ACRX=$P(ACRFLDS,",",ACRJJ) Q:ACRX=""  D DIE
 Q
DIE S DA=ACRSSDA
 S DIE="^ACRSS("
 S DR=ACR("DR",ACRX)
 I $E(DR)'="[",DR'["T" S DR=DR_"T"
 D DIE^ACRFDIC
 Q
DISP ;DISPLAY ITEM INFO
 D GATHER
 W @IOF
 W !?18,@ACRON,"SUPPLY/SERVICE ITEM INFORMATION",@ACROF
 W !!,"1. QUANTITY REQ'D: ",$G(ACR(1))
 W ?40,"4. NATL STOCK NO.: ",$G(ACR(4))
 W !,"2. UNIT OF ISSUE.: ",$G(ACR(2))
 W ?40,"5. NATL DRUG CODE: ",$G(ACR(5))
 W !,"3. UNIT COST.....: ",$G(ACR(3))
 W ?40,"6. VENDOR PART NO: ",$G(ACR(6))
 W !!,"7. DESCRIPTION:"
 F X=7,8 S ACRX=$G(ACR(X)) D:ACRX]"" D1
 W !,"--------------------------------------------------------------------------------"
 Q
D1 S ACRX=$TR(ACRX,"^"," ")
 W !?3
 F ACRJ=1:1 S X=$P(ACRX," ",ACRJ) Q:$P(ACRX," ",ACRJ,99)=""  W:$X+$L(X)>78 !?3 W X," "
 Q
GATHER ;GATHER ITEM INFO
 S ACRSS0=$G(^ACRSS(ACRSSDA,0))
 S ACRSSDT=$G(^ACRSS(ACRSSDA,"DT"))
 S ACRSSDSC=$G(^ACRSS(ACRSSDA,"DESC"))
 S ACRSSNMS=$G(^ACRSS(ACRSSDA,"NMS"))
 S ACRSSSPC=$G(^ACRSS(ACRSSDA,"NOTES"))
 S ACR(1)=$P(ACRSSDT,U)
 S X=$P(ACRSSDT,U,2)
 S ACR(2)=$P($G(^ACRUI(+X,0)),U)
 S ACR(3)=$P(ACRSSDT,U,3)
 S ACR(4)=$P(ACRSSNMS,U,2)
 S ACR(5)=$P(ACRSSNMS,U,3)
 S ACR(6)=$P(ACRSSNMS,U)
 S ACR(7)=ACRSSDSC
 S ACR(8)=ACRSSSPC
 Q
FIELDS ;SET FIELDS TO BE EDITED
 S ACR("DR",1)="10T"
 S ACR("DR",2)="11T"
 S ACR("DR",3)="12T"
 S ACR("DR",4)="2T"
 S ACR("DR",5)="3T"
 S ACR("DR",6)="1T"
 S ACR("DR",7)="[ACR DESCRIPTION]"
 Q