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

APCH2P16.m

Go to the documentation of this file.
APCH2P16 ; IHS/TUCSON/LAB - PCC HEALTH SUMMARY POST INIT PATCH 12 ;  [ 09/07/04  10:26 AM ]
 ;;2.0;IHS RPMS/PCC Health Summary;**16**;JUN 24, 1997
 ;
 ;
 ; The following line prevents the "Disable Options..." and "Move
 ; Routines..." questions from being asked during the install.
 I $G(XPDENV)=1 S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
 F X="XPO1","XPZ1","XPZ2","XPI1" S XPDDIQ(X)=0
 I '$$INSTALLD("APCH*2.0*15") D SORRY(2)
 ;
 Q
INSTALLD(APCHSTAL) ;EP - Determine if patch APCHSTAL was installed, where
 ; APCHSTAL is the name of the INSTALL.  E.g "AG*6.0*11".
 ;
 NEW APCHY,DIC,X,Y
 S X=$P(APCHSTAL,"*",1)
 S DIC="^DIC(9.4,",DIC(0)="FM",D="C"
 D IX^DIC
 I Y<1 D IMES Q 0
 S DIC=DIC_+Y_",22,",X=$P(APCHSTAL,"*",2)
 D ^DIC
 I Y<1 D IMES Q 0
 S DIC=DIC_+Y_",""PAH"",",X=$P(APCHSTAL,"*",3)
 D ^DIC
 S APCHY=Y
 D IMES
 Q $S(APCHY<1:0,1:1)
