PXRMV1IH ; SLC/PKR - Inits for new REMINDER package (globals).;05/19/2000
;;1.5;CLINICAL REMINDERS;;Jun 19, 2000
;
;These routines are for properly setting up the
; VA-HEP C RISK ASSESSMENT reminder.
;
;=======================================================================
CTERMS ;Connect the terms to findings.
N REMIEN,TERMLIST
S REMIEN=$O(^PXD(811.9,"B","VA-HEP C RISK ASSESSMENT",""))
D TERMLIST(REMIEN,.TERMLIST)
D HFTERMS(REMIEN,.TERMLIST)
D TAXTERMS(REMIEN,.TERMLIST)
Q
;
;=======================================================================
HFTERMS(REMIEN,TERMLIST) ;Connect terms using health factors.
N FDA,FDAIEN,HFIEN
S HFIEN=$O(^AUTTHF("B","DECLINED HEP C RISK ASSESSMENT",""))
S FDAIEN(1)=TERMLIST("DECLINED HEP C RISK ASSESSMENT")
S FDA(811.5,"?1,",.01)="DECLINED HEP C RISK ASSESSMENT"
S FDA(811.5,"?1,",.02)="N"
S FDA(811.52,"?+2,?1,",.01)=HFIEN_";AUTTHF("
D UPDATE(.FDA,.FDAIEN)
;
S HFIEN=$O(^AUTTHF("B","NO RISK FACTORS FOR HEP C",""))
K FDA,FDAIEN
S FDAIEN(1)=TERMLIST("NO RISK FACTORS FOR HEP C")
S FDA(811.5,"?1,",.01)="NO RISK FACTORS FOR HEP C"
S FDA(811.5,"?1,",.02)="N"
S FDA(811.52,"?+2,?1,",.01)=HFIEN_";AUTTHF("
D UPDATE(.FDA,.FDAIEN)
;
S HFIEN=$O(^AUTTHF("B","PREV POS TEST FOR HEP C",""))
K FDA,FDAIEN
S FDAIEN(1)=TERMLIST("PREV POSITIVE TEST FOR HEP C")
S FDA(811.5,"?1,",.01)="PREV POSITIVE TEST FOR HEP C"
S FDA(811.5,"?1,",.02)="N"
S FDA(811.52,"?+2,?1,",.01)=HFIEN_";AUTTHF("
D UPDATE(.FDA,.FDAIEN)
;
S HFIEN=$O(^AUTTHF("B","RISK FACTOR FOR HEPATITIS C",""))
K FDA,FDAIEN
S FDAIEN(1)=TERMLIST("RISK FACTOR FOR HEPATITIS C")
S FDA(811.5,"?1,",.01)="RISK FACTOR FOR HEPATITIS C"
S FDA(811.5,"?1,",.02)="N"
S FDA(811.52,"?+2,?1,",.01)=HFIEN_";AUTTHF("
D UPDATE(.FDA,.FDAIEN)
Q
;
;=======================================================================
TAXTERMS(REMIEN,TERMLIST) ;Connect terms using taxonomies.
N FDA,FDAIEN,TAXIEN
S TAXIEN=$O(^PXD(811.2,"B","VA-HEPATITIS C INFECTION",""))
S FDAIEN(1)=TERMLIST("HEPATITIS C INFECTION")
S FDA(811.5,"?1,",.01)="HEPATITIS C INFECTION"
S FDA(811.5,"?1,",.02)="N"
S FDA(811.52,"?+2,?1,",.01)=TAXIEN_";PXD(811.2,"
D UPDATE(.FDA,.FDAIEN)
Q
;
;=======================================================================
TERMLIST(REMIEN,TERMLIST) ;Build the list of terms in the reminder.
N TERM,TERMNAME
S TERM=""
F S TERM=$O(^PXD(811.9,REMIEN,20,"E","PXRMD(811.5,",TERM)) Q:+TERM=0 D
. S TERMNAME=$P(^PXRMD(811.5,TERM,0),U,1)
. S TERMLIST(TERMNAME)=TERM
Q
;
;=======================================================================
UPDATE(FDA,FDAIEN) ;Do the update.
N MSG
D UPDATE^DIE("","FDA","FDAIEN","MSG")
Q
;
PXRMV1IH ; SLC/PKR - Inits for new REMINDER package (globals).;05/19/2000
+1 ;;1.5;CLINICAL REMINDERS;;Jun 19, 2000
+2 ;
+3 ;These routines are for properly setting up the
+4 ; VA-HEP C RISK ASSESSMENT reminder.
+5 ;
+6 ;=======================================================================
CTERMS ;Connect the terms to findings.
+1 NEW REMIEN,TERMLIST
+2 SET REMIEN=$ORDER(^PXD(811.9,"B","VA-HEP C RISK ASSESSMENT",""))
+3 DO TERMLIST(REMIEN,.TERMLIST)
+4 DO HFTERMS(REMIEN,.TERMLIST)
+5 DO TAXTERMS(REMIEN,.TERMLIST)
+6 QUIT
+7 ;
+8 ;=======================================================================
HFTERMS(REMIEN,TERMLIST) ;Connect terms using health factors.
+1 NEW FDA,FDAIEN,HFIEN
+2 SET HFIEN=$ORDER(^AUTTHF("B","DECLINED HEP C RISK ASSESSMENT",""))
+3 SET FDAIEN(1)=TERMLIST("DECLINED HEP C RISK ASSESSMENT")
+4 SET FDA(811.5,"?1,",.01)="DECLINED HEP C RISK ASSESSMENT"
+5 SET FDA(811.5,"?1,",.02)="N"
+6 SET FDA(811.52,"?+2,?1,",.01)=HFIEN_";AUTTHF("
+7 DO UPDATE(.FDA,.FDAIEN)
+8 ;
+9 SET HFIEN=$ORDER(^AUTTHF("B","NO RISK FACTORS FOR HEP C",""))
+10 KILL FDA,FDAIEN
+11 SET FDAIEN(1)=TERMLIST("NO RISK FACTORS FOR HEP C")
+12 SET FDA(811.5,"?1,",.01)="NO RISK FACTORS FOR HEP C"
+13 SET FDA(811.5,"?1,",.02)="N"
+14 SET FDA(811.52,"?+2,?1,",.01)=HFIEN_";AUTTHF("
+15 DO UPDATE(.FDA,.FDAIEN)
+16 ;
+17 SET HFIEN=$ORDER(^AUTTHF("B","PREV POS TEST FOR HEP C",""))
+18 KILL FDA,FDAIEN
+19 SET FDAIEN(1)=TERMLIST("PREV POSITIVE TEST FOR HEP C")
+20 SET FDA(811.5,"?1,",.01)="PREV POSITIVE TEST FOR HEP C"
+21 SET FDA(811.5,"?1,",.02)="N"
+22 SET FDA(811.52,"?+2,?1,",.01)=HFIEN_";AUTTHF("
+23 DO UPDATE(.FDA,.FDAIEN)
+24 ;
+25 SET HFIEN=$ORDER(^AUTTHF("B","RISK FACTOR FOR HEPATITIS C",""))
+26 KILL FDA,FDAIEN
+27 SET FDAIEN(1)=TERMLIST("RISK FACTOR FOR HEPATITIS C")
+28 SET FDA(811.5,"?1,",.01)="RISK FACTOR FOR HEPATITIS C"
+29 SET FDA(811.5,"?1,",.02)="N"
+30 SET FDA(811.52,"?+2,?1,",.01)=HFIEN_";AUTTHF("
+31 DO UPDATE(.FDA,.FDAIEN)
+32 QUIT
+33 ;
+34 ;=======================================================================
TAXTERMS(REMIEN,TERMLIST) ;Connect terms using taxonomies.
+1 NEW FDA,FDAIEN,TAXIEN
+2 SET TAXIEN=$ORDER(^PXD(811.2,"B","VA-HEPATITIS C INFECTION",""))
+3 SET FDAIEN(1)=TERMLIST("HEPATITIS C INFECTION")
+4 SET FDA(811.5,"?1,",.01)="HEPATITIS C INFECTION"
+5 SET FDA(811.5,"?1,",.02)="N"
+6 SET FDA(811.52,"?+2,?1,",.01)=TAXIEN_";PXD(811.2,"
+7 DO UPDATE(.FDA,.FDAIEN)
+8 QUIT
+9 ;
+10 ;=======================================================================
TERMLIST(REMIEN,TERMLIST) ;Build the list of terms in the reminder.
+1 NEW TERM,TERMNAME
+2 SET TERM=""
+3 FOR
SET TERM=$ORDER(^PXD(811.9,REMIEN,20,"E","PXRMD(811.5,",TERM))
IF +TERM=0
QUIT
Begin DoDot:1
+4 SET TERMNAME=$PIECE(^PXRMD(811.5,TERM,0),U,1)
+5 SET TERMLIST(TERMNAME)=TERM
End DoDot:1
+6 QUIT
+7 ;
+8 ;=======================================================================
UPDATE(FDA,FDAIEN) ;Do the update.
+1 NEW MSG
+2 DO UPDATE^DIE("","FDA","FDAIEN","MSG")
+3 QUIT
+4 ;