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

APCDR07.m

Go to the documentation of this file.
APCDR07 ; IHS/CMI/LAB - V POV REVIEW ;
 ;;2.0;IHS PCC SUITE;**11**;MAY 14, 2009;Build 58
 ;
 ;           screening off codes less than 800.
DVAR ;
 S APCDEREC=^AUPNVPOV(APCDEDFN,0)
POVCODE ; 
 S APCDICDP=$P(APCDEREC,U) I '$D(^ICD9(APCDICDP,0)) S APCDE="E004" D ERR G XIT
 S APCDICD=$$CODEC^ICDEX(80,APCDICDP)
 K APCDE,APCDAGEE
 D ^APCDRICD
 I $D(APCDE) D ERR G XIT
 I $D(APCDAGEE),'$P(^AUPNVPOV(APCDEDFN,0),U,14) S APCDE="E048" D ERR G XIT
 S APCDCODE=APCDICD
POVNARR ; POV Narrative-CP 51-94- if null use 3rd piece of ICD9
 S APCDNPTR=$P(APCDEREC,U,4) I APCDNPTR="" S APCDE="E006" D ERR G XIT
 I '$D(^AUTNPOV(APCDNPTR,0)) S APCDE="E006" D ERR G XIT
 ;
FVRV ; First/Revisit-CP 95-8th piece of AUPNVPOV,0
 S APCDFVRV=$P(APCDEREC,U,8)
 S:APCDFVRV="" APCDFVRV=2
 ;
INJICDA ; Cause of Injury-CP 106-109
 S APCDICD="",APCDINJ=$P(APCDEREC,U,11),APCDICDP=$P(APCDEREC,U,9)
 G:APCDICDP="" XIT
 G:'$$INJ^APCDAPOV($$CODEC^ICDEX(80,APCDICDP),$$CSI^ICDEX(80,APCDICDP)) XIT
 I '$$CHKE1^AUPNSICD(APCDICDP) S APCDE="E005" D ERR G XIT
 ;
XIT ; Clean up and exit
 K APCDEREC,APCDICD,APCDICDP,APCDNPTR,APCDINJ,APCDE,APCDCODE,APCDFVRV,APCDAGEE
 Q
ERR ;
 S APCDE("FILE")=9000010.07,APCDE("ENTRY")=APCDEDFN
 D ERR^APCDRV
 Q