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

APCDOPOV.m

Go to the documentation of this file.
APCDOPOV ; IHS/CMI/LAB - CPV MNEMONIC CALLS
 ;;2.0;IHS PCC SUITE;**18**;MAY 14, 2009;Build 2
 ;
FMLK ;EP - called from input templates
 ;APCD CPV (ADD)
 D EN^XBNEW("FMLK1^APCDOPOV","APCDDATE;APCDVSIT;AUPNSEX;APCDTSKI;APCDLOOK;APCDTERR;APCDUINP;APCDTNQP")
 Q
FMLK1 ;EP - called from xbnew
 K APCDTSKI,APCDTERR,APCDTNQP
 K DIR
 S DIR(0)="FO^1:60",DIR("A")="Enter PURPOSE OF VISIT"
 S DIR("?")=$S($G(APCDTIN9):"^D HELP9^AUPNSIC9",1:"^D HELP^AUPNSICH")
 S DIR("??")=$S($G(APCDTIN9):"^D HELP9^AUPNSIC9",1:"^D HELP^AUPNSICH")
 KILL DA D ^DIR KILL DIR
 I Y="" S APCDTSKI=1,APCDLOOK="" G XITL
 I $D(DIRUT) S APCDLOOK="",APCDTSKI=1 G XITL
 S APCDUINP=Y
 S X=APCDUINP
 X:$D(^DD(9000010.07,.01,12.1)) ^DD(9000010.07,.01,12.1) S DIC="^ICD9(",DIC(0)="EMQ" D ^DIC K DIC
 G:Y="" XITL
 ;I $P(Y,U)=-1,X=""!(X="^") S APCDTSKI=1,APCDLOOK="" G XIT
 I $P(Y,U)=-1 S APCDTERR=1,APCDLOOK="" G XITL
 S APCDLOOK="`"_+Y,APCDTNQP=APCDUINP
N ;
 ;
XITL K Y,X,DO,D,DD,DIPGM,APCDTPCC
 Q
EDIT01 ;EP - called from APCD CPV (MOD)
 D EN^XBNEW("EDIT011^APCDOPOV","APCDTDA;APCDVSIT;APCDPAT;APCDDATE;DFN;AUPNPAT;AUPNVSIT;APCDTTMP")
 Q
EDIT011 ;
 K DIE,DA,DR
 S APCDOVRR=1
 ;
 S APCDT90=$P($$ICDDX^ICDEX($P(^AUPNVPOV(APCDTDA,0),U,1),$$VD^APCLV(APCDVSIT)),U,20)
 ;PROVIDER NARRATIVE
 D K
 I $P($G(^AUPNVPOV(APCDTDA,11)),U,1)]"" D  G 4
 .W !!?5,"PROVIDER NARRATIVE: ",$$VAL^XBDIQ1(9000010.07,APCDTDA,.04),!!   ;display only if snomed coded
 I $G(APCDTTMP)="IPV" D  G 4
 .S APCDTNQ=$E($P($$ICDDX^ICDEX($P(^AUPNVPOV(APCDTDA,0),U,1),APCDD,,,"I"),U,4),1,140)_"     ****ICD****"
 .S DA=APCDTDA,DIE="^AUPNVPOV(",DR=".04///"_APCDTNQ,DIE("NO^")=1 D ^DIE K DIE,DA,DR
 .W !!,"PROVIDER NARRATIVE: ",$$VAL^XBDIQ1(9000010.07,APCDTDA,.04)
NA ;
 K DIR S DIR(0)="9000010.07,.04",DIR("A")="PROVIDER NARRATIVE",DIR("B")=$$VAL^XBDIQ1(9000010.07,APCDTDA,.04) KILL DA D ^DIR KILL DIR
 I $D(DIRUT) Q  ;^
 I X["|" D EN^DDIOL("A vertical bar '|' is not allowed in the provider narrative") G NA
 S APCDTNQ=+Y
 S DA=APCDTDA,DIE="^AUPNVPOV(",DR=".04////"_APCDTNQ D ^DIE K DIE,DA,DR
 ;
4 ;PRESENT ON ADMISSION/PRIMARY/SECONDAY H VISITS ONLY
 D K
 S APCDTIMH=""
 S DIE="^AUPNVPOV(",DA=APCDTDA,DR="[APCD EDIT POV]" D ^DIE K DIE,DA,DR
 I '$G(APCDTIMH) Q
17 ;
 S DA=APCDTDA,DIE="^AUPNVPOV(",DR="[APCD EDIT CPV]" D ^DIE K DIE,DA,DR
 Q
K ;
 K DIE,DA,DR,DIR
 K APCDTDEL,APCDTNPV,APCDTFIE,APCDTDIA,APCDIMP,APCDTIN9,APCDTUPH
 Q