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

APCH2P11.m

Go to the documentation of this file.
APCH2P11 ; IHS/TUCSON/LAB - PCC HEALTH SUMMARY POST INIT PATCH 11 ;  [ 04/14/04  3:14 PM ]
 ;;2.0;IHS RPMS/PCC Health Summary;**11**;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
 ;
 Q
PRE ;EP
 S DA=$O(^APCHSCMP("B","MENTAL HEALTH/SOCIAL SERVICES",0))
 I DA S DIE="^APCHSCMP(",DR=".01///BEHAVIORAL HEALTH" D ^DIE K DIE,DA,DR
 Q
POST ;EP
 NEW X
 S X=$$ADD^XPDMENU("APCHSBLD","APCHSTED FM","FMMT")
 I 'X W "Attempt to add modify health summary option option failed." H 3
 S X=$$ADD^XPDMENU("APCHSMAINT","APCHSTED FM","FMMT")
 I 'X W "Attempt to add modify health summary option option failed." H 3
 I '$O(^APCHSCMP("B","MEDS - CHRONIC & ACUTE W/ ISSU",0)) D
 .D ^XBFMK S DIC="^APCHSCMP(",X="MEDS - CHRONIC & ACUTE W/ ISSUE HISTORY",DIC("DR")="2////Y",DIC(0)="L" K DD,DO,D0 D FILE^DICN
 .I Y=-1 W !!,"adding health summary component MEDS - CHRONIC & ACUTE W/ ISSUE HISTORY failed." D ^XBFMK Q
 .S $P(^APCHSCMP(+Y,0),U,2)="MEDSNDUP;APCHS78"
 I '$O(^APCHSCMP("B","MEDS - CHRONIC BY NAME",0)) D
 .D ^XBFMK S DIC="^APCHSCMP(",X="MEDS - CHRONIC BY NAME",DIC("DR")="2////Y;3////CHRONIC MEDICATIONS - SORTED BY DRUG NAME",DIC(0)="L" K DD,DO,D0 D FILE^DICN
 .I Y=-1 W !!,"adding health summary component MEDS - CHRONIC BY NAME failed." D ^XBFMK Q
 .S $P(^APCHSCMP(+Y,0),U,2)="MEDSCHRN;APCHS77"
 I '$O(^APCHSCMP("B","MEDS - CURRENT BY NAME",0)) D
 .D ^XBFMK S DIC="^APCHSCMP(",X="MEDS - CURRENT BY NAME",DIC("DR")="2////Y;3////CURRENT MEDICATIONS - SORTED BY DRUG NAME",DIC(0)="L" K DD,DO,D0 D FILE^DICN
 .I Y=-1 W !!,"adding health summary component MEDS - CURRENT BY NAME failed." D ^XBFMK Q
 .S $P(^APCHSCMP(+Y,0),U,2)="MEDSCURR;APCHS77"
 S DIK="^APCHSCTL(" D IXALL^DIK
 S DIK="^APCHSURV(" D IXALL^DIK
DUPE ;
 K APCHY,APCHZ S APCHX=0,APCHC=0 F  S APCHX=$O(^APCHSCMP(APCHX)) Q:APCHX'=+APCHX  D
 .I $P(^APCHSCMP(APCHX,0),U)'="MEDS - CHRONIC EXCLUDING D/C'ED MEDS" Q
 .S APCHC=APCHC+1,APCHY(APCHC)=APCHX,APCHZ(APCHX)=""
 I APCHC>1 D
 .;loop through types and change to first one
 .S APCHUSE=APCHY(1)
 .K APCHZ(APCHY(1)),APCHY(1)
 .S APCHT=0 F  S APCHT=$O(^APCHSCTL(APCHT)) Q:APCHT'=+APCHT  D
 ..S APCH1=0 F  S APCH1=$O(^APCHSCTL(APCHT,1,APCH1)) Q:APCH1'=+APCH1  D
 ...S APCH2=$P(^APCHSCTL(APCHT,1,APCH1,0),U,2)
 ...Q:'$D(APCHZ(APCH2))
 ...S DIE="^APCHSCTL("_APCHT_",1,",DA=APCH1,DA(1)=APCHT,DR="1////"_APCHUSE D ^DIE
 .S DA=0 F  S DA=$O(APCHZ(DA)) Q:DA'=+DA  S DIK="^APCHSCMP(" D ^DIK
 K APCHY,APCHZ S APCHX=0,APCHC=0 F  S APCHX=$O(^APCHSCMP(APCHX)) Q:APCHX'=+APCHX  D
 .I $P(^APCHSCMP(APCHX,0),U)'="PATIENT ED - MOST RECENT BY TOPIC" Q
 .S APCHC=APCHC+1,APCHY(APCHC)=APCHX,APCHZ(APCHX)=""
 I APCHC>1 D
 .;loop through types and change to first one
 .S APCHUSE=APCHY(1)
 .K APCHZ(APCHY(1)),APCHY(1)
 .S APCHT=0 F  S APCHT=$O(^APCHSCTL(APCHT)) Q:APCHT'=+APCHT  D
 ..S APCH1=0 F  S APCH1=$O(^APCHSCTL(APCHT,1,APCH1)) Q:APCH1'=+APCH1  D
 ...S APCH2=$P(^APCHSCTL(APCHT,1,APCH1,0),U,2)
 ...Q:'$D(APCHZ(APCH2))
 ...S DIE="^APCHSCTL("_APCHT_",1,",DA=APCH1,DA(1)=APCHT,DR="1////"_APCHUSE D ^DIE
 .S DA=0 F  S DA=$O(APCHZ(DA)) Q:DA'=+DA  S DIK="^APCHSCMP(" D ^DIK
 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
 S DA=$O(^APCHSURV("B","IHD-Elevated LDL Prompt",0))
 I DA S DR=".03///I",DIE="^APCHSURV(" D ^DIE K DIE,DA,DR
 S DA=$O(^APCHSURV("B","IHD-LDL Screening",0))
 I DA S DR=".03///I",DIE="^APCHSURV(" D ^DIE K DIE,DA,DR
 S DA=$O(^APCHSURV("B","ADULT MMR 1-DOSE VERSION",0))
 I DA S DR=".03///I",DIE="^APCHSURV(" D ^DIE K DIE,DA,DR
 S DA=$O(^APCHSURV("B","ADULT MMR 2-DOSE VERSION",0))
 I DA S DR=".03///I",DIE="^APCHSURV(" D ^DIE K DIE,DA,DR
 S DA=$O(^APCHSURV("B","RUBELLA VACCINATION",0))
 I DA S DR=".03///I",DIE="^APCHSURV(" D ^DIE K DIE,DA,DR
