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

APCDPPOV.m

Go to the documentation of this file.
  1. APCDPPOV ; IHS/CMI/LAB - post selection on V POV ;
  1. ;;2.0;IHS PCC SUITE;**2,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 %=$$ICDDX^ICDEX(APCDY,$S($G(APCDVSIT):$$VD^APCLV(APCDVSIT),1:DT))
  1. Q:'$G(APCDVSIT)
  1. S (A,B)="" ;CSV
  1. I $$VERSION^XPDUTL("BCSV")]"" D I 1 ;CSV
  1. .S A=$P(%,U,15),B=$P(%,U,16) ;CSV
  1. E S A=$P($G(^ICD9(APCDY,9999999)),U),B=$P($G(^ICD9(APCDY,9999999)),U,2)
  1. I A]"",A>$$AGE^AUPNPAT($P($G(^AUPNVSIT(APCDVSIT,0)),U,5),$$VD^APCLV(APCDVSIT)) D ACCEPT
  1. I B]"",B<$$AGE^AUPNPAT($P($G(^AUPNVSIT(APCDVSIT,0)),U,5),$$VD^APCLV(APCDVSIT)) 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 Edit Lower Age: ",A,?35,"ICD Edit Upper Age: ",B
  1. I APCDCAT="H",'$D(^APCDINPT(9,11,"AC",$P(^ICD9(APCDY,0),U))) W !!,"An ACCEPT command is not allowed for this code. Refer to IHS Direct",!,"Inpatient Edit Documentation for further explanation. You cannot use this code.",! S Y=-1 Q
  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. Q
  1. XIT ;
  1. I Y'=-1,$D(APCDSY) S Y=APCDSY
  1. K APCDY,APCDRDOB,APCDSY
  1. Q