source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURCES5.m@ 623

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1NURCES5 ;HIRMFO/YH-END OF SHIFT -VITAL/MEASUREMENT DATA ;12/5/96
2 ;;4.0;NURSING SERVICE;**24**;Apr 25, 1997
3VITAL ;
4 N NUR,NURVIT,NURIEF,NURDT,NDTFLG,NURDT,NURTYP,NURQUAL,NURDATA,NURWT,NURHT,NURBMI
5 S GMRVSTR="T;P;R;BP;WT;HT;PN;",GMRVSTR(0)="^^1^1" D EN1^GMRVUT0
6 I $D(^UTILITY($J,"GMRVD")) S %X="^UTILITY($J,""GMRVD"",",%Y="NURVIT(" D %XY^%RCR K ^UTILITY($J,"GMRVD")
7 S GMRVSTR="T;P;R;BP;PN;",GMRVSTR(0)=NURNOW(1)_"^"_NURNOW D EN1^GMRVUT0
8 F NUR="T","P","R","BP" S NURDT=0 F S NURDT=$O(^UTILITY($J,"GMRVD",NUR,NURDT)) Q:NURDT'>0 S NURDA=0 F S NURDA=$O(^UTILITY($J,"GMRVD",NUR,NURDT,NURDA)) Q:NURDA'>0 D
9 . I $P(^UTILITY($J,"GMRVD",NUR,NURDT,NURDA),"^",12)="*",'$D(NURVIT(NURDT,NUR,NURDA)) S NURVIT(NURDT,NUR,NURDA)=^UTILITY($J,"GMRVD",NUR,NURDT,NURDA)
10 K NVM S NVM=0 S NURDT=0,NDTFLG=0 F S NURDT=$O(NURVIT(NURDT)) Q:NURDT'>0 D
11 . I NURDT'=NDTFLG S NDTFLG=NURDT,NVM=NVM+1,NVM(NVM)=$$FMTE^XLFDT(9999999-NURDT,"2P"),NDTFLG=NURDT
12 . S NURTYP="" F S NURTYP=$O(NURVIT(NURDT,NURTYP)) Q:NURTYP="" D
13 . . S NURIEF=0 F S NURIEF=$O(NURVIT(NURDT,NURTYP,NURIEF)) Q:NURIEF'>0 D
14 . . . S NURDATA=NURVIT(NURDT,NURTYP,NURIEF)
15 . . . S NURQUAL=$P(NURDATA,"^",10)_$S($P(NURDATA,"^",10)'="":" ",1:"")_$P(NURDATA,"^",11)
16 . . . S:NURQUAL'="" NURQUAL="-"_NURQUAL
17 . . . S NURDATA(1)=$P(NURDATA,"^",8)_$P(NURDATA,"^",12)_$S(NURTYP="WT":" lb",NURTYP="HT":" in",1:"")_NURQUAL
18 . . . I '$D(NURTYP(NURDT,NURTYP)) S NVM=NVM+1,NVM(NVM)=$E(" "_NURTYP_":"_NURDATA(1),1,21),NURTYP(NURDT,NURTYP)=""
19 . . .E S NVM=NVM+1,NVM(NVM)=" "_$E(NURDATA(1),1,20)
20 . . . I NURTYP="WT" S NURWT=$S($P(NURDATA,"^",13)>0:+$P(NURDATA,"^",13),1:0)
21 . . . I NURTYP="HT" S NURHT=$S($P(NURDATA,"^",13)>0:$P(NURDATA,"^",13)/100,1:0)
22 . . . Q
23 . . Q
24 . Q
25 I $G(NURWT)>0,$G(NURHT)>0 S NURBMI=$J(NURWT/(NURHT*NURHT),0,0),NURBMI=NURBMI_$S(NURBMI>27:"*",1:""),NVM=NVM+1,NVM(NVM)="BMI: "_NURBMI
26 Q
27SORT(NORDER) ;SORT BY ROOM-BED/ALPHABETICAL/BED
28SORT1 W !,?5,"1. by room-bed",!,?5,"2. by alphabetical",!,?5,"3. by bed",!!,?5,"Enter a number: 1// " R NORDER:DTIME I '$T!(NORDER["^") S NURQUIT=1 Q NORDER
29 I NORDER="" S NORDER="SORT1" Q NORDER
30 I NORDER=1!(NORDER=2)!(NORDER=3) S NORDER="SORT"_NORDER Q NORDER
31 G SORT1
32FITLINE(NLINE,NLEN,NGLOB) ;
33 N X,NL S X=NLINE,DIWR=NLEN,DIWF="",DIWL=0 K ^UTILITY($J) D ^DIWP
34 S NL=0 F S NL=$O(^UTILITY($J,"W",0,NL)) Q:NL'>0 S NGLOB=NGLOB+1,NGLOB(NGLOB)=$S(NL>1:" ",1:"")_^UTILITY($J,"W",0,NL,0)
35 K ^UTILITY($J)
36 Q
Note: See TracBrowser for help on using the repository browser.