DGFLICN ;ALB/CKN - RPC - DG FULL ICN SHOW/UPDATE; 11/17/00 12:12pm ; 11/24/17 6:07pm
 ;;5.3;Registration;**950**;Aug 13, 1993;Build 4
 ;
 ;**950 - Story 625205 (ckn)
 ;  This routine will support DG FULL ICN SHOW/UPDATE RPC calls
 
Q
EN(RETURN,DGDATA) ;
 ;
 
RPCPAR,VFULLICN,VICN,VCHKSUM,DFN,MPIFICN,MPIICN,MPICHKSM,MPINODE
 
RPCPAR=$P(DGDATA,"^"),DFN=$P(DGDATA,"^",3),MPIFICN=$P(DGDATA,"^",4)
 
MPIICN=$P(MPIFICN,"V"),MPICHKSM=$P(MPIFICN,"V",2)
 
MPINODE=$G(^DPT(DFN,"MPI")),VICN=$P(MPINODE,"^"),VCHKSUM=$P(MPINODE,"^",2)
 
VFULLICN=$P(MPINODE,"^",10)
 
RPCPAR="S" RETURN=VFULLICN_"^"_VICN_"^"_VCHKSUM Q  ;Only SHOW
 ;If input parameter is for Update
 
RPCPAR="U" D  Q
 
.DGFDA,DGERR
 
.DGFDA(2,DFN_",",991.1)=MPIFICN
 
.DGFDA(2,DFN_",",991.01)=MPIICN
 
.DGFDA(2,DFN_",",991.02)=MPICHKSM
 
.FILE^DIE("","DGFDA","DGERR")
 .
I $D(DGERRRETURN="-1^Error filing data into Patient file - "_$G(DGERR("DIERR",1,"TEXT",1)) Q
 
.MPINODE=$G(^DPT(DFN,"MPI")),VICN=$P(MPINODE,"^"),VCHKSUM=$P(MPINODE,"^",2)
 .
VFULLICN=$P(MPINODE,"^",10)
 .
RETURN=VFULLICN_"^"_VICN_"^"_VCHKSUM
 
Q