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

ACMRLU1.m

Go to the documentation of this file.
ACMRLU1 ; IHS/TUCSON/TMJ - GEN RETR UTILITIES ; [ 07/15/1999  7:57 AM ]
 ;;2.0;ACM CASE MANAGEMENT SYSTEM;**1**;JAN 10, 1996
 ;IHS/CMI/LAB - patch 1 Y2K
 ;
MCR ;display all current medicare data
 NEW ACMMIFN
 I '$D(^DPT(P,0)) G MCRX
 I $P(^DPT(P,0),U,19) G MCRX
 I '$D(^AUPNPAT(P,0)) G MCRX
 I '$D(^AUPNMCR(P,11)) G MCRX
 I $D(^DPT(P,.35)),$P(^(.35),U)]"",$P(^(.35),U)<D G MCRX
 S ACMMIFN=0 F  S ACMMIFN=$O(^AUPNMCR(P,11,ACMMIFN)) Q:ACMMIFN'=+ACMMIFN  D
 .Q:$P(^AUPNMCR(P,11,ACMMIFN,0),U)>D
 .I $P(^AUPNMCR(P,11,ACMMIFN,0),U,2)]"",$P(^(0),U,2)<D Q
 .S ACMPCNT=ACMPCNT+1,ACMPRNM(ACMPCNT)=$P(^AUPNMCR(DFN,0),U,3)_" ["_$S($P(^(0),U,4)]"":$P(^AUTTMCS($P(^(0),U,4),0),U),1:"-")_"]"
 .;being Y2K
 .;S ACMPCNT=ACMPCNT+1,Y=$P(^AUPNMCR(DFN,11,ACMMIFN,0),U),Z=$P(^(0),U,2),ACMPRNM(ACMPCNT)=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3)_"-" I Z]"" S ACMPRNM(ACMPCNT)=ACMPRNM(ACMPCNT)_$E(Z,4,5)_"/"_$E(Z,6,7)_"/"_$E(Y,2,3) ;Y2000
 .S ACMPCNT=ACMPCNT+1,Y=$P(^AUPNMCR(DFN,11,ACMMIFN,0),U),Z=$P(^(0),U,2),ACMPRNM(ACMPCNT)=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_(1700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