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

EC725U02.m

Go to the documentation of this file.
EC725U02 ;ALB/GTS/JAP/JAM - EC National Procedure Update;08/10/99
 ;;2.0; EVENT CAPTURE ;**20**;8 May 96
 ;
 ;this routine is used as a post-init in a KIDS build 
 ;to modify the EC National Procedure file #725
 ;
NAMECHG ;* change national procedure names
 ;
 ;  ECXX is in format:
 ;   NATIONAL NUMBER^NEW NAME
 ;
 N ECX,ECXX,ECDA,DA,DR,DIC,DIE,X,Y
 D MES^XPDUTL(" ")
 D BMES^XPDUTL("Changing names in EC NATIONAL PROCEDURE File (#725)...")
 D MES^XPDUTL(" ")
 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 BMES^XPDUTL("   Entry #"_ECDA_" for "_$P(ECXX,U,1))
 ...D BMES^XPDUTL("   ...field (#.01) updated to  "_$P(ECXX,U,2)_".")
 .I '$D(^EC(725,"D",$P(ECXX,U,1))) D
 ..D MES^XPDUTL(" ")
 ..D BMES^XPDUTL("Can't find entry for "_$P(ECXX,U,1))
 ..D BMES^XPDUTL("...field (#.01) not updated.")
 Q
 ;
CHNG ;name changes
 ;;SW006^HEALTH ED/REFER IND NEW PT 15 MIN
 ;;SW015^PSYCHSOC TX OPT 75-80 MIN
 ;;SW002^CONSULTATION INPT 10 MIN
 ;;SW003^DISCH PLANNING <30MIN
 ;;SW013^OFFICE VISIT OPT  5 MIN
 ;;SW014^PSYCHSOC ASSES INPT @ 30 MIN
 ;;SW019^HEALTHED/REFER GP (1-5) @30MIN
 ;;SW025^HEAKTHED/REFER GP (6-8) @30MIN
 ;;SW026^HEALTHED/REFER GP (9+) @30MIN
 ;;SW033^CONSULTATION INPT 20 MIN
 ;;SW034^CONSULTATION INPT 30 MIN
 ;;SW056^OFFICE VISIT OPT 10 MIN
 ;;SW057^OFFICE VISIT OPT 15 MIN
 ;;SW058^OFFICE VISIT OPT 25 MIN
 ;;SW059^OFFICE VISIT OPT 40 MIN
 ;;SW037^HEALTH ED/REFER IND NEW PT 30 MIN
 ;;SW038^HEALTH ED/REFER IND NEW PT 45 MIN
 ;;SW039^HEALTH ED/REFER IND NEW PT 60 MIN
 ;;SW060^COMP & PEN EXAM
 ;;SW061^PSYCHSOC TX OPT 20-30 MIN
 ;;SW062^PSYCHSOC TX OPT 45-50 MIN
 ;;QUIT
 ;
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,NAME,CODE,CPT,COUNT,X,Y,DIC,DIE,DA,DR,DLAYGO,DINUM
 N ECADD,ECBEG,ECEND,CODX,NAMX,ECSEQ,LIEN
 D MES^XPDUTL(" ")
 D BMES^XPDUTL("Adding new procedures to EC NATIONAL PROCEDURE File (#725)...")
 D MES^XPDUTL(" ")
 S ECDINUM=$O(^EC(725,9999),-1),COUNT=$P(^EC(725,0),U,4)
 F ECX=1:1 S ECXX=$P($T(NEW+ECX),";;",2) Q:ECXX="QUIT"  D
 .S NAME=$P(ECXX,U,1),CODE=$P(ECXX,U,2),CPT=$P(ECXX,U,3),CODX=CODE
 .S ECBEG=$P(ECXX,U,4),ECEND=$P(ECXX,U,5),NAMX=NAME
 .I ECBEG="" S X=NAME D FILPROC Q
 .F ECSEQ=ECBEG:1:ECEND D
 ..S ECADD="000"_ECSEQ,ECADD=$E(ECADD,$L(ECADD)-2,$L(ECADD))
 ..S NAME=NAMX_" "_ECADD,X=NAME,CODE=CODX_ECADD
 ..D FILPROC
 S $P(^EC(725,0),U,4)=COUNT,X=$O(^EC(725,999999),-1),$P(^EC(725,0),U,3)=X
 Q
 ;
