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

ACHSVUR1.m

Go to the documentation of this file.
ACHSVUR1 ; IHS/ITSC/PMF - NO DESCRIPTION PROVIDED ;  [ 10/16/2001   8:16 AM ]
 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
 ;routine created 9/11/00 to check eligibility changes
 ;
PRVTST ;EP from ACHSVUR
 ;TEST FOR PRIVATE INSURANCE ELIGIBLE DURING DATE OF SERVICE
 S I=0
 S CT=0
 F  S I=$O(^AUPNPRVT(DFN,11,I))  Q:(I'?1N.N)!(CT=1)  D
 .S ELGBDAT=$P(^AUPNPRVT(DFN,11,I,0),U,6)
 .S ELGEDAT=$P(^AUPNPRVT(DFN,11,I,0),U,7)
 .S AUTHBDOS=$P(^ACHSF(DUZ(2),"D",DA,3),U)
 .S AUTHEDOS=$P(^ACHSF(DUZ(2),"D",DA,3),U,2)
 .I (ELGEDAT="")&(AUTHBDOS>ELGBDAT) S CT=CT+1 W ?65,"Y"
 .I (ELGEDAT'="")&(AUTHBDOS>ELGBDAT)&(AUTHBDOS<ELGEDAT) S CT=CT+1 W ?65,"Y"
 K ELGBDAT,ELGEDAT,AUTHBOS,AUTHEDOS,I,CT
 Q
MCDTST ;EP from ACHSVUR
 ;TEST FOR MEDICAID INSURANCE ELIGIBLE DURING DATE OF SERVICE
 S CT=0
 S M=0
 S M=$O(^AUPNMCD("B",DFN,M))  Q:'+M  D
 .S MCDDFN=M
 .Q
 S I=0
 F  S I=$O(^AUPNMCD(MCDDFN,11,I))  Q:(I'?1N.N)!(CT=1)  D
 .S ELGBDAT=$P(^AUPNMCD(MCDDFN,11,I,0),U)
 .S ELGEDAT=$P(^AUPNMCD(MCDDFN,11,I,0),U,2)
 .S AUTHBDOS=$P(^ACHSF(DUZ(2),"D",DA,3),U)
 .S AUTHEDOS=$P(^ACHSF(DUZ(2),"D",DA,3),U,2)
 .I (ELGEDAT="")&(AUTHBDOS>ELGBDAT) S CT=CT+1 W ?65,"Y"
 .I (ELGEDAT'="")&(AUTHBDOS>ELGBDAT)&(AUTHBDOS<ELGEDAT) S CT=CT+1 W ?65,"Y"
 K ELGBDAT,ELGEDAT,AUTHBOS,AUTHEDOS,I,M,MCDDFN,CT
 Q
MCRTST ;EP from ACHSVUR
 ;TEST FOR MEDICARE INSURANCE ELIGIBLE DURING DATE OF SERVICE
 S CT=0
 S I=0
 F  S I=$O(^AUPNMCR(DFN,11,I))  Q:(I'?1N.N)!(CT=1)  D
 .S ELGBDAT=$P(^AUPNMCR(DFN,11,I,0),U)
 .S ELGEDAT=$P(^AUPNMCR(DFN,11,I,0),U,2)
 .S AUTHBDOS=$P(^ACHSF(DUZ(2),"D",DA,3),U)
 .S AUTHEDOS=$P(^ACHSF(DUZ(2),"D",DA,3),U,2)
 .I (ELGEDAT="")&(AUTHBDOS>ELGBDAT) S CT=CT+1 W ?65,"Y"
 .I (ELGEDAT'="")&(AUTHBDOS>ELGBDAT)&(AUTHBDOS<ELGEDAT) S CT=CT+1 W ?65,"Y"
 K ELGBDAT,ELGEDAT,AUTHBOS,AUTHEDOS,I,CT
 Q
RRETST ;EP from ACHSVUR
 ;TEST FOR RAILROAD INSURANCE ELIGIBLE DURING DATE OF SERVICE
 S CT=0
 S I=0
 F  S I=$O(^AUPNRRE(DFN,11,I))  Q:(I'?1N.N)!(CT=1)  D
 .S ELGBDAT=$P(^AUPNRRE(DFN,11,I,0),U)
 .S ELGEDAT=$P(^AUPNRRE(DFN,11,I,0),U,2)
 .S AUTHBDOS=$P(^ACHSF(DUZ(2),"D",DA,3),U)
 .S AUTHEDOS=$P(^ACHSF(DUZ(2),"D",DA,3),U,2)
 .I (ELGEDAT="")&(AUTHBDOS>ELGBDAT) S CT=CT+1 W ?65,"Y"
 .I (ELGEDAT'="")&(AUTHBDOS>ELGBDAT)&(AUTHBDOS<ELGEDAT) S CT=CT+1 W ?65,"Y"
 K ELGBDAT,ELGEDAT,AUTHBOS,AUTHEDOS,I,CT
 Q