PXRMSEL1 ;SLC/PJH - PXRM Selection ;01/03/2011
;;2.0;CLINICAL REMINDERS;**12,18**;Feb 04, 2005;Build 152
;
; Called by PXRMSEL
;
BUILD ;Build selection list
;
D CHGCAP^VALM("HEADER1"," Item")
;Reminder Dialog
I PXRMGTYP="DLG" D Q
.N CODE,DATA,DDIS,PXRMDIEN,PXRMDNAM,PXRMITEM,PXRMRNAM,TXT,TYP
.S CODE="",VALMCNT=0
.F S CODE=$O(^PXRMD(801.41,"B",CODE)) Q:CODE="" D
..;Get Dialog detail
..S PXRMDIEN=$O(^PXRMD(801.41,"B",CODE,"")) Q:'PXRMDIEN
..S DATA=$G(^PXRMD(801.41,PXRMDIEN,0)) Q:$P(DATA,U,4)'="R"
..S PXRMDNAM=$P(DATA,U),PXRMRNAM="",DDIS=0
..I $P(DATA,U,3)>0 S DDIS=1
..I $O(^PXD(811.9,"AG",PXRMDIEN,"")),DDIS=0 S DDIS=2
..S PXRMITEM=$P($G(^PXRMD(801.41,PXRMDIEN,0)),U,2)
..I PXRMITEM D
...I $E(PXRMVIEW,2)="N" S PXRMRNAM=$P($G(^PXD(811.9,PXRMITEM,0)),U)
...I $E(PXRMVIEW,2)="P" S PXRMRNAM=$P($G(^PXD(811.9,PXRMITEM,0)),U,3)
..S PXRMDNAM=$E(PXRMDNAM,1,39),PXRMRNAM=$E(PXRMRNAM,1,39)
..S:PXRMRNAM="" PXRMRNAM="*NONE*"
..S TXT=PXRMDNAM_$J("",40-$L(PXRMDNAM))_PXRMRNAM
..S VALMCNT=VALMCNT+1,TXT=$J(VALMCNT,4)_" "_TXT
..S TXT=$E(TXT,1,71)_$J("",71-$L(TXT))
..S TXT=TXT_" "_$S(DDIS=1:"Disabled",DDIS=2:"Linked",1:"")
..D SET^VALM10(VALMCNT,TXT,PXRMDIEN)
.D CHGCAP^VALM("HEADER2","Reminder Dialog Name"_$J("",20)_"Source Reminder")
.D CHGCAP^VALM("HEADER3"," Status")
;
;All dialogs types
I PXRMGTYP="DLGE" D Q
.N CODE,DATA,DDIS,DTYP,PXRMDIEN,PXRMDNAM,PXRMITEM,TXT
.S CODE="",VALMCNT=0,VALMBG=1
.F S CODE=$O(^PXRMD(801.41,"B",CODE)) Q:CODE="" D
..;Get Dialog detail
..S PXRMDIEN=$O(^PXRMD(801.41,"B",CODE,"")) Q:'PXRMDIEN
..S DATA=$G(^PXRMD(801.41,PXRMDIEN,0)),DTYP=$P(DATA,U,4)
..I PXRMDTYP'="A" Q:DTYP'=PXRMDTYP
..Q:DTYP="R"
..S PXRMDNAM=$P(DATA,U),DDIS=0 I $P(DATA,U,3)>0 S DDIS=1
..S PXRMITEM=$O(^PXD(811.9,"AG",PXRMDIEN,""))
..I PXRMITEM,DDIS=0 S DDIS=2
..S PXRMDNAM=$E(PXRMDNAM,1,39)
..S TXT=PXRMDNAM_$J("",40-$L(PXRMDNAM))_$$LIT(DTYP)
..S VALMCNT=VALMCNT+1,TXT=$J(VALMCNT,4)_" "_TXT
..S TXT=$E(TXT,1,71)_$J("",71-$L(TXT))
..S TXT=TXT_$S(DDIS=1:"Disabled",1:"")
..D SET^VALM10(VALMCNT,TXT,PXRMDIEN)
.D CHGCAP^VALM("HEADER2","Dialog Name"_$J("",29)_"Dialog type")
.D CHGCAP^VALM("HEADER3","Status")
;
;Link reminders to dialogs
I PXRMGTYP="DLGR" D Q
.N CODE,DATA,DDIS,DTYP,DIEN,DNAM,MODE,PNAM,RIEN,RNAM,SUB,TXT,TYPE
.S CODE="",VALMCNT=0,VALMBG=1,MODE=$E(PXRMVIEW,2),TYPE=$E(PXRMVIEW)
.S SUB=$S(MODE="P":"D",1:"B")
.F S CODE=$O(^PXD(811.9,SUB,CODE)) Q:CODE="" D
..;Get Dialog detail
..S RIEN=""
..F S RIEN=$O(^PXD(811.9,SUB,CODE,RIEN)) Q:'RIEN D
...S DATA=$G(^PXD(811.9,RIEN,0)) Q:DATA=""
...S RNAM=$P(DATA,U),PNAM=$P(DATA,U,3)
...S DIEN=$P($G(^PXD(811.9,RIEN,51)),U)
...I TYPE="L" Q:'DIEN
...I MODE="P" S:PNAM]"" RNAM=PNAM
...S RNAM=$E(RNAM,1,34),DNAM="",DDIS=2
...D:DIEN
....S DATA=$G(^PXRMD(801.41,DIEN,0)),DDIS=0
....S DNAM=$P(DATA,U) I +$P(DATA,U,3)>0 S DDIS=1
....S DNAM=$E(DNAM,1,27) I DNAM="" S DNAM="??"
...S TXT=RNAM_$J("",35-$L(RNAM))
...S TXT=TXT_DNAM_$J("",28-$L(DNAM))
...S VALMCNT=VALMCNT+1,TXT=$J(VALMCNT,4)_" "_TXT
...S TXT=$E(TXT,1,71)_$J("",71-$L(TXT))
...S TXT=TXT_$S(DDIS=1:"Disabled",1:"")
...D SET^VALM10(VALMCNT,TXT,RIEN)
.I MODE="N" S TXT="Reminder Name"_$J("",22)
.I MODE="P" S TXT="Reminder Print Name"_$J("",16)
.S TXT=TXT_"Linked Dialog Name & Dialog St"
.D CHGCAP^VALM("HEADER2",TXT)
.D CHGCAP^VALM("HEADER3","atus")
;
;Finding item parameters
I PXRMGTYP="FIP" D Q
.N CODE,DATA,DNAM,DSUB,IEN,FDIS,FSUB,FITEM,FLIT,FTYP,TXT
.S CODE="",VALMCNT=0
.F S CODE=$O(^PXRMD(801.43,"B",CODE)) Q:CODE="" D
..S IEN=$O(^PXRMD(801.43,"B",CODE,""))
..S DATA=$G(^PXRMD(801.43,IEN,0)),TXT=$E($P(DATA,U),1,39)
..S FITEM=$P(DATA,U,2),FTYP=$P(FITEM,";",2),FSUB=$P(FITEM,";")
..I FTYP]"" S FTYP=$G(DEF1(FTYP)) S:FTYP="" FTYP="??"
..S FLIT="??" I FSUB S FLIT=FTYP_"("_FSUB_")"
..S VALMCNT=VALMCNT+1,TXT=$J(VALMCNT,4)_" "_FTYP_"-"_TXT
..S DSUB=$P(DATA,U,4),DNAM="",FDIS=$P(DATA,U,3)
..I DSUB S DNAM=$P($G(^PXRMD(801.41,DSUB,0)),U)
..S TXT=TXT_$J("",40-$L(TXT))_DNAM
..S TXT=$E(TXT,1,71)_$J("",71-$L(TXT))_$S(FDIS=1:"Disabled",1:"Enabled")
..D SET^VALM10(VALMCNT,TXT,IEN)
.D CHGCAP^VALM("HEADER2","Finding Item Type & Name"_$J("",10)_"Dialog Group/Element")
.D CHGCAP^VALM("HEADER3","Status")
;
;Finding Type Parameters
I PXRMGTYP="FPAR" D
.N CODE,FDES,TXT,IEN
.S CODE="",VALMCNT=0
.F S CODE=$O(^PXRMD(801.45,"B",CODE)) Q:CODE="" D
..I CODE="POV" S FDES="DIAGNOSIS (POV)"
..I CODE="CPT" S FDES="PROCEDURE (CPT)"
..I $D(DEF2(CODE)) S FDES=DEF2(CODE)
..S VALMCNT=VALMCNT+1,TXT=$J(VALMCNT,4)_" "_FDES
..S IEN=$O(^PXRMD(801.45,"B",CODE,""))
..D SET^VALM10(VALMCNT,TXT,IEN)
.D CHGCAP^VALM("HEADER2","Finding Type Parameter")
;
;Reminder Categories
I PXRMGTYP="RCAT" D Q
.N CODE,DATA,TXT,IEN
.S CODE="",VALMCNT=0
.F S CODE=$O(^PXRMD(811.7,"B",CODE)) Q:CODE="" D
..S IEN=$O(^PXRMD(811.7,"B",CODE,""))
..S DATA=$G(^PXRMD(811.7,IEN,0)),TXT=$P(DATA,U)
..S VALMCNT=VALMCNT+1,TXT=$J(VALMCNT,4)_" "_TXT
..D SET^VALM10(VALMCNT,TXT,IEN)
.D CHGCAP^VALM("HEADER2","Reminder Category")
;
;Taxonomy
I PXRMGTYP="DTAX" D Q
.N CODE,DATA,TXT,IEN
.S CODE="",VALMCNT=0
.F S CODE=$O(^PXD(811.2,"B",CODE)) Q:CODE="" D
..S IEN=$O(^PXD(811.2,"B",CODE,""))
..S DATA=$G(^PXD(811.2,IEN,0)),TXT=$P(DATA,U)
..S VALMCNT=VALMCNT+1,TXT=$J(VALMCNT,4)_" "_TXT
..D SET^VALM10(VALMCNT,TXT,IEN)
.D CHGCAP^VALM("HEADER2","Reminder Taxonomy")
;
;Resolution Statuses
I PXRMGTYP="RESN" D Q
.N CODE,DATA,HED,IEN,TXT,TYP
.S CODE="",VALMCNT=0
.F S CODE=$O(^PXRMD(801.9,"B",CODE)) Q:CODE="" D
..S IEN=$O(^PXRMD(801.9,"B",CODE,""))
..S DATA=$G(^PXRMD(801.9,IEN,0))
..S TXT=$E($P(DATA,U),1,39),TYP=$P(DATA,U,6)
..S VALMCNT=VALMCNT+1,TXT=$J(VALMCNT,4)_" "_TXT
..S TXT=TXT_$J("",40-$L(TXT))_$S(TYP=1:"NATIONAL",1:"LOCAL")
..D SET^VALM10(VALMCNT,TXT,IEN)
.S HED="Reminder Resolution Status National/Local"
.D CHGCAP^VALM("HEADER2",HED)
;
;Health Factor Resolutions
I PXRMGTYP="SHFR" D Q
.N CODE,DARRAY,DATA,HCNT,IEN,RNAM,SUB,TXT
.S IEN=0
.F S IEN=$O(^PXRMD(801.95,IEN)) Q:'IEN D
..S DATA=$G(^AUTTHF(IEN,0)),TXT=$E($P(DATA,U),1,39) Q:TXT=""
..S DARRAY(TXT)=IEN
.S CODE="",VALMCNT=0,HCNT=0
.F S CODE=$O(DARRAY(CODE)) Q:CODE="" D
..S IEN=DARRAY(CODE)
..S DATA=$G(^AUTTHF(IEN,0))
..S VALMCNT=VALMCNT+1,HCNT=HCNT+1,TXT=$J(VALMCNT,4)_" "_CODE
..S SUB=$O(^PXRMD(801.95,IEN,1,"B",0))
..S RNAM="" I SUB S RNAM=$P($G(^PXRMD(801.9,SUB,0)),U)
..S TXT=TXT_$J("",40-$L(TXT))_RNAM
..F S SUB=$O(^PXRMD(801.95,IEN,1,"B",SUB)) Q:'SUB D
...S RNAM=$P($G(^PXRMD(801.9,SUB,0)),U)
...S TXT=TXT_"/"_RNAM
..D SET^VALM10(VALMCNT,TXT,IEN)
.D CHGCAP^VALM("HEADER2","Health Factors"_$J("",20)_"Resolution Status")
;
Q
;
LIT(INP) ;Dialog type description
Q:INP="E" "Dialog Element"
Q:INP="F" "Forced Value"
Q:INP="G" "Dialog Group"
Q:INP="P" "Additional Prompt"
Q:INP="R" "Reminder Dialog"
Q:INP="S" "Result Group"
Q:INP="T" "Result Element"
Q "???"
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXRMSEL1 7086 printed Dec 13, 2024@01:49:06 Page 2
PXRMSEL1 ;SLC/PJH - PXRM Selection ;01/03/2011
+1 ;;2.0;CLINICAL REMINDERS;**12,18**;Feb 04, 2005;Build 152
+2 ;
+3 ; Called by PXRMSEL
+4 ;
BUILD ;Build selection list
+1 ;
+2 DO CHGCAP^VALM("HEADER1"," Item")
+3 ;Reminder Dialog
+4 IF PXRMGTYP="DLG"
Begin DoDot:1
+5 NEW CODE,DATA,DDIS,PXRMDIEN,PXRMDNAM,PXRMITEM,PXRMRNAM,TXT,TYP
+6 SET CODE=""
SET VALMCNT=0
+7 FOR
SET CODE=$ORDER(^PXRMD(801.41,"B",CODE))
if CODE=""
QUIT
Begin DoDot:2
+8 ;Get Dialog detail
+9 SET PXRMDIEN=$ORDER(^PXRMD(801.41,"B",CODE,""))
if 'PXRMDIEN
QUIT
+10 SET DATA=$GET(^PXRMD(801.41,PXRMDIEN,0))
if $PIECE(DATA,U,4)'="R"
QUIT
+11 SET PXRMDNAM=$PIECE(DATA,U)
SET PXRMRNAM=""
SET DDIS=0
+12 IF $PIECE(DATA,U,3)>0
SET DDIS=1
+13 IF $ORDER(^PXD(811.9,"AG",PXRMDIEN,""))
IF DDIS=0
SET DDIS=2
+14 SET PXRMITEM=$PIECE($GET(^PXRMD(801.41,PXRMDIEN,0)),U,2)
+15 IF PXRMITEM
Begin DoDot:3
+16 IF $EXTRACT(PXRMVIEW,2)="N"
SET PXRMRNAM=$PIECE($GET(^PXD(811.9,PXRMITEM,0)),U)
+17 IF $EXTRACT(PXRMVIEW,2)="P"
SET PXRMRNAM=$PIECE($GET(^PXD(811.9,PXRMITEM,0)),U,3)
End DoDot:3
+18 SET PXRMDNAM=$EXTRACT(PXRMDNAM,1,39)
SET PXRMRNAM=$EXTRACT(PXRMRNAM,1,39)
+19 if PXRMRNAM=""
SET PXRMRNAM="*NONE*"
+20 SET TXT=PXRMDNAM_$JUSTIFY("",40-$LENGTH(PXRMDNAM))_PXRMRNAM
+21 SET VALMCNT=VALMCNT+1
SET TXT=$JUSTIFY(VALMCNT,4)_" "_TXT
+22 SET TXT=$EXTRACT(TXT,1,71)_$JUSTIFY("",71-$LENGTH(TXT))
+23 SET TXT=TXT_" "_$SELECT(DDIS=1:"Disabled",DDIS=2:"Linked",1:"")
+24 DO SET^VALM10(VALMCNT,TXT,PXRMDIEN)
End DoDot:2
+25 DO CHGCAP^VALM("HEADER2","Reminder Dialog Name"_$JUSTIFY("",20)_"Source Reminder")
+26 DO CHGCAP^VALM("HEADER3"," Status")
End DoDot:1
QUIT
+27 ;
+28 ;All dialogs types
+29 IF PXRMGTYP="DLGE"
Begin DoDot:1
+30 NEW CODE,DATA,DDIS,DTYP,PXRMDIEN,PXRMDNAM,PXRMITEM,TXT
+31 SET CODE=""
SET VALMCNT=0
SET VALMBG=1
+32 FOR
SET CODE=$ORDER(^PXRMD(801.41,"B",CODE))
if CODE=""
QUIT
Begin DoDot:2
+33 ;Get Dialog detail
+34 SET PXRMDIEN=$ORDER(^PXRMD(801.41,"B",CODE,""))
if 'PXRMDIEN
QUIT
+35 SET DATA=$GET(^PXRMD(801.41,PXRMDIEN,0))
SET DTYP=$PIECE(DATA,U,4)
+36 IF PXRMDTYP'="A"
if DTYP'=PXRMDTYP
QUIT
+37 if DTYP="R"
QUIT
+38 SET PXRMDNAM=$PIECE(DATA,U)
SET DDIS=0
IF $PIECE(DATA,U,3)>0
SET DDIS=1
+39 SET PXRMITEM=$ORDER(^PXD(811.9,"AG",PXRMDIEN,""))
+40 IF PXRMITEM
IF DDIS=0
SET DDIS=2
+41 SET PXRMDNAM=$EXTRACT(PXRMDNAM,1,39)
+42 SET TXT=PXRMDNAM_$JUSTIFY("",40-$LENGTH(PXRMDNAM))_$$LIT(DTYP)
+43 SET VALMCNT=VALMCNT+1
SET TXT=$JUSTIFY(VALMCNT,4)_" "_TXT
+44 SET TXT=$EXTRACT(TXT,1,71)_$JUSTIFY("",71-$LENGTH(TXT))
+45 SET TXT=TXT_$SELECT(DDIS=1:"Disabled",1:"")
+46 DO SET^VALM10(VALMCNT,TXT,PXRMDIEN)
End DoDot:2
+47 DO CHGCAP^VALM("HEADER2","Dialog Name"_$JUSTIFY("",29)_"Dialog type")
+48 DO CHGCAP^VALM("HEADER3","Status")
End DoDot:1
QUIT
+49 ;
+50 ;Link reminders to dialogs
+51 IF PXRMGTYP="DLGR"
Begin DoDot:1
+52 NEW CODE,DATA,DDIS,DTYP,DIEN,DNAM,MODE,PNAM,RIEN,RNAM,SUB,TXT,TYPE
+53 SET CODE=""
SET VALMCNT=0
SET VALMBG=1
SET MODE=$EXTRACT(PXRMVIEW,2)
SET TYPE=$EXTRACT(PXRMVIEW)
+54 SET SUB=$SELECT(MODE="P":"D",1:"B")
+55 FOR
SET CODE=$ORDER(^PXD(811.9,SUB,CODE))
if CODE=""
QUIT
Begin DoDot:2
+56 ;Get Dialog detail
+57 SET RIEN=""
+58 FOR
SET RIEN=$ORDER(^PXD(811.9,SUB,CODE,RIEN))
if 'RIEN
QUIT
Begin DoDot:3
+59 SET DATA=$GET(^PXD(811.9,RIEN,0))
if DATA=""
QUIT
+60 SET RNAM=$PIECE(DATA,U)
SET PNAM=$PIECE(DATA,U,3)
+61 SET DIEN=$PIECE($GET(^PXD(811.9,RIEN,51)),U)
+62 IF TYPE="L"
if 'DIEN
QUIT
+63 IF MODE="P"
if PNAM]""
SET RNAM=PNAM
+64 SET RNAM=$EXTRACT(RNAM,1,34)
SET DNAM=""
SET DDIS=2
+65 if DIEN
Begin DoDot:4
+66 SET DATA=$GET(^PXRMD(801.41,DIEN,0))
SET DDIS=0
+67 SET DNAM=$PIECE(DATA,U)
IF +$PIECE(DATA,U,3)>0
SET DDIS=1
+68 SET DNAM=$EXTRACT(DNAM,1,27)
IF DNAM=""
SET DNAM="??"
End DoDot:4
+69 SET TXT=RNAM_$JUSTIFY("",35-$LENGTH(RNAM))
+70 SET TXT=TXT_DNAM_$JUSTIFY("",28-$LENGTH(DNAM))
+71 SET VALMCNT=VALMCNT+1
SET TXT=$JUSTIFY(VALMCNT,4)_" "_TXT
+72 SET TXT=$EXTRACT(TXT,1,71)_$JUSTIFY("",71-$LENGTH(TXT))
+73 SET TXT=TXT_$SELECT(DDIS=1:"Disabled",1:"")
+74 DO SET^VALM10(VALMCNT,TXT,RIEN)
End DoDot:3
End DoDot:2
+75 IF MODE="N"
SET TXT="Reminder Name"_$JUSTIFY("",22)
+76 IF MODE="P"
SET TXT="Reminder Print Name"_$JUSTIFY("",16)
+77 SET TXT=TXT_"Linked Dialog Name & Dialog St"
+78 DO CHGCAP^VALM("HEADER2",TXT)
+79 DO CHGCAP^VALM("HEADER3","atus")
End DoDot:1
QUIT
+80 ;
+81 ;Finding item parameters
+82 IF PXRMGTYP="FIP"
Begin DoDot:1
+83 NEW CODE,DATA,DNAM,DSUB,IEN,FDIS,FSUB,FITEM,FLIT,FTYP,TXT
+84 SET CODE=""
SET VALMCNT=0
+85 FOR
SET CODE=$ORDER(^PXRMD(801.43,"B",CODE))
if CODE=""
QUIT
Begin DoDot:2
+86 SET IEN=$ORDER(^PXRMD(801.43,"B",CODE,""))
+87 SET DATA=$GET(^PXRMD(801.43,IEN,0))
SET TXT=$EXTRACT($PIECE(DATA,U),1,39)
+88 SET FITEM=$PIECE(DATA,U,2)
SET FTYP=$PIECE(FITEM,";",2)
SET FSUB=$PIECE(FITEM,";")
+89 IF FTYP]""
SET FTYP=$GET(DEF1(FTYP))
if FTYP=""
SET FTYP="??"
+90 SET FLIT="??"
IF FSUB
SET FLIT=FTYP_"("_FSUB_")"
+91 SET VALMCNT=VALMCNT+1
SET TXT=$JUSTIFY(VALMCNT,4)_" "_FTYP_"-"_TXT
+92 SET DSUB=$PIECE(DATA,U,4)
SET DNAM=""
SET FDIS=$PIECE(DATA,U,3)
+93 IF DSUB
SET DNAM=$PIECE($GET(^PXRMD(801.41,DSUB,0)),U)
+94 SET TXT=TXT_$JUSTIFY("",40-$LENGTH(TXT))_DNAM
+95 SET TXT=$EXTRACT(TXT,1,71)_$JUSTIFY("",71-$LENGTH(TXT))_$SELECT(FDIS=1:"Disabled",1:"Enabled")
+96 DO SET^VALM10(VALMCNT,TXT,IEN)
End DoDot:2
+97 DO CHGCAP^VALM("HEADER2","Finding Item Type & Name"_$JUSTIFY("",10)_"Dialog Group/Element")
+98 DO CHGCAP^VALM("HEADER3","Status")
End DoDot:1
QUIT
+99 ;
+100 ;Finding Type Parameters
+101 IF PXRMGTYP="FPAR"
Begin DoDot:1
+102 NEW CODE,FDES,TXT,IEN
+103 SET CODE=""
SET VALMCNT=0
+104 FOR
SET CODE=$ORDER(^PXRMD(801.45,"B",CODE))
if CODE=""
QUIT
Begin DoDot:2
+105 IF CODE="POV"
SET FDES="DIAGNOSIS (POV)"
+106 IF CODE="CPT"
SET FDES="PROCEDURE (CPT)"
+107 IF $DATA(DEF2(CODE))
SET FDES=DEF2(CODE)
+108 SET VALMCNT=VALMCNT+1
SET TXT=$JUSTIFY(VALMCNT,4)_" "_FDES
+109 SET IEN=$ORDER(^PXRMD(801.45,"B",CODE,""))
+110 DO SET^VALM10(VALMCNT,TXT,IEN)
End DoDot:2
+111 DO CHGCAP^VALM("HEADER2","Finding Type Parameter")
End DoDot:1
+112 ;
+113 ;Reminder Categories
+114 IF PXRMGTYP="RCAT"
Begin DoDot:1
+115 NEW CODE,DATA,TXT,IEN
+116 SET CODE=""
SET VALMCNT=0
+117 FOR
SET CODE=$ORDER(^PXRMD(811.7,"B",CODE))
if CODE=""
QUIT
Begin DoDot:2
+118 SET IEN=$ORDER(^PXRMD(811.7,"B",CODE,""))
+119 SET DATA=$GET(^PXRMD(811.7,IEN,0))
SET TXT=$PIECE(DATA,U)
+120 SET VALMCNT=VALMCNT+1
SET TXT=$JUSTIFY(VALMCNT,4)_" "_TXT
+121 DO SET^VALM10(VALMCNT,TXT,IEN)
End DoDot:2
+122 DO CHGCAP^VALM("HEADER2","Reminder Category")
End DoDot:1
QUIT
+123 ;
+124 ;Taxonomy
+125 IF PXRMGTYP="DTAX"
Begin DoDot:1
+126 NEW CODE,DATA,TXT,IEN
+127 SET CODE=""
SET VALMCNT=0
+128 FOR
SET CODE=$ORDER(^PXD(811.2,"B",CODE))
if CODE=""
QUIT
Begin DoDot:2
+129 SET IEN=$ORDER(^PXD(811.2,"B",CODE,""))
+130 SET DATA=$GET(^PXD(811.2,IEN,0))
SET TXT=$PIECE(DATA,U)
+131 SET VALMCNT=VALMCNT+1
SET TXT=$JUSTIFY(VALMCNT,4)_" "_TXT
+132 DO SET^VALM10(VALMCNT,TXT,IEN)
End DoDot:2
+133 DO CHGCAP^VALM("HEADER2","Reminder Taxonomy")
End DoDot:1
QUIT
+134 ;
+135 ;Resolution Statuses
+136 IF PXRMGTYP="RESN"
Begin DoDot:1
+137 NEW CODE,DATA,HED,IEN,TXT,TYP
+138 SET CODE=""
SET VALMCNT=0
+139 FOR
SET CODE=$ORDER(^PXRMD(801.9,"B",CODE))
if CODE=""
QUIT
Begin DoDot:2
+140 SET IEN=$ORDER(^PXRMD(801.9,"B",CODE,""))
+141 SET DATA=$GET(^PXRMD(801.9,IEN,0))
+142 SET TXT=$EXTRACT($PIECE(DATA,U),1,39)
SET TYP=$PIECE(DATA,U,6)
+143 SET VALMCNT=VALMCNT+1
SET TXT=$JUSTIFY(VALMCNT,4)_" "_TXT
+144 SET TXT=TXT_$JUSTIFY("",40-$LENGTH(TXT))_$SELECT(TYP=1:"NATIONAL",1:"LOCAL")
+145 DO SET^VALM10(VALMCNT,TXT,IEN)
End DoDot:2
+146 SET HED="Reminder Resolution Status National/Local"
+147 DO CHGCAP^VALM("HEADER2",HED)
End DoDot:1
QUIT
+148 ;
+149 ;Health Factor Resolutions
+150 IF PXRMGTYP="SHFR"
Begin DoDot:1
+151 NEW CODE,DARRAY,DATA,HCNT,IEN,RNAM,SUB,TXT
+152 SET IEN=0
+153 FOR
SET IEN=$ORDER(^PXRMD(801.95,IEN))
if 'IEN
QUIT
Begin DoDot:2
+154 SET DATA=$GET(^AUTTHF(IEN,0))
SET TXT=$EXTRACT($PIECE(DATA,U),1,39)
if TXT=""
QUIT
+155 SET DARRAY(TXT)=IEN
End DoDot:2
+156 SET CODE=""
SET VALMCNT=0
SET HCNT=0
+157 FOR
SET CODE=$ORDER(DARRAY(CODE))
if CODE=""
QUIT
Begin DoDot:2
+158 SET IEN=DARRAY(CODE)
+159 SET DATA=$GET(^AUTTHF(IEN,0))
+160 SET VALMCNT=VALMCNT+1
SET HCNT=HCNT+1
SET TXT=$JUSTIFY(VALMCNT,4)_" "_CODE
+161 SET SUB=$ORDER(^PXRMD(801.95,IEN,1,"B",0))
+162 SET RNAM=""
IF SUB
SET RNAM=$PIECE($GET(^PXRMD(801.9,SUB,0)),U)
+163 SET TXT=TXT_$JUSTIFY("",40-$LENGTH(TXT))_RNAM
+164 FOR
SET SUB=$ORDER(^PXRMD(801.95,IEN,1,"B",SUB))
if 'SUB
QUIT
Begin DoDot:3
+165 SET RNAM=$PIECE($GET(^PXRMD(801.9,SUB,0)),U)
+166 SET TXT=TXT_"/"_RNAM
End DoDot:3
+167 DO SET^VALM10(VALMCNT,TXT,IEN)
End DoDot:2
+168 DO CHGCAP^VALM("HEADER2","Health Factors"_$JUSTIFY("",20)_"Resolution Status")
End DoDot:1
QUIT
+169 ;
+170 QUIT
+171 ;
LIT(INP) ;Dialog type description
+1 if INP="E"
QUIT "Dialog Element"
+2 if INP="F"
QUIT "Forced Value"
+3 if INP="G"
QUIT "Dialog Group"
+4 if INP="P"
QUIT "Additional Prompt"
+5 if INP="R"
QUIT "Reminder Dialog"
+6 if INP="S"
QUIT "Result Group"
+7 if INP="T"
QUIT "Result Element"
+8 QUIT "???"