source: WorldVistAEHR/trunk/r/DIETETICS-FH/FHOMIP.m@ 1270

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

initial load of WorldVistAEHR

File size: 1.7 KB
RevLine 
[613]1FHOMIP ;Hines OIFO/RTK OUTPATIENT ISOLATION/PRECAUTION EDIT ;9/22/03 11:15
2 ;;5.5;DIETETICS;**2**;Jan 28, 2005
3 ;
4 D ^FHOMDPA I FHDFN="" Q
5 I '$D(^FHPT(FHDFN,0)) W !!,"UNKNOWN SELECTION !" Q
6 S FHIPBEF=$P($G(^FHPT(FHDFN,0)),U,5)
7 S DIE="^FHPT(",DA=FHDFN,DR="19" D ^DIE
8 S FHIP=$P($G(^FHPT(FHDFN,0)),U,5) I FHIP=FHIPBEF Q
9 D UPD100
10 I FHIP'="" S FHIP=$P($G(^FH(119.4,FHIP,0)),U,1)
11 I FHIP="" S FHIP="Cancelled"
12 S FHACT="O",FHOPTY="I",(FHDIET,FHLOC,FHMEAL)="" D SETORX^FHOMRO2
13 Q
14HL7SET ;
15 ; Use this to set isolations/precautions received from CPRS via HL7 msg
16 ; segments. Just set the necessary variables.
17 S FHOBR=$P(FHX,"|",13),FHIP=$P(FHOBR,"^",4)
18 S FHORN=$S($G(FHORN)="":"",1:FHORN)
19 I '$D(^FH(119.4,FHIP,0)) S TXT="Invalid I/P" D GETOR^FHWOR,ERR^FHOMWOR Q
20 S DIE="^FHPT(",DA=FHDFN,DR="19////^S X=FHIP;20////^S X=FHORN" D ^DIE
21 S FILL="I;"_FHIP
22 D SEND^FHWOR
23 S FHIP=$P($G(^FH(119.4,FHIP,0)),U,1)
24 S FHACT="O",FHOPTY="I",(FHDIET,FHLOC,FHMEAL)="" D SETORX^FHOMRO2
25 Q
26CAN ;
27 S DIE="^FHPT(",DA=FHDFN,DR="19////@;20////FHORN" D ^DIE
28 S FHACT="O",FHOPTY="I",FHIP="Cancelled",(FHDIET,FHLOC,FHMEAL)=""
29 D SETORX^FHOMRO2
30 Q
31UPD100 ;Backdoor message to update file #100 with a new IP order
32 Q:'$$PATCH^XPDUTL("OR*3.0*215") ;must have CPRSv26 for O.M. backdoor
33 Q:'DFN Q:FHIP="" K MSG D SITE^FH
34 S FHOLOC=$O(^FH(119.6,"AL",0)),FHOLOCNM=$P($G(^SC(FHOLOC,0)),U,1)
35 S MSG(1)="MSH|^~\&|DIETETICS|"_SITE(1)_"|||||ORM"
36 S MSG(2)="PID|||"_DFN_"||"_$P($G(^DPT(DFN,0)),"^",1)
37 S MSG(3)="PV1||O|"_FHOLOC_"^"_FHOLOCNM_"||||||||||||||||"
38 D NOW^%DTC S FHNOW=%,FHODT=$E(%,1,7),FHODT=$$FMTHL7^XLFDT(FHODT)
39 S FILL="I;"_FHNOW,FHIPEXT=$P($G(^FH(119.4,FHIP,0)),U,1)
40 S MSG(4)="ORC|SN||"_FILL_"^FH||||^^^"_FHODT_"^"_FHODT_"||||||||"_FHNOW
41 S MSG(5)="OBR||||||||||||^^^"_FHIP_"^"_FHIPEXT
42 D EVSEND^FHWOR
43 Q
Note: See TracBrowser for help on using the repository browser.