PXRMCQLM ;SLC/PKR - List Manager routines for clinical quality measures. ;07/18/2014
;;2.0;CLINICAL REMINDERS;**47**;Feb 04, 2005;Build 291
;
;=========================================
BLDLIST(NODE) ;Build of list of value set file entries.
N CMSID,IEN,FMTSTR,IND,NAME,NL,NUM,OUTPUT,START
K ^TMP(NODE,$J)
;Build the list in alphabetical order.
S FMTSTR=$$LMFMTSTR^PXRMTEXT(.VALMDDF,"RLLL")
S (NUM,VALMCNT)=0
S NAME=""
F S NAME=$O(^PXRM(802.3,"B",NAME)) Q:NAME="" D
. S IEN=""
. F S IEN=$O(^PXRM(802.3,"B",NAME,IEN)) Q:IEN="" D
.. S NUM=NUM+1
.. S CMSID=$P(^PXRM(802.3,IEN,1),U,1)
.. S ^TMP(NODE,$J,"SEL",NUM)=IEN
.. S ^TMP(NODE,$J,"IEN",IEN)=NUM
.. D FORMAT(NUM,NAME,CMSID,FMTSTR,.NL,.OUTPUT)
.. S START=VALMCNT+1
.. F IND=1:1:NL D
... S VALMCNT=VALMCNT+1,^TMP(NODE,$J,VALMCNT,0)=OUTPUT(IND)
... S ^TMP(NODE,$J,"IDX",VALMCNT,NUM)=""
.. S ^TMP(NODE,$J,"LINES",NUM)=START_U_VALMCNT
S ^TMP(NODE,$J,"VALMCNT")=VALMCNT
S ^TMP(NODE,$J,"NCQM")=NUM
Q
;
;=========================================
ENTRY ;Entry code
D INITMPG^PXRMCQLM
D BLDLIST^PXRMCQLM("PXRMCQML")
D XQORM
Q
;
;=========================================
EXIT ;Exit code
D INITMPG^PXRMCQLM
D CLEAN^VALM10
D FULL^VALM1
S VALMBCK="Q"
Q
;
;=========================================
FORMAT(NUMBER,NAME,CMSID,FMTSTR,NL,OUTPUT) ;Format entry number and name for
;the LM display.
N TEMP
S TEMP=NUMBER_U_NAME_U_CMSID
D COLFMT^PXRMTEXT(FMTSTR,TEMP," ",.NL,.OUTPUT)
Q
;
;=========================================
GETSEL(TEXT) ;Get a single selection
N DIR,NCQM,X,Y
S NCQM=+$G(^TMP("PXRMCQML",$J,"NCQM"))
I NCQM=0 Q 0
S DIR(0)="N^1:"_NCQM
S DIR("A")=TEXT
D ^DIR
Q +$G(^TMP("PXRMCQML",$J,"SEL",+Y))
;
;=========================================
HELP ;Display help.
N DDS,DIR0,DONE,IND,TEXT
;DBIA #5746 covers kill and set of DDS. DDS needs to be set or the
;Browser will kill some ScreenMan variables.
S DDS=1,DONE=0
F IND=1:1 Q:DONE D
. S TEXT(IND)=$P($T(HTEXT+IND),";",3,99)
. I TEXT(IND)="**End Text**" K TEXT(IND) S DONE=1 Q
D BROWSE^DDBR("TEXT","NR","Clinical Quality Measures Help")
S VALMBCK="R"
Q
;
;=========================================
HDR ; Header code
S VALMHDR(1)="NLM Clinical Quality Measures."
S VALMSG="+ Next Screen - Prev Screen ?? More Actions"
Q
;
;=========================================
HTEXT ;Taxonomy mangement help text.
;;Select one of the following actions:
;; INQ - clinical quality measure inquiry.
;;
;;You can select the action first and then the entry or choose the entry and then
;;the action.
;;
;;**End Text**
Q
;
;=========================================
INQ(IEN) ;Display the contents of a measure.
D BMINQ^PXRMCQIN(IEN)
S VALMBCK="R"
Q
;
;=========================================
INQS ;Inquiry for a selected value set.
N IEN
;Get the entry
S IEN=+$$GETSEL("Select the value set")
I IEN=0 S VALMBCK="R" Q
D INQ^PXRMCQLM(IEN)
Q
;
;=========================================
INITMPG ;Initialize all the ^TMP globals.
K ^TMP("PXRMCQML",$J)
Q
;
;=========================================
PEXIT ; Protocol exit code
S VALMSG="+ Next Screen - Prev Screen ?? More Actions"
;Reset after page up/down etc
D XQORM
Q
;
;=========================================
START ;Main entry point for PXRM Value Set Menu.
N VALMBCK,VALMSG,X
S X="IORESET"
D ENDR^%ZISS
D EN^VALM("PXRM CQM MENU")
W IORESET
D KILL^%ZISS
Q
;
;=========================================
XQORM ;Set range for selection.
N NCQM
S NCQM=^TMP("PXRMCQML",$J,"NCQM")
S XQORM("#")=$O(^ORD(101,"B","PXRM CQM SELECT ENTRY",0))_U_"1:"_NCQM
S XQORM("A")="Select Action: "
Q
;
;=========================================
XSEL ;Entry action for protocol PXRM CQM SELECT ENTRY.
N EDITOK,IEN,SEL
S SEL=$P(XQORNOD(0),"=",2)
;Remove trailing ,
I $E(SEL,$L(SEL))="," S SEL=$E(SEL,1,$L(SEL)-1)
;Invalid selection
I SEL["," D Q
. W !,"Only one item number allowed." H 2
. S VALMBCK="R"
I ('SEL)!(SEL>VALMCNT)!('$D(@VALMAR@("SEL",SEL))) D Q
. W !,SEL_" is not a valid item number." H 2
. S VALMBCK="R"
;
;Get the IEN.
S IEN=^TMP("PXRMCQML",$J,"SEL",SEL)
;
;Full screen mode
D FULL^VALM1
;
;Action list.
N DIR,DIROUT,DIRUT,DTOUT,DUOUT,OPTION,X,Y
S DIR(0)="SBM"_U
S DIR(0)=DIR(0)_"INQ:Inquire;"
S DIR("A")="Select Action: "
S DIR("B")="INQ"
S DIR("?")="Select from the actions displayed."
D ^DIR
I $D(DIROUT)!$D(DIRUT) S VALMBCK="R" Q
I $D(DTOUT)!$D(DUOUT) S VALMBCK="R" Q
S OPTION=Y
D CLEAR^VALM1
;
I OPTION="INQ" D INQ^PXRMCQLM(IEN)
S VALMBCK="R"
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXRMCQLM 4718 printed Nov 22, 2024@16:53:32 Page 2
PXRMCQLM ;SLC/PKR - List Manager routines for clinical quality measures. ;07/18/2014
+1 ;;2.0;CLINICAL REMINDERS;**47**;Feb 04, 2005;Build 291
+2 ;
+3 ;=========================================
BLDLIST(NODE) ;Build of list of value set file entries.
+1 NEW CMSID,IEN,FMTSTR,IND,NAME,NL,NUM,OUTPUT,START
+2 KILL ^TMP(NODE,$JOB)
+3 ;Build the list in alphabetical order.
+4 SET FMTSTR=$$LMFMTSTR^PXRMTEXT(.VALMDDF,"RLLL")
+5 SET (NUM,VALMCNT)=0
+6 SET NAME=""
+7 FOR
SET NAME=$ORDER(^PXRM(802.3,"B",NAME))
if NAME=""
QUIT
Begin DoDot:1
+8 SET IEN=""
+9 FOR
SET IEN=$ORDER(^PXRM(802.3,"B",NAME,IEN))
if IEN=""
QUIT
Begin DoDot:2
+10 SET NUM=NUM+1
+11 SET CMSID=$PIECE(^PXRM(802.3,IEN,1),U,1)
+12 SET ^TMP(NODE,$JOB,"SEL",NUM)=IEN
+13 SET ^TMP(NODE,$JOB,"IEN",IEN)=NUM
+14 DO FORMAT(NUM,NAME,CMSID,FMTSTR,.NL,.OUTPUT)
+15 SET START=VALMCNT+1
+16 FOR IND=1:1:NL
Begin DoDot:3
+17 SET VALMCNT=VALMCNT+1
SET ^TMP(NODE,$JOB,VALMCNT,0)=OUTPUT(IND)
+18 SET ^TMP(NODE,$JOB,"IDX",VALMCNT,NUM)=""
End DoDot:3
+19 SET ^TMP(NODE,$JOB,"LINES",NUM)=START_U_VALMCNT
End DoDot:2
End DoDot:1
+20 SET ^TMP(NODE,$JOB,"VALMCNT")=VALMCNT
+21 SET ^TMP(NODE,$JOB,"NCQM")=NUM
+22 QUIT
+23 ;
+24 ;=========================================
ENTRY ;Entry code
+1 DO INITMPG^PXRMCQLM
+2 DO BLDLIST^PXRMCQLM("PXRMCQML")
+3 DO XQORM
+4 QUIT
+5 ;
+6 ;=========================================
EXIT ;Exit code
+1 DO INITMPG^PXRMCQLM
+2 DO CLEAN^VALM10
+3 DO FULL^VALM1
+4 SET VALMBCK="Q"
+5 QUIT
+6 ;
+7 ;=========================================
FORMAT(NUMBER,NAME,CMSID,FMTSTR,NL,OUTPUT) ;Format entry number and name for
+1 ;the LM display.
+2 NEW TEMP
+3 SET TEMP=NUMBER_U_NAME_U_CMSID
+4 DO COLFMT^PXRMTEXT(FMTSTR,TEMP," ",.NL,.OUTPUT)
+5 QUIT
+6 ;
+7 ;=========================================
GETSEL(TEXT) ;Get a single selection
+1 NEW DIR,NCQM,X,Y
+2 SET NCQM=+$GET(^TMP("PXRMCQML",$JOB,"NCQM"))
+3 IF NCQM=0
QUIT 0
+4 SET DIR(0)="N^1:"_NCQM
+5 SET DIR("A")=TEXT
+6 DO ^DIR
+7 QUIT +$GET(^TMP("PXRMCQML",$JOB,"SEL",+Y))
+8 ;
+9 ;=========================================
HELP ;Display help.
+1 NEW DDS,DIR0,DONE,IND,TEXT
+2 ;DBIA #5746 covers kill and set of DDS. DDS needs to be set or the
+3 ;Browser will kill some ScreenMan variables.
+4 SET DDS=1
SET DONE=0
+5 FOR IND=1:1
if DONE
QUIT
Begin DoDot:1
+6 SET TEXT(IND)=$PIECE($TEXT(HTEXT+IND),";",3,99)
+7 IF TEXT(IND)="**End Text**"
KILL TEXT(IND)
SET DONE=1
QUIT
End DoDot:1
+8 DO BROWSE^DDBR("TEXT","NR","Clinical Quality Measures Help")
+9 SET VALMBCK="R"
+10 QUIT
+11 ;
+12 ;=========================================
HDR ; Header code
+1 SET VALMHDR(1)="NLM Clinical Quality Measures."
+2 SET VALMSG="+ Next Screen - Prev Screen ?? More Actions"
+3 QUIT
+4 ;
+5 ;=========================================
HTEXT ;Taxonomy mangement help text.
+1 ;;Select one of the following actions:
+2 ;; INQ - clinical quality measure inquiry.
+3 ;;
+4 ;;You can select the action first and then the entry or choose the entry and then
+5 ;;the action.
+6 ;;
+7 ;;**End Text**
+8 QUIT
+9 ;
+10 ;=========================================
INQ(IEN) ;Display the contents of a measure.
+1 DO BMINQ^PXRMCQIN(IEN)
+2 SET VALMBCK="R"
+3 QUIT
+4 ;
+5 ;=========================================
INQS ;Inquiry for a selected value set.
+1 NEW IEN
+2 ;Get the entry
+3 SET IEN=+$$GETSEL("Select the value set")
+4 IF IEN=0
SET VALMBCK="R"
QUIT
+5 DO INQ^PXRMCQLM(IEN)
+6 QUIT
+7 ;
+8 ;=========================================
INITMPG ;Initialize all the ^TMP globals.
+1 KILL ^TMP("PXRMCQML",$JOB)
+2 QUIT
+3 ;
+4 ;=========================================
PEXIT ; Protocol exit code
+1 SET VALMSG="+ Next Screen - Prev Screen ?? More Actions"
+2 ;Reset after page up/down etc
+3 DO XQORM
+4 QUIT
+5 ;
+6 ;=========================================
START ;Main entry point for PXRM Value Set Menu.
+1 NEW VALMBCK,VALMSG,X
+2 SET X="IORESET"
+3 DO ENDR^%ZISS
+4 DO EN^VALM("PXRM CQM MENU")
+5 WRITE IORESET
+6 DO KILL^%ZISS
+7 QUIT
+8 ;
+9 ;=========================================
XQORM ;Set range for selection.
+1 NEW NCQM
+2 SET NCQM=^TMP("PXRMCQML",$JOB,"NCQM")
+3 SET XQORM("#")=$ORDER(^ORD(101,"B","PXRM CQM SELECT ENTRY",0))_U_"1:"_NCQM
+4 SET XQORM("A")="Select Action: "
+5 QUIT
+6 ;
+7 ;=========================================
XSEL ;Entry action for protocol PXRM CQM SELECT ENTRY.
+1 NEW EDITOK,IEN,SEL
+2 SET SEL=$PIECE(XQORNOD(0),"=",2)
+3 ;Remove trailing ,
+4 IF $EXTRACT(SEL,$LENGTH(SEL))=","
SET SEL=$EXTRACT(SEL,1,$LENGTH(SEL)-1)
+5 ;Invalid selection
+6 IF SEL[","
Begin DoDot:1
+7 WRITE !,"Only one item number allowed."
HANG 2
+8 SET VALMBCK="R"
End DoDot:1
QUIT
+9 IF ('SEL)!(SEL>VALMCNT)!('$DATA(@VALMAR@("SEL",SEL)))
Begin DoDot:1
+10 WRITE !,SEL_" is not a valid item number."
HANG 2
+11 SET VALMBCK="R"
End DoDot:1
QUIT
+12 ;
+13 ;Get the IEN.
+14 SET IEN=^TMP("PXRMCQML",$JOB,"SEL",SEL)
+15 ;
+16 ;Full screen mode
+17 DO FULL^VALM1
+18 ;
+19 ;Action list.
+20 NEW DIR,DIROUT,DIRUT,DTOUT,DUOUT,OPTION,X,Y
+21 SET DIR(0)="SBM"_U
+22 SET DIR(0)=DIR(0)_"INQ:Inquire;"
+23 SET DIR("A")="Select Action: "
+24 SET DIR("B")="INQ"
+25 SET DIR("?")="Select from the actions displayed."
+26 DO ^DIR
+27 IF $DATA(DIROUT)!$DATA(DIRUT)
SET VALMBCK="R"
QUIT
+28 IF $DATA(DTOUT)!$DATA(DUOUT)
SET VALMBCK="R"
QUIT
+29 SET OPTION=Y
+30 DO CLEAR^VALM1
+31 ;
+32 IF OPTION="INQ"
DO INQ^PXRMCQLM(IEN)
+33 SET VALMBCK="R"
+34 QUIT
+35 ;