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

AICDKWLD.m

Go to the documentation of this file.
AICDKWLD ; IHS/OHPRD/ACC - DRIVER ROUTINE FOR "AND"ING INVERTED LIST SEARCHES ;
 ;;4.0;AICD;;DEC 03, 2014;Build 7
 ;IHS/CMI/LAB - CSV MODS
 ; AICDDESC,AICDH,AICDMULT,AICDREF0 ARE PASSED IN TO DISPLAY ROUTINES
 ;  AND SHOULD NOT BE KILLED IN THIS ROUTINE
 ; AICDKSCH,AICDX ARE KILLED BY AICDKWL
 ;
VERSION ; ENTRY POINT - DISPLAY VERSION (USED FROM MENUS)
 S X="KEYWORD-DRIVEN LOOKUP UTILITY (3.51)"
 S Y=$S(DUZ(2):$P(^DIC(4,DUZ(2),0),U),1:"No site selected")
 W @IOF,!,?(IOM-$L(X)/2),X,!,?(IOM-$L(Y)/2),Y,!
 Q
 ;
ICDDX ; PUBLISHED ENTRY POINT - LOOK UP ICD DIAGNOSIS CODE
 S AICDX=X K AICDKSCH S AICDKSCH("TYPE")="DIAGNOSES",AICDKSCH("GBL")="^ICD9(",AICDKSCH("INDEX")="AIHS",AICDKSCH("DSPLY")="DSPLYD^AICDKWLD" G COMMON
 ;
ICDOP ; PUBLISHED ENTRY POINT - LOOK UP ICD OPERATION/PROCEDURE CODE
 S AICDX=X K AICDKSCH S AICDKSCH("TYPE")="PROCEDURES",AICDKSCH("GBL")="^ICD0(",AICDKSCH("INDEX")="AIHS",AICDKSCH("DSPLY")="DSPLYO^AICDKWLD" G COMMON
 ;
CPTOP ; PUBLISHED ENTRY POINT - LOOK UP CPT CODE
 S AICDX=X K AICDKSCH S AICDKSCH("TYPE")="CPT PROCEDURES",AICDKSCH("GBL")="^ICPT(",AICDKSCH("INDEX")="C",AICDKSCH("DSPLY")="DSPLYC^AICDKWLD"
 ;
COMMON ; COMMON CODE FOR ALL TYPES OF LOOKUPS
 I $D(DIC(0)),DIC(0)["A" W !
 S X=AICDX,AICDX="" F %=1:1 S AICDC=$E(X,%) Q:AICDC=""  S:AICDC?1L AICDC=$C($A(AICDC)-32) S AICDX=AICDX_AICDC
 K AICDC
 D ^AICDKWL
 Q
DSPLYD ; DISPLAY CODE AND TEXT FOR DIAGNOSIS
 S %=3 G DSPCOM
DSPLYO ; DISPLAY CODE AND TEXT FOR OPERATION/PROCEDURE
 S %=4 G DSPCOM
DSPCOM ; COMMON DISPLAY CODE
 W:AICDMULT $J(AICDH,4),": "
 ;ihs/cmi/lab - csv, use $$ICDD call
 ;W $P(@(AICDREF0),"^",1)," ","(",$P(^(0),"^",%),")",! S AICDDESC=$S($D(^(1)):^(1),1:"<no long description available>")
 W $P(@(AICDREF0),"^",1)," ","(",$P(^(0),"^",%),")",!
 NEW N,AICDLD
 S N=$$ICDD^ICDCODE(AICDI,"AICDLD")
 I $P(N,"^",1)=-1 D  I 1
 .I AICDREF0["ICD0" S AICDDESC=$S($D(^ICD0(AICDI,1)):^ICD0(AICDI,1),1:"") I AICDDESC="" S AICDDESC=$P($$ICDOP^ICDCODE(AICDI,,,1),U,5)
 .I AICDREF0["ICD9" S AICDDESC=$S($D(^ICD9(AICDI,1)):^ICD9(AICDI,1),1:"") I AICDDESC="" S AICDDESC=$P($$ICDDX^ICDCODE(AICDI,,,1),U,4)
 E  S AICDDESC=$G(AICDLD(1))
 D DSPDESC^AICDKWL1
 Q
DSPLYC ; DISPLAY CODE AND TEXT FOR CPT PROCEDURE
 W:AICDMULT $J(AICDH,4),": "
 W $P(@(AICDREF0),"^",1)
 S AICDREFD=$P(AICDREF0,"0)",1)_"""D"",%)"
 F %=0:0 S %=$O(@(AICDREFD)) Q:'%  W ?15,^(%,0),!
 K AICDREFD
 Q