source: FOIAVistA/trunk/r/DIETETICS-FH/FHWOR61.m@ 1169

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1FHWOR61 ; HISC/JH - Dietetics Isolation/Precaution ;2/23/00 09:53
2 ;;5.5;DIETETICS;;Jan 28, 2005
3GET ; Get OBR
4 N FHIS1
5 S OBR=$P(X,"|",13),(FHIS1,IS)=$P(OBR,"^",4)
6 I $P(^FHPT(FHDFN,"A",ADM,0),"^",10)'="" S FHIS=$P(^FHPT(FHDFN,"A",ADM,0),"^",10) D CAN^FHORD4 S FHHOLD=FHORN,FHORN=$P(^FHPT(FHDFN,"A",ADM,0),"^",13) D:FHORN>0 CODE^FHWOR61 S FHORN=FHHOLD,IS=FHIS K FHHOLD,FHIS
7 S IS=FHIS1 D FIL^FHORD4 S $P(^FHPT(FHDFN,"A",ADM,0),"^",13)=+FHORN,FILL="I"_";"_ADM_";"_IS D SEND^FHWOR
8 K OBR Q
9ISO ; Isolation/Precaution Order
10 K MSG D SETVAR^FHORD4
11 S MSG(1)="MSH|^~\&|DIETETICS|"_SITE(1)_"|||||ORM"
12 S MSG(2)="PID|||"_DFN_"||"_$P($G(^DPT(DFN,0)),"^",1)
13 S WARD=$G(^DPT(DFN,.1)) Q:WARD="" S FHWRD=$O(^DIC(42,"B",WARD,0)) Q:'FHWRD S HOSP=+$P($G(^DIC(42,+FHWRD,44)),"^",1) Q:'HOSP S RM=$G(^DPT(DFN,.108)) S:RM RM=$P($G(^DG(405.4,+RM,0)),"^",1)
14 S MSG(3)="PV1||I|"_HOSP_"^"_RM_"||||||||||||||||"
15 S MSG(4)="ORC|SN||"_FILL_"^FH||||^^^"_FHIDT_"|||"_DUZ_"||"_DUZ_"|||"_FHIDT
16 S MSG(5)="OBR||||||||||||^^^"_IS_"^"_$P(^FH(119.4,IS,0),"^")_"^99FHI"
17 K FHIDT,FILL,FHWRD,HOSP,RM,SITE,SDT
18 D:$D(MSG) MSG^XQOR("FH EVSEND OR",.MSG) K MSG
19 Q
20CODE ; Cancelation From Dietetic
21 K MSG D SETVAR^FHORD4
22 S MSG(1)="MSH|^~\&|DIETETICS|"_SITE(1)_"|||||ORM"
23 S MSG(2)="PID|||"_DFN_"||"_$P($G(^DPT(DFN,0)),"^")
24 S MSG(3)="ORC|OC|"_FHORN_"^OR|"_FILL_"^FH|||||||||"_FHPV_"|||"_FHIDT_"|Dietetics Canceled Isolation/Precaution"
25 D:$D(MSG) MSG^XQOR("FH EVSEND OR",.MSG) K MSG
26 Q
27CAN ; Cancel Isolation From Order Entry
28 S IS=+$P(FILL,";",3) I 'IS D CSEND^FHWOR Q
29 D GADM^FHWORR
30 I IS'=$P($G(^FHPT(FHDFN,"A",+ADM,0)),"^",10) D CSEND^FHWOR Q
31 I +FHORN'=$P($G(^FHPT(FHDFN,"A",ADM,0)),"^",13) D CSEND^FHWOR Q
32 D CAN^FHORD4,CSEND^FHWOR
33 K IS
34 Q
35NA ; If isolation store in Ditetics and Order/Entry
36 G:'$P(FILL,";",3) KILL
37 S:ADM'=$P(FILL,";",2) ADM=$P(ADM,";",2) ;Check if same admission
38 S OBR=$P($G(^FHPT(FHDFN,"A",ADM,0)),"^",10) I OBR=+$P(FILL,";",3) D
39 .I +FHORN>0 S $P(^FHPT(FHDFN,"A",ADM,0),"^",13)=+FHORN
40 .Q
41KILL K FHIDT,IS
42 Q
Note: See TracBrowser for help on using the repository browser.