OCXSENDD ;SLC/RJS,CLA - BUILD RULE TRANSPORTER ROUTINES (DD and DIC interface) ;1/23/01 11:48
;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,105**;Dec 17,1997
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
Q
;
DATE(Y) X ^DD("DD") Q Y
;
FIELD(OCXD,OCXF,OCXAT) ;
;
N OCXTGT,OCXMESS
Q:'$G(OCXD) "" Q:'$G(OCXF) "" Q:'$L($G(OCXAT)) ""
S OCXTGT(1)="",OCXMESS(1)=""
D FIELD^DID(+OCXD,+OCXF,"N",OCXAT,"OCXTGT(1)","OCXMESS(1)")
Q $G(OCXTGT(1,OCXAT))
;
FILE(OCXD,OCXAT) ;
;
N OCXTGT,OCXMESS
Q:'$G(OCXD) "" Q:'$L($G(OCXAT)) ""
S OCXTGT(1)="",OCXMESS(1)=""
D FILE^DID(+OCXD,"N",OCXAT,"OCXTGT(1)","OCXMESS(1)")
Q $G(OCXTGT(1,OCXAT))
;
FILENAME(OCXSUB) ;
;
Q:'$G(OCXSUB) ""
N LINE,TEXT,NAME
S NAME=""
F LINE=1:1:9999 S TEXT=$T(FDATA+LINE) Q:($P(TEXT,";",2)) D Q:$L(NAME)
.I (+$P(TEXT,";;",2)=OCXSUB) S NAME=$P(TEXT,"^",2)
S:'$L(NAME) NAME=$$FILE(OCXSUB,"NAME")
Q NAME
;
FILEHDR(OCXSUB) ;
;
Q:'$G(OCXSUB) ""
N LINE,TEXT,HEADER
S HEADER=""
F LINE=1:1:9999 S TEXT=$T(FDATA+LINE) Q:($P(TEXT,";",2)) D Q:$L(HEADER)
.I (+$P(TEXT,";;",2)=OCXSUB) S HEADER=$P($P(TEXT,";;",2),"^",1)
Q HEADER
FDATA ;
;;860.1^ORDER CHECK PATIENT ACTIVE DATA
;;860.11^ACTIVE ELEMENT
;;860.111P^ELEMENT DATA
;;860.12D^SCHEDULED EVENT
;;860.121P^RULE
;;860.2^ORDER CHECK RULE
;;860.21I^TRUTH ELEMENTS
;;860.22I^RELATION ACTIONS
;;860.3^ORDER CHECK ELEMENT
;;860.31^CONDITIONAL EXPRESSION
;;860.4^ORDER CHECK DATA FIELD
;;860.41P^DATA SOURCES
;;860.5^ORDER CHECK DATA SOURCE
;;860.6^ORDER CHECK DATA CONTEXT
;;860.7^ORDER CHECK PATIENT RULE EVENT
;;860.71P^RULE EVENT
;;860.712^RELATION
;;860.7122P^ELEMENTS
;;860.71223P^DATA FIELDS
;;860.8^ORDER CHECK COMPILER FUNCTIONS
;;860.801^CODE
;;860.81^DESCRIPTION
;;860.9^ORDER CHECK LOCAL TERM
;;860.91IA^LOCAL TERM TEXT
;;861^ORDER CHECK RAW DATA LOG
;;861.01^DATA
;;863^OCX MDD CLASS
;;863.01P^PARAMETER
;;863.02^DESCRIPTION
;;863.1^OCX MDD APPLICATION
;;863.11P^PARAMETER
;;863.12^SYNONYM
;;863.13P^PRIMARY SUBJECT
;;863.2^OCX MDD SUBJECT
;;863.21P^PARAMETER
;;863.22^SYNONYM
;;863.3^OCX MDD LINK
;;863.31^SYNONYMS
;;863.32P^PARAMETER
;;863.4^OCX MDD ATTRIBUTE
;;863.41PI^PARAMETER
;;863.5^OCX MDD VALUES
;;863.51^VALUES
;;863.52^CONTEXT
;;863.54^LONG DESCRIPTION
;;863.55P^PARAMETER
;;863.6^OCX MDD METHOD
;;863.61^DESCRIPTION
;;863.63P^PARAMETER
;;863.7^OCX MDD PUBLIC FUNCTION
;;863.72^LONG DESCRIPTION
;;863.74P^PARAMETER
;;863.8^OCX MDD PARAMETER
;;863.81^DESCRIPTION
;;863.84P^PARAMETER ATTRIBUTE
;;863.9^OCX MDD CONDITION/FUNCTION
;;863.91^PARAMETER
;;863.92^SYNONYM
;;864^OCX MDD SITE PREFERENCES
;;864.1^OCX MDD DATATYPE
;;864.11P^PARAMETER
;1;
;
OCXSENDD ;SLC/RJS,CLA - BUILD RULE TRANSPORTER ROUTINES (DD and DIC interface) ;1/23/01 11:48
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,105**;Dec 17,1997
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 ;
+4 QUIT
+5 ;
DATE(Y) XECUTE ^DD("DD")
QUIT Y
+1 ;
FIELD(OCXD,OCXF,OCXAT) ;
+1 ;
+2 NEW OCXTGT,OCXMESS
+3 IF '$GET(OCXD)
QUIT ""
IF '$GET(OCXF)
QUIT ""
IF '$LENGTH($GET(OCXAT))
QUIT ""
+4 SET OCXTGT(1)=""
SET OCXMESS(1)=""
+5 DO FIELD^DID(+OCXD,+OCXF,"N",OCXAT,"OCXTGT(1)","OCXMESS(1)")
+6 QUIT $GET(OCXTGT(1,OCXAT))
+7 ;
FILE(OCXD,OCXAT) ;
+1 ;
+2 NEW OCXTGT,OCXMESS
+3 IF '$GET(OCXD)
QUIT ""
IF '$LENGTH($GET(OCXAT))
QUIT ""
+4 SET OCXTGT(1)=""
SET OCXMESS(1)=""
+5 DO FILE^DID(+OCXD,"N",OCXAT,"OCXTGT(1)","OCXMESS(1)")
+6 QUIT $GET(OCXTGT(1,OCXAT))
+7 ;
FILENAME(OCXSUB) ;
+1 ;
+2 IF '$GET(OCXSUB)
QUIT ""
+3 NEW LINE,TEXT,NAME
+4 SET NAME=""
+5 FOR LINE=1:1:9999
SET TEXT=$TEXT(FDATA+LINE)
IF ($PIECE(TEXT,";",2))
QUIT
Begin DoDot:1
+6 IF (+$PIECE(TEXT,";;",2)=OCXSUB)
SET NAME=$PIECE(TEXT,"^",2)
End DoDot:1
IF $LENGTH(NAME)
QUIT
+7 IF '$LENGTH(NAME)
SET NAME=$$FILE(OCXSUB,"NAME")
+8 QUIT NAME
+9 ;
FILEHDR(OCXSUB) ;
+1 ;
+2 IF '$GET(OCXSUB)
QUIT ""
+3 NEW LINE,TEXT,HEADER
+4 SET HEADER=""
+5 FOR LINE=1:1:9999
SET TEXT=$TEXT(FDATA+LINE)
IF ($PIECE(TEXT,";",2))
QUIT
Begin DoDot:1
+6 IF (+$PIECE(TEXT,";;",2)=OCXSUB)
SET HEADER=$PIECE($PIECE(TEXT,";;",2),"^",1)
End DoDot:1
IF $LENGTH(HEADER)
QUIT
+7 QUIT HEADER
FDATA ;
+1 ;;860.1^ORDER CHECK PATIENT ACTIVE DATA
+2 ;;860.11^ACTIVE ELEMENT
+3 ;;860.111P^ELEMENT DATA
+4 ;;860.12D^SCHEDULED EVENT
+5 ;;860.121P^RULE
+6 ;;860.2^ORDER CHECK RULE
+7 ;;860.21I^TRUTH ELEMENTS
+8 ;;860.22I^RELATION ACTIONS
+9 ;;860.3^ORDER CHECK ELEMENT
+10 ;;860.31^CONDITIONAL EXPRESSION
+11 ;;860.4^ORDER CHECK DATA FIELD
+12 ;;860.41P^DATA SOURCES
+13 ;;860.5^ORDER CHECK DATA SOURCE
+14 ;;860.6^ORDER CHECK DATA CONTEXT
+15 ;;860.7^ORDER CHECK PATIENT RULE EVENT
+16 ;;860.71P^RULE EVENT
+17 ;;860.712^RELATION
+18 ;;860.7122P^ELEMENTS
+19 ;;860.71223P^DATA FIELDS
+20 ;;860.8^ORDER CHECK COMPILER FUNCTIONS
+21 ;;860.801^CODE
+22 ;;860.81^DESCRIPTION
+23 ;;860.9^ORDER CHECK LOCAL TERM
+24 ;;860.91IA^LOCAL TERM TEXT
+25 ;;861^ORDER CHECK RAW DATA LOG
+26 ;;861.01^DATA
+27 ;;863^OCX MDD CLASS
+28 ;;863.01P^PARAMETER
+29 ;;863.02^DESCRIPTION
+30 ;;863.1^OCX MDD APPLICATION
+31 ;;863.11P^PARAMETER
+32 ;;863.12^SYNONYM
+33 ;;863.13P^PRIMARY SUBJECT
+34 ;;863.2^OCX MDD SUBJECT
+35 ;;863.21P^PARAMETER
+36 ;;863.22^SYNONYM
+37 ;;863.3^OCX MDD LINK
+38 ;;863.31^SYNONYMS
+39 ;;863.32P^PARAMETER
+40 ;;863.4^OCX MDD ATTRIBUTE
+41 ;;863.41PI^PARAMETER
+42 ;;863.5^OCX MDD VALUES
+43 ;;863.51^VALUES
+44 ;;863.52^CONTEXT
+45 ;;863.54^LONG DESCRIPTION
+46 ;;863.55P^PARAMETER
+47 ;;863.6^OCX MDD METHOD
+48 ;;863.61^DESCRIPTION
+49 ;;863.63P^PARAMETER
+50 ;;863.7^OCX MDD PUBLIC FUNCTION
+51 ;;863.72^LONG DESCRIPTION
+52 ;;863.74P^PARAMETER
+53 ;;863.8^OCX MDD PARAMETER
+54 ;;863.81^DESCRIPTION
+55 ;;863.84P^PARAMETER ATTRIBUTE
+56 ;;863.9^OCX MDD CONDITION/FUNCTION
+57 ;;863.91^PARAMETER
+58 ;;863.92^SYNONYM
+59 ;;864^OCX MDD SITE PREFERENCES
+60 ;;864.1^OCX MDD DATATYPE
+61 ;;864.11P^PARAMETER
+62 ;1;
+63 ;