source: WorldVistAEHR/trunk/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/PXBHLP0.m@ 1000

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

initial load of WorldVistAEHR

File size: 2.0 KB
RevLine 
[613]1PXBHLP0 ;ISL/JVS - MAIN HELP DRIVING ROUTINE ;11/5/96 14:25
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**11**;Aug 12, 1996
3 ;
4 ;
5 ;
6EN1(PACK,SUBJ,INTR,BODY,LEVEL) ;--MAIN ENTRY POINT TO HELP
7 ;
8 ;
9 ; PACK - Package that is calling for help (REQUIRED)
10 ; SUBJ - Subject that the help is about (REQUIRED)
11 ; INTR - Line number on which to write the INTRODUCTION
12 ; BODY - Line number on which to write the BODY
13 ;
14 ; PXBREC - The node in the PHBHLPR routine
15 ;
16 I '$D(PACK),'$D(SUBJ) W !," Requires the Package and the Subject!! "
17 ;
18NEW ;----New any necessary Items
19 N TAG,RTN,LENGTH,PLACE,BLENGTH
20 K NOREV
21 ;
22SET ;-----Set up Variables needed for HELP
23 D TERM^PXBCC
24 I $D(LEVEL),LEVEL=1 S TAG="INTRO"
25 I $D(LEVEL),LEVEL=2 S TAG="BODY"
26 ;
27 ;
28NODE ;
29 I '$D(TAG) Q
30 S PXBNOD=PACK_SUBJ D EN1^PXBHLPR I PXBREC="" S PXBREC=-1 Q
31 ;---GET LENGTH OF TAG FROM ROUTINE IN FIRST PIECE OF PXBREC
32 ;
33 S ROUTINE=$P($P(PXBREC,"~",1),"^",2)
34 D SIZE
35 ;
36 ;----CLEAN OFF THE SCREEN
37 D CLEAN(LENGTH)
38 ;
39 ;
40 ;---WRITE THE TEXT TO THE SCREEN
41 I $D(IOEDEOP),PACK="PXB" W IOEDEOP
42 I TAG="INTRO" D @$P(PXBREC,"~",1) Q
43 I TAG="BODY" D @$P(PXBREC,"~",2)
44 I TAG'="INTRO",TAG'="BODY" S RTN=TAG_"^"_$P($P(PXBREC,"~",2),"^",2) D
45 .D @RTN
46 I $G(TAG)>0 Q
47 ;----D THE PROMPT
48 ;
49 D @$P(PXBREC,"~",3)
50 I TAG=""!(TAG["^") Q
51 G NODE
52 Q
53 ;--------------------------SUB ROUTINES---------------------------------
54 ;
55CLEAN(LENGTH) ;---Clean off the Screen where the message will be.
56 D PLACE
57 S (IOBM,IOTM)=0 W @IOSTBM
58 I $D(INTR),$G(PLACE) D
59 .D LOC^PXBCC(PLACE,0) F I=1:1:LENGTH W IORI,IOELALL
60 I $D(BODY),$G(PLACE) D
61 .D LOC^PXBCC(PLACE,0) F I=1:1:LENGTH W IORI,IOELALL
62 Q
63SIZE ;-----GET THE SIZE OF THE SPACE OF THE DATA
64 ;-----------------------------------
65 S X="LENGTH=$P($T("_TAG_"^"_ROUTINE_"),"";;"",2)"
66 S @X
67 I TAG="BODY" S BLENGTH=LENGTH
68 ;----------------------------------------------
69 ;
70 Q
71PLACE ;----CALCULATE THE PLACEMENT OF THE HELP FOR PXB*
72 N HDR
73 I $D(BLENGTH) S LENGTH=BLENGTH
74 S HDR=4
75 S PLACE=HDR+PXBCNT+1+LENGTH
76 I PLACE<17 Q
77 I PLACE>16 S PLACE=4+LENGTH,NOREV=1
78 Q
Note: See TracBrowser for help on using the repository browser.