FILPROC ;File national procedures
 ;
 I '$D(^EC(725,"D",CODE)) D
 .S ECDINUM=ECDINUM+1,DINUM=ECDINUM,DIC(0)="L",DLAYGO=725,DIC="^EC(725,"
 .S DIC("DR")="1////^S X=CODE;4////^S X=CPT"
 .D FILE^DICN
 .I +Y>0 D
 ..S COUNT=COUNT+1
 ..D MES^XPDUTL(" ")
 ..D BMES^XPDUTL("   Entry #"_+Y_" for "_$P(Y,U,2)_$S(CPT:" [CPT: "_CPT_"]",1:"")_" ("_CODE_")")
 ..D BMES^XPDUTL("   ...successfully added.")
 .I Y=-1 D
 ..D MES^XPDUTL(" ")
 ..D BMES^XPDUTL("ERROR when attempting to add "_NAME_" ("_CODE_")")
 I $D(^EC(725,"DL",CODE)) D
 .S LIEN=$O(^EC(725,"DL",CODE,""))
 .D MES^XPDUTL(" ")
 .D BMES^XPDUTL("   Your site has a local procedure (entry #"_LIEN_") in File #725")
 .D BMES^XPDUTL("   which uses "_CODE_" as its National Number.")
 .D BMES^XPDUTL("   Please inactivate this local procedure.")
 .K Y
 Q
