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

BCHRLU1.m

Go to the documentation of this file.
  1. BCHRLU1 ; IHS/CMI/LAB - GEN RET UTIL ;
  1. ;;2.0;IHS RPMS CHR SYSTEM;;OCT 23, 2012;Build 27
  1. ;IHS/CMI/LAB - patch 7 Y2K
  1. ;
  1. ;IHS/CMI/LAB - PATCH 6 9/21/98
  1. ;IHS/CMI/LAB - patch 9 fixes variable Y to Z
  1. MCR ;display all current medicare data
  1. NEW BCHMIFN
  1. I '$D(^DPT(P,0)) G MCRX
  1. I $P(^DPT(P,0),U,19) G MCRX
  1. I '$D(^AUPNPAT(P,0)) G MCRX
  1. I '$D(^AUPNMCR(P,11)) G MCRX
  1. I $D(^DPT(P,.35)),$P(^(.35),U)]"",$P(^(.35),U)<D G MCRX
  1. S BCHMIFN=0 F S BCHMIFN=$O(^AUPNMCR(P,11,BCHMIFN)) Q:BCHMIFN'=+BCHMIFN D
  1. .Q:$P(^AUPNMCR(P,11,BCHMIFN,0),U)>D
  1. .I $P(^AUPNMCR(P,11,BCHMIFN,0),U,2)]"",$P(^(0),U,2)<D Q ;IHS/CMI/LAB - patch 6 replaced BCHACE with D 9/21/98
  1. .S BCHPCNT=BCHPCNT+1,BCHPRNM(BCHPCNT)=$P(^AUPNMCR(DFN,0),U,3)_" ["_$S($P(^(0),U,4)]"":$P(^AUTTMCS($P(^(0),U,4),0),U),1:"-")_"]"
  1. .;begin Y2K
  1. .;S BCHPCNT=BCHPCNT+1,Y=$P(^AUPNMCR(DFN,11,BCHMIFN,0),U),Z=$P(^(0),U,2),BCHPRNM(BCHPCNT)=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3)_"-" I Z]"" S BCHPRNM(BCHPCNT)=BCHPRNM(BCHPCNT)_$E(Z,4,5)_"/"_$E(Z,6,7)_"/"_$E(Y,2,3) ;Y2000
  1. .S BCHPCNT=BCHPCNT+1,Y=$P(^AUPNMCR(DFN,11,BCHMIFN,0),U),Z=$P(^(0),U,2),BCHPRNM(BCHPCNT)=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_($E(Y,1,3)+1700)_"-" ;Y2000
  1. .I Z]"" S BCHPRNM(BCHPCNT)=BCHPRNM(BCHPCNT)_$E(Z,4,5)_"/"_$E(Z,6,7)_"/"_(1700+$E(Z,1,3)) ;Y2000
  1. .;end Y2K
  1. .Q
  1. MCRX ;
  1. K Y,Z
  1. Q
  1. ;
  1. MCD ;
  1. NEW BCHMIFN,BCHNIFN
  1. I '$D(^DPT(P,0)) G MCDX
  1. I $P(^DPT(P,0),U,19) G MCDX
  1. I '$D(^AUPNPAT(P,0)) G MCDX
  1. I $D(^DPT(P,.35)),$P(^(.35),U)]"",$P(^(.35),U)<D G MCDX
  1. S BCHMIFN=0 F S BCHMIFN=$O(^AUPNMCD("B",P,BCHMIFN)) Q:BCHMIFN'=+BCHMIFN D
  1. .Q:'$D(^AUPNMCD(BCHMIFN,11))
  1. .S BCHNIFN=0 F S BCHNIFN=$O(^AUPNMCD(BCHMIFN,11,BCHNIFN)) Q:BCHNIFN'=+BCHNIFN D
  1. ..Q:BCHNIFN>D
  1. ..I $P(^AUPNMCD(BCHMIFN,11,BCHNIFN,0),U,2)]"",$P(^(0),U,2)<D Q
  1. ..S BCHPCNT=BCHPCNT+1,BCHPRNM(BCHPCNT)=$P(^AUPNMCD(BCHMIFN,0),U,3)_"/"_$S($P(^AUPNMCD(BCHMIFN,0),U,2)]"":$P(^AUTNINS($P(^AUPNMCD(BCHMIFN,0),U,2),0),U),1:"<>")
  1. ..;begin Y2K
  1. ..;S BCHPCNT=BCHPCNT+1,Y=$P(^AUPNMCD(BCHMIFN,11,BCHNIFN,0),U),Z=$P(^(0),U,2),BCHPRNM(BCHPCNT)=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3)_"-" I Z]"" S BCHPRNM(BCHPCNT)=BCHPRNM(BCHPCNT)_$E(Z,4,5)_"/"_$E(Z,6,7)_"/"_$E(Y,2,3) ;Y2000
  1. ..S BCHPCNT=BCHPCNT+1,Y=$P(^AUPNMCD(BCHMIFN,11,BCHNIFN,0),U),Z=$P(^(0),U,2),BCHPRNM(BCHPCNT)=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_(1700+$E(Y,1,3))_"-" ;Y2000
  1. ..I Z]"" S BCHPRNM(BCHPCNT)=BCHPRNM(BCHPCNT)_$E(Z,4,5)_"/"_$E(Z,6,7)_"/"_(1700+$E(Z,1,3)) ;Y2000
  1. ..;end Y2K
  1. ..Q
  1. .Q
  1. ;
  1. MCDX ;
  1. Q
  1. ;
  1. PI ;
  1. NEW BCHMIFN,BCHFLG
  1. I '$D(^DPT(P,0)) G PIX
  1. I $P(^DPT(P,0),U,19) G PIX
  1. I '$D(^AUPNPAT(P,0)) G PIX
  1. I '$D(^AUPNPRVT(P,11)) G PIX
  1. I $D(^DPT(P,.35)),$P(^(.35),U)]"",$P(^(.35),U)<D G PIX
  1. S BCHMIFN=0 F S BCHMIFN=$O(^AUPNPRVT(P,11,BCHMIFN)) Q:BCHMIFN'=+BCHMIFN D
  1. .Q:$P(^AUPNPRVT(P,11,BCHMIFN,0),U)=""
  1. .S BCHNAME=$P(^AUPNPRVT(DFN,11,BCHMIFN,0),U) Q:BCHNAME=""
  1. .Q:$P(^AUTNINS(BCHNAME,0),U)["AHCCCS"
  1. .Q:$P(^AUPNPRVT(P,11,BCHMIFN,0),U,6)>D
  1. .I $P(^AUPNPRVT(P,11,BCHMIFN,0),U,7)]"",$P(^(0),U,7)<D Q ;IHS/CMI/LAB - patch 6 replaced BCHACE with D 9/21/98
  1. .S BCHPCNT=BCHPCNT+1,BCHPRNM(BCHPCNT)=$P(^AUTNINS($P(^AUPNPRVT(P,11,BCHMIFN,0),U),0),U)
  1. .;begin Y2K
  1. .;S BCHPCNT=BCHPCNT+1,Y=$P(^AUPNPRVT(DFN,11,BCHMIFN,0),U,6),Z=$P(^(0),U,7),BCHPRNM(BCHPCNT)=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3)_"-" I Z]"" S BCHPRNM(BCHPCNT)=BCHPRNM(BCHPCNT)_$E(Z,4,5)_"/"_$E(Z,6,7)_"/"_$E(Y,2,3) ;Y2000
  1. .S BCHPCNT=BCHPCNT+1,Y=$P(^AUPNPRVT(DFN,11,BCHMIFN,0),U,6),Z=$P(^(0),U,7),BCHPRNM(BCHPCNT)=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_(1700+$E(Y,1,3))_"-" ;Y2000
  1. .I Z]"" S BCHPRNM(BCHPCNT)=BCHPRNM(BCHPCNT)_$E(Z,4,5)_"/"_$E(Z,6,7)_"/"_(1700+$E(Z,1,3)) ;Y2000
  1. .;end Y2K
  1. .Q
  1. PIX ;
  1. Q