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

PXRMXTB.m

Go to the documentation of this file.
  1. PXRMXTB ; SLC/PJH - Reminder Reports Template Load ;01/28/2013
  1. ;;2.0;CLINICAL REMINDERS;**6,12,26**;Feb 04, 2005;Build 404
  1. ;
  1. ; Called from PXRMXD
  1. ;
  1. ;Select Template
  1. ;---------------
  1. START N X,Y,CNT,FOUND,PXRMFLD,DIC,MSG
  1. N ERR,SEQ,TMPLST,LIST
  1. K DIROUT,DIRUT,DTOUT,DUOUT
  1. S PXRMTMP="",FOUND=0
  1. ;
  1. ;Check if any templates exist for the user
  1. D GETLST^XPAR(.TMPLST,"USR","PXRM REPORT TEMPLATE (USER)","Q",.ERR)
  1. I ERR>0 W !!,?5,"Error: "_$P(ERR,U,2) S DUOUT=1 H 2 Q
  1. I 'TMPLST W !!,?5,"No report Templates for this user" S DUOUT=1 H 2 Q
  1. ;Build list of templates
  1. S SEQ=0
  1. F S SEQ=$O(TMPLST(SEQ)) Q:'SEQ D
  1. .S Y=$P(TMPLST(SEQ),U,2) Q:'Y
  1. .S LIST(Y)=""
  1. ;
  1. ;Select template required
  1. W !
  1. S CNT=0,DIC=810.1,DIC(0)="AEQMZ"
  1. S DIC("A")="Select REPORT TEMPLATE:"
  1. S DIC("S")="I $D(LIST(+Y)),$P(^PXRMPT(810.1,+Y,0),U,3)=PXRMTYP"
  1. D ^DIC
  1. W !!,"1"
  1. I X="" S DUOUT=1
  1. I X=(U_U) S DTOUT=1
  1. I '$D(DTOUT),('$D(DUOUT)) D
  1. .I +Y'=-1 D Q
  1. ..S CNT=CNT+1,ARRAY(CNT)=Y_U_Y(0,0)_U_$P(Y(0),U,3)
  1. K DIC
  1. ;
  1. ;Load template into local array
  1. I (+Y'=-1)&('$D(DTOUT))&('$D(DUOUT)) D
  1. .L +^PXRMPT(810.1,$P(Y,U)):DILOCKTM
  1. .E W !!?5,"Another user is editing this entry." S DUOUT=1 Q
  1. .;Load template into an array
  1. .S PXRMTMP=Y_U_$P(Y(0),U,2) D LOAD^PXRMXT
  1. .L -^PXRMPT(810.1,$P(PXRMTMP,U))
  1. .;Exit if problem loading template
  1. .I $D(MSG) S DTOUT=1 Q
  1. .;Display Template information
  1. .D:'$D(MSG) ^PXRMXTD
  1. EXIT Q
  1. ;
  1. XREF ;
  1. K MREF,XREF
  1. S XREF("NAME")=.01
  1. S XREF("TITLE")=1.9
  1. S XREF("PXRMTYP")=1.1
  1. S XREF("PXRMSEL")=1.2
  1. S XREF("PXRMPRIM")=1.3
  1. S XREF("PXRMREP")=1.4
  1. S XREF("PXRMLCSC")=1.5
  1. S XREF("PXRMFD")=1.6
  1. S XREF("PXRMPML")=1.7
  1. S XREF("PXRMPER")=1.8
  1. S XREF("PXRMREM")=2
  1. S XREF("PXRMFAC")=3
  1. S XREF("PXRMPRV")=4
  1. S XREF("RUN")=5
  1. S XREF("PXRMPAT")=6
  1. S XREF("PXRMOTM")=7
  1. S XREF("PXRMPCM")=8
  1. S XREF("PXRMSCAT")=9
  1. S XREF("PXRMLCHL")=10
  1. S XREF("PXRMCS")=11
  1. S XREF("PXRMCGRP")=12
  1. S XREF("PXRMRCAT")=13
  1. S XREF("PXRMLIST")=14
  1. S XREF("PXRMOWN")=15
  1. ;
  1. S MREF("REMINDER")=.01
  1. S MREF("PATIENT")=.01
  1. S MREF("PROVIDER")=.01
  1. S MREF("OERR TEAM")=.01
  1. S MREF("PCMM TEAM")=.01
  1. S MREF("FACILITY")=.01
  1. S MREF("SERVICE")=.01
  1. S MREF("LOCATION")=.01
  1. S MREF("STOP CODE")=.01
  1. S MREF("CLINIC GROUP")=.01
  1. S MREF("DISPLAY ORDER")=.02
  1. S MREF("REMINDER CATEGORY")=.01
  1. S MREF("DISPLAY")=.02
  1. S MREF("PXRMLIST")=.01
  1. Q