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

BKM100P2.m

Go to the documentation of this file.
  1. BKM100P2 ;PRXM/HC/ALA-BKM 1.00 Patch 2 ; 08 Mar 2007 6:12 PM
  1. ;;2.0;HIV MANAGEMENT SYSTEM;;May 29, 2009
  1. ;
  1. EN ;
  1. ;
  1. ; Set up new taxonomies for STI and updates
  1. D ^BKMETX
  1. ;
  1. LTAX ; Add Lab Taxonomies to ^ATXLAB
  1. NEW X,DIC,DLAYGO,DA,DR,DIE,Y,LTAX
  1. S DIC="^ATXLAB(",DIC(0)="L",DLAYGO=9002228
  1. ; Loop through the Taxonomies as stored in routine BKMVTAX4.
  1. D LDLAB(.LTAX)
  1. F BJ=1:1 Q:'$D(LTAX(BJ)) S X=LTAX(BJ) D
  1. . I $D(^ATXLAB("B",X)) Q ; Skip pre-existing Lab taxonomies
  1. . D ^DIC S DA=+Y
  1. . I DA<1 Q
  1. . S BQTXUP(9002228,DA_",",.02)=$P(X," ",2,999)
  1. . S BQTXUP(9002228,DA_",",.05)=DUZ
  1. . S BQTXUP(9002228,DA_",",.06)=DT
  1. . S BQTXUP(9002228,DA_",",.09)=60
  1. . D FILE^DIE("I","BQTXUP")
  1. . S BQTXUP(9002228,DA_",",.08)="B"
  1. . D FILE^DIE("E","BQTXUP")
  1. ;
  1. K DA,BJ,BQTXUP
  1. ;
  1. ; Set up the HMS Reminders as inactive in the standard Health
  1. ; Summary Maintenance Items file #9001018 (APCHSURV)
  1. ;NEW BKMDATA,BKMI,BKMJ,BKMD,PRGM
  1. ;F BKMI=1:1:13 S BKMDATA=$P($T(REM+BKMI),";;",2) D
  1. ;. NEW X,DIC,DA,BKMUPD,Y
  1. ;. S X=$P(BKMDATA,"|",1)
  1. ;. S DIC="^APCHSURV(",DIC(0)="LZ" D ^DIC
  1. ;. ; If this is not a new entry, quit
  1. ;. I $P(Y,U,3)'=1 Q
  1. ;. S DA=+Y
  1. ;. S BKMUPD(9001018,DA_",",.03)="INACTIVE (OFF)"
  1. ;. S BKMUPD(9001018,DA_",",.05)="HIV"
  1. ;. S BKMUPD(9001018,DA_",",.06)="YES"
  1. ;. S PRGM=$P(BKMDATA,"|",2),PRGM=$TR(PRGM,"~",";")
  1. ;. S BKMUPD(9001018,DA_",",1)=PRGM
  1. ;. D FILE^DIE("E","BKMUPD","ERROR")
  1. ;. F BKMJ=1:1 S BKMD=$T(@BKMI+BKMJ) Q:BKMD[" Q" S BKWP(BKMJ)=$P(BKMD,";;",2)
  1. ;. D WP^DIE(9001018,DA_",",2,"","BKWP","ERROR")
  1. ;. K BKWP
  1. ;
  1. ; Load HMS Supplement in ^APCHSUP
  1. ;
  1. ;NEW BKMDATA,BKMI,BKMJ,BKMD
  1. ;F BKMI=1 S BKMDATA=$P($T(SUP+BKMI),";;",2) D
  1. ;. NEW X,DIC,DA,BKMUPD,Y
  1. ;. S X=$P(BKMDATA,"|",1)
  1. ;. S DIC="^APCHSUP(",DIC(0)="LZ" D ^DIC
  1. ;. ; If this is not a new entry, quit
  1. ;. I $P(Y,U,3)'=1 Q
  1. ;. S DA=+Y
  1. ;. S BKMUPD(9001022,DA_",",1100)=$P(BKMDATA,"|",2)
  1. ;. D FILE^DIE("E","BKMUPD","ERROR")
  1. ;. F BKMJ=1:1 S BKMD=$T(@("S"_BKMI)+BKMJ) Q:BKMD[" Q" S BKWP(BKMJ)=$P(BKMD,";;",2)
  1. ;. D WP^DIE(9001022,DA_",",1200,"","BKWP","ERROR")
  1. ;. K BKWP
  1. Q
  1. ;
  1. PRE ; Preinstall
  1. NEW DA,DIK
  1. S DIK="^BKM(90454,"
  1. S DA=0
  1. F S DA=$O(^BKM(90454,DA)) Q:'DA D ^DIK
  1. Q
  1. ;
  1. REM ;
  1. ;;SAFE SEX EDUCATION|ED01~BKMVF33
  1. ;;FAMILY PLANNING EDUCATION|ED02~BKMVF33
  1. ;;HMS PNEUMOVAX|IZ01~BKMVF33
  1. ;;HMS INFLUENZA|IZ02~BKMVF33
  1. ;;HEPATITIS A|IZ03~BKMVF33
  1. ;;HEPATITIS B|IZ04~BKMVF33
  1. ;;TETANUS|IZ05~BKMVF33
  1. ;;EYE EXAM|EX01~BKMVF33
  1. ;;DENTAL EXAM|EX02~BKMVF33
  1. ;;HMS MAMMOGRAM|WMH~BKMVF33
  1. ;;CD4|TST01~BKMVF33
  1. ;;CHLAMYDIA|TST02~BKMVF33
  1. ;;SYPHILIS|TST03~BKMVF33
  1. Q
  1. ;
  1. 1 ;;
  1. ;;Numerator: All patients, ages 13 and older.
  1. ;; Due date = Today, if patients have not had Safe Sex Education (ED.3)
  1. ;;ever documented.
  1. ;; OR
  1. ;; Due date = Last documented education date + 183 days (or 6 months)
  1. Q
  1. 2 ;;
  1. ;;Numerator: All patients, ages 13 and older.
  1. ;;Due date = Today, if patients have not had Safe Sex Education
  1. ;;(ED.3) ever
  1. ;;documented.
  1. ;;OR
  1. ;;Due date = Last documented education date + 183 days (or 6 months)
  1. Q
  1. 3 ;;
  1. ;;Due date = Today, if no Pneumovax vaccine (IZ.6) ever
  1. ;;documented.
  1. ;;OR
  1. ;;Due date = Date of most recent Pneumovax vaccine + 1825 days
  1. ;;or 5 years
  1. ;;or 60 months).
  1. Q
  1. 4 ;;
  1. ;;Due date = Today, if no Influenza vaccine (IZ.5) ever documented.
  1. ;;OR
  1. ;;Due date = Date of most recent Influenza vaccine + 365 days (or
  1. ;;12 months)
  1. Q
  1. 5 ;;
  1. ;;Due date = Today, if no Hepatitis A diagnosis (DX.5) POV or
  1. ;;Problem list ever documented.
  1. ;;OR
  1. ;;Due date = Today, if no Hepatitis A immunization (IZ.3) ever documented.
  1. Q
  1. 6 ;;
  1. ;;Due date = Today, if no Hepatitis B diagnosis (DX.15) POV or
  1. ;;Problem list ever documented.
  1. ;;OR
  1. ;;Due date = Today, if no Hepatitis B immunization (IZ.4) ever documented.
  1. Q
  1. 7 ;;
  1. ;;Due date = Today, if no Tetanus immunization (IZ.7) ever documented.
  1. ;;OR
  1. ;;Due date = Date of most recent Tetanus immunization + 3650 days or 10 years or 120 months).
  1. Q
  1. 8 ;;
  1. ;;Due date = Today, if no dilated eye exam (P.03) ever documented.
  1. ;;Due date = Date of most recent dilated eye exam + 183 days (or 6 months)
  1. ;; if any CD4 Absolute laboratory test (T.30) since most recent
  1. ;; dilated eye exam is < 50.
  1. ;;Due date = Date of most recent dilated eye exam + 365 days (or 12 months).
  1. Q
  1. 9 ;;
  1. ;;Due date = Today, if no dental exam (P.02) ever documented.
  1. ;;Due date = Date of most recent dental exam + 365 days (or 12 months)
  1. Q
  1. 10 ;;
  1. ;;Numerator: All female patients ages 50-69 without documented bilateral
  1. ;;mastectomy (P.01)
  1. ;;
  1. ;;Due date = Today, if no Mammogram (P.05) ever documented.
  1. ;;Due date = Date of most mammogram + 365 days (or 12 months).
  1. Q
  1. 11 ;;
  1. ;;Due date = Today, if no CD4 test (T.2) documented ever.
  1. ;;Due date = Date of most recent CD4 test + 120 days (or 4 months).
  1. Q
  1. 12 ;;
  1. ;;Numerator: All patients 18 years of age and older
  1. ;;Due date = Today, if no Chlamydia test (T.3) ever documented
  1. ;;OR
  1. ;;Due date = Today, if most recent test results for any of the following
  1. ;;are positive
  1. ;; since the most recent Chlamydia test and =<365 days from today:
  1. ;; Gonorrhea (T.10); Syphilis (T.22) or (T.9).
  1. ;;OR
  1. ;;Due date = Today, if patient has any of the following POV diagnoses
  1. ;; since the most recent Chlamydia test and =<365 days from today:
  1. ;; Gonorrhea (DX.4), Syphilis (DX.11), Trichomoniasis (DX.13) or other
  1. ;;STD (DX.9)
  1. ;;OR
  1. ;;Due date = Date of most recent positive Chlamydia test + 56 days (for
  1. ;;retest after cure)
  1. ;;OR
  1. ;;Due date = Date of most recent Chlamydia test + 365 days (or 12 months).
  1. Q
  1. 13 ;;
  1. ;;Numerator: Patients with a positive RPR laboratory value (T.22) (defined
  1. ;;as positive, reactive, indeterminate or any number values) and no FTA-ABS
  1. ;;(T.9) documented after the date of the positive RPR
  1. ;;
  1. ;;Due date = Date of the most recent positive RPR laboratory test + 14 days.
  1. Q
  1. ;
  1. SUP ; Load HMS Supplement in ^APCHSUP
  1. ;;HMS PATIENT CARE SUPPLEMENT|D EP^BKMVSUP(APCHSPAT)
  1. Q
  1. ;
  1. S1 ;;
  1. ;;The HMS Supplement has been designed to display information
  1. ;;specifically related to HIV. You will be able to see, at a glance, the
  1. ;;relevant labs, related diagnoses, medications and reminders.
  1. Q
  1. ;
  1. LDLAB(ARRAY) ;EP - Load site-populated Lab tests
  1. NEW I,TEXT
  1. F I=1:1 S TEXT=$P($T(LAB+I),";;",2) Q:TEXT="" S ARRAY(I)=TEXT
  1. Q
  1. ;
  1. LAB ;EP - LAB TESTS (SITE-POPULATED)
  1. ;;BGP CHLAMYDIA TESTS TAX
  1. ;;BGP HIV TEST TAX
  1. ;;BKM GONORRHEA TEST TAX
  1. ;;BKM HEP B TAX
  1. ;;BKM FTA-ABS TEST TAX
  1. ;;BKM RPR TAX
  1. ;;