source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORU2.m@ 1154

Last change on this file since 1154 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1ORU2 ; slc/dcm - More OE/RR Utilities ;1/21/92 16:08
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**11**;Dec 17, 1997
3 ;
4FORMAT(TEXT,LENGTH) ; Formats text field
5 N ORI,ORX
6 F ORI=1:1:$L(TEXT,"|") S $P(TEXT,"|",ORI)=$$STRIP($P(TEXT,"|",ORI))
7 S ORX="" F ORI=1:1:$L(TEXT,"|") S:$P(TEXT,"|",ORI)]"" ORX=ORX_$S(ORI=1:"",1:" -")_$P(TEXT,"|",ORI)
8 S TEXT=ORX
9 I $L(TEXT)>LENGTH S TEXT=$$WRAP(TEXT,LENGTH)
10 Q TEXT
11STRIP(TEXT) ; Strips white space from text
12 N ORI,ORX
13 S ORX="" F ORI=1:1:$L(TEXT," ") S:$A($P(TEXT," ",ORI))>0 ORX=ORX_$S(ORI=1:"",1:" ")_$P(TEXT," ",ORI)
14 S TEXT=ORX
15 Q TEXT
16WRAP(TEXT,LENGTH) ; Breaks text string into substrings of length LENGTH
17 N ORI,LINE,ORX,ORY
18 S LINE=1,ORX(1)="",ORY=0
19 F ORI=1:1:$L(TEXT," ") S:$L(ORX(LINE)_" "_$P(TEXT," ",ORI))>LENGTH LINE=LINE+1,ORY=0 S:'$D(ORX(LINE)) ORX(LINE)="" S ORX(LINE)=$G(ORX(LINE))_$S(ORY=0:"",1:" ")_$P(TEXT," ",ORI),ORY=1
20 S TEXT="" F ORI=1:1:3 Q:$G(ORX(ORI))']"" S TEXT=TEXT_$S(ORI=1:"",1:"| ")_$G(ORX(ORI))
21 Q TEXT
22PATHLP(X) ; Writes executable help for Patient lookup
23 N I,J,XQH,Y
24 I X?1.2"?" W !!,"Enter selection(s) by typing the name(s) or number(s) (separated by commas)."
25 I X?2"?" D
26 . W !!,"ALL items (except those numbered above 900) may be selected by typing 'ALL'."
27 . W !!,"RANGES of numbers may be entered using dashes."
28 . W !?5,"For example: 2-5,7-9"
29 . W !!,"EXCEPTIONS may be entered by preceding them with an apostrophe."
30 . W !?5,"For example: 1-10,'9 or 1-10,'BRANDX"
31 . W !,"(These select items 1 thru 10 except for 9 or BRANDX, respectively.)"
32 . I $E($G(^%ZOSF("OS")),1,3)'="DSM" W !!,"HELP for advanced look-up features may be obtained by entering '???'."
33 I X?3"?",($E($G(^%ZOSF("OS")),1,3)'="DSM") S XQH="OR PATIENT LOOKUP" D EN^XQH
34 Q ""
35PATHLP1(X) ; Writes executable help for Patient lookup
36 N DIC,I,J,XQH,Y
37 I X?1.2"?" S DIC=2,DIC(0)="M" D ^DIC
38 I X?2"?",($E($G(^%ZOSF("OS")),1,3)'="DSM") D
39 . W !!?1,"You may also enter User, Provider or Treating Specialty name to pick from",!?5,"corresponding patient lists."
40 . W !!?1,"HELP for advanced look-up features may be obtained by entering '???'."
41 I X?3"?",($E($G(^%ZOSF("OS")),1,3)'="DSM") S XQH="OR PATIENT LOOKUP" D EN^XQH
42 Q ""
Note: See TracBrowser for help on using the repository browser.