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

APCDEL1.m

Go to the documentation of this file.
APCDEL1 ; IHS/CMI/LAB - UPDATE VISIT W/LIST MAN ;
 ;;2.0;IHS PCC SUITE;**5**;MAY 14, 2009;Build 18
 ;
 ;
 ;
HS ;EP - called from protocol to display health summary
 D FULL^VALM1
 K DIC,DR,DD S DIC="^APCHSCTL(",DIC(0)="AEMQ",DIC("B")="ADULT REGULAR" D ^DIC K DIC,DA,DD,D0,D1,DQ
 I Y=-1 D PAUSE,BACK Q
 S APCHSTYP=+Y,APCHSPAT=APCDPAT
 S APCDHDR="PCC Health Summary for "_$P(^DPT(APCDPAT,0),U)
 D VIEWR^XBLM("EN^APCHS",APCDHDR)
 S (DFN,Y)=APCDPAT D ^AUPNPAT
 K APCHSPAT,APCHSTYP,APCHSTAT,APCHSMTY,AMCHDAYS,AMCHDOB,APCDHDR,APCDSEL,APCDHIGH,APCDSEL,APCHSCCL,APCHSDCL,APCHSICD,APCHSICL,APCHSNRQ,APCHSQT
 D BACK
 Q
OTHER ;EP - called from protocol to process other mnemonics
 D EN^VALM("APCD EL SECONDARY ITEMS")
 D CLEAR^VALM1
 K APCDDISP,APCDSEL,^TMP("APCDEL",$J),C,X,I,K,J,APCDHIGH,APCDCUT,APCDCSEL,APCDCNTL,APCDC,APCDANS,APCDI,APCDCRIT,APCDTEXT
 K VALMHDR,VALMCNT
 D BACK
 Q
HIST ;EP - called from protocol
 D EN^VALM("APCD EL HISTORICAL ITEMS")
 D CLEAR^VALM1
 K APCDDISP,APCDSEL,^TMP("APCDEL",$J),C,X,I,K,J,APCDHIGH,APCDCUT,APCDCSEL,APCDCNTL,APCDC,APCDANS,APCDI,APCDCRIT,APCDTEXT
 K VALMHDR,VALMCNT
 D BACK
 Q
DISP ;
 D FULL^VALM1
 D ^APCDVD
 S (DFN,Y)=APCDPAT
 D ^AUPNPAT
 D BACK
 Q
PROB ;EP called from protocol
 D FULL^VALM1
 S DFN=APCDPAT,APCDSLOC=APCDLOC,APCDSDAT=APCDDATE,APCDSPAT=APCDPAT
 D EN1^APCDPL
 S APCDPAT=APCDSPAT,APCDLOC=APCDSLOC,APCDDATE=APCDSDAT
 K APCDSPAT,APCDSLOC,APCDSDAT
 S (DFN,Y)=APCDPAT
 D ^AUPNPAT
 D BACK
 Q
ADD ;EP - add an item to the selected list - called from a protocol
 W ! S DIR(0)="LO^1:"_APCDHIGH,DIR("A")="Add which visit item(s)" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
 I Y="" W !,"No items selected." G ADDX
 I $D(DIRUT) W !,"No items selected." G ADDX
 D FULL^VALM1 W:$D(IOF) @IOF
 D ADDPROC
ADDX ;
 W !! S DIR(0)="EO",DIR("A")="Press return to continue..." K DA D ^DIR K DIR
 K APCDANS,APCDC,APCDI,APCDCRIT,APCDTEXT
 D BACK
 Q
ADDPROC ;process add items
 S APCDANS=Y,APCDC="" F APCDI=1:1 S APCDC=$P(APCDANS,",",APCDI) Q:APCDC=""  S APCDCRIT=APCDSEL(APCDC) D
 .S APCDTEXT=$P(^APCDTKW(APCDCRIT,0),U,12)
 .S APCDMODE="A"
 .I $P(^APCDTKW(APCDCRIT,0),U,11)=999 D MNEPROC Q
 .S APCDMNE=APCDCRIT,APCDMNE("NAME")=$P(^APCDTKW(APCDCRIT,0),U,1)
 .S APCDMODE="A"
 .K APCDMOD
 .W !!,"Adding ",APCDTEXT,!
 .D ^APCDEA3
 .Q
 Q
MODIFY ;
 W ! S DIR(0)="LO^1:"_APCDHIGH,DIR("A")="Modify which visit item(s)" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
 I Y="" W !,"No items selected." G ADDX
 I $D(DIRUT) W !,"No items selected." G ADDX
 D FULL^VALM1 W:$D(IOF) @IOF
 D MODPROC
