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

EC2P150B.m

Go to the documentation of this file.
EC2P150B ;ALB/TXH - EC National Procedure Update; Apr 27, 2020@14:13
 ;;2.0;EVENT CAPTURE;**150**;May 8, 1996;Build 5
 ;
 ;This routine is used as a post-init in a KIDS build
 ;to add new procedure codes and change procedure names  
 ;in the EC National Procedure file (#725).
 ;
 Q
 ;
ADDPROC ;* add national procedures
 ;
 ;  ECXX is in format:
 ;   NAME^NATIONAL NUMBER^CPT CODE^FIRST NATIONAL NUMBER SEQUENCE
 ;   LAST NATIONAL NUMBER SEQUENCE
 ;
 N ECX,ECXX,ECDINUM,ECNAME,ECCODE,ECCPT,ECCOUNT,X,Y,DIC,DIE,DA,DR,DLAYGO,DINUM
 N ECADD,ECBEG,ECEND,ECCODX,ECNAMX,ECSEQ,ECLIEN,ECSTR,ECCPTN,ECCNT1,ECCNT11
 ;
 D MES^XPDUTL("*** Adding new procedures to the EC NATIONAL PROCEDURE File (#725)...")
 ;
 S ECDINUM=$O(^EC(725,9999),-1),ECCOUNT=$P(^EC(725,0),U,4)
 S (ECCNT1,ECCNT11)=0
 F ECX=1:1 S ECXX=$P($T(NEW+ECX),";;",2) Q:ECXX="QUIT"  D
 .S ECNAME=$P(ECXX,U,1),ECCODE=$P(ECXX,U,2),ECCPTN=$P(ECXX,U,3),ECCODX=ECCODE
 .S ECCPT=""
 .I ECCPTN'="" S ECCPT=$$FIND1^DIC(81,"","X",ECCPTN) I +ECCPT<1 D  Q
 ..S ECSTR="   CPT code "_ECCPTN_" not a valid code in CPT File."
 ..D MES^XPDUTL(" ")
 ..D MES^XPDUTL("   ["_ECCODE_"] "_ECSTR)
 .S ECBEG=$P(ECXX,U,4),ECEND=$P(ECXX,U,5),ECNAMX=ECNAME
 .I ECBEG="" S X=ECNAME D FILPROC Q
 .F ECSEQ=ECBEG:1:ECEND D
 ..S ECADD="000"_ECSEQ,ECADD=$E(ECADD,$L(ECADD)-2,$L(ECADD))
 ..I $E(ECCODX,1,3)'="RCM" S ECNAME=ECNAMX_ECSEQ,X=ECNAME,ECCODE=ECCODX_ECADD
 ..E  S ECNAME=ECNAMX_$E(ECADD,2,99),X=ECNAME,ECCODE=ECCODX_$E(ECADD,2,99)
 ..D FILPROC
 S $P(^EC(725,0),U,4)=ECCOUNT,X=$O(^EC(725,999999),-1),$P(^EC(725,0),U,3)=X
 D BMES^XPDUTL("    Total "_ECCNT1_" new codes have been added.")
 I ECCNT11>0 D MES^XPDUTL("    Total "_ECCNT11_" new codes have NOT added.")
 D MES^XPDUTL(" ")
 Q
 ;
FILPROC ;File national procedures
 I '$D(^EC(725,"D",ECCODE)) D
 .S ECDINUM=ECDINUM+1,DINUM=ECDINUM,DIC(0)="L",DLAYGO=725,DIC="^EC(725,"
 .S DIC("DR")="1////^S X=ECCODE;4///^S X=ECCPT"
 .D FILE^DICN
 .;
 .I +Y>0 D
 ..S ECCOUNT=ECCOUNT+1
 ..D MES^XPDUTL(" ")
 ..S ECSTR="    Entry #"_+Y_" for "_$P(Y,U,2)
 ..S ECSTR=ECSTR_$S(ECCPT'="":" [CPT: "_ECCPT_"]",1:"")_" ("_ECCODE_")"
 ..D MES^XPDUTL(ECSTR)
 ..D MES^XPDUTL("      ...successfully added.")
 ..S ECCNT1=ECCNT1+1
 .;
 .I Y=-1 D
 ..D MES^XPDUTL(" ")
 ..D BMES^XPDUTL("    ERROR when attempting to add "_ECNAME_" ("_ECCODE_")")
 ..S ECCNT11=ECCNT11+1
 ;
 I $D(^EC(725,"DL",ECCODE)) D
 .S ECLIEN=$O(^EC(725,"DL",ECCODE,""))
 .D BMES^XPDUTL(" ")
 .D MES^XPDUTL("    ** Your site has a local procedure (entry #"_ECLIEN_") in File #725")
 .D MES^XPDUTL("       which uses "_ECCODE_" as its National Number.")
 .D MES^XPDUTL("       Please inactivate this local procedure.")
 .D MES^XPDUTL(" ")
 .K Y
 Q
NEW ;national procedures to add;;descript^nation #^CPT code^beg seq^end seq
 ;;CGM PT EQ TRAIN 30M^NU221^95249^^
 ;;CGM ANALY/INTERP 45M^NU222^95251^^
 ;;INTERDIS CARE PLN MTG 3M^NU223^^^
 ;;DX-INCR ENERGY EXPEND 0M^NU311^^^
 ;;DX-INAD ENERGY INTAKE 0M^NU312^^^
 ;;DX-EXC ENERGY INTAKE 0M^NU313^^^
 ;;DX-PRED INAD ENER INT 0M^NU314^^^
 ;;DX-PRED EXC ENER INT 0M^NU315^^^
 ;;DX-INAD ORAL INTAKE 0M^NU316^^^
 ;;DX-EXC ORAL INTAKE 0M^NU317^^^
 ;;DX-INAD EN INFUSION 0M^NU318^^^
 ;;DX-EXC EN INFUSION 0M^NU319^^^
 ;;DX-EN COMP INCONST 0M^NU320^^^
 ;;DX-EN ADM INCONST 0M^NU321^^^
 ;;DX-LMT FOOD ACCEPT 0M^NU322^^^
 ;;DX-INAD FLUID INTAKE 0M^NU323^^^
 ;;DX-EXC FLUID INTAKE 0M^NU324^^^
 ;;DX-INCR NUTR NEEDS 0M^NU325^^^
 ;;DX-INAD PRO/ENER INT 0M^NU326^^^ 
 ;;DX-DECR NUTR NEEDS 0M^NU327^^^
 ;;DX-IMBAL OF NUTR 0M^NU328^^^
 ;;DS-INAD FAT INTAKE 0M^NU329^^^
 ;;DX-EXC FAT INTAKE 0M^NU330^^^
 ;;DX-FATS INCON W/NEEDS 0M^NU331^^^
 ;;DX-INAD PRO INTAKE 0M^NU332^^^
 ;;DX-EXC PRO INTAKE 0M^NU333^^^
 ;;DX-PRO INCON W/NEEDS 0M^NU334^^^
 ;;DX-INAD CHO 0M^NU335^^^
 ;;DX-EXC CHO 0M^NU336^^^
 ;;DX-CHO INCON W/NEEDS 0M^NU337^^^
 ;;DX-INCON CHO INTAKE 0M^NU338^^^
 ;;DX-INAD FIBER INTAKE 0M^NU339^^^
 ;;DX-EXC FIBER INTAKE 0M^NU340^^^
 ;;DX-INAD VIT INTAKE 0M^NU341^^^
 ;;DX-EXC VIT INTAKE 0M^NU342^^^
 ;;DX-INAD MIN INTAKE 0M^NU343^^^
 ;;DX-EXC MIN INTAKE 0M^NU344^^^
 ;;DX-PRED SUB NUT INTAKE 0M^NU345^^^
 ;;DX-PRED EXC NUT INTAKE 0M^NU346^^^
 ;;DX-SWALLOW DIFF 0M^NU347^^^
 ;;DX-CHEW DIFF 0M^NU348^^^
 ;;DX-ALT GI FX 0M^NU349^^^
 ;;DX-IMPAIR NUTR UTIL 0M^NU350^^^
 ;;DX-ALTERED LABS 0M^NU351^^^
 ;;DX-FOOD-MED INTERACT 0M^NU352^^^
 ;;DX-PRED FD-MED INTER 0M^NU353^^^
 ;;DX-UNDERWEIGHT 0M^NU354^^^
 ;;DX-UNINTEN WT LOSS 0M^NU355^^^
 ;;DX-OVERWEIGHT 0M^NU356^^^
 ;;DX-OBESE, CLASS 1 0M^NU357^^^
 ;;DX-OBESE, CLASS II 0M^NU358^^^
 ;;DX-OBESE, CLASS III 0M^NU359^^^
 ;;DX-UNINTEND WT GAIN 0M^NU360^^^
 ;;DX-FN KNOW DEF 0M^NU361^^^
 ;;DX-UNSUP BELIEFS/ATT 0M^NU362^^^
 ;;DX-NOT RDY DT/LIF CHG 0M^NU363^^^
 ;;DX-SELF-MONITOR DEF 0M^NU364^^^
 ;;DX-DISORDERED EAT PAT 0M^NU365^^^
 ;;DX-LIMITED ADHERENCE 0M^NU366^^^
 ;;DX-UNDES FOOD CHOICES 0M^NU367^^^
 ;;DX-PHYSICAL INACATIVITY 0M^NU368^^^
 ;;DX-EXC PHYSI ACTIVITY 0M^NU369^^^
 ;;DX-INAB MGE SELF-CARE 0M^NU370^^^
 ;;DX-IMP ABILITY PREP FD 0M^NU371^^^
 ;;DX-POOR NUTR QOL 0M^NU372^^^
 ;;DX-SELF-FEED DIFF 0M^NU373^^^
 ;;DX-INT OF UNSAFE FOOD 0M^NU374^^^
 ;;DX-LMT ACCESS FD/WATER 0M^NU375^^^
 ;;DX-LMT ACCESS NUTR SUP 0M^NU376^^^
 ;;DX-NO NUTR DX 0M^NU377^^^
 ;;DX-NOC 0M^NU378^^^
 ;;ET-ACCESS 0M^NU390^^^
 ;;ET-BEHAVIOR 0M^NU391^^^
 ;;ET-BELIEFS-ATTITUDES 0M^NU392^^^
 ;;ET-CULTURAL 0M^NU393^^^
 ;;ET-KNOWLEDGE 0M^NU394^^^
 ;;ET-PHYSICAL FUNCTION 0M^NU395^^^
 ;;ET-PHYSIOLOGIC-METAB 0M^NU396^^^
 ;;ET-PSYCHOLOGICAL 0M^NU397^^^
 ;;ET-SOCIAL-PERSONAL 0M^NU398^^^
 ;;ET-TREATMENT 0M^NU399^^^
 ;;IN-GEN HEALT DIET 0M^NU411^^^
 ;;IN-MOD COMP MEAL/SN 0M^NU412^^^
 ;;IN-TEXT MOD DIET 0M^NU413^^^
 ;;IN-ENERGY MOD DIET 0M^NU414^^^
 ;;IN-PROT MOD DIET 0M^NU415^^^
 ;;IN-CHO MODIFIED DIET 0M^NU416^^^
 ;;IN-FAT MODIFIED DIET 0M^NU417^^^
 ;;IN-FIBER MODIFIED DIET 0M^NU418^^^
 ;;IN-FLUID MODIFIED DIET 0M^NU419^^^
 ;;IN-MOD SPEC FOOD/INGR 0M^NU420^^^
 ;;IN-VIT MOD DIET 0M^NU421^^^
 ;;IN-MOD EN 0M^NU422^^^
 ;;IN-MOD PN 0M^NU423^^^
 ;;IN-INSERT FT 0M^NU424^^^
 ;;IN-EN SITE CARE 0M^NU425^^^
 ;;IN-EN FLUSH 0M^NU426^^^
 ;;IN-COM BEV 0M^NU427^^^
 ;;IN-COM FOOD 0M^NU428^^^
 ;;IN-MOD BEV 0M^NU429^^^
 ;;IN-MOD FOOD 0M^NU430^^^
 ;;IN-SPEC FOODS/BEV 0M^NU431^^^
 ;;IN-MULTIVIT/MIN SUPP 0M^NU432^^^
 ;;IN-MULTITRACE SUPP 0M^NU433^^^
 ;;IN-VIT SUPP 0M^NU434^^^
 ;;IN-MIN SUPP 0M^NU435^^^
 ;;IN-FEED ASSIST 0M^NU436^^^
 ;;IN-ADAPTIVE DEVICE 0M^NU437^^^
 ;;IN-FEED POS 0M^NU438^^^
 ;;IN-MEAL SET UP 0M^NU439^^^
 ;;IN-MOUTH CARE 0M^NU440^^^
 ;;IN-MENU ASSIST 0M^NU441^^^
 ;;IN-MANAG FEED ENVIRON 0M^NU442^^^
 ;;IN-PRESCRIPTION RX 0M^NU443^^^
 ;;IN-(OTC) MED 0M^NU444^^^
 ;;IN-CAM 0M^NU445^^^
 ;;IN-CONTENT ED 0M^NU446^^^
 ;;IN-ED-INFLUE ON HEALTHi 0M^NU447^^^
 ;;IN-PA GUIDE 0M^NU448^^^
 ;;IN-LAB RESULT INTERPR 0M^NU449^^^
 ;;IN-NUTR SKILL ED 0M^NU450^^^
 ;;IN-TECH NUT ED 0M^NU451^^^
 ;;IN-CBT 0M^NU452^^^
 ;;IN-HBM 0M^NU453^^^
 ;;IN-SOCIAL LEARN 0M^NU454^^^
 ;;IN-TRANSTH ST OF CHG 0M^NU455^^^
 ;;IN-MI 0M^NU456^^^
 ;;IN-GOAL SET 0M^NU457^^^
 ;;IN-SELF-MONITOR 0M^NU458^^^
 ;;IN-PROBLEM SOLVING 0M^NU459^^^
 ;;IN-SOCIAL SUPPORT 0M^NU460^^^
 ;;IN-STRESS MANAGEMENT 0M^NU461^^^
 ;;IN-STIMULUS CONTROL 0M^NU462^^^
 ;;IN-COGNIT RESTRUCT 0M^NU463^^^
 ;;IN-RELAPSE PREVENTION 0M^NU464^^^
 ;;IN-REWARDS 0M^NU465^^^
 ;;IN-TEAM MEETING 0M^NU466^^^
 ;;IN-REFERRAL TO RDN 0M^NU467^^^
 ;;IN-COLLAB WITH RDN/DT 0M^NU468^^^
 ;;IN-COLLAB W/ OTHER PROV 0M^NU469^^^
 ;;IN-REFER TO OTHER PROV 0M^NU470^^^
 ;;IN-REFERRAL TO COM 0M^NU471^^^
 ;;IN-D/C-TX CARE OTH PROV 0M^NU472^^^
 ;;IN-D/C-TX CARE OTH AGEN 0M^NU473^^^
 ;;IN-D/C-TX CARE OTH RDN 0M^NU474^^^
 ;;IN-INTERV NOC 0M^NU475^^^
 ;;M&E GOAL MET 0M^NU510^^^
 ;;M&E GOAL NOT MET 0M^NU511^^^
 ;;HEALTH BEHAV INTERV INI 30^SW189^96158^^
 ;;HEALTH BEHAV INTERV INI GRP 30^SW190^96164^^
 ;;HEALTH BEHAV INTERV FAM INI W/PT 30^SW191^96167^^
 ;;HEALTH BEHAV INTERV FAM INI W/O PT 30^SW192^96170^^
 ;;SELF CARE MGMT TRAINING^SW193^97535^^
 ;;COMMUNITY/WORK REINTEGRT^SW194^97537^^
 ;;SECURE MESG 11-20 MIN^SW195^98971^^
 ;;SECURE MESG 21+ MIN^SW196^98972^^
 ;;GROUP EDUCATION SVS^SW197^99078^^
 ;;E-CONSLT 5-10 MIN^SW198^G2061^^
 ;;E-CONSLT 11-20 MIN^SW199^G2062^^
 ;;E-CONSLT 21+ MIN^SW200^G2063^^
 ;;CRISIS INT SVC^SW201^S9484^^
 ;;TELE GROUP^SW202^T1015^^
 ;;QUIT
 ;
NAMECHG ;* change national procedure names
 ;
 ;  ECXX is in format:
 ;   NATIONAL NUMBER^NEW NAME
 ;
 N ECX,ECXX,ECDA,DA,DR,DIC,DIE,X,Y,ECSTR,ECCNT4
 D MES^XPDUTL("*** Changing names in EC NATIONAL PROCEDURE File (#725)...")
 ;
 S ECCNT4=0
 F ECX=1:1 S ECXX=$P($T(CHNG+ECX),";;",2) Q:ECXX="QUIT"  D
 .I $D(^EC(725,"D",$P(ECXX,U,1))) D
 ..S ECDA=+$O(^EC(725,"D",$P(ECXX,U,1),0))
 ..I $D(^EC(725,ECDA,0)) D
 ...S DA=ECDA,DR=".01////^S X=$P(ECXX,U,2)",DIE="^EC(725," D ^DIE
 ...D MES^XPDUTL(" ")
 ...D MES^XPDUTL("    Entry #"_ECDA_" for "_$P(ECXX,U,1))
 ...D MES^XPDUTL("    ... field (#.01) updated to "_$P(ECXX,U,2)_".")
 ...S ECCNT4=ECCNT4+1
 .;
 .I '$D(^EC(725,"D",$P(ECXX,U,1))) D
 ..D MES^XPDUTL(" ")
 ..S ECSTR="Can't find entry for "_$P(ECXX,U,1)
 ..D BMES^XPDUTL(ECSTR_" ...field (#.01) not updated.")
 ;
 D BMES^XPDUTL("    Total "_ECCNT4_" names have been changed.")
 D MES^XPDUTL(" ")
 Q
 ;
CHNG ;name changes -national code #^new procedure name
 ;;CH100^RITE/SACRAMENT/ORDINANCE
 ;;CH109^FUNERAL/MEMORIAL
 ;;CH110^INDIVIDUAL CARE COUNSELING
 ;;CH114^FAMILY CARE/COUNSELING
 ;;CH118^GROUP
 ;;CH125^INTERDISCIPLINARY TEAM
 ;;NU181^REM MNTR PHYSIO PARAM DEV
 ;;SW019^PREVENTATIVE COUNSEL, GRP
 ;;SW181^SECURE MESG 5-10 MIN
 ;;QUIT