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

PXRMUIDE.m

Go to the documentation of this file.
  1. PXRMUIDE ;SLC/PKR - List Manager routines for taxonomy UID edit. ;05/22/2017
  1. ;;2.0;CLINICAL REMINDERS;**26,47,42**;Feb 04, 2005;Build 245
  1. ;
  1. ;=========================================
  1. ENTRY ;Entry code
  1. N TAXIEN
  1. S TAXIEN=^TMP("PXRMTAX",$J,"TAXIEN")
  1. D INITMPG^PXRMTXLS
  1. K ^TMP("PXRMCODES",$J)
  1. D HDR^PXRMUIDE
  1. D CODELIST^PXRMTXSM(TAXIEN)
  1. D BLDLIST^PXRMTXLS
  1. D XQORM^PXRMUIDE
  1. Q
  1. ;
  1. ;=========================================
  1. EXIT ;Exit code
  1. D INITMPG^PXRMTXLS
  1. K ^TMP("PXRMCODES",$J)
  1. D FULL^VALM1
  1. D CLEAN^VALM10
  1. D KILL^VALM10
  1. D CLEAR^VALM1
  1. S VALMBCK="Q"
  1. Q
  1. ;
  1. ;=========================================
  1. EXITS ;Exit and save action.
  1. D SAVE^PXRMUIDE
  1. D EXIT^PXRMUIDE
  1. Q
  1. ;
  1. ;=========================================
  1. HDR ; Header code
  1. S VALMHDR(1)="Edit UID for all selected codes in this taxonomy."
  1. S VALMSG="+ Next Screen - Prev Screen ?? More Actions"
  1. Q
  1. ;
  1. ;=========================================
  1. HELP ;Display help.
  1. N DDS,DIR0,DONE,IND,TEXT
  1. ;DBIA #5746 covers kill and set of DDS. DDS needs to be set or the
  1. ;Browser will kill some ScreenMan variables.
  1. S DDS=1,DONE=0
  1. F IND=1:1 Q:DONE D
  1. . S TEXT(IND)=$P($T(HTEXT+IND),";",3,99)
  1. . I TEXT(IND)="**End Text**" K TEXT(IND) S DONE=1 Q
  1. D BROWSE^DDBR("TEXT","NR","UID Edit Help")
  1. S VALMBCK="R"
  1. Q
  1. ;
  1. ;=========================================
  1. HTEXT ;Lexicon selection help text. PROBABLY CAN REMOVE AND USE ORIGINAL
  1. ;;Select one of the following actions:
  1. ;;
  1. ;; RFD - removes selected codes from being used in a dialog.
  1. ;; UID - adds selected codes to the taxonomy and marks them for use in a dialog.
  1. ;; SAVE - saves all selected codes. Even if codes have been selected, they will
  1. ;; not be stored until they are saved. Finally, a save must be done when
  1. ;; exiting the ScreenMan form or no changes will be saved.
  1. ;; EXIT - saves then exits.
  1. ;;
  1. ;;You can select the action first and then be prompted for a list of codes or
  1. ;;you can input the list and then select the action. Because of the way List
  1. ;;Manager works, you may be able to select a larger list by selecting the action
  1. ;;first.
  1. ;;
  1. ;;**End Text**
  1. Q
  1. ;
  1. ;=========================================
  1. PEXIT ; Protocol exit code
  1. S VALMSG="+ Next Screen - Prev Screen ?? More Actions"
  1. ;Reset after page up/down etc
  1. D XQORM^PXRMUIDE
  1. Q
  1. ;
  1. ;=========================================
  1. SAVE ;Save the changes.
  1. N TAXIEN
  1. S TAXIEN=^TMP("PXRMTAX",$J,"TAXIEN")
  1. D SAVE^PXRMTXLS
  1. D POSTSAVE^PXRMTXSM(TAXIEN)
  1. S VALMBCK="R"
  1. Q
  1. ;
  1. ;=========================================
  1. XQORM ; Set range for selection.
  1. N NCODES
  1. S NCODES=+$G(^TMP("PXRMTXSC",$J,"NCODES"))
  1. I NCODES=0 Q
  1. S XQORM("#")=$O(^ORD(101,"B","PXRM TAXONOMY UIDE SELECT ENTRY",0))_U_"1:"_NCODES
  1. S XQORM("A")="Select Action: "
  1. Q
  1. ;
  1. ;=========================================
  1. XSEL ;Entry action for protocol PXRM TAXONOMY ALL SELECTED SELECT.
  1. N ENUM,IND,LIST,NCODES,LVALID
  1. S LIST=$P(XQORNOD(0),"=",2)
  1. ;Remove trailing ,
  1. I $E(LIST,$L(LIST))="," S LIST=$E(LIST,1,$L(LIST)-1)
  1. S LVALID=1
  1. S NCODES=+$O(^TMP("PXRMTXSC",$J,"LINES",""),-1)
  1. F IND=1:1:$L(LIST,",") D
  1. . S ENUM=$P(LIST,",",IND)
  1. . I (ENUM<1)!(ENUM>NCODES) D
  1. .. W !,ENUM," is not a valid selection."
  1. .. W !,"The range is 1 to ",NCODES,"."
  1. .. H 2
  1. .. S LVALID=0
  1. I 'LVALID S VALMBCK="R" Q
  1. ;
  1. ;Full screen mode
  1. D FULL^VALM1
  1. ;
  1. ;Possible actions.
  1. N DIR,DIROUT,DIRUT,DTOUT,DUOUT,OPTION,X,Y
  1. S DIR(0)="SBM"_U_"RFD:Remove from dialog;"
  1. S DIR(0)=DIR(0)_"UID:Use in dialog;"
  1. S DIR("A")="Select Action: "
  1. S DIR("B")="UID"
  1. S DIR("?")="Select from the actions displayed."
  1. D ^DIR
  1. I $D(DIROUT)!$D(DIRUT) S VALMBCK="R" Q
  1. I $D(DTOUT)!$D(DUOUT) S VALMBCK="R" Q
  1. S OPTION=Y
  1. D CLEAR^VALM1
  1. ;
  1. I OPTION="RFD" D RFDX^PXRMTXLS(.LIST)
  1. I OPTION="UID" D INCX^PXRMTXLS(.LIST,1)
  1. ;
  1. S VALMBCK="R"
  1. Q
  1. ;