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

APCDEGP0.m

Go to the documentation of this file.
APCDEGP0 ; IHS/CMI/LAB - CONT. APCDEGP ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
POV1 ;EP;
 D ^XBFMK
 W !
 K APCDLOOK,APCDTNQP,APCDTERR,APCDTSKI,X
 D ^APCDAPOV
 I $D(APCDTSKI) S APCDPOV="" Q
 I $D(APCDTERR) G POV1
 S APCDPOV=APCDLOOK
 K APCDLOOK
 K DA,DIR,DIRUT,DUOUT,DTOUT,X,Y S DIR("A")="PROVIDER NARRATIVE",DIR(0)="9000010.07,.04" D ^DIR K DIR
 G:$D(DIRUT) POV1
 S APCDEGC=APCDEGC+1
 S ^TMP("APCDEGP",$J,"POV",APCDEGC,"APCDTPOV")=APCDPOV_U_"`"_+Y_U_2
 Q
PROV1 ;EP
 D ^XBFMK
 X:$D(^DD(9000010.06,.01,12.1)) ^DD(9000010.06,.01,12.1)
 S DIC=$S($P(^DD(9000010.06,.01,0),U,2)[200:"^VA(200,",1:"^DIC(6,"),DIC(0)="AEMQ",DIC("A")=$S('APCDEGPS:"Enter PRIMARY Provider.: ",1:"Enter SECONDARY Provider: ") D ^DIC K DIC ;IHS/CMI/LAB - added file 200 check
 I Y=-1 S APCDEGPR="" Q
 S APCDEGPR=+Y
 I APCDEGPS S APCDEGPC="S" G PROV11
 S APCDEGPS=1,APCDEGPC="P"
PROV11 S APCDEGC=APCDEGC+1
 S ^TMP("APCDEGP",$J,"PROV",APCDEGC,"APCDTPRV")="`"_APCDEGPR_U_APCDEGPC
 Q
CHECK ;EP;SEE IF PV AND PRO ENTERED CORRECTLY
 Q:$D(APCDMOD)
 S APCDMPQ=1
 I $P(^AUPNVSIT(APCDVSIT,0),U,7)="E" Q
 K APCDNOCL D ^APCDVCHK
 I APCDMODE'="M",'$D(^AUPNVPOV("AD",APCDVSIT)) W !,"PV mnemonic required!",!,APCDBEEP S:'$D(DTOUT) APCDMPQ=0 Q
 I APCDMODE'="M",'$D(^AUPNVPRV("AD",APCDVSIT)) W !,"PRV mnemonic required!",!,APCDBEEP S:'$D(DTOUT) APCDMPQ=0 Q
 I APCDMODE'="M",$D(APCDNOCL) W !,"CL mnemonic required!",!,$C(7) S:'$D(DTOUT) APCDMPQ=0 K APCDNOCL Q
 I APCDMODE'="M",$P(^AUPNVSIT(APCDVSIT,0),U,3)="C",'$D(^AUPNVCHS("AD",APCDVSIT)) W !,"CHA, CHH or CHI mnemonic required with Contract Visits!",$C(7) S:'$D(DTOUT) APCDMPQ=0 Q
 D DEDT^APCDEA2(APCDVSIT) I $P(APCDPARM,U,5)="Y",'$D(^APCDFORM("AB",APCDVSIT)) S APCDFV=APCDVSIT D ^APCDFORM K APCDFV
 Q
EDUC1 ;EP;
 D ^XBFMK
 X:$D(^DD(9000010.16,.01,12.1)) ^DD(9000010.16,.01,12.1)
 W !
 S DIC="^AUTTEDT(",DIC(0)="AEMQ",DIC("A")="Enter Educaton TOPIC: " D ^DIC K DIC
 I Y=-1 S APCDEGPR="" Q
 S APCDEGPR=+Y
 K DIR
 S DIR(0)="9000010.16,.08",DIR("A")="Enter the number of minutes of education provided" KILL DA D ^DIR KILL DIR
 I $D(DIRUT) Q
 I Y="" Q
EDUC11 S APCDEGC=APCDEGC+1
 S ^TMP("APCDEGP",$J,"EDUC",APCDEGC,"APCDTTOP")="`"_APCDEGPR_U_Y
 K DIC
 S DIC=200,DIC(0)="AEMQ",DIC("A")="Provider who performed the education: " D ^DIC
 I X="" W !,"none entered " G EDUC12
 I Y=-1 W !,"none entered " G EDUC12
 S $P(^TMP("APCDEGP",$J,"EDUC",APCDEGC,"APCDTTOP"),U,3)=+Y
EDUC12 ;OBJECTIVES
 W !!,"Note: if you enter objectives met, the objectives must be the "
 W !,"same for each patient in the group.",!
 S DIR(0)="9000010.16,.14",DIR("A")="Enter the Objectives Met" KILL DA D ^DIR KILL DIR
 I $D(DIRUT) G EDUCX
 I Y="" G EDUCX
 S $P(^TMP("APCDEGP",$J,"EDUC",APCDEGC,"APCDTTOP"),U,4)=Y
EDUCX ;
 G EDUC1