IMES ;
 D MES^XPDUTL($$CJ^XLFSTR("Patch """_APCHSTAL_""" is"_$S(Y<1:" *NOT*",1:"")_" installed.",IOM))
 Q
SORRY(X) ;
 KILL DIFQ
 I X=3 S XPDQUIT=2 Q
 S XPDQUIT=X
 W *7,!,$$CJ^XLFSTR("Sorry....FIX IT!",IOM)
 Q
PRE ;EP
 ;SAVE OFF STATUS FOR EACH REMINDER
 S DA=$O(^APCHHMC("B","CARDIOVASCULAR DISEASE",0))
 I DA S DIE="^APCHHMC(",DR=".01///CVD-RELATED" D ^DIE
 K DIE,DA,DR
 S DA=$O(^APCHSURV("B","IHD-Elevated LDL Prompt",0))
 I DA S DIE="^APCHSURV(",DR=".01///LDL Elevated for IHD Patients" D ^DIE
 K DA,DR,DIE
 S DA=$O(^APCHSURV("B","IHD-LDL Screening",0))
 I DA S DIE="^APCHSURV(",DR=".01///LDL Screening for IHD Patients" D ^DIE
 K DA,DR,DIE
 S DA=$O(^APCHSURV("B","SCREEN FOR ALCOHOL USE",0))
 I DA S DIE="^APCHSURV(",DR=".01///ALCOHOL USE SCREENING" D ^DIE
 K DA,DR,DIE
 S DA=$O(^APCHSURV("B","SCREEN FOR TOBACCO USE",0))
 I DA S DIE="^APCHSURV(",DR=".01///TOBACCO USE SCREENING" D ^DIE
 K DA,DR,DIE
 K ^APCHTMP("HMR STATUS")
 S X=0 F  S X=$O(^APCHSURV(X)) Q:X'=+X  S ^APCHTMP("HMR STATUS",X)=$P(^APCHSURV(X,0),U)_U_$P(^APCHSURV(X,0),U,3)
 Q
POST ;EP
 S X=$$ADD^XPDMENU("APCHSMAINT","APCH UPD MAJOR CPT TAX","IPT")
 I 'X W "Attempt to add MAJOR CPT taxonomy option failed." H 3
 S X=$$ADD^XPDMENU("APCHSMAINT","APCH UPD MINOR CPT TAX","MPT")
 I 'X W "Attempt to add Minor CPT taxonomy option failed." H 3
 I '$D(^ATXAX("B","APCH HS MAJOR PROCEDURE CPTS")) D ^APCHP16  ;2 NEW TAXONOMIES
 S DA=$O(^ATXAX("B","APCH HS MAJOR PROCEDURE CPTS",0))
 I DA S $P(^ATXAX(DA,0),U,4)="n"
 S DA=$O(^ATXAX("B","APCH HS MINOR PROCEDURE CPTS",0))
 I DA S $P(^ATXAX(DA,0),U,4)="n"
 ;PUT STATUS BACK IN
 S APCHX=0 F  S APCHX=$O(^APCHTMP("HMR STATUS",APCHX)) Q:APCHX'=+APCHX  D
 .S X=$P(^APCHTMP("HMR STATUS",APCHX),U),APCHS=$P(^APCHTMP("HMR STATUS",APCHX),U,2),DIC="^APCHSURV(",DIC(0)="M" D ^DIC
 .I Y=-1 W !!,"could not update status on ",X," hmr" Q
 .S $P(^APCHSURV(+Y,0),U,3)=APCHS
 ;update new categories per Linza Bethea 6/18/07
 S APCHST="CAT" F APCHSX=1:1:999 S APCH1=$P($T(@APCHST+APCHSX),";;",2,99) Q:APCH1=""  D
 .K DIC S X=$P(APCH1,";;",1),DIC="^APCHSURV(",DIC(0)="M" D ^DIC K DIC
 .I Y=-1 Q
 .S DA=+Y,DR=".05///"_$P(APCH1,";;",2),DIE="^APCHSURV(" D ^DIE K DIE,DA,DR
 .I $D(Y) W !,"category not updated. ",X
 .Q
 D TAXREAD
BUL ;
 D ^APCHBU16
 Q
TAXREAD ;
 S ATXPNSP=""
 S APCHTEXT="TAX" F APCHX=1:1 S APCHDATA=$P($T(@APCHTEXT+APCHX),";;",2) Q:APCHDATA=""  D
 .S APCHDA=$O(^ATXAX("B",$P(APCHDATA,"|"),0))
 .Q:APCHDA=""
 .S $P(^ATXAX(APCHDA,0),U,4)="n" W !,$P(APCHDATA,"|")  ;SET NO DELETE
 .S $P(^ATXAX(APCHDA,0),U,22)=$P(APCHDATA,"|",2) ;set read only
 .;set packages in multiple
 .K DIC,DA,DR
 .S APCHP=$P(APCHDATA,"|",3)
 .F APCHN=1:1 S APCHPP=$P(APCHP,"*",APCHN) Q:APCHPP=""  D
 ..S APCHPI=$O(^DIC(9.4,"C",APCHPP,0))
 ..Q:APCHPI=""  ;NO PACKAGE
 ..S X="`"_APCHPI,DIC="^ATXAX("_APCHDA_",41,",DIC(0)="L",DIC("P")=$P(^DD(9002226,4101,0),U,2),DA(1)=APCHDA
 ..D ^DIC
 ..I Y=-1 W !,"updating package multiple for ",APCHPP," entry ",$P(^ATXAX(APCHDA,0),U)," failed"
 ..K DIC,DA,Y,X
 .Q
 Q
SET ;
 S X=0 F  S X=$O(^ATXAX(X)) Q:X'=+X  D
 .S Y=$P(^ATXAX(X,0),U)
 .S L=$L(APCHPNSP)
 .I $E(Y,1,L)=APCHPNSP S $P(^ATXAX(X,0),U,4)="n" W !,Y
 .Q
 Q
TAX ;
 ;;APCH GLUCOSE SCREENING LOINC|1|APCH
 ;;APCH DM ADA EXAMS|0|APCH
 ;;APCH CLINIC STOP FOR PT HS|1|APCH
 ;;APCH HCT/HGB LOINC CODES|1|APCH
 ;;APCH ISCHEMIC HEART DISEASE|1|APCH
 ;;APCH PNEUMOVAX REVAX|1|APCH
 ;;APCH HS MINOR PROCEDURE CPTS|0|APCH
 ;;APCH HS MAJOR PROCEDURE CPTS|0|APCH
 ;;
CAT ;;
 ;;BREAST EXAM;;GENERAL
 ;;DIABETES SCREENING;;DIABETES
 ;;BLOOD PRESSURE;;GENERAL
 ;;PAP SMEAR;;CANCER
 ;;RECTAL;;CANCER
 ;;TONOMETRY;;ELDER
 ;;URINALYSIS;;PEDIATRIC
 ;;PELVIC EXAM;;GENERAL
 ;;VISUAL ACUITY EXAM;;ELDER
 ;;HEARING TEST;;PEDIATRIC
 ;;HCT/HGB;;PEDIATRIC
 ;;HEAD CIRCUMFERENCE;;PEDIATRIC
 ;;HEIGHT;;GENERAL
 ;;WEIGHT;;GENERAL
 ;;IMMUNIZATIONS;;IMMUNIZATIONS
 ;;MAMMOGRAM;;CANCER
 ;;PNEUMOVAX;;IMMUNIZATIONS
 ;;SCREEN FOR ALCOHOL USE;;BEHAVIORAL HEALTH
 ;;SCREEN FOR TOBACCO USE;;CANCER
 ;;PHYSICAL EXAM;;GENERAL
 ;;TD-ADULT;;IMMUNIZATIONS
 ;;INFLUENZA;;IMMUNIZATIONS
 ;;COLORECTAL CA SCRN-FOBT;;CANCER
 ;;CHOLESTEROL;;CVD-RELATED
 ;;COLORECTAL CA-SCOPE/XRAY;;CANCER
 ;;HEARING INQUIRY;;ELDER
 ;;STRABISMUS/AMBLYOPIA SCREEN;;PEDIATRIC
 ;;PPD - TUBERCULOSIS;;PEDIATRIC
 ;;ANMC DEPRESSION SCREEN SCORE;;BEHAVIORAL HEALTH
 ;;REHAB/FUNCTIONAL SCREEN;;GENERAL
 ;;ANMC COLORECTAL;;CANCER
 ;;ASTHMA - ADD/INCREASE INHALED STERIODS;;ASTHMA
 ;;ASTHMA - PRIMARY CARE PROVIDER;;ASTHMA
 ;;ASTHMA - SEVERITY CLASSIFICATION;;ASTHMA
 ;;ASTHMA - MANAGEMENT PLAN;;ASTHMA
 ;;ASTHMA PATIENT-FLU SHOT;;IMMUNIZATIONS
 ;;IHD-LDL Screening;;CVD-RELATED
 ;;IHD-Elevated LDL Prompt;;CVD-RELATED
 ;;ADULT MMR 1-DOSE VERSION;;IMMUNIZATIONS
 ;;ADULT MMR 2-DOSE VERSION;;IMMUNIZATIONS
 ;;RUBELLA VACCINATION;;IMMUNIZATIONS
 ;;DOMESTIC VIOLENCE/IPV SCREENING;;BEHAVIORAL HEALTH
 ;;ANMC COLORECTAL CANCER;;CANCER
 ;;DEPRESSION SCREENING;;BEHAVIORAL HEALTH
 ;;FALL RISK ASSESSMENT;;ELDER
 ;;EPSDT Screening;;PEDIATRIC
 ;;
 ;;