Changeset 636 for FOIAVistA/tag/r/CLINICAL_REMINDERS-PXRM/PXRMETM.m
- Timestamp:
- Dec 4, 2009, 8:26:01 PM (15 years ago)
- 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 ;0 9/06/20072 ;;2.0;CLINICAL REMINDERS;**4 ,6**;Feb 04, 2005;Build 1231 PXRMETM ; SLC/PKR/PJH - Extract/Transmission Management ;05/15/2006 2 ;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21 3 3 ; 4 4 ;Main entry point for PXRM EXTRACT MANAGEMENT … … 15 15 K ^TMP("PXRMETM",$J) 16 16 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) 18 22 Q 23 ; 24 LIST(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 ; 39 FRE(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 19 48 ; 20 49 ENTRY ;Entry code … … 30 59 Q 31 60 ; 32 FMT(NUMBER,NAME,CLASS) ;Format entry number, name33 ;and date packed.34 N TCLASS,TEMP,TNAME,TSOURCE35 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_" "_TCLASS40 Q TEMP41 ;42 GEN ;Ad hoc report option43 ;Reset Screen Mode44 W IORESET45 ;46 N IND,LISTIEN,VALMY47 D EN^VALM2(XQORNOD(0))48 ;If there is no list quit.49 I '$D(VALMY) Q50 S PXRMDONE=051 S IND=""52 F S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE) D53 .;Get the ien.54 .S LISTIEN=^TMP("PXRMETM",$J,"SEL",IND)55 .D GENSEL(LISTIEN)56 ;57 S VALMBCK="R"58 Q59 ;60 GENSEL(IEN) ;Report for selected extract definition61 N ANS,BEGIN,END,RTN,TEXT62 D DATES^PXRMEUT(.BEGIN,.END,"Report")63 ;Options64 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 Report67 D ADHOC^PXRMETCO(IEN,BEGIN,END)68 Q69 ;70 61 HDR ; Header code 71 62 S VALMHDR(1)="Available Extract Definitions:" 72 63 S VALMSG="+ Next Screen - Prev Screen ?? More Actions" 73 Q74 ;75 HELP(CALL) ;General help text routine76 N HTEXT77 I CALL=1 D78 .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 Q83 ;84 HLIST ;Extract History85 N IND,LISTIEN,VALMY86 D EN^VALM2(XQORNOD(0))87 ;If there is no list quit.88 I '$D(VALMY) Q89 S PXRMDONE=090 S IND=""91 F S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE) D92 .;Get the ien.93 .S LISTIEN=^TMP("PXRMETM",$J,"SEL",IND)94 .D START^PXRMETH(LISTIEN)95 S VALMBCK="R"96 64 Q 97 65 ; … … 106 74 Q 107 75 ; 108 LIST(NODE,VALMCNT) ;Build a list of extract definition entries.109 N EPCLASS,IND,FNAME,NAME110 ;Build the list in alphabetical order.111 S VALMCNT=0112 S NAME=""113 F S NAME=$O(^PXRM(810.2,"B",NAME)) Q:NAME="" D114 .S IND=$O(^PXRM(810.2,"B",NAME,"")) Q:'IND115 .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+1118 .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)=IND121 Q122 ;123 76 PEXIT ;Protocol exit code 124 77 S VALMSG="+ Next Screen - Prev Screen ?? More Actions" 125 78 ;Reset after page up/down etc 126 79 D XQORM 127 Q128 ;129 PLIST ;Extract Definition Inquiry130 N IND,EPIEN,VALMY131 D EN^VALM2(XQORNOD(0))132 ;If there is no list quit.133 I '$D(VALMY) Q134 S PXRMDONE=0135 S IND=""136 F S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE) D137 .;Get the ien.138 .S EPIEN=^TMP("PXRMETM",$J,"SEL",IND)139 .D START^PXRMEPED(EPIEN)140 S VALMBCK="R"141 80 Q 142 81 ; … … 146 85 ; 147 86 XSEL ;PXRM EXTRACT MANAGEMENT SELECT ENTRY validation 148 N EDIEN,SEL87 N SEL,IEN 149 88 S SEL=$P(XQORNOD(0),"=",2) 150 89 ;Remove trailing , … … 154 93 .W $C(7),!,"Only one item number allowed." H 2 155 94 .S VALMBCK="R" 156 I ('SEL)!(SEL>VALMCNT)!('$D(@VALMAR@(" SEL",SEL))) D Q95 I ('SEL)!(SEL>VALMCNT)!('$D(@VALMAR@("IDX",SEL))) D Q 157 96 .W $C(7),!,SEL_" is not a valid item number." H 2 158 97 .S VALMBCK="R" 159 98 ; 160 99 ;Get the list ien. 161 S EDIEN=^TMP("PXRMETM",$J,"SEL",SEL)100 S IEN=^TMP("PXRMETM",$J,"IDX",SEL,SEL) 162 101 ; 163 102 ;Full screen mode … … 178 117 ; 179 118 ;Display Extract Definitions 180 I OPTION="EDM" D START^PXRMEPED(EDIEN) 119 I OPTION="EDM" D 120 .D START^PXRMEPED(IEN) 181 121 ; 182 122 ;Examine/Run Extract 183 I OPTION="VSE" D START^PXRMETH(EDIEN) 123 I OPTION="VSE" D 124 .D START^PXRMETH(IEN) 184 125 ; 185 126 ;Examine/Run Extract 186 I OPTION="ERE" D GENSEL(EDIEN) 127 I OPTION="ERE" D 128 .D GENSEL(IEN) 187 129 ; 188 130 S VALMBCK="R" 189 131 Q 190 132 ; 133 HELP(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 ; 143 GEN ;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 ; 162 GENSEL(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 ; 172 HLIST ;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 ; 186 PLIST ;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.