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

ACHSDM.m

Go to the documentation of this file.
ACHSDM ;IHS/OIT/FCJ - FX MEDICAID ENTRIES ; 02/19/2015
 ;;99.1;IHS DICTIONARIES (PATIENT);**24**;MAR 9, 1999;Build 1
 ;Fix developed for BMW
 ;DFN's in the Medicaid file were not dinumed this routine will
 ;be ran during the clean up of those entries
 ;
 ;CALLED BY AUPNMCDF
EN(DFN,ACHSMCD,ACHSOLD,ACHSNEW) ; EP - MCD ELIGIBILITY FIX
 ;DFN-PATIENT DFN
 ;ACHSMCD-MEDICAID IEN
 ;ACHSOLD-OLD MEDICAID IEN
 ;ACHSNEW-NEW MEDICAID IEN
 ;
 ;
 S ACHSDFC=0
 F  S ACHSDFC=$O(^ACHSDEN(ACHSDFC)) Q:ACHSDFC'?1N.N  D
 .Q:'$D(^ACHSDEN(ACHSDFC,"D","D",DFN))
 .S ACHSDDFN=0
 .F  S ACHSDDFN=$O(^ACHSDEN(ACHSDFC,"D","D",DFN,ACHSDDFN)) Q:ACHSDDFN'?1N.N  D
 ..Q:'$D(^ACHSDEN(ACHSDFC,"D",ACHSDDFN,320))
 ..S ACHSDINS=0
 ..F  S ACHSDINS=$O(^ACHSDEN(ACHSDFC,"D",ACHSDDFN,320,ACHSDINS)) Q:ACHSDINS'?1N.N  D
 ...Q:$P(^ACHSDEN(ACHSDFC,"D",ACHSDDFN,320,ACHSDINS,0),U,2)'="C"
 ...Q:$P(^ACHSDEN(ACHSDFC,"D",ACHSDDFN,320,ACHSDINS,0),U,3)'=ACHSMCD
 ...Q:$P(^ACHSDEN(ACHSDFC,"D",ACHSDDFN,320,ACHSDINS,0),U,4)'=ACHSOLD
 ...S $P(^ACHSDEN(ACHSDFC,"D",ACHSDDFN,320,ACHSDINS,0),U,4)=ACHSNEW
 ...;D LOG^AUPNMCDF(FILE,IEN UPDATED,FIELD #,OLD VALUE)
 ...S ACHSIEN=ACHSDINS_","_ACHSDDFN_","_ACHSDFC,ACHSFLD="9002071.13,3",ACHSFL=9002071
 ...D LOG^AUPNMCDF(ACHSFL,ACHSIEN,ACHSFLD,ACHSOLD)
 ;
EXT ;
 K ACHSDFC,ACHSDDFN,ACHSDINS,ACHSMCD,ACHSOLD,ACHSNEW,ACHSIEN,ACHSFLD,ACHSFL
 Q
 ;