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

PSOCROC.m

Go to the documentation of this file.
PSOCROC ;HP/MJE - CLINICAL REMINDER ORDER CHECK FOR OP ORDER CHECKS ;09/22/11 5:00pm
 ;;7.0;OUTPATIENT PHARMACY;**411,569**;DEC 1997;Build 1
 ;
 ;Reference to ORDERCHK^PXRMORCH supported by DBIA 5531
 ;Reference to SIG^XUSESIG supported by DBIA 10050
 ;
CK ;CHECK FOR CROCS AGAINST PROSPECTIVE DRUG
 S $P(CROCLN,"=",60)="=",$P(CROCLN2,"-",60)="-"
 I CROCPFLG&(($Y+4)>IOSL) D WAIT^PSODRG W ! K CROCPFLG
 D ORDERCHK^PXRMORCH(DFN,-1,0,$G(PSODRUG("IEN")),0)
 I '$D(VADM) D DEM^VADPT ;restore VA & VADM array variable after calling CROC by *569
 I '$D(^TMP($J,$G(PSODRUG("IEN")))) W !,"Now processing Clinical Reminder Order Checks. Please wait ..."
 N PSOFIRST
 I $D(^TMP($J,$G(PSODRUG("IEN")))) D
 . W !,"Now processing Clinical Reminder Order Checks. Please wait ..."
 S (CROCSTA,CROCDNM,CROCNUM,CROCSTR,CROCHFLG)=""
 I $D(^TMP($J,$G(PSODRUG("IEN")))) D
 .S CROCHFLG=2
 .F  S CROCSTA=$O(^TMP($J,PSODRUG("IEN"),CROCSTA)) Q:CROCSTA=""!$G(PSORX("DFLG"))  D
 ..I CROCSTA=1 S CROCHFLG=1
 ..F  S CROCDNM=$O(^TMP($J,PSODRUG("IEN"),CROCSTA,CROCDNM)) Q:CROCDNM=""!$G(PSORX("DFLG"))  D
 ...I '$G(PSOFIRST) W !!,CROCLN S PSOFIRST=1
 ...S CROCSTA2=$S(CROCSTA=1:"HIGH",CROCSTA=2:"MEDIUM",CROCSTA=3:"LOW",1:"UNKNOWN")
 ...W !,"*** Clinical Reminder Order Check | Severity: "_CROCSTA2_" ***",!
 ...W !,CROCDNM,!
 ...F  S CROCNUM=$O(^TMP($J,PSODRUG("IEN"),CROCSTA,CROCDNM,CROCNUM)) Q:CROCNUM=""!$G(PSORX("DFLG"))  D
 ....I ($Y+7)>IOSL,$E(IOST)="C" D
 .....W ! K DIR S DIR(0)="E",DIR("A")="Press Return to Continue..." D ^DIR K DIR W @IOF
 ....W !,^TMP($J,PSODRUG("IEN"),CROCSTA,CROCDNM,CROCNUM)
 ...W !!,CROCLN2 I ($Y+5)>IOSL W ! K DIR S DIR(0)="E",DIR("A")="Press Return to Continue..." D ^DIR K DIR W @IOF
 I $G(PSODGCK) G KILL
 I CROCHFLG=1 S DIR(0)="SA^1:YES;0:NO",DIR("A")="Do you want to Continue? ",DIR("B")="Y" D ^DIR
 I CROCHFLG=1,Y["^"!(Y=0)!($D(DIRUT)) S (PSORX("DFLG"))=1 G KILL
 I CROCHFLG=1 D SIG^XUSESIG I X1="" W !!,"Signature Code not valid" S (PSORX("DFLG"))=1 H 2 G KILL
 I CROCHFLG=1 I X1'="" D EN3^PSORXI("CLINICAL REMINDER")
 I CROCHFLG=2 W ! S DIR(0)="SA^1:YES;0:NO",DIR("A")="Do you want to Intervene? ",DIR("B")="N" D ^DIR
 I CROCHFLG=2,Y=1 D EN3^PSORXI("CLINICAL REMINDER")
KILL K CROCSTA,CROCSTA2,CROCDNM,CROCNUM,CROCSTR,CROCHFLG,CROCLN,CROCLN2,X1,Y,DIRUT
 Q
 ;
ADDCR ;Add CLINICAL REMINDER (one time use as post install)
 I '$$FIND1^DIC(9009032.3,"","X","CLINICAL REMINDER","B") D
 .N PSSMRMPD K PSSMRMER S PSSMRMPD(1,9009032.3,"+1,",.01)="CLINICAL REMINDER" D UPDATE^DIE("","PSSMRMPD(1)",,"PSSMRMER(1)")
 K PSSMRMPD,PSSMRMER
 Q