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

APCLCOD0.m

Go to the documentation of this file.
  1. APCLCOD0 ; IHS/CMI/LAB - EXTENSION OF ROUTINE APCLCODE ;
  1. ;;2.0;IHS PCC SUITE;**11**;MAY 14, 2009;Build 58
  1. ;
  1. ;cmi/anch/maw 9/10/2007 code set versioning in LOOK
  1. ;
  1. LOOK ; ENTRY POINT - LOOKUP USER RESPONSE; SET UTILITY NODES
  1. S DIC="^ICD9(",DIC(0)="EMF" D ^DIC K DIC,DR
  1. I Y<0 S APCLA=1 W $C(7)," ??" S APCL("NO DISPLAY")=1 G X3
  1. ;S:APCLTYP="LOW" APCL("LOW")=$P(^ICD9(+Y,0),U)_" "
  1. S:APCLTYP="LOW" APCL("LOW")=$P($$ICDDX^ICDEX(+Y),U,2)_" "
  1. I APCLTYP="LOW",APCLONE S APCL("HI")=APCL("LOW") D ^APCLCOD1
  1. ;I APCLTYP="HI" S APCL("HI")=$P(^ICD9(+Y,0),U)_" " D I 'APCL("NO DISPLAY") D DISPLAY^APCLCODE,^APCLCOD1
  1. I APCLTYP="HI" S APCL("HI")=$P($$ICDDX^ICDEX(+Y),U,2)_" " D I 'APCL("NO DISPLAY") D DISPLAY^APCLCODE,^APCLCOD1
  1. . I $E(APCL("HI"))?1N&($E(APCL("LOW"))?1N)!($E(APCL("LOW"))'?1N&($E(APCL("HI"))'?1N))
  1. . E W !,$C(7),"Low and high codes of range must both start either with a letter or a number.",! S APCL("NO DISPLAY")=1
  1. . I 'APCL("NO DISPLAY") I APCL("LOW")]APCL("HI") W !,$C(7),"Low code is higher than high code.",! S APCL("NO DISPLAY")=1
  1. X3 Q
  1. ;
  1. SETDIR ; ENTRY POINT - SETS HELP AND DIR FOR INIT SUBROUTINE OF APCLCODE
  1. S DIR(0)="FO",DIR("?",1)="Enter ICD9 diagnosis code or narrative. You may enter a range of",DIR("?",2)="codes by placing a ""-"" between two codes. Codes in a range will"
  1. S DIR("?",3)="include the first and last codes indicated and all codes that fall",DIR("?",4)="between. Only one code or one range of codes at a time. You may"
  1. S DIR("?",5)="also enter ""[TAXONOMY NAME"" to select codes already within a taxonomy."
  1. S DIR("?",6)="You can also ""de-select"" a code or range of codes by placing a ""-"" in",DIR("?",7)="front of it. (e.g. '-250.00' or '-250.01-250.91') Enter ""??"" to see"
  1. S DIR("?")="code ranges selected so far."
  1. S DIR("??")="^D ASK2^APCLCODE0"
  1. Q
  1. ;
  1. ASK2 ;ASKS USER IF WANTS TO DISPLAY/PRINT RESULTS TO THIS POINT
  1. I '$D(APCLTBLE) W !!,"A code range has yet to be selected. A display cannot be generated.",! Q
  1. W !!,"Do you want to display the codes from a range you have already selected" S %=1 D YN^DICN I %=1 D SHOW^APCLCODE
  1. I %=2!(%=-1) Q
  1. I %=0 W !!,"A table of ranges you have selected is displayed above. You may ask for the",!,"codes in one of the ranges to be displayed.",! G ASK2
  1. Q
  1. ;