25 lines
1.0 KiB
Mathematica
25 lines
1.0 KiB
Mathematica
RGACTIV ;BAY/ALS-MPI/PD PATIENT ACTIVITY INFORMATION ;03/08/02
|
|
;;1.0;CLINICAL INFO RESOURCE NETWORK;**25,48**;30 Apr 99;Build 3
|
|
; Reference to ^VAT(391.71 supported by IA# 3422
|
|
EN(ARRAY,ICN,SSN) ;
|
|
I '$D(ICN) S ARRAY(0)="-1^ICN NOT PASSED" G QUIT
|
|
S DFN=$$GETDFN^MPIF001(ICN)
|
|
I DFN<1 S ARRAY(ICN,0)=DFN G QUIT
|
|
;S SITE=+$$SITE^VASITE()
|
|
;**48 CHANGE TO PASS STATION NUMBER
|
|
S SITE=$P($$SITE^VASITE(),"^",3)
|
|
PIVOT ; Get message information from ADT/HL7 PIVOT file
|
|
S RGMSG="",MSGDATA=""
|
|
I $D(^VAT(391.71,"C",DFN)) D
|
|
. S MSG=0 S MSG=$O(^VAT(391.71,"C",DFN,MSG)) Q:'MSG D
|
|
.. S DIC="391.71",DR=".01;.04;2.1",DA=MSG,DIQ="RGMSG",DIQ(0)="E"
|
|
.. D EN^DIQ1 K DIC,DR,DA,DIQ
|
|
.. S MSGDATA=RGMSG(391.71,MSG,.04,"E")_"^"_RGMSG(391.71,MSG,.01,"E")_"^"_MSG_"^"_RGMSG(391.71,MSG,2.1,"E")
|
|
.. S ARRAY(ICN,SITE,"PIVOT",MSG)=ICN_"^"_SITE_"^"_"PIVOT^"_MSGDATA
|
|
EXC ;Get exception information
|
|
D GETEX^RGEX03(.RETURN,DFN)
|
|
S X=0 F S X=$O(RETURN(X)) Q:'X S ARRAY(ICN,SITE,"EXC",X)=ICN_"^"_SITE_"^"_"EXC^"_RETURN(X)
|
|
QUIT ;
|
|
K DFN,RGMSG,MSG,MSGDATA,RETURN,SITE,X
|
|
Q
|