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

GMRC1233.m

Go to the documentation of this file.
GMRC1233 ;SLC/JFR - CREATE/EDIT GMRC PROCEDURES;1/11/99 12:05
 ;;3.0;CONSULT/REQUEST TRACKING;**15**;DEC 27, 1997
EN ;START HERE
 N DLAYGO,DIE,DIC,X,Y,GMRCNEW,GMRCTIT,DUOUT,DTOUT,DA,DR,UPDATE
 S DIC="^GMR(123.3,",DIC(0)="AELZMQ",DLAYGO=123.3
 S DIC("A")="Select Procedure:"
 D ^DIC I Y<1 Q
 S GMRCIT=+Y
 I $P(Y,U,3) S GMRCNEW=1
 S DIE=DIC,DA=GMRCIT,DR="[GMRC PROCEDURE SETUP]" D ^DIE
 S UPDATE=$$OI(+$G(GMRCNEW),GMRCIT)
 I +UPDATE W !!,"Orderable Item Updated"
 I '+UPDATE W !!,$C(7),"Unable to update Orderable Item"
 Q
OI(NEW,PROC) ;get procedure info and update orderable item
 I '$D(PROC) Q 0
 I '$D(^GMR(123.3,+PROC)) Q 0
 N NAME,CTRLC,ACTION,GMRCSYNS,GMRCMSG
 S NAME=$P(^GMR(123.3,+PROC,0),U)
 I $G(NEW) S CTRLC="MAD",ACTION="REP"
 ;I +$P(^GMR(123.3,+PROC,0),U,2),'$G(NEW) S CTRLC="MDC"
 I +$P(^GMR(123.3,+PROC,0),U,2) S CTRLC="MDC"
 I '$D(CTRLC) S CTRLC="MUP"
 I '$D(ACTION) S ACTION="UPD"
 D SYNS(PROC,.GMRCSYNS)
 D EN^GMRC101H(CTRLC,ACTION,+PROC,NAME,.GMRCSYNS,"GMRCR ")
 D MSG^XQOR("GMRC ORDERABLE ITEM UPDATE",.GMRCMSG)
 Q 1
SYNS(IEN,ARRAY) ;get synonyms and load into ARRAY
 Q:'IEN
 N I S I=0
 F  S I=$O(^GMR(123.3,IEN,1,I)) Q:'I  D
 . S ARRAY(I)=$P(^GMR(123.3,IEN,1,I,0),U)
 Q