BUL ;
 D ^APCHBU11
 Q
 ;
CAT ;
 ;;BREAST EXAM;;GENERAL
 ;;DIABETES SCREENING;;DIABETES
 ;;BLOOD PRESSURE;;GENERAL
 ;;PAP SMEAR;;GENERAL
 ;;RECTAL;;GENERAL
 ;;TONOMETRY;;GENERAL
 ;;URINALYSIS;;GENERAL
 ;;PELVIC EXAM;;GENERAL
 ;;VISUAL ACUITY EXAM;;GENERAL
 ;;HEARING TEST;;GENERAL
 ;;HCT/HGB;;GENERAL
 ;;ENDEMIC TB;;GENERAL
 ;;NON-ENDEMIC TB;;GENERAL
 ;;HEAD CIRCUMFERENCE;;GENERAL
 ;;HEIGHT;;GENERAL
 ;;WEIGHT;;GENERAL
 ;;IMMUNIZATIONS;;GENERAL
 ;;HEARING TEST ANNUAL;;GENERAL
 ;;MAMMOGRAM;;GENERAL
 ;;PNEUMOVAX;;GENERAL
 ;;DM FOOT EXAM;;
 ;;DM EYE EXAM;;
 ;;SCREEN FOR ALCOHOL USE;;GENERAL
 ;;SCREEN FOR TOBACCO USE;;GENERAL
 ;;DM CHOLESTEROL;;
 ;;DM CREATININE;;
 ;;DM TRIGLYCERIDE;;
 ;;DM DENTAL EXAM;;
 ;;PHYSICAL EXAM;;GENERAL
 ;;TD-ADULT;;GENERAL
 ;;INFLUENZA;;GENERAL
 ;;COLORECTAL CA SCRN-FOBT;;GENERAL
 ;;CHOLESTEROL;;GENERAL
 ;;DM URINE PROTEIN;;
 ;;COLORECTAL CA-SCOPE/XRAY;;GENERAL
 ;;ALASKA DOMESTIC VIOLENCE;;GENERAL
 ;;HEARING INQUIRY;;GENERAL
 ;;STRABISMUS/AMBLYOPIA SCREEN;;GENERAL
 ;;PPD - TUBERCULOSIS;;GENERAL
 ;;ANMC DEPRESSION SCREEN SCORE;;GENERAL
 ;;REHAB/FUNCTIONAL SCREEN;;GENERAL
 ;;ANMC COLORECTAL;;GENERAL
 ;;ASTHMA - ADD/INCREASE INHALED STERIODS;;ASTHMA
 ;;ASTHMA - PRIMARY CARE PROVIDER;;ASTHMA
 ;;ASTHMA - SEVERITY CLASSIFICATION;;ASTHMA
 ;;ASTHMA - MANAGEMENT PLAN;;ASTHMA
 ;;ASTHMA PATIENT-FLU SHOT;;ASTHMA
 ;;IHD-LDL Screening;;CARDIOVASCULAR DISEASE
 ;;IHD-Elevated LDL Prompt;;CARDIOVASCULAR DISEASE
 ;;ADULT MMR 1-DOSE VERSION;;GENERAL
 ;;ADULT MMR 2-DOSE VERSION;;GENERAL
 ;;RUBELLA VACCINATION;;GENERAL
 ;;