source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURSUT4.m@ 1042

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

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1NURSUT4 ;HIRMFO/RM-UTILITIES FOR FILE 213.9 ;5/17/93
2 ;;4.0;NURSING SERVICE;**20,22**;Apr 25, 1997
3EN1 ; ENTRY FROM INPUT TRANSFORM FROM FIELDS 10.4 AND 10.5 ON FILE 213.9
4 K:$L(X)>6!($L(X)<1)!'(X?1"T"!(X?1"N")!(X?1"T+"1.4N)!(X?1"T-"1.4N)!(X?1"N+"1.4N)!(X?1"N-"1.4N)) X
5 Q
6EN2 ; EXECUTABLE HELP FROM OPTION NURAAM-ACU GRADE/STEP CODE LOAD
7 N DA,Y,X I $G(^NURSF(211.1,0))="" W !,$C(7),"NURS PAY SCALE FILE IS NOT RESIDENT CANNOT CONTINUE!!"
8 K NUROUT,^TMP("NURCD",$J)
9 D DISP
10 W !!,"Enter Grade/Step Code",!,"examples: ",!,"R/E1/5 = Registered Nurse,ENTRY1,Step 5",!,"N/4/7 = Nursing Assistant,GS4,Step 7",!
11QUIT K NURTAB,NURS,NURAQ,NUREND,NURP,NSCD,I,NURMAX,NCTR,NURI,NURMI
12 Q
13DISP ;
14 K NURTAB,NSCD S NCTR=1,NSCD="",NURMAX=0
15 F I=0:0 S NSCD=$O(^NURSF(211.1,"B",NSCD)) Q:NSCD="" F DA=0:0 S DA=$O(^NURSF(211.1,"B",NSCD,DA)) Q:DA'>0 D
16 . S NURMAX=NURMAX+1,NSCD(NURMAX)=DA_"^"_NSCD
17 . Q
18 S NURSTRT=1,(NUROUT,NURDONE)=0
19 F D DSP I $G(NURDONE)!$G(NUROUT) Q
20 Q
21DSP ;
22 W @IOF S NURAQ=$Y
23 F NURS=NURSTRT:3:NURMAX S NURI=NURS D I $Y>(IOSL+NURAQ-10),NURS'=NURMAX S NURSTRT=NURS+3 Q
24 . Q:$D(NSCD(NURI))[0
25 . S NURI(0)=NURI+1,NURI(1)=NURI+2
26 . W ! W:$G(NSCD(NURI))'="" ?1,$J(NURI,2),". ",$P($G(NSCD(NURI)),U,2) W:$G(NSCD(NURI(0)))'="" ?26,$J(NURI(0),2),". ",$P($G(NSCD(NURI(0))),U,2) W:$G(NSCD(NURI(1)))'="" ?52,$J(NURI(1),2),". ",$P($G(NSCD(NURI(1))),U,2)
27 . Q
28 S NURDONE=(NURS=NURMAX)!(NURS+2=NURMAX)
29 I 'NURDONE W !,"<<More>>"
30 W !,"Press the return key to continue or '^' to exit: " R NURX:DTIME I NURX="^" S NUROUT=1 Q
31 G:NURDONE QUIT
32 S:NURX["?" NURSTRT=1 G DSP:NURX["?"
33 Q
34EN3 ;INPUT TRANSFORM FOR FIELD 8 FILE 211.82
35 K X W $C(7),!,"*** NOT YET IMPLEMENTED ***"
36 Q
37COMPDAT(D0) ; EXTRINSIC FUNCTION TO RETURN COMPUTED SERVICE COMPUTATION DATE
38 ; FROM THE EMPLOYEE(#450) FILE
39 N X,Y,NURY,NURX,NURZ
40 S (NURCOMP,PRSPCDA)=0,NURX=+$G(^NURSF(210,+D0,0)),NURY=$P($G(^VA(200,+NURX,1)),U,9) S:NURY'="" PRSPCDA=$O(^PRSPC("SSN",NURY,0))
41 S Y=$S(+PRSPCDA:$P($G(^PRSPC(PRSPCDA,0)),U,31),1:"")
42 ;I +Y>0 S %DT="" D DD^%DT S NURCOMP=Y
43 I +Y>0 S NURCOMP=Y
44 S:NURCOMP=0 NURCOMP="" K PRSPCDA
45 Q NURCOMP
46VALENT ;
47 S NURSBAD=0 F NURS1=1:1 S NURS2=$P(NURSX,",",NURS1) Q:NURS2="" D VAL0 Q:NURSBAD
48 Q
49VAL0 I +NURS2>NURSMAX!(+NURS2<1) S NURSBAD=1
50 I NURS2["-",$P(NURS2,"-")'?.N!($P(NURS2,"-",2)'?.N)!(+$P(NURS2,"-",2)>NURSMAX)!(+$P(NURS2,"-",2)<1)!(+NURS2>NURSMAX)!(+NURS2<1) S NURSBAD=1
51 I NURS2'["-",NURS2'?.N!(+NURS2>NURSMAX)!(+NURS2<1) S NURSBAD=1
52 I (NURSX["?"!(NURSBAD)) D Q
53 . W:NURSX'?2"?" !!,?5,$C(7),"Make a selection from the screen display, a range of numbers can be",!,?5,"selected by using a HYPHEN, multiple selections can be made by"
54 . W !,?5,"separating them by COMMAS, ",$S($G(NURSNALL)'>0:"select ALL ",1:""),"or '^' to exit."
55 . W:NURSX'?2"?" !,?15,"E.G. 1 1-2 1,3 1-2,4-5 1,3-4"
56 . W:$G(NURSNALL)'>0 " ALL"
57 . W !,?22,"Are examples of valid selections" S:NURSX?2."?" NURSSTRT=1
58 . Q
59 Q
60COMPDISP ; SERVICE COMP DATE DISPLAY
61 N X,Y
62 S Y=$$COMPDAT^NURSUT4(D0) D D^DIQ I Y'="" W ?$X+1,Y,?$X+1," (NO EDITING)"
63 Q
Note: See TracBrowser for help on using the repository browser.