1 | ORMBLDOR ; SLC/MKB - Build outgoing OR msgs ;11/17/00 11:11
|
---|
2 | ;;3.0;ORDER ENTRY/RESULTS REPORTING;**97**;Dec 17, 1997
|
---|
3 | EN ; -- 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 | ;
|
---|
14 | ADT ; -- 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 | ;
|
---|
26 | PTR(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 | ;
|
---|
29 | HL7DATE(D) ; -- FM->HL7 format
|
---|
30 | Q $$FMTHL7^XLFDT(D) ;**97
|
---|