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

APCDRICD.m

Go to the documentation of this file.
APCDRICD ; IHS/CMI/LAB - RECODE ICD TO APC ; 25 Feb 2010  11:46 AM
 ;;2.0;IHS PCC SUITE;**1,11**;MAY 14, 2009;Build 58
 K APCDAGEE
EIN ; SCREEN OUT E CODES AND INACTIVE CODES
 NEW %
 I $G(APCDICDP) S %=APCDICDP G EIN1
 S %=$$CODEABA^ICDEX(APCDICD,80)
EIN1 ;
 I $$CHKE1^AUPNSICD(+%) S APCDE="E047" Q
 I APCDICD=.9999!(APCDICD="ZZZ.999") S APCDE="E026" Q
 ;G:$E(APCDICD)="." SEX I $L($P(APCDICD,".",2))>2 S APCDE="E003" Q
SEX ;
 NEW S,%
 S %=$$ICDDX^ICDEX(APCDICDP,$$VD^APCLV(APCDVSIT)) S S=$P(%,U,11)
 I S]"",AUPNSEX'=S S APCDE="E042" Q
AGE ; IF THERE IS AGE CRITERIA DATA AVAILABLE CHECK TO SEE THAT IT FITS THE CRITERIA
 S (A,B)=""  ;CSV
 I $$VERSION^XPDUTL("BCSV")]"" D  I 1  ;CSV
 .S A=$P(%,U,15),B=$P(%,U,16)  ;CSV
 E   S A=$P($G(^ICD9(APCDICDP,9999999)),U),B=$P($G(^ICD9(APCDICDP,9999999)),U,2)
 I A]"",A>$$AGE^AUPNPAT($P($G(^AUPNVSIT(APCDVSIT,0)),U,5),$$VD^APCLV(APCDVSIT)) S APCDAGEE="" Q
 I B]"",B<$$AGE^AUPNPAT($P($G(^AUPNVSIT(APCDVSIT,0)),U,5),$$VD^APCLV(APCDVSIT)) S APCDAGEE="" Q
 Q
 ;