Changeset 623 for WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMLPU.m
- Timestamp:
- Dec 4, 2009, 12:11:15 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMLPU.m
r613 r623 1 PXRMLPU ; SLC/PKR/PJH - Reminder Patient List ;10/11/2007 2 ;;2.0;CLINICAL REMINDERS;**4,6**;Feb 04, 2005;Build 123 3 ; 4 ;Main entry point for PXRM PATIENT LIST 5 START(MODE) ; 6 N PXRMDONE,VALMBCK,VALMSG,X,XMZ,MODE1 7 S X="IORESET" 8 D ENDR^%ZISS 9 S VALMCNT=0 10 D EN^VALM("PXRM PATIENT LIST USER") 11 W IORESET 12 D KILL^%ZISS 13 Q 14 ; 15 ACCESS(IEN,NODE) ; 16 ;Holders of the PXRM MANAGER key have full access to all lists. 17 ;DBIA #10076 18 I $D(^XUSEC("PXRM MANAGER",DUZ)) Q "F" 19 N ACCESS,TYPE 20 I $G(NODE)="" S NODE=$G(^PXRMXP(810.5,IEN,0)) 21 S TYPE=$P(NODE,U,8) 22 I TYPE="" Q "F" 23 I TYPE="PUB" Q "F" 24 I $P(NODE,U,7)=DUZ Q "F" 25 S ACCESS="N" 26 I TYPE="PVT",$D(^PXRMXP(810.5,IEN,40,"B",DUZ)) D 27 . N USIEN,STATUS 28 . S USIEN=$O(^PXRMXP(810.5,IEN,40,"B",DUZ,"")) 29 . S ACCESS=$S(USIEN="":"N",1:$P(^PXRMXP(810.5,IEN,40,USIEN,0),U,2)) 30 Q ACCESS 31 ; 32 BLDLIST ; 33 N PLIST 34 K ^TMP("PXRMLPU",$J) 35 K ^TMP("PXRMLPUH",$J) 36 S PLIST="PXRMLPU" 37 D LIST(MODE,PLIST) 38 S VALMCNT=+$G(^TMP("PXRMLPU",$J,"VALMCNT")) 39 Q 40 ; 41 ENTRY ;Entry code 42 ;MODE=0 ORDER BY NAME 43 ;MODE=1 ORDER BY TYPE 44 I $G(MODE)'>0 S MODE=0 45 D BLDLIST,XQORM 46 Q 47 ; 48 EXIT ;Exit code 49 K ^TMP("PXRMLPU",$J) 50 K ^TMP("PXRMLPUH",$J) 51 D CLEAN^VALM10 52 D FULL^VALM1 53 S VALMBCK="R" 54 Q 55 ; 56 HDR ; Header code 57 N NAME 58 S VALMHDR(1)="Available Patient Lists." 59 Q 60 ; 61 HELP(CALL) ;General help text routine 62 N HTEXT 63 I CALL=1 D 64 .S HTEXT(1)="Select CO to copy the patient list.\\" 65 .S HTEXT(2)="Select COE to copy the patient list to an OE/RR Team.\\" 66 .S HTEXT(3)="Select DE to delete the patient list.\\" 67 .S HTEXT(4)="Select DCD to display creation documentation.\\" 68 .S HTEXT(5)="Select DSP to display the patient list.\\" 69 D HELP^PXRMEUT(.HTEXT) 70 Q 71 ; 72 HLP ;Help code 73 N ORU,ORUPRMT,SUB,XQORM 74 S SUB="PXRMLPUH" 75 D EN^VALM("PXRM PATIENT LIST HELP") 76 Q 77 ; 78 INIT ;Init 79 S VALMCNT=0 80 Q 81 ; 82 LIST(MODE,PLIST) ;Build a list of patient list entries. 83 N ACCESS,COUNT,DATA,DATE,IND,FMTSTR,FNAME,OUTPUT,NAME,NL,NUM 84 N STR,SUB,TYPE 85 S FMTSTR=$$LMFMTSTR^PXRMTEXT(.VALMDDF,"RLLRRC") 86 ;MODE=0 build list in alphabetical order 87 ;MODE=1 build list by type of list. 88 K ^TMP($J,PLIST),^TMP(PLIST,$J) 89 S VALMCNT=0,NAME="",NUM=0,TYPE="" 90 F S NAME=$O(^PXRMXP(810.5,"B",NAME)) Q:NAME="" D 91 .S IND="" F S IND=$O(^PXRMXP(810.5,"B",NAME,IND)) Q:'IND D 92 ..S DATA=$G(^PXRMXP(810.5,IND,0)) 93 ..S ACCESS=$$ACCESS(IND,DATA) 94 ..I ACCESS="N" Q 95 ..S FNAME=$P($G(DATA),U),DATE=$P($G(DATA),U,4) 96 ..S COUNT=+$P($G(^PXRMXP(810.5,IND,30,0)),U,4) 97 ..S TYPE=$P(DATA,U,8) 98 ..S SUB=$S(MODE=0:"NAME",1:TYPE) 99 ..S ^TMP($J,PLIST,SUB,FNAME)=IND_U_DATE_U_COUNT_U_TYPE_U_ACCESS 100 I '$D(^TMP($J,PLIST)) Q 101 ;Loop through ARRAY to populate the output list 102 ;sub is either the type of list or 'NAME'. If sort is 103 ;by TYPE show PVT lists first. 104 S SUB="" 105 F S SUB=$O(^TMP($J,PLIST,SUB),-1) Q:SUB="" D 106 . S FNAME="" 107 . F S FNAME=$O(^TMP($J,PLIST,SUB,FNAME)) Q:FNAME="" D 108 .. S DATA=^TMP($J,PLIST,SUB,FNAME),NUM=NUM+1 109 .. S ^TMP("PXRMLPU",$J,"SEL",NUM)=$P(DATA,U,1) 110 .. S DATE=$P(DATA,U,2),DATE=$$FMTE^XLFDT(DATE,2) 111 .. S $P(DATA,U,2)=DATE 112 .. S STR=NUM_U_FNAME_U_$P(DATA,U,2,5) 113 .. D COLFMT^PXRMTEXT(FMTSTR,STR," ",.NL,.OUTPUT) 114 .. F IND=1:1:NL D 115 ... S VALMCNT=VALMCNT+1,^TMP(PLIST,$J,VALMCNT,0)=OUTPUT(IND) 116 ... S ^TMP("PXRMLPU",$J,"IDX",VALMCNT,NUM)="" 117 S ^TMP(PLIST,$J,"VALMCNT")=VALMCNT 118 K ^TMP($J,PLIST) 119 Q 120 ; 121 PCOPY ;Patient list copy 122 S SUB="PXRMLPU" 123 D PCOPY1(SUB) 124 D BLDLIST 125 S VALMBCK="R" 126 Q 127 ; 128 PCOPY1(SUB) ; 129 ;Full Screen 130 W IORESET 131 N IND,LISTIEN,VALMY 132 D EN^VALM2(XQORNOD(0)) 133 ;If there is no list quit. 134 I '$D(VALMY) Q 135 S IND="",PXRMDONE=0 136 F S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE) D 137 .;Get the patient list ien. 138 .S LISTIEN=^TMP(SUB,$J,"SEL",IND) 139 .D COPY^PXRMRUL1(LISTIEN) 140 Q 141 ; 142 PDELETE ;Patient list delete 143 ;Full Screen 144 W IORESET 145 N DELOK,IND,LISTIEN,NODE,VALMY 146 D EN^VALM2(XQORNOD(0)) 147 ;If there is no list quit. 148 I '$D(VALMY) Q 149 S IND="",PXRMDONE=0 150 F S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE) D 151 .;Get the patient list ien. 152 .S LISTIEN=^TMP("PXRMLPU",$J,"SEL",IND) 153 .S NODE=$G(^PXRMXP(810.5,LISTIEN,0)) 154 .S DELOK=$$LDELOK^PXRMEUT(LISTIEN) 155 .I DELOK D DELETE^PXRMRUL1(LISTIEN) Q 156 .E D Q 157 ..W !,"In order to delete a list you must be the creator or a Reminder Manager!" 158 ..S PXRMDONE=1 H 2 159 D BLDLIST 160 S VALMBCK="R" 161 Q 162 ; 163 PEXIT ;Protocol exit code 164 S VALMSG="+ Next Screen - Prev Screen ?? More Actions" 165 ;Reset after page up/down etc 166 D XQORM 167 Q 168 ; 169 POERR ;Patient list copy to OERR Team (#101.21) 170 ;Full Screen 171 W IORESET 172 N ACCESS,IND,LISTIEN,NODE,USIEN,VALMY 173 D EN^VALM2(XQORNOD(0)) 174 ;If there is no list quit. 175 I '$D(VALMY) Q 176 S IND="",PXRMDONE=0 177 F S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE) D 178 .;Get the patient list ien. 179 .S LISTIEN=^TMP("PXRMLPU",$J,"SEL",IND) 180 .S NODE=$G(^PXRMXP(810.5,LISTIEN,0)) 181 .S ACCESS=$$ACCESS^PXRMLPU(LISTIEN,NODE) 182 .I ACCESS="F" D OERR^PXRMLPOE(LISTIEN) 183 .I ACCESS="N" D 184 ..W !,"The list cannot be copied; you must have full access to copy the list to an OE/RR team!" 185 ..S PXRMDONE=1 H 2 186 S VALMBCK="R" 187 Q 188 ; 189 PLIST ;Patient list inquiry. 190 N CREAT,NAME,IND,LISTIEN,USIEN,VALMY,CREAT,NODE,TRUE 191 D EN^VALM2(XQORNOD(0)) 192 ;If there is no list quit. 193 I '$D(VALMY) Q 194 ;PXRMDONE is newed in PXRMLPU 195 S PXRMDONE=0 196 S IND="" 197 F S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE) D 198 .S LISTIEN=^TMP("PXRMLPU",$J,"SEL",IND) 199 .D START^PXRMLPP(LISTIEN) 200 D BLDLIST 201 S VALMBCK="R" 202 Q 203 ; 204 VIEW ; 205 D FULL^VALM1 206 N DIR,DTOUT,DUOUT,DIROUT,DIROUT,Y 207 S DIR(0)="SO^N:NAME;T:TYPE" 208 S DIR("A")="Select View Type" 209 D ^DIR 210 I $D(DTOUT),$D(DUOUT),$D(DIROUT) Q 211 I Y="N" S MODE=0 D ENTRY 212 I Y="T" S MODE=1 D ENTRY 213 Q 214 ; 215 XQORM ; 216 S XQORM("#")=$O(^ORD(101,"B","PXRM PATIENT LIST USER SELECT ENTRY",0))_U_"1:"_VALMCNT 217 S XQORM("A")="Select Item: " 218 Q 219 ; 220 XSEL ;SELECT validation 221 N EPIEN,LEVEL,LISTIEN,LRIEN,NODE,SEL 222 S SEL=$P(XQORNOD(0),"=",2) 223 ;Remove trailing , 224 I $E(SEL,$L(SEL))="," S SEL=$E(SEL,1,$L(SEL)-1) 225 ;Invalid selection 226 I SEL["," D Q 227 .W $C(7),!,"Only one item number allowed." H 2 228 .S VALMBCK="R" 229 I ('SEL)!(SEL>VALMCNT)!('$D(@VALMAR@("SEL",SEL))) D Q 230 .W $C(7),!,SEL_" is not a valid item number." H 2 231 .S VALMBCK="R" 232 ; 233 ;Get the patient list ien 234 S LISTIEN=^TMP("PXRMLPU",$J,"SEL",SEL) 235 ;Get extract definition ien (if present) 236 S EPIEN=$P($G(^PXRMXP(810.5,LISTIEN,0)),U,5) 237 ;Get list rule ien 238 S LRIEN=$P($G(^PXRMXP(810.5,LISTIEN,0)),U,6) 239 S NODE=$G(^PXRMXP(810.5,LISTIEN,0)) 240 ; 241 ;Full screen mode 242 D FULL^VALM1 243 ; 244 ;Option to Install, Delete or Install History 245 N ACCESS,DELOK,DIR,OPTION,RIEN,X,Y 246 K DIROUT,DIRUT,DTOUT,DUOUT 247 S ACCESS=$$ACCESS(LISTIEN,NODE) 248 S DELOK=$$LDELOK^PXRMEUT(LISTIEN) 249 S DIR(0)="SBM"_U_"CO:Copy Patient List;" 250 S DIR(0)=DIR(0)_"COE:Copy to OE/RR Team;" 251 I DELOK S DIR(0)=DIR(0)_"DE:Delete Patient List;" 252 S DIR(0)=DIR(0)_"DCD:Display Creation Documentation;" 253 S DIR(0)=DIR(0)_"DSP:Display Patient List;" 254 S DIR("A")="Select Action: " 255 S DIR("B")="DSP" 256 S DIR("?")="Select from the codes displayed. For detailed help type ??" 257 S DIR("??")=U_"D HELP^PXRMLPU(1)" 258 D ^DIR K DIR 259 I $D(DIROUT) S DTOUT=1 260 I $D(DTOUT)!($D(DUOUT)) S VALMBCK="R" Q 261 S OPTION=Y 262 ; 263 I $G(OPTION)="" G XSELE 264 ; 265 ;Copy patient list 266 I OPTION="CO" D COPY^PXRMRUL1(LISTIEN) 267 Q:$D(DUOUT)!$D(DTOUT) 268 ; 269 ;Copy to OE/RR Team 270 I OPTION="COE" D OERR^PXRMLPOE(LISTIEN) 271 Q:$D(DUOUT)!$D(DTOUT) 272 ; 273 ;Delete patient list 274 I OPTION="DE" D PDELETE 275 ; 276 ;Display creation documentation 277 I OPTION="DCD" D EN^PXRMLCD(LISTIEN) 278 ; 279 ;Display patient list 280 I OPTION="DSP" D START^PXRMLPP(LISTIEN) 281 ; 282 XSELE ; 283 D CLEAN^VALM10 284 D BLDLIST,XQORM 285 S VALMBCK="R" 286 Q 1 PXRMLPU ; SLC/PKR/PJH - Reminder Patient List ;08/07/2006 2 ;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21 3 ; 4 ;Main entry point for PXRM PATIENT LIST 5 START(MODE) ; 6 N PXRMDONE,VALMBCK,VALMSG,X,XMZ,MODE1 7 S X="IORESET" 8 D ENDR^%ZISS 9 S VALMCNT=0 10 D EN^VALM("PXRM PATIENT LIST USER") 11 W IORESET 12 D KILL^%ZISS 13 Q 14 ; 15 ACCESS(IEN,NODE) ; 16 ;Holders of the PXRM MANAGER key have full access to all lists. 17 ;DBIA #10076 18 I $D(^XUSEC("PXRM MANAGER",DUZ)) Q "F" 19 N ACCESS,TYPE 20 I $G(NODE)="" S NODE=$G(^PXRMXP(810.5,IEN,0)) 21 S TYPE=$P(NODE,U,8) 22 I TYPE="" Q "F" 23 I TYPE="PUB" Q "F" 24 I $P(NODE,U,7)=DUZ Q "F" 25 S ACCESS="N" 26 I TYPE="PVT",$D(^PXRMXP(810.5,IEN,40,"B",DUZ)) D 27 . N USIEN,STATUS 28 . S USIEN=$O(^PXRMXP(810.5,IEN,40,"B",DUZ,"")) 29 . S ACCESS=$S(USIEN="":"N",1:$P(^PXRMXP(810.5,IEN,40,USIEN,0),U,2)) 30 Q ACCESS 31 ; 32 BLDLIST ; 33 N IEN,PLIST 34 K ^TMP("PXRMLPU",$J) 35 K ^TMP("PXRMLPUH",$J) 36 S PLIST="PXRMLPU" 37 D LIST(MODE,PLIST,.IEN) 38 S VALMCNT=+$G(^TMP("PXRMLPU",$J,"VALMCNT")) 39 F IND=1:1:VALMCNT D 40 .S ^TMP("PXRMLPU",$J,"IDX",IND,IND)=IEN(IND) 41 Q 42 ; 43 ENTRY ;Entry code 44 ;MODE=0 ORDER BY NAME 45 ;MODE=1 ORDER BY TYPE 46 I $G(MODE)'>0 S MODE=0 47 D BLDLIST,XQORM 48 Q 49 ; 50 EXIT ;Exit code 51 K ^TMP("PXRMLPU",$J) 52 K ^TMP("PXRMLPUH",$J) 53 D CLEAN^VALM10 54 D FULL^VALM1 55 S VALMBCK="R" 56 Q 57 ; 58 FORMAT(NUMBER,NAME,NODE) ;Format entry number, name, source, 59 ;and date packed. 60 N ACCESS,DATE,COUNT,TEMP,TYPE 61 S DATE=$P(NODE,U,2),COUNT=$P(NODE,U,3) 62 S TYPE=$P(NODE,U,4),ACCESS=$P(NODE,U,5) 63 S TEMP=$$RJ^XLFSTR(NUMBER,5," ") 64 S NAME=$E(NAME,1,45) 65 S TEMP=TEMP_" "_$$LJ^XLFSTR(NAME,45," ") 66 S DATE=$$FMTE^XLFDT(DATE,2) 67 S TEMP=TEMP_" "_$$LJ^XLFSTR(DATE,17," ") 68 S TEMP=TEMP_" "_$$RJ^XLFSTR(COUNT,6," ") 69 S TEMP=TEMP_" "_$$RJ^XLFSTR(TYPE,4," ") 70 S TEMP=TEMP_" "_$$RJ^XLFSTR(ACCESS,3," ") 71 Q TEMP 72 ; 73 HDR ; Header code 74 N NAME 75 S VALMHDR(1)="Available Patient Lists." 76 Q 77 ; 78 HELP(CALL) ;General help text routine 79 N HTEXT 80 I CALL=1 D 81 .S HTEXT(1)="Select CO to copy patient list." 82 .S HTEXT(2)="Select COE to copy patient list to OE/RR Team." 83 .S HTEXT(3)="Select CR to delete patient list." 84 .S HTEXT(4)="Select DCD to display creation documentation." 85 .S HTEXT(5)="Select DSP to display patient list." 86 D HELP^PXRMEUT(.HTEXT) 87 Q 88 ; 89 HLP ;Help code 90 N ORU,ORUPRMT,SUB,XQORM 91 S SUB="PXRMLPUH" 92 D EN^VALM("PXRM PATIENT LIST HELP") 93 Q 94 ; 95 INIT ;Init 96 S VALMCNT=0 97 Q 98 ; 99 LIST(MODE,PLIST,IEN) ;Build a list of patient list entries. 100 N ACCESS,COUNT,DATE,IND,FNAME,NAME,NODE,SUB,TYPE 101 ;MODE=0 build list in alphabetical order 102 ;MODE=1 build list by type of list. 103 K ^TMP($J,PLIST),^TMP(PLIST,$J) 104 S VALMCNT=0,NAME="",TYPE="" 105 F S NAME=$O(^PXRMXP(810.5,"B",NAME)) Q:NAME="" D 106 .S IND="" F S IND=$O(^PXRMXP(810.5,"B",NAME,IND)) Q:'IND D 107 ..S NODE=$G(^PXRMXP(810.5,IND,0)) 108 ..S ACCESS=$$ACCESS(IND,NODE) 109 ..I ACCESS="N" Q 110 ..S FNAME=$P($G(NODE),U),DATE=$P($G(NODE),U,4) 111 ..S COUNT=+$P($G(^PXRMXP(810.5,IND,30,0)),U,4) 112 ..S TYPE=$P(NODE,U,8) 113 ..S SUB=$S(MODE=0:"NAME",1:TYPE) 114 ..S ^TMP($J,PLIST,SUB,FNAME)=IND_U_DATE_U_COUNT_U_TYPE_U_ACCESS 115 I '$D(^TMP($J,PLIST)) Q 116 ;Loop through ARRAY to populate the output list 117 ;sub is either the type of list or 'NAME'. If sort is 118 ;by TYPE show PVT lists first. 119 S SUB="" 120 F S SUB=$O(^TMP($J,PLIST,SUB),-1) Q:SUB="" D 121 .S FNAME="" 122 .F S FNAME=$O(^TMP($J,PLIST,SUB,FNAME)) Q:FNAME="" D 123 ..S NODE=^TMP($J,PLIST,SUB,FNAME),VALMCNT=VALMCNT+1 124 ..S ^TMP(PLIST,$J,VALMCNT,0)=$$FORMAT(VALMCNT,FNAME,NODE) 125 ..S IEN(VALMCNT)=$P(NODE,U,1) 126 S ^TMP(PLIST,$J,"VALMCNT")=VALMCNT 127 K ^TMP($J,PLIST) 128 Q 129 ; 130 PCOPY ;Patient list copy 131 S SUB="PXRMLPU" 132 D PCOPY1(SUB) 133 D BLDLIST 134 S VALMBCK="R" 135 Q 136 ; 137 PCOPY1(SUB) ; 138 ;Full Screen 139 W IORESET 140 N IND,LISTIEN,VALMY 141 D EN^VALM2(XQORNOD(0)) 142 ;If there is no list quit. 143 I '$D(VALMY) Q 144 S IND="",PXRMDONE=0 145 F S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE) D 146 .;Get the patient list ien. 147 .S LISTIEN=^TMP(SUB,$J,"IDX",IND,IND) 148 .D COPY^PXRMRULE(LISTIEN) 149 Q 150 ; 151 PDELETE ;Patient list delete 152 ;Full Screen 153 W IORESET 154 N DELOK,IND,LISTIEN,NODE,VALMY 155 D EN^VALM2(XQORNOD(0)) 156 ;If there is no list quit. 157 I '$D(VALMY) Q 158 S IND="",PXRMDONE=0 159 F S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE) D 160 .;Get the patient list ien. 161 .S LISTIEN=^TMP("PXRMLPU",$J,"IDX",IND,IND) 162 .S NODE=$G(^PXRMXP(810.5,LISTIEN,0)) 163 .S DELOK=$$LDELOK^PXRMEUT(LISTIEN) 164 .I DELOK D DELETE^PXRMRULE(LISTIEN) Q 165 .E D Q 166 ..W !,"In order to delete a list you must be the creator or a Reminder Manager!" 167 ..S PXRMDONE=1 H 2 168 D BLDLIST 169 S VALMBCK="R" 170 Q 171 ; 172 PEXIT ;Protocol exit code 173 S VALMSG="+ Next Screen - Prev Screen ?? More Actions" 174 ;Reset after page up/down etc 175 D XQORM 176 Q 177 ; 178 POERR ;Patient list copy to OERR Team (#101.21) 179 ;Full Screen 180 W IORESET 181 N ACCESS,IND,LISTIEN,NODE,USIEN,VALMY 182 D EN^VALM2(XQORNOD(0)) 183 ;If there is no list quit. 184 I '$D(VALMY) Q 185 S IND="",PXRMDONE=0 186 F S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE) D 187 .;Get the patient list ien. 188 .S LISTIEN=^TMP("PXRMLPU",$J,"IDX",IND,IND) 189 .S NODE=$G(^PXRMXP(810.5,LISTIEN,0)) 190 .S ACCESS=$$ACCESS^PXRMLPU(LISTIEN,NODE) 191 .I ACCESS="F" D OERR^PXRMLPOE(LISTIEN) 192 .I ACCESS="N" D 193 ..W !,"The list cannot be copied; you must have full access to copy the list to an OE/RR team!" 194 ..S PXRMDONE=1 H 2 195 S VALMBCK="R" 196 Q 197 ; 198 PLIST ;Patient list inquiry. 199 N CREAT,NAME,IND,LISTIEN,USIEN,VALMY,CREAT,NODE,TRUE 200 D EN^VALM2(XQORNOD(0)) 201 ;If there is no list quit. 202 I '$D(VALMY) Q 203 ;PXRMDONE is newed in PXRMLPU 204 S PXRMDONE=0 205 S IND="" 206 F S IND=$O(VALMY(IND)) Q:(+IND=0)!(PXRMDONE) D 207 .S LISTIEN=^TMP("PXRMLPU",$J,"IDX",IND,IND) 208 .D START^PXRMLPP(LISTIEN) 209 D BLDLIST 210 S VALMBCK="R" 211 Q 212 ; 213 VIEW ; 214 D FULL^VALM1 215 N DIR,DTOUT,DUOUT,DIROUT,DIROUT,Y 216 S DIR(0)="SO^N:NAME;T:TYPE" 217 S DIR("A")="Select View Type" 218 D ^DIR 219 I $D(DTOUT),$D(DUOUT),$D(DIROUT) Q 220 I Y="N" S MODE=0 D ENTRY 221 I Y="T" S MODE=1 D ENTRY 222 Q 223 ; 224 XQORM ; 225 S XQORM("#")=$O(^ORD(101,"B","PXRM PATIENT LIST USER SELECT ENTRY",0))_U_"1:"_VALMCNT 226 S XQORM("A")="Select Item: " 227 Q 228 ; 229 XSEL ;SELECT validation 230 N EPIEN,LEVEL,LISTIEN,LRIEN,NODE,SEL 231 S SEL=$P(XQORNOD(0),"=",2) 232 ;Remove trailing , 233 I $E(SEL,$L(SEL))="," S SEL=$E(SEL,1,$L(SEL)-1) 234 ;Invalid selection 235 I SEL["," D Q 236 .W $C(7),!,"Only one item number allowed." H 2 237 .S VALMBCK="R" 238 I ('SEL)!(SEL>VALMCNT)!('$D(@VALMAR@("IDX",SEL))) D Q 239 .W $C(7),!,SEL_" is not a valid item number." H 2 240 .S VALMBCK="R" 241 ; 242 ;Get the patient list ien 243 S LISTIEN=^TMP("PXRMLPU",$J,"IDX",SEL,SEL) 244 ;Get extract definition ien (if present) 245 S EPIEN=$P($G(^PXRMXP(810.5,LISTIEN,0)),U,5) 246 ;Get list rule ien 247 S LRIEN=$P($G(^PXRMXP(810.5,LISTIEN,0)),U,6) 248 S NODE=$G(^PXRMXP(810.5,LISTIEN,0)) 249 ; 250 ;Full screen mode 251 D FULL^VALM1 252 ; 253 ;Option to Install, Delete or Install History 254 N ACCESS,DELOK,DIR,OPTION,RIEN,X,Y 255 K DIROUT,DIRUT,DTOUT,DUOUT 256 S ACCESS=$$ACCESS(LISTIEN,NODE) 257 S DELOK=$$LDELOK^PXRMEUT(LISTIEN) 258 S DIR(0)="SBM"_U_"CO:Copy Patient List;" 259 S DIR(0)=DIR(0)_"COE:Copy to OE/RR Team;" 260 I DELOK S DIR(0)=DIR(0)_"DE:Delete Patient List;" 261 S DIR(0)=DIR(0)_"DCD:Display Creation Documentation;" 262 S DIR(0)=DIR(0)_"DSP:Display Patient List;" 263 S DIR("A")="Select Action: " 264 S DIR("B")="DSP" 265 S DIR("?")="Select from the codes displayed. For detailed help type ??" 266 S DIR("??")=U_"D HELP^PXRMLPM(1)" 267 D ^DIR K DIR 268 I $D(DIROUT) S DTOUT=1 269 I $D(DTOUT)!($D(DUOUT)) S VALMBCK="R" Q 270 S OPTION=Y 271 ; 272 I $G(OPTION)="" G XSELE 273 ; 274 ;Copy patient list 275 I OPTION="CO" D COPY^PXRMRULE(LISTIEN) 276 Q:$D(DUOUT)!$D(DTOUT) 277 ; 278 ;Copy to OE/RR Team 279 I OPTION="COE" D OERR^PXRMLPOE(LISTIEN) 280 Q:$D(DUOUT)!$D(DTOUT) 281 ; 282 ;Delete patient list 283 I OPTION="DE" D PDELETE 284 ; 285 ;Display creation documentation 286 I OPTION="DCD" D EN^PXRMLCD(LISTIEN) 287 ; 288 ;Display patient list 289 I OPTION="DSP" D START^PXRMLPP(LISTIEN) 290 ; 291 XSELE ; 292 D CLEAN^VALM10 293 D BLDLIST,XQORM 294 S VALMBCK="R" 295 Q
Note:
See TracChangeset
for help on using the changeset viewer.