MODIFYX ;
 W !! S DIR(0)="EO",DIR("A")="Press return to continue..." K DA D ^DIR K DIR
 K APCDANS,APCDC,APCDI,APCDCRIT,APCDTEXT
 D BACK
 Q
MODPROC ;
 S APCDANS=Y,APCDC="" F APCDI=1:1 S APCDC=$P(APCDANS,",",APCDI) Q:APCDC=""  S APCDCRIT=APCDSEL(APCDC) D
 .S APCDTEXT=$P(^APCDTKW(APCDCRIT,0),U,12)
 .S APCDMODE="M"
 .I $P(^APCDTKW(APCDCRIT,0),U,11)=999 D MNEPROC Q
 .S APCDMNE=APCDCRIT,APCDMNE("NAME")=$P(^APCDTKW(APCDCRIT,0),U,1)
 .S APCDMODE="M",APCDVLK=$G(APCDVSIT)
 .K APCDMOD
 .W !!,"Modifying ",APCDTEXT,!
 .D ^APCDEA3
 .Q
 Q
DELETE ;
 W ! S DIR(0)="LO^1:"_APCDHIGH,DIR("A")="Modify which visit item(s)" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
 I Y="" W !,"No items selected." G DELETEX
 I $D(DIRUT) W !,"No items selected." G DELETEX
 D FULL^VALM1 W:$D(IOF) @IOF
 D DELPROC
DELETEX ;
 W !! S DIR(0)="EO",DIR("A")="Press return to continue..." K DA D ^DIR K DIR
 K APCDANS,APCDC,APCDI,APCDCRIT,APCDTEXT,APCDSEL,APCDHIGH,APCDVLK
 D BACK
 Q
DELPROC ;
 S APCDANS=Y,APCDC="" F APCDI=1:1 S APCDC=$P(APCDANS,",",APCDI) Q:APCDC=""  S APCDCRIT=APCDSEL(APCDC) D
 .S APCDTEXT=$P(^APCDTKW(APCDCRIT,0),U,12)
 .S APCDMODE="M"
 .I $P(^APCDTKW(APCDCRIT,0),U,11)=999 D MNEPROC Q
 .S APCDMNE=APCDCRIT,APCDMNE("NAME")=$P(^APCDTKW(APCDCRIT,0),U,1)
 .S APCDMODE="M",APCDVLK=$G(APCDVSIT)
 .K APCDMOD
 .W !!,"Deleting ",APCDTEXT,!,"After you select the ",APCDTEXT," that you want to delete, ",!,"you MUST enter an '@' to confirm the desire to delete the item.",!
 .D ^APCDEA3
 .Q
 Q
BACK ;EP go back to listman
 D TERM^VALM0
 S VALMBCK="R"
 D:'$G(APCDSECM) INIT^APCDEL
 D:$G(APCDSECM)=1 INIT2^APCDEL
 D:$G(APCDSECM)=2 INIT3^APCDEL
 D HDR^APCDEL
 K DIR
 D KDIE
 K X,Y,Z,I
 Q
PAUSE ;EP
 S DIR(0)="EO",DIR("A")="Press return to continue...." D ^DIR K DIR S:$D(DUOUT) DIRUT=1
 Q
KDIE ;kill all vars used by DIE
 K DIE,DR,DA,DIU,DIV,DQ,D0,DO,DI,DIW,DIY,%,DQ
 Q
MNEPROC ;EP - PROCESS MNEMONICS UNTIL DONE
 S APCDMPQ=0
 F  D GETMNE D:$D(APCDEQX) CHKEHR2^APCDVCHK I APCDMPQ Q
 D GETMNEK
 K APCDMPQ
 Q
 ;
GETMNE ; GET MNEMONIC
 W !
 S DIC="^APCDTKW(",DIC(0)="AEMQ",DIC("A")="MNEMONIC: ",DIC("S")="I $L($P(^(0),U))<5" D ^DIC K DIC("A"),DIC("S")
 I Y<0 S APCDMPQ=1 Q
 S APCDMNE=+Y,APCDMNE("NAME")=$P(Y,U,2)
 K APCDMOD
 D ^APCDEA3
 I $D(APCDEQX) D ^APCDEQX I $D(APCDEQX) S APCDMPQ=1 Q
 I $D(APCDMOD) W !!,"Switching to Modify Mode for ONE Mnemonic ONLY!" S APCDMODE="M",APCDVLK=$G(APCDVSIT) D GETMNE K APCDVLK,APCDMOD S APCDMODE="A" W !!,"Switching back to ENTER Mode!" Q
 Q
 ;
GETMNEK ; KILL GETMNE SPECIFIC VARIABLES
 K APCDEGX,APCDEQX,APCDMNE
 Q