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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRGACTIV 1075 printed Dec 13, 2024@01:41:19 Page 2
RGACTIV ;BAY/ALS-MPI/PD PATIENT ACTIVITY INFORMATION ;03/08/02
+1 ;;1.0;CLINICAL INFO RESOURCE NETWORK;**25,48**;30 Apr 99;Build 3
+2 ; Reference to ^VAT(391.71 supported by IA# 3422
EN(ARRAY,ICN,SSN) ;
+1 IF '$DATA(ICN)
SET ARRAY(0)="-1^ICN NOT PASSED"
GOTO QUIT
+2 SET DFN=$$GETDFN^MPIF001(ICN)
+3 IF DFN<1
SET ARRAY(ICN,0)=DFN
GOTO QUIT
+4 ;S SITE=+$$SITE^VASITE()
+5 ;**48 CHANGE TO PASS STATION NUMBER
+6 SET SITE=$PIECE($$SITE^VASITE(),"^",3)
PIVOT ; Get message information from ADT/HL7 PIVOT file
+1 SET RGMSG=""
SET MSGDATA=""
+2 IF $DATA(^VAT(391.71,"C",DFN))
Begin DoDot:1
+3 SET MSG=0
SET MSG=$ORDER(^VAT(391.71,"C",DFN,MSG))
if 'MSG
QUIT
Begin DoDot:2
+4 SET DIC="391.71"
SET DR=".01;.04;2.1"
SET DA=MSG
SET DIQ="RGMSG"
SET DIQ(0)="E"
+5 DO EN^DIQ1
KILL DIC,DR,DA,DIQ
+6 SET MSGDATA=RGMSG(391.71,MSG,.04,"E")_"^"_RGMSG(391.71,MSG,.01,"E")_"^"_MSG_"^"_RGMSG(391.71,MSG,2.1,"E")
+7 SET ARRAY(ICN,SITE,"PIVOT",MSG)=ICN_"^"_SITE_"^"_"PIVOT^"_MSGDATA
End DoDot:2
End DoDot:1
EXC ;Get exception information
+1 DO GETEX^RGEX03(.RETURN,DFN)
+2 SET X=0
FOR
SET X=$ORDER(RETURN(X))
if 'X
QUIT
SET ARRAY(ICN,SITE,"EXC",X)=ICN_"^"_SITE_"^"_"EXC^"_RETURN(X)
QUIT ;
+1 KILL DFN,RGMSG,MSG,MSGDATA,RETURN,SITE,X
+2 QUIT