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

EC2P118.m

Go to the documentation of this file.
EC2P118 ;ALB/DE - EC National Update ; 4/2/13 3:17pm
 ;;2.0;EVENT CAPTURE;**118**;8 May 96;Build 5
 ;
 ;this routine is used as a post-init in a KIDS build
 ;to modify the EC National Procedure (#725) file
 ;
 Q
 ;
START ; entry point for post-init
 ;
 D ADDPROC
 Q
 ;
ADDPROC ;* add procedure to national procedure file
 ;
 ;  Some routine structure is left in place, in the event, additional EC National
 ;  Procedures are desired before the patch is released.
 ;
 ;  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
 D MES^XPDUTL(" ")
 D BMES^XPDUTL("Adding new procedures to EC NATIONAL PROCEDURE (#725) File...")
 D MES^XPDUTL(" ")
 S ECDINUM=$O(^EC(725,9999),-1),ECCOUNT=$P(^EC(725,0),U,4)
 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 BMES^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
 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 BMES^XPDUTL(ECSTR_"  ...added.")
 .I Y=-1 D
 ..D MES^XPDUTL(" ")
 ..D BMES^XPDUTL("ERROR when attempting to add "_ECNAME_" ("_ECCODE_")")
 I $D(^EC(725,"DL",ECCODE)) D
 .S ECLIEN=$O(^EC(725,"DL",ECCODE,""))
 .D MES^XPDUTL(" ")
 .D BMES^XPDUTL("   Your site has a local procedure (entry #"_ECLIEN_") in File #725")
 .D BMES^XPDUTL("   which uses "_ECCODE_" as its National Number.")
 .D BMES^XPDUTL("   Please inactivate this local procedure.")
 .K Y
 Q
NEW ;national procedures to add;;descript^nation #^CPT code^beg seq^end seq
 ;;PAT COORD/ASSIST^BR001^99199
 ;;NON-MD IDT PAT^BR002^99368
 ;;NON-MD IDT NO PAT^BR003^99366
 ;;OTH THERAPY EXERCISE^BR004^97110
 ;;COG SKILLS DVMNT^BR005^97532
 ;;CASE MGMT/ADJ COUNSEL^BR006^96152
 ;;GRP TRAIN/SUP 2-5^BR007^96153
 ;;GRP TRAIN/SUP 6-10^BR008^96153
 ;;GRP TRAIN/SUP >11^BR009^96153
 ;;TRAIN/SUP PAT/FAM^BR010^96154
 ;;TRAIN/SUP FAM ONLY^BR011^96155
 ;;PHONE 5-10M^BR012^98966
 ;;PHONE 11-20M^BR013^98967
 ;;PHONE 21-30M^BR014^98968
 ;;PHONE 5-10M, NO PT^BR015^98966
 ;;PHONE 11-20M, NO PT^BR016^98967
 ;;PHONE 21-30M, NO PT^BR017^98968
 ;;TRANSPORT/ESCORT PAT^BR018^99082
 ;;CAT INITIAL ASSESS^BR019^97755
 ;;CAT RE-ASSESS^BR020^96151
 ;;CAT SENS INTEG TECH^BR021^97535
 ;;CAT ADAPT SOFTWARE^BR022^97537
 ;;CAT APP SOFTWARE^BR023^97537
 ;;CAT EMAIL/INTERNET^BR024^97537
 ;;CAT EQUIP/MAINT/TRBL^BR025^97537
 ;;CAT PROG INTRO^BR026^97537
 ;;LS INITIAL ASSESS^BR027^96150
 ;;LS RE-ASSESS^BR028^96151
 ;;LS SENS INTEG TECH^BR029^97535
 ;;LS COMM BASIC^BR030^97535
 ;;LS COMM/OCCUP TRNG^BR031^97537
 ;;LS SCM BRAILLE^BR032^97535
 ;;LS SCM ADL^BR033^97535
 ;;LS SCM KITCHEN^BR034^97535
 ;;MS INITIAL ASSESS^BR035^96150
 ;;MS RE-ASSESS^BR036^96151
 ;;MS SIT SENS SKILLTRG^BR037^97535
 ;;MS SIT BASIC SKILLS^BR038^97533
 ;;MS SELF CARE MGMT^BR039^97535
 ;;MS ADV SKILLTRG^BR040^97533
 ;;MS HOUSE RPR WW^BR041^97535
 ;;OM INITIAL ASSESS^BR042^96150
 ;;OM RE-ASSESS^BR043^96151
 ;;OM SENS INTEG TECH^BR044^97535
 ;;OM INDOOR TRG^BR045^97116
 ;;OM RES RURAL TVL^BR046^97116
 ;;OM BUSINESS TVL^BR047^97537
 ;;OM COMMUNITY TVL^BR048^97537
 ;;LV INITIAL ASSESS^BR049^96150
 ;;LV RE-ASSESS^BR050^96151
 ;;LV SIT VSTRNG NO DEV^BR051^97533
 ;;LV SIT VSTRNG DEV^BR052^97533
 ;;LV SELF CARE MGMT^BR053^97535
 ;;LV SIT INTDIST REC TASK^BR054^97533
 ;;LV SIT DISTANCE VIEW^BR055^97533
 ;;HH DRIVE TIME (15MIN) PA^HH147
 ;;INDIRCALORMTRY 20M^NU205^94690
 ;;INDIRCALORMTRY ADD5M^NU206
 ;;SECURE MSGEVAL MD^SM001^99444
 ;;SECURE MSGEVAL NONMD^SM002^98969
 ;;SECURE MSG <2M^SM003
 ;;SECURE MSG 2-5M^SM004
 ;;SECURE MSG 5-10M^SM005
 ;;SECURE MSG >10M^SM006
 ;;FEES INTERPRET/RPT^SP564^92613
 ;;FLST INTERPRET/RPT^SP565^92615
 ;;FEEST INTERPRET/RPT^SP566^92617
 ;;QUIT