[613] | 1 | PXRMETM ; SLC/PKR/PJH - Extract/Transmission Management ;09/06/2007
|
---|
| 2 | ;;2.0;CLINICAL REMINDERS;**4,6**;Feb 04, 2005;Build 123
|
---|
| 3 | ;
|
---|
| 4 | ;Main entry point for PXRM EXTRACT MANAGEMENT
|
---|
| 5 | START N PXRMDONE,VALMBCK,VALMCNT,VALMSG,X,XMZ,XQORM,XQORNOD
|
---|
| 6 | S X="IORESET"
|
---|
| 7 | D ENDR^%ZISS
|
---|
| 8 | S VALMCNT=0
|
---|
| 9 | D EN^VALM("PXRM EXTRACT MANAGEMENT")
|
---|
| 10 | W IORESET
|
---|
| 11 | D KILL^%ZISS
|
---|
| 12 | Q
|
---|
| 13 | ;
|
---|
| 14 | BLDLIST ;Build workfile
|
---|
| 15 | K ^TMP("PXRMETM",$J)
|
---|
| 16 | N IEN,IND,PLIST
|
---|
| 17 | D LIST("PXRMETM",.VALMCNT)
|
---|
| 18 | Q
|
---|
| 19 | ;
|
---|
| 20 | ENTRY ;Entry code
|
---|
| 21 | D BLDLIST,XQORM
|
---|
| 22 | Q
|
---|
| 23 | ;
|
---|
| 24 | EXIT ;Exit code
|
---|
| 25 | K ^TMP("PXRMETM",$J)
|
---|
| 26 | K ^TMP("PXRMETMH",$J)
|
---|
| 27 | D CLEAN^VALM10
|
---|
| 28 | D FULL^VALM1
|
---|
| 29 | S VALMBCK="Q"
|
---|
| 30 | Q
|
---|
| 31 | ;
|
---|
| 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 | ;
|
---|
| 70 | HDR ; Header code
|
---|
| 71 | S VALMHDR(1)="Available Extract Definitions:"
|
---|
| 72 | 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"
|
---|
| 96 | Q
|
---|
| 97 | ;
|
---|
| 98 | HLP ;Help code
|
---|
| 99 | N ORU,ORUPRMT,SUB,XQORM
|
---|
| 100 | S SUB="PXRMETMH"
|
---|
| 101 | D EN^VALM("PXRM EXTRACT HELP")
|
---|
| 102 | Q
|
---|
| 103 | ;
|
---|
| 104 | INIT ;Init
|
---|
| 105 | S VALMCNT=0
|
---|
| 106 | Q
|
---|
| 107 | ;
|
---|
| 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 | ;
|
---|
| 123 | PEXIT ;Protocol exit code
|
---|
| 124 | S VALMSG="+ Next Screen - Prev Screen ?? More Actions"
|
---|
| 125 | ;Reset after page up/down etc
|
---|
| 126 | 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"
|
---|
| 141 | Q
|
---|
| 142 | ;
|
---|
| 143 | XQORM S XQORM("#")=$O(^ORD(101,"B","PXRM EXTRACT MANAGEMENT SELECT ENTRY",0))_U_"1:"_VALMCNT
|
---|
| 144 | S XQORM("A")="Select Item: "
|
---|
| 145 | Q
|
---|
| 146 | ;
|
---|
| 147 | XSEL ;PXRM EXTRACT MANAGEMENT SELECT ENTRY validation
|
---|
| 148 | N EDIEN,SEL
|
---|
| 149 | S SEL=$P(XQORNOD(0),"=",2)
|
---|
| 150 | ;Remove trailing ,
|
---|
| 151 | I $E(SEL,$L(SEL))="," S SEL=$E(SEL,1,$L(SEL)-1)
|
---|
| 152 | ;Invalid selection
|
---|
| 153 | I SEL["," D Q
|
---|
| 154 | .W $C(7),!,"Only one item number allowed." H 2
|
---|
| 155 | .S VALMBCK="R"
|
---|
| 156 | I ('SEL)!(SEL>VALMCNT)!('$D(@VALMAR@("SEL",SEL))) D Q
|
---|
| 157 | .W $C(7),!,SEL_" is not a valid item number." H 2
|
---|
| 158 | .S VALMBCK="R"
|
---|
| 159 | ;
|
---|
| 160 | ;Get the list ien.
|
---|
| 161 | S EDIEN=^TMP("PXRMETM",$J,"SEL",SEL)
|
---|
| 162 | ;
|
---|
| 163 | ;Full screen mode
|
---|
| 164 | D FULL^VALM1
|
---|
| 165 | ;
|
---|
| 166 | ;Options
|
---|
| 167 | N X,Y,DIR,OPTION K DIROUT,DIRUT,DTOUT,DUOUT
|
---|
| 168 | S DIR(0)="SBM"_U_"EDM:Extract Definition Management;"
|
---|
| 169 | S DIR(0)=DIR(0)_"VSE:Examine/Schedule Extract;"
|
---|
| 170 | S DIR("A")="Select Action"
|
---|
| 171 | S DIR("B")="VSE"
|
---|
| 172 | S DIR("?")="Select from the codes displayed. For detailed help type ??"
|
---|
| 173 | S DIR("??")=U_"D HELP^PXRMETM(1)"
|
---|
| 174 | D ^DIR K DIR
|
---|
| 175 | I $D(DIROUT) S DTOUT=1
|
---|
| 176 | I $D(DTOUT)!($D(DUOUT)) S VALMBCK="R" Q
|
---|
| 177 | S OPTION=Y
|
---|
| 178 | ;
|
---|
| 179 | ;Display Extract Definitions
|
---|
| 180 | I OPTION="EDM" D START^PXRMEPED(EDIEN)
|
---|
| 181 | ;
|
---|
| 182 | ;Examine/Run Extract
|
---|
| 183 | I OPTION="VSE" D START^PXRMETH(EDIEN)
|
---|
| 184 | ;
|
---|
| 185 | ;Examine/Run Extract
|
---|
| 186 | I OPTION="ERE" D GENSEL(EDIEN)
|
---|
| 187 | ;
|
---|
| 188 | S VALMBCK="R"
|
---|
| 189 | Q
|
---|
| 190 | ;
|
---|