source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURAED6.m@ 1006

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1NURAED6 ;HIRMFO/RM-DATA STORAGE TMP FOR THE POSITION EDIT ;7/11/90
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3EN1 ; STORE PATIENT DATA FROM NURSASS(#) AND NURSPOS(#)
4 N DA W:$O(NURSPOS("")) !!?20,"Making changes now - hold a minute"
5EN2 ; STORE DATA FOR POSITION EDIT
6 F NURSANM=0:0 S NURSANM=$O(NURSASS(NURSANM)) Q:NURSANM'>0 I $D(NURSPOS(NURSANM)) D ADD:NURSASS(NURSANM)="",DEL:NURSPOS(NURSANM)="",EDT:NURSASS(NURSANM)'=""&(NURSPOS(NURSANM)'="")
7 Q
8ADD ; ADD NEW POSITION
9 S NURSNPOS=NURSPOS(NURSANM) D ADDP
10 Q
11DEL ; DELETE EXISTING POSITION
12 S DA(1)=$P(NURSASS(NURSANM),U),DA=$P(NURSASS(NURSANM),U,2) D DELP
13 Q
14EDT ; EDIT EXISTING POSITION
15 S DA(1)=$P(NURSASS(NURSANM),U),DA=$P(NURSASS(NURSANM),U,2)
16 I $P(NURSPOS(NURSANM),U,1,3)'=$P(NURSASS(NURSANM),U,3,5) D DELP S NURSNPOS=NURSPOS(NURSANM) D ADDP Q
17EDFL ; ADD THE DATA FOR THE REST OF THE FIELDS
18 Q:DA(1)'>0!(DA'>0) K DR S DIE="^NURSF(211.8,"_DA(1)_",1,",DR=$S($P(NURSASS(NURSANM),U,7)=$P(NURSPOS(NURSANM),U,5):"",1:".03////"_$P(NURSPOS(NURSANM),U,5))
19 F NURSX=6:1:12 S NURSY=$P(NURSPOS(NURSANM),U,NURSX) I $P(NURSASS(NURSANM),U,NURSX+2)'=NURSY S DR=DR_$S($L(DR):";",1:"")_(NURSX-5)_$S(NURSY'="":"////",1:"///")_$S(NURSY'="":NURSY,1:"@")
20 D:DR'="" ^DIE
21 Q
22DELP ;DELETE POSITION USING DIK
23 S DIK="^NURSF(211.8,DA(1),1," D ^DIK
24 Q
25ADDP ; ADD A NEW POSITION USING FILE^DICN
26 S DA=-1,DA(1)=$O(^NURSF(211.8,"AA",+$P(NURSNPOS,U),$P(NURSNPOS,U,2),0)) I DA(1)'>0 S DIC="^NURSF(211.8,",DIC(0)="L",X=$P(NURSNPOS,U),DIC("DR")=".02///"_$P(NURSNPOS,U,2) K DD D FILE^DICN K DIC Q:+Y'>0 S DA(1)=+Y
27 S:'$D(^NURSF(211.8,DA(1),1,0)) ^(0)="^211.82ID^^"
28 S DIC="^NURSF(211.8,DA(1),1,",DIC(0)="L",X=$P(NURSNPOS,U,3),DIC("DR")=".02////"_$P(NURSNPOS,U,4)_";.03////"_$P(NURSNPOS,U,5)_$S($P(NURSNPOS,U,11):";6///"_$P(NURSNPOS,U,11),1:"") K DD D FILE^DICN K DIC
29 S DA=+Y,NUR=".01^1" D EN1^NURSUT1 S:NURSASS(NURSANM)'="" $P(NURSASS(NURSANM),U,8,13)="" D EDFL
30 Q
Note: See TracBrowser for help on using the repository browser.