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

OCXDI5.m

Go to the documentation of this file.
OCXDI5 ;SLC/RJS,CLA - OCX PACKAGE DIAGNOSTIC UTILITY ROUTINE ;SEP 7,1999 at 10:30
 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
 ;;  ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
 ;
EN() ;
 ;  Protocol Utilities
 ;
 N OCXLINE,OCXTEXT,OCXQUIT
 S OCXQUIT=0
 F OCXLINE=1:1:500 S OCXTEXT=$P($T(DATA+OCXLINE),";",2,999) Q:OCXTEXT  I $L(OCXTEXT) D  Q:OCXQUIT
 .D DOT^OCXDIAG
 .S OCXTEXT=$P(OCXTEXT,";",2,999)
 .S OCXQUIT=$$ADD($P(OCXTEXT,U,1),$P(OCXTEXT,U,2))
 Q OCXQUIT
 ;
ADD(OCXX,OCXITEM) ;
 ;
 N OCXD0,OCXD1,OCXD2,DIE,DIC,DR,X,Y,DA,OCXQUIT
 S OCXD0=$$DIC("^ORD(101,",OCXX) Q:'OCXD0 0
 S OCXD1=$$DIC("^ORD(101,",OCXITEM) Q:'OCXD1 0
 S OCXD2=0 F  S OCXD2=$O(^ORD(101,OCXD0,10,OCXD2)) Q:'OCXD2  Q:(+^ORD(101,OCXD0,10,OCXD2,0)=OCXD1)
 Q:OCXD2 0 S OCXQUIT=0
 I OCXFLGR W !!," '"_OCXITEM_"' is missing as an Item to the '"_OCXX_"' protocol."
 Q:'OCXFLGC 0 I OCXFLGA S OCXQUIT=$$READ("Y"," Do you want to add '"_OCXITEM_"' as an Item to '"_OCXX_"'  ?","YES") I 'OCXQUIT Q (OCXQUIT[U)
 S:'$D(^ORD(101,OCXD0,10,0)) ^ORD(101,OCXD0,10,0)="^101.01PA^^"
 S (DIE,DIC)="^ORD(101,"_OCXD0_",10,"
 F DA=1:1 Q:'$D(^ORD(101,OCXD0,10,DA,0))
 S DA(1)=OCXD0
 S DR=".01///"_OCXITEM
 S OCXSCR=1 D ^DIE
 I OCXFLGR W !,"  added"
 I 'OCXFLGR W !," '"_OCXITEM_"' added as an Item to the '"_OCXX_"' protocol"
 ;
 Q 0
 ;
DIC(DIC,X) S DIC(0)="",OCXSCR=1 D ^DIC Q:(+Y>0) +Y Q 0
 ;
READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
 N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
 Q:'$L($G(OCXZ0)) U
 S DIR(0)=OCXZ0
 S:$L($G(OCXZA)) DIR("A")=OCXZA
 S:$L($G(OCXZB)) DIR("B")=OCXZB
 F OCXLINE=1:1:($G(OCXZL)-1) W !
 D ^DIR
 I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
 Q Y
 ;
DATA ;:
 ;;DGPM MOVEMENT EVENTS^OCX ORDER CHECK PATIENT MOVE.
 ;;PS EVSEND OR^OCX ORDER CHECK HL7 RECIEVE
 ;;RA EVSEND OR^OCX ORDER CHECK HL7 RECIEVE
 ;;OR EVSEND RA^OCX ORDER CHECK HL7 RECIEVE
 ;;OR EVSEND LRCH^OCX ORDER CHECK HL7 RECIEVE
 ;;LR7O CH EVSEND OR^OCX ORDER CHECK HL7 RECIEVE
 ;;OR EVSEND LRBB^OCX ORDER CHECK HL7 RECIEVE
 ;;OR EVSEND LRAP^OCX ORDER CHECK HL7 RECIEVE
 ;;LR7O BB EVSEND OR^OCX ORDER CHECK HL7 RECIEVE
 ;;LR7O AP EVSEND OR^OCX ORDER CHECK HL7 RECIEVE
 ;;FH EVSEND OR^OCX ORDER CHECK HL7 RECIEVE
 ;;OR EVSEND DGPM^OCX ORDER CHECK HL7 RECIEVE
 ;;OR EVSEND FH^OCX ORDER CHECK HL7 RECIEVE
 ;;OR EVSEND ORG^OCX ORDER CHECK HL7 RECIEVE
 ;;OR EVSEND PS^OCX ORDER CHECK HL7 RECIEVE
 ;;OR EVSEND GMRA^OCX ORDER CHECK HL7 RECIEVE
 ;;OR EVSEND GMRC^OCX ORDER CHECK HL7 RECIEVE
 ;;GMRC EVSEND OR^OCX ORDER CHECK HL7 RECIEVE
 ;1;