NEW ;national procedures to add
 ;;BEDDAY STATE HOSPITAL^SH^^1^20
 ;;BEDDAY STATE DOM^SD^^1^42
 ;;BEDDAY STATE NURS HOME^SN^^1^100
 ;;SN 0-25 CARE LEVEL ADDON^SN101
 ;;SN 26-50 CARE LEVEL ADDON^SN102
 ;;SN 51-75 CARE LEVEL ADDON^SN103
 ;;SN 76-100 CARE LEVEL ADDON^SN104
 ;;SN 101-199 CARE LEVEL ADDON^SN105
 ;;SN 200-299 CARE LEVEL ADDON^SN106
 ;;SN 300-499 CARE LEVEL ADDON^SN107
 ;;SN 500-599 CARE LEVEL ADDON^SN108
 ;;SN >600 CARE LEVEL ADDON^SN109
 ;;SN RUGS II^SN110
 ;;SN RUGS III^SN111
 ;;BEDDAY COMM NUR HOME^CN^^1^100
 ;;CN 0-25 CARE LEVEL ADDON^CN101
 ;;CN 26-50 CARE LEVEL ADDON^CN102
 ;;CN 51-75 CARE LEVEL ADDON^CN103
 ;;CN 76-100 CARE LEVEL ADDON^CN104
 ;;CN 101-199 CARE LEVEL ADDON^CN105
 ;;CN 200-299 CARE LEVEL ADDON^CN106
 ;;CN 300-499 CARE LEVEL ADDON^CN107
 ;;CN 500-599 CARE LEVEL ADDON^CN108
 ;;CN >600 CARE LEVEL ADDON^CN109
 ;;CN RUGS II^CN110
 ;;CN RUGS III^CN111
 ;;HH VIST, NEW^HH001^99211
 ;;HH VIST-NEW-MOD SEVERITY^HH002^99211
 ;;HH VIST-NEW-HI SEVERITY^HH003^99211
 ;;HH VIST, ESTAB 15 MIN^HH004^99211
 ;;HH VIST, ESTAB 25 MIN^HH005^99211
 ;;HH VIST, ESTAB 40 MIN^HH006^99211
 ;;HH VIST, ESTAB 60 MIN^HH007^99211
 ;;HH COMPLAINT RESOLVE^HH008^99499
 ;;HH COLLATERAL VISIT^HH009^99499
 ;;HH PAT ADVOCACY^HH010^99499
 ;;HH HAA HOME VISIT^HH011^99211
 ;;HH CNH PAT VISIT^HH012^99211
 ;;HH OUTPT CONSULT^HH013^99499
 ;;HH INPT FOLLOW VISIT^HH014^99499
 ;;HH INPT CONSULT^HH015^99499
 ;;HH PATIENT EDUCATION^HH016^99499
 ;;HH COLLATERAL EDUCATION^HH017^99499
 ;;HH PHONE CONTACT WITH PATIENT^HH025^99371
 ;;HH REFER-VA PURCH SKILLED^HH030
 ;;HH END-VA PURCH SKILLED^HH031
 ;;HH REFER-VA PURCH AIDE^HH032
 ;;HH END-VA PURCH AIDE^HH033
 ;;HH REFER VA PURCH HOME MAKER^HH034
 ;;HH END-VA PURCH HOME MAKER^HH035
 ;;HH REFER-VA PURCH INFUSION^HH036
 ;;HH END-VA PURCH INFUSION^HH037
 ;;HH REFER-VA PURCH HOSPICE^HH038
 ;;HH END-VA PURCH HOSPICE^HH039
 ;;HH REFER-VA PD RESPIR CONTRCT^HH040
 ;;HH END VA PURCH RESPIRATORY^HH041
 ;;HH REFER-VA PURCH MNTL HLTH^HH042
 ;;HH END VA PURCH MNTL HLTH^HH043
 ;;HH REFER TO MEDICARE^HH044
 ;;HH REFER TO VA PD PHYSICAL THPY^HH045
 ;;HH REFER TO HOMHLH END VA PD PT^HH046
 ;;HH REFER TO VA PD OCCUP THPY^HH047
 ;;HH REFER TO END VA PD OT^HH048
 ;;HH REFER TO VA PD SPEECH THPY^HH049
 ;;HH REFER TO END VA PD SPECH^HH050
 ;;HH REFER TO VA PD SOCIAL WK^HH051
 ;;HH REFER TO END VA PD SOC WK^HH052
 ;;HH REFER TO VA PD HOME HOSPICE^HH053
 ;;HH REFER TO END VA PD HOMHSPC^HH054
 ;;HH REFER TO VA PD BOWEL AND BLADDER^HH055
 ;;HH REFER TO END VA PD BOWEL AND BLADDER^HH056
 ;;HH REFER TO VA PD LAB SERVICES^HH057
 ;;HH REFER TO END VA PD LAB^HH058
 ;;HH REFER - HOME HSPICE MEDICARE^HH059
 ;;HH REFER - HOME HSPICE MEDICAID^HH060
 ;;HH REFER - HOME HSPICE THIRD PARTY^HH061
 ;;HH REFER - HOME HSPICE GRATUS^HH062
 ;;HH REFER TO MEDICAID^HH063
 ;;HH REFER PUBLIC HEALTH (COUNTY)^HH064
 ;;HH REFER THIRD PARTY^HH065
 ;;HH REFER TO HMO^HH066
 ;;HH REFER TO PRIVATE PAY^HH067
 ;;HH REFER RESPITE MEDICARE^HH068
 ;;HH REFER RESPITE OTHER^HH069
 ;;HH CARE PLAN OVERSIGHT^HH070
 ;;HH MEDICAL RECORDS REVIEW^HH071
 ;;HH FAMILY SUPPORT ACTIVITIES^HH072
 ;;HH MONITORING LAB RESULTS^HH073
 ;;HH DISCHARGE DAY MANAGEMENT^HH074
 ;;HH ADMIN DETAILS OF REFER COORDIN^HH075
 ;;HH REFER TO VA PURCH. PALLIATIVE CARE^HH076
 ;;HH END VA PURCH. PALLIATIVE CARE^HH077
 ;;HH PURCH VISITS/MO-SKILLED^HH091
 ;;HH PURCH VISITS/MO-AIDE^HH092
 ;;HH PURCH VISITS/MO-INFUSION^HH093
 ;;HH PURCH VISITS/MO-HOSPICE^HH094
 ;;HH PURCH VISITS/MO-RESPIRATORY^HH095
 ;;HH PURCH VISITS/MO-MENT HLTH^HH096
 ;;HH PURCH VISITS/MO-PHYS THPY^HH097
 ;;HH PURCH VISITS/MO-OCCUP THPY^HH098
 ;;HH PURCH VISITS/MO-SPECH THPY^HH099
 ;;HH PURCH VISITS/MO-SOCIAL WK^HH100
 ;;HH PURCH VISITS/MO-HOM HOSPIC^HH101
 ;;HH PURCH VISITS/MO-BOWEL-BLADDER^HH102
 ;;HH PURCH VISITS/MO-LAB SERVICES^HH103
 ;;HH PURCH VISITS/MO-HOMEMAKER^HH104
 ;;HH PURCH VISITS/MO-RESPITE^HH105
 ;;HH PURCH VISITS/MO-PALLIATIVE CRE^HH106
 ;;HH PURCH VISITS/MO-ADULT DAY CARE^HH107
 ;;DISCH PLANNING >30MIN^SW007^99239
 ;;INDIV FUNCTIONAL IMPVMT @ 15 MIN^SW072^97530
 ;;SELF CARE/HOME MGMT @ 15 MIN^SW073^97535
 ;;COMM/WORK REINTEGRATE @15 MIN^SW074^97537
 ;;HIGH RISK ASSESSMENT^SW075^99420
 ;;HOME VISIT 60 MIN^SW076^99350
 ;;PSYCHSOCASSES OPT @ 60 MIN^SW077^99244
 ;;PSYCHSOC TX INPT 75-80 MIN^SW080^90821
 ;;PSYCHSOC TX INPT 20-30 MIN^SW081^90816
 ;;PSYCHSOC TX INPT 45-50 MIN^SW082^90818
 ;;HEALTHED/REFER GP (1-5) @60MIN^SW083^99412
 ;;HEAKTHED/REFER GP (6-8) @60MIN^SW084^99412
 ;;HEALTHED/REFER GP (9+) @60MIN^SW085^99412
 ;;QUIT