source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORMBLDOR.m@ 1757

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

initial load of FOIAVistA 6/30/08 version

File size: 1.2 KB
Line 
1ORMBLDOR ; SLC/MKB - Build outgoing OR msgs ;11/17/00 11:11
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**97**;Dec 17, 1997
3EN ; -- Generic orders: Activity, Nursing, Diagnosis, Condition, Vitals
4 N OI,START,STOP,SCH,TXT
5 S OI=$G(ORDIALOG($$PTR("ORDERABLE ITEM"),1))
6 S TXT=$G(ORDIALOG($$PTR("FREE TEXT 1"),1))
7 S START=$P(OR0,U,8),STOP=$P(OR0,U,9),SCH=""
8 S:ORDG=$O(^ORD(100.98,"B","V/M",0)) SCH=$$VALUE^ORCSAVE2(IFN,"SCHEDULE")
9 S $P(ORMSG(4),"|",8)=U_SCH_"^^"_$$HL7DATE(START)_U_$$HL7DATE(STOP) ; QT
10 S ORMSG(5)="OBR||||"_$$USID^ORMBLD(OI)
11 S:$L(TXT) ORMSG(6)="NTE|1|L|"_TXT ; order text?
12 Q
13 ;
14ADT ; -- M.A.S. event requests
15 Q N PROV,PROV1,ORIFN
16 S PROV=+$G(ORDIALOG($$PTR("PROVIDER"),1)) I 'PROV D EN Q
17 S PROV1=+$G(ORDIALOG($$PTR("PROVIDER 1"),1)),PKG="DGPM"
18 S $P(ORMSG(1),"|",5)="M.A.S.",$P(ORMSG(1),"|",9)="ADT"
19 K ORMSG(4) S ORMSG(4)=ORMSG(3),ORMSG(3)=ORMSG(2)
20 S ORMSG(2)="EVN|A08|"_$$HL7DATE($$NOW^XLFDT)
21 S $P(ORMSG(4),"|",8)=PROV
22 S:PROV1 ORMSG(5)="ZDG|"_PROV1
23 S ORIFN=+IFN D NW^ORMORG ; set status, start date
24 Q
25 ;
26PTR(X) ; -- Returns ptr value of prompt X in #101.41
27 Q +$O(^ORD(101.41,"AB",$E("OR GTX "_X,1,63),0))
28 ;
29HL7DATE(D) ; -- FM->HL7 format
30 Q $$FMTHL7^XLFDT(D) ;**97
Note: See TracBrowser for help on using the repository browser.