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

ACMPLAN.m

Go to the documentation of this file.
ACMPLAN ; IHS/TUCSON/TMJ - CARE PLAN ;
 ;;2.0;ACM CASE MANAGEMENT SYSTEM;;JAN 10, 1996
EN D HEAD^ACMMENU
 W !!?14,"Update ",@ACMRVON,"PLAN OF CARE",@ACMRVOFF,!?17,"for ",@ACMRVON,ACMPTNA2,@ACMRVOFF,!!?14,"CARE PLAN CATEGORY",?50,"CARE PLAN LAST EDITED",!?14,"----------------------",?50,"-----------------------"
PP D ACMTEMP
 W !?14,"MEDICAL CARE PLAN",?50,ACMMED,!?14,"NURSING PLAN",?50,ACMPHN,!?14,"SOCIAL SERVICES PLAN",?50,ACMSS,!?14,"EDUCATIONAL PLAN",?50,ACMEDP,!?14,"MENTAL HEALTH PLAN",?50,ACMMH,!?14,"OTHER PLANS",?50,ACMOTH
DIC S DIC="^ACM(48.1,",DIC(0)="AEQM",DIC("A")=" SELECT PLAN: "
 W !
 D ^DIC K DIC
 G:X="" EXIT
 I $E(X)=U S ACMQUIT="" S:X["^" ACMOUT="" G EXIT
 S X=+Y
 I $D(^ACM(48,"AC",ACMRG,ACMPTNO,+Y)) S DA=^(+Y) G DIE
 K DIC,DD
 S DIC="^ACM(48,",DIC(0)="L",DIC("DR")=".02////"_ACMPTNO_";.03////"_ACMRGDFN_";.04////"_ACMRG
 K DD,DO D FILE^DICN S DA=+Y K DIC,DR,DD
DIE S DIE="^ACM(48,",DR=".02////"_ACMPTNO_";.03////"_ACMRGDFN_";.04////"_ACMRG_";1;2///"_DT
 D ^DIE K DIC,DIE,DA,DR
 S DIE="^ACM(41,",DA=ACMRGDFN,DR="11///TODAY" D ^DIE K DIC,DIE,DA,DR
 I $D(ACMFLAG),ACMFLAG'="" G EXIT
 G EN
 Q
ACMTEMP ;
 S (ACMMED,ACMPHN,ACMSS,ACMEDP,ACMMH,ACMOTH)="*** NO PLAN ON FILE ***",(ACMAA,ACMP)=""
 F  S ACMAA=$O(^ACM(48,"AC",ACMRG,ACMPTNO,ACMAA)) Q:ACMAA=""  S ACMA=^(ACMAA) D FIND
 Q
FIND ;
 S ACMP=$P(^ACM(48,ACMA,0),U)
 I ACMP=1,$D(^ACM(48,ACMA,4)) S ACMMED=$P(^ACM(48,ACMA,4),U) I +ACMMED>0 S Y=ACMMED X ^DD("DD") S ACMMED=Y
 I ACMP=2,$D(^ACM(48,ACMA,4)) S ACMPHN=$P(^ACM(48,ACMA,4),U) I +ACMPHN>0 S Y=ACMPHN X ^DD("DD") S ACMPHN=Y
 I ACMP=3,$D(^ACM(48,ACMA,4)) S ACMSS=$P(^ACM(48,ACMA,4),U) I +ACMSS>0 S Y=ACMSS X ^DD("DD") S ACMSS=Y
 I ACMP=4,$D(^ACM(48,ACMA,4)) S ACMMH=$P(^ACM(48,ACMA,4),U) I +ACMMH>0 S Y=ACMMH X ^DD("DD") S ACMMH=Y
 I ACMP=5,$D(^ACM(48,ACMA,4)) S ACMOTH=$P(^ACM(48,ACMA,4),U) I +ACMOTH>0 S Y=ACMOTH X ^DD("DD") S ACMOTH=Y
 I ACMP=6,$D(^ACM(48,ACMA,1,0)) S ACMEDP=$P(^ACM(48,ACMA,4),U) I +ACMEDP>0 S Y=ACMEDP X ^DD("DD") S ACMEDP=Y
 Q
EXIT ;
 K ACMX,ACMA,ACMAA,ACMMED,ACMPHN,ACMSS,ACMEDP,ACMMH,ACMOTH,ACMP,ACMFLAG
 Q