source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURSAGP3.m@ 1147

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

initial load of WorldVistAEHR

File size: 2.5 KB
RevLine 
[613]1NURSAGP3 ;HISC/MD-MULTIPLE SERVICE CATEGORY SELECTION UTILITY ;4/17/97
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3 ; This routine allows a user to select one or more of the service
4 ; category(ies) at one time:
5 ; The user's selections are returned in a global array
6 ; TMP("NURSCAT",$J,Free-Text service category name)=""
7EN1 ; SELECT SERVICE CATEGORY
8 N DA,Y,X
9 K NUROUT,^TMP("NURSCAT",$J)
10 D DISP I $O(^TMP("NURSCAT",$J,0))="" S NUROUT=1
11QUIT K NURSTAB,NURS,NURSAQ,NURSND,DIC,NURSCAT,DLAYGO,I,NURSMAX,NURSCLA,NURSCNT,NURSI,NURSMI
12 Q
13DISP ;
14 ; Define list of user selectable service category(ies) from the
15 ; NURS Service Positon (#211.3) File.
16 ;
17 K NURSTAB,NURSCAT S NURSX="",NURSMAX=0
18 F NURSX="R (RN-REGISTERED NURSE)","L (LPN-LIC. PRACTICAL NURSE)","N (NA-NURSING ASSISTANT)","C (CK-CLERICAL)","S (SE-SUMMER EMPLOYEE)","A (AO-ADMIN. OFFICER)","O (OT-OTHER)" D
19 . I $G(NRNLPN)'="",'(NURSX["(RN-"),'(NURSX["(LPN-") Q
20 . S NURSMAX=NURSMAX+1,NURSCAT(NURSMAX)=NURSX
21 . Q
22 S NURSX="" F S NURSX=$O(^NURSF(211.3,"F",NURSX)) Q:NURSX="" S DA=$O(^NURSF(211.3,"F",NURSX,0)) I '$G(NRNLPN) D
23 . S NURSMAX=NURSMAX+1,NURSCAT(NURSMAX)=$$UP^XLFSTR(NURSX)
24 . Q
25 S NURSMAX=NURSMAX+1,NURSCAT(NURSMAX)="ALL"
26 S NURSTRT=1,(NUROUT,NURSDONE)=0
27 F D DSP I $G(NURSDONE)!$G(NUROUT) Q
28 Q
29DSP ;
30 ; Display the list of selectable service category(ies) from file 211.3.
31 ;
32 W @IOF W !,$S('($G(NURSI)>7):"NURSING Service Categories",1:"OTHER Service Categories"),!,$$REPEAT^XLFSTR("-",26) S NURSAQ=$Y
33 F NURS=NURSTRT:1:NURSMAX S NURSI=NURS D I $Y>(IOSL+NURSAQ-10),NURS'=NURSMAX S NURSTRT=NURS+1 Q
34 . Q:$D(NURSCAT(NURSI))[0
35 . I NURSI=8 W !!,"OTHER Service Categories",!,$$REPEAT^XLFSTR("-",24)
36 . W ! W:$G(NURSCAT(NURSI))'="" ?1,$J(NURSI,2),". ",$G(NURSCAT(NURSI))
37 . Q
38 S NURSDONE=(NURS=NURSMAX)
39 I 'NURSDONE W !!,"<<More>>",! S DIR(0)="E" D ^DIR I $G(DIRUT) S NUROUT=1 Q
40 G:NUROUT QUIT
41 I 'NURSDONE G DSP
42ASK ;
43 ; Interactive user service category selection.
44 ;
45 W !!,"Select SERVICE CATEGORY: " R NURSX:DTIME
46 S:'$T NURSX="^" I "^"[NURSX S:$E(NURSX)="^" NUROUT=1 Q
47 I NURSX=NURSMAX!($$UP^XLFSTR(NURSX)="ALL") S NURSX="1"_$S(NURSMAX>2:"-"_(NURSMAX-1),1:"")
48 D:'(NURSX?2."?") VALENT^NURSUT4 I (NURSX["?"!($G(NURSBAD))) S:NURSX?2."?" (NURSTRT,NURSI)=1 G DSP:NURSX?2."?",ASK
49 K ^TMP("NURSCAT") F NURSI=1:1 S NURSCLA=$P(NURSX,",",NURSI) Q:NURSCLA="" S NURSND=$P(NURSCLA,"-",2)_"+"_NURSCLA F NURSCNT=+NURSCLA:1:NURSND I +$G(NURSCAT(NURSCNT))'="" D
50 . S X=NURSCAT(NURSCNT),Y=$S(X["(RN-":"R",X["(LPN-":"L",X["(NA-":"N",X["(CK-":"C",X["(SE-":"S",X["AO-":"A",X["OT-":"O",1:X)
51 . S ^TMP("NURSCAT",$J,Y)=""
52 Q
Note: See TracBrowser for help on using the repository browser.