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

ACMADDR.m

Go to the documentation of this file.
ACMADDR ; IHS/TUCSON/TMJ - PRINT PATIENT ADDRESS FOR CMS APPOINTMENT LETTER ;
 ;;2.0;ACM CASE MANAGEMENT SYSTEM;;JAN 10, 1996
EN D EN1
EXIT K ACM,ACMCOL,ACMLINE,ACMPTDFN,ACMPTNAM,ACMCONT
 W:$D(IOF) @IOF
 Q
EN1 S ACMPTDFN=$P(^ACM(49,D0,0),U,2),ACMCONT=$P(^ACM(41,$P(^(0),U,3),"DT"),U,13)
 Q:'$D(^DPT(ACMPTDFN,0))!'$D(^(.11))!(ACMLETR="")!($P(ACMLETR,U,1)="")!($P(ACMLETR,U,2)="")
 S ACMCOL=$P(ACMLETR,U,2),ACMLINE=$P(ACMLETR,U)
 F ACM=1:1:(ACMLINE-$Y) W !
 I ACMCONT'="" W !?ACMCOL,ACMCONT
 E  S ACMPTNAM=$P(^DPT(ACMPTDFN,0),U) W !?ACMCOL,$P($P(ACMPTNAM,",",2)," ")," ",$P(ACMPTNAM,",")
 W !?ACMCOL,$P(^DPT(ACMPTDFN,.11),U),!?ACMCOL,$P(^(.11),U,4),", ",$P(^DIC(5,$P(^(.11),U,5),0),U,2),"  ",$P(^DPT(ACMPTDFN,.11),U,6)
 K ACMPTDFN
 Q