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

APSPCAN.m

Go to the documentation of this file.
  1. APSPCAN ;IHS/OHPRD/JCM - SHOW PROFILE THEN CANCEL MEDICATIONS; [ 09/03/97 1:30 PM ]
  1. ;;6.0;IHS PHARMACY MODIFICATIONS;;09/03/97
  1. ;Input variables: PSDFN,DFN
  1. ;
  1. ;variables: PSRXS,AMC,AMC1,AMC2,AMC3,PS,PSFROM,PSII,PSD,X
  1. ;------------------PSOZCAN("EN")
  1. ;
  1. ;External Calls: ^PSODSPL,ENM^PSOCAN1 ;IHS/DSD/ENM 03/27/97
  1. ;
  1. ;---------------------------------------------------------------
  1. START ;
  1. N X,PSOFROM,PSOOPT S APSPDFN=PSODFN ;IHS/DSD/ENM 03/27/97
  1. S BC="LL" ;IHS/DSD/ENM 03/27/97
  1. D INIT
  1. ;IHS/DSD/ENM 03/27/97 NEXT 4 LINES DISABLED
  1. ;D ^PSODSPL ;----->Displays profile
  1. ;D ASK ;---------->Asks which prescriptions to cancel
  1. ;G:'$T!(PSRXS="")!(PSRXS["^") EXIT
  1. ;D EN^PSOCAN ;---->Does the actual cancellation or reinstating of rxs
  1. D ENM^PSOCAN1 ;IHS/DSD/ENM 03/27/97 ---->Does the actual cancellation or reinstating of rxs
  1. S:$G(PSODFN)']"" PSODFN=APSPDFN ;IHS/DSD/ENM 03/31/97
  1. EXIT ;---------------->End of routine
  1. ;
  1. K PSOZCAN,PS,PSD,PSII,PSRXS,X,PSFROM,BC ;IHS/DSD/ENM 03/27/97
  1. Q
  1. ;-----------------------------------------------------------------
  1. ;
  1. INIT ;
  1. S PSOZCAN("EN")=""
  1. K PSD
  1. S PSFROM="R",PSII=0
  1. S PS="CANCEL"
  1. Q
  1. ;
  1. ASK ;
  1. K X
  1. S DIR("A")="CHOOSE FROM ",DIR("?")="SELECT A NUMBER",DIR(0)="L^1:"_PSII D ^DIR S PSRXS=Y K DIR ;IHS/DSD/ENM 01/09/97
  1. ;W !,"CHOOSE 1 - ",PSII," > "
  1. G:'$T!(PSRXS="")!(PSRXS["^") ASKX
  1. I PSRXS'?1N.E D QUES G START
  1. I +PSRXS>PSII S X=PSRXS G ASKX
  1. F AMC=1:1 S AMC1=$P(PSRXS,",",AMC) Q:AMC1="" S AMC3="" F AMC2=1:1:AMC1 S AMC3=$O(PSD(AMC3)) Q:'AMC3 I AMC2=AMC1 S X=$S($D(X):X_","_$P(^PSRX(+PSD(AMC3),0),U,1),1:$P(^PSRX(+PSD(AMC3),0),U,1)) ;IHS/DSD/ENM 11/15/96
  1. ASKX ;Exit for ASK subroutine
  1. K AMC,AMC1,AMC2,AMC3
  1. Q
  1. QUES ;
  1. W !?5,"Enter the item #(s) or RX #(s) you wish to cancel seperated by commas."
  1. W !?5,"For example: 1,2,5 or 123456,33254A,232323B."
  1. W !?5,"Do not enter the same number twice, duplicates are not allowed."
  1. Q