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

APCDPOP.m

Go to the documentation of this file.
  1. APCDPOP ; IHS/CMI/LAB - post selection on V PROCEDURE ;
  1. ;;2.0;IHS PCC SUITE;**11**;MAY 14, 2009;Build 58
  1. ;
  1. AGE ;IF THERE IS AGE CRITERIA DATA AVAILABLE CHECK TO SEE THAT IT FITS THE CRITERIA
  1. Q:$D(APCDTACC)
  1. Q:'$D(APCDTPCC)
  1. G:'$D(AUPNDAYS) XIT
  1. S APCDSY=Y,APCDY=+Y
  1. NEW %,A,B
  1. S %=$$ICDOP^ICDEX(APCDY,$S($G(APCDVSIT):$$VD^APCLV(APCDVSIT),1:DT),,"I")
  1. S (A,B)="" ;CSV
  1. I $$VERSION^XPDUTL("BCSV")]"" D I 1 ;CSV
  1. .S A="",B="" ;CSV
  1. E S A=$P($G(^ICD0(APCDY,9999999)),U),B=$P($G(^ICD0(APCDY,9999999)),U,2)
  1. I A]"",A>AUPNDAYS D ACCEPT
  1. I B]"",B<AUPNDAYS D ACCEPT
  1. D XIT
  1. Q
  1. ACCEPT ;
  1. I $D(AUPNTALK) S APCDTACC="" Q
  1. I $D(ZTQUEUED) S APCDTACC="" Q
  1. W !!,$C(7),$C(7),"WARNING: The Patient's age is outside the IHS edit age range for this ICD Code!",!
  1. I $D(AUPNDOB) S Y=AUPNDOB D DD^%DT S APCDRDOB=Y
  1. W "Patient's DOB: ",$G(APCDRDOB),?35,"Patient's Age in Days: ",AUPNDAYS,!,"ICD Proc Edit Lower Age: ",$P(^ICD0(APCDY,9999999),U),?35,"ICD Proc Edit Upper Age: ",$P(^ICD0(APCDY,9999999),U,2)
  1. W !!,"Do you still want to use this code" S %=2 D YN^DICN I %'=1 S Y=-1 Q
  1. S APCDTACC=1
  1. Q
  1. XIT ;
  1. I Y'=-1,$D(APCDSY) S Y=APCDSY
  1. K APCDY,APCDRDOB,APCDSY
  1. Q