Ignore:
Timestamp:
Dec 4, 2009, 8:26:01 PM (15 years ago)
Author:
George Lilly
Message:

WorldVistAEHR overlayed on FOIAVistA

Location:
FOIAVistA/tag/r
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • FOIAVistA/tag/r/CLINICAL_REMINDERS-PXRM/PXRMETM.m

    r628 r636  
    1 PXRMETM ; SLC/PKR/PJH - Extract/Transmission Management ;09/06/2007
    2  ;;2.0;CLINICAL REMINDERS;**4,6**;Feb 04, 2005;Build 123
     1PXRMETM ; SLC/PKR/PJH - Extract/Transmission Management ;05/15/2006
     2 ;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21
    33 ;
    44 ;Main entry point for PXRM EXTRACT MANAGEMENT
     
    1515 K ^TMP("PXRMETM",$J)
    1616 N IEN,IND,PLIST
    17  D LIST("PXRMETM",.VALMCNT)
     17 D LIST(.PLIST,.IEN)
     18 M ^TMP("PXRMETM",$J)=PLIST
     19 S VALMCNT=PLIST("VALMCNT")
     20 F IND=1:1:VALMCNT D
     21 .S ^TMP("PXRMETM",$J,"IDX",IND,IND)=IEN(IND)
    1822 Q
     23 ;
     24LIST(RLIST,IEN) ;Build a list of extract definition entries.
     25 N EPCLASS,IND,FNAME,NAME
     26 ;Build the list in alphabetical order.
     27 S VALMCNT=0
     28 S NAME=""
     29 F  S NAME=$O(^PXRM(810.2,"B",NAME)) Q:NAME=""  D
     30 .S IND=$O(^PXRM(810.2,"B",NAME,"")) Q:'IND
     31 .S FNAME=$P($G(^PXRM(810.2,IND,0)),U)
     32 .S EPCLASS=$P($G(^PXRM(810.2,IND,100)),U)
     33 .S VALMCNT=VALMCNT+1
     34 .S RLIST(VALMCNT,0)=$$FRE(VALMCNT,FNAME,EPCLASS)
     35 .S IEN(VALMCNT)=IND
     36 S RLIST("VALMCNT")=VALMCNT
     37 Q
     38 ;
     39FRE(NUMBER,NAME,CLASS) ;Format  entry number, name
     40 ;and date packed.
     41 N TCLASS,TEMP,TNAME,TSOURCE
     42 S TEMP=$$RJ^XLFSTR(NUMBER,5," ")
     43 S TNAME=$E(NAME,1,46)
     44 S TEMP=TEMP_"  "_$$LJ^XLFSTR(TNAME,60," ")
     45 S TCLASS=$S(CLASS="N":"NATIONAL",CLASS="V":"VISN",1:"LOCAL")
     46 S TEMP=TEMP_"  "_TCLASS
     47 Q TEMP
    1948 ;
    2049ENTRY ;Entry code
     
    3059 Q
    3160 ;
    32 FMT(NUMBER,NAME,CLASS) ;Format  entry number, name
    33  ;and date packed.
    34  N TCLASS,TEMP,TNAME,TSOURCE
    35  S TEMP=$$RJ^XLFSTR(NUMBER,5," ")
    36  S TNAME=$E(NAME,1,46)
    37  S TEMP=TEMP_"  "_$$LJ^XLFSTR(TNAME,60," ")
    38  S TCLASS=$S(CLASS="N":"NATIONAL",CLASS="V":"VISN",1:"LOCAL")
    39  S TEMP=TEMP_"  "_TCLASS
    40  Q TEMP
    41  ;
    42 GEN ;Ad hoc report option
    43  ;Reset Screen Mode
    44  W IORESET
    45  ;
    46  N IND,LISTIEN,VALMY
    47  D EN^VALM2(XQORNOD(0))
    48  ;If there is no list quit.
    49  I '$D(VALMY) Q
    50  S PXRMDONE=0
    51  S IND=""
    52  F  S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE)  D
    53  .;Get the ien.
    54  .S LISTIEN=^TMP("PXRMETM",$J,"SEL",IND)
    55  .D GENSEL(LISTIEN)
    56  ;
    57  S VALMBCK="R"
    58  Q
    59  ;
    60 GENSEL(IEN) ;Report for selected extract definition
    61  N ANS,BEGIN,END,RTN,TEXT
    62  D DATES^PXRMEUT(.BEGIN,.END,"Report")
    63  ;Options
    64  S RTN="PXRMETM",TEXT="Run compliance report for this period"
    65  S ANS=$$ASKYN^PXRMEUT("N",TEXT,RTN,1) Q:'ANS  Q:$D(DUOUT)!$D(DTOUT)
    66  ;Print Report
    67  D ADHOC^PXRMETCO(IEN,BEGIN,END)
    68  Q
    69  ;
    7061HDR ; Header code
    7162 S VALMHDR(1)="Available Extract Definitions:"
    7263 S VALMSG="+ Next Screen   - Prev Screen   ?? More Actions"
    73  Q
    74  ;
    75 HELP(CALL) ;General help text routine
    76  N HTEXT
    77  I CALL=1 D
    78  .S HTEXT(1)="Select EDM to edit/display extract definitions.\\"
    79  .S HTEXT(2)="Select VSE to view previous extracts or"
    80  .S HTEXT(3)="initiate a manual extract or transmission."
    81  D HELP^PXRMEUT(.HTEXT)
    82  Q
    83  ;
    84 HLIST ;Extract History
    85  N IND,LISTIEN,VALMY
    86  D EN^VALM2(XQORNOD(0))
    87  ;If there is no list quit.
    88  I '$D(VALMY) Q
    89  S PXRMDONE=0
    90  S IND=""
    91  F  S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE)  D
    92  .;Get the ien.
    93  .S LISTIEN=^TMP("PXRMETM",$J,"SEL",IND)
    94  .D START^PXRMETH(LISTIEN)
    95  S VALMBCK="R"
    9664 Q
    9765 ;
     
    10674 Q
    10775 ;
    108 LIST(NODE,VALMCNT) ;Build a list of extract definition entries.
    109  N EPCLASS,IND,FNAME,NAME
    110  ;Build the list in alphabetical order.
    111  S VALMCNT=0
    112  S NAME=""
    113  F  S NAME=$O(^PXRM(810.2,"B",NAME)) Q:NAME=""  D
    114  .S IND=$O(^PXRM(810.2,"B",NAME,"")) Q:'IND
    115  .S FNAME=$P($G(^PXRM(810.2,IND,0)),U)
    116  .S EPCLASS=$P($G(^PXRM(810.2,IND,100)),U)
    117  .S VALMCNT=VALMCNT+1
    118  .S ^TMP(NODE,$J,VALMCNT,0)=$$FMT(VALMCNT,FNAME,EPCLASS)
    119  .S ^TMP(NODE,$J,"IDX",VALMCNT,VALMCNT)=""
    120  .S ^TMP(NODE,$J,"SEL",VALMCNT)=IND
    121  Q
    122  ;
    12376PEXIT ;Protocol exit code
    12477 S VALMSG="+ Next Screen   - Prev Screen   ?? More Actions"
    12578 ;Reset after page up/down etc
    12679 D XQORM
    127  Q
    128  ;
    129 PLIST ;Extract Definition Inquiry
    130  N IND,EPIEN,VALMY
    131  D EN^VALM2(XQORNOD(0))
    132  ;If there is no list quit.
    133  I '$D(VALMY) Q
    134  S PXRMDONE=0
    135  S IND=""
    136  F  S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE)  D
    137  .;Get the ien.
    138  .S EPIEN=^TMP("PXRMETM",$J,"SEL",IND)
    139  .D START^PXRMEPED(EPIEN)
    140  S VALMBCK="R"
    14180 Q
    14281 ;
     
    14685 ;
    14786XSEL ;PXRM EXTRACT MANAGEMENT SELECT ENTRY validation
    148  N EDIEN,SEL
     87 N SEL,IEN
    14988 S SEL=$P(XQORNOD(0),"=",2)
    15089 ;Remove trailing ,
     
    15493 .W $C(7),!,"Only one item number allowed." H 2
    15594 .S VALMBCK="R"
    156  I ('SEL)!(SEL>VALMCNT)!('$D(@VALMAR@("SEL",SEL))) D  Q
     95 I ('SEL)!(SEL>VALMCNT)!('$D(@VALMAR@("IDX",SEL))) D  Q
    15796 .W $C(7),!,SEL_" is not a valid item number." H 2
    15897 .S VALMBCK="R"
    15998 ;
    16099 ;Get the list ien.
    161  S EDIEN=^TMP("PXRMETM",$J,"SEL",SEL)
     100 S IEN=^TMP("PXRMETM",$J,"IDX",SEL,SEL)
    162101 ;
    163102 ;Full screen mode
     
    178117 ;
    179118 ;Display Extract Definitions
    180  I OPTION="EDM" D START^PXRMEPED(EDIEN)
     119 I OPTION="EDM" D
     120 .D START^PXRMEPED(IEN)
    181121 ;
    182122 ;Examine/Run Extract
    183  I OPTION="VSE" D START^PXRMETH(EDIEN)
     123 I OPTION="VSE" D
     124 .D START^PXRMETH(IEN)
    184125 ;
    185126 ;Examine/Run Extract
    186  I OPTION="ERE" D GENSEL(EDIEN)
     127 I OPTION="ERE" D
     128 .D GENSEL(IEN)
    187129 ;
    188130 S VALMBCK="R"
    189131 Q
    190132 ;
     133HELP(CALL) ;General help text routine
     134 N HTEXT
     135 I CALL=1 D
     136 .S HTEXT(1)="Select EDM to edit/display extract definitions."
     137 .S HTEXT(2)="extract. Select VSE to view previous extracts or "
     138 .S HTEXT(3)="initiate a manual extract or transmission."
     139 ;
     140 D HELP^PXRMEUT(.HTEXT)
     141 Q
     142 ;
     143GEN ;Ad hoc report option
     144 ;
     145 ;Reset Screen Mode
     146 W IORESET
     147 ;
     148 N IND,LISTIEN,VALMY
     149 D EN^VALM2(XQORNOD(0))
     150 ;If there is no list quit.
     151 I '$D(VALMY) Q
     152 S PXRMDONE=0
     153 S IND=""
     154 F  S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE)  D
     155 .;Get the ien.
     156 .S LISTIEN=^TMP("PXRMETM",$J,"IDX",IND,IND)
     157 .D GENSEL(LISTIEN)
     158 ;
     159 S VALMBCK="R"
     160 Q
     161 ;
     162GENSEL(IEN) ;Report for selected extract definition
     163 N ANS,BEGIN,END,RTN,TEXT
     164 D DATES^PXRMEUT(.BEGIN,.END,"Report")
     165 ;Options
     166 S RTN="PXRMETM",TEXT="Run compliance report for this period"
     167 S ANS=$$ASKYN^PXRMEUT("N",TEXT,RTN,1) Q:'ANS  Q:$D(DUOUT)!$D(DTOUT)
     168 ;Print Report
     169 D ADHOC^PXRMETCO(IEN,BEGIN,END)
     170 Q
     171 ;
     172HLIST ;Extract History
     173 N IND,LISTIEN,VALMY
     174 D EN^VALM2(XQORNOD(0))
     175 ;If there is no list quit.
     176 I '$D(VALMY) Q
     177 S PXRMDONE=0
     178 S IND=""
     179 F  S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE)  D
     180 .;Get the ien.
     181 .S LISTIEN=^TMP("PXRMETM",$J,"IDX",IND,IND)
     182 .D START^PXRMETH(LISTIEN)
     183 S VALMBCK="R"
     184 Q
     185 ;
     186PLIST ;Extract Definition Inquiry
     187 N IND,EPIEN,VALMY
     188 D EN^VALM2(XQORNOD(0))
     189 ;If there is no list quit.
     190 I '$D(VALMY) Q
     191 S PXRMDONE=0
     192 S IND=""
     193 F  S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE)  D
     194 .;Get the ien.
     195 .S EPIEN=^TMP("PXRMETM",$J,"IDX",IND,IND)
     196 .D START^PXRMEPED(EPIEN)
     197 ;
     198 S VALMBCK="R"
     199 Q
Note: See TracChangeset for help on using the changeset viewer.