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) ;
;
N RPCPAR,VFULLICN,VICN,VCHKSUM,DFN,MPIFICN,MPIICN,MPICHKSM,MPINODE
S RPCPAR=$P(DGDATA,"^"),DFN=$P(DGDATA,"^",3),MPIFICN=$P(DGDATA,"^",4)
S MPIICN=$P(MPIFICN,"V"),MPICHKSM=$P(MPIFICN,"V",2)
S MPINODE=$G(^DPT(DFN,"MPI")),VICN=$P(MPINODE,"^"),VCHKSUM=$P(MPINODE,"^",2)
S VFULLICN=$P(MPINODE,"^",10)
I RPCPAR="S" S RETURN=VFULLICN_"^"_VICN_"^"_VCHKSUM Q ;Only SHOW
;If input parameter is for Update
I RPCPAR="U" D Q
.N DGFDA,DGERR
.S DGFDA(2,DFN_",",991.1)=MPIFICN
.S DGFDA(2,DFN_",",991.01)=MPIICN
.S DGFDA(2,DFN_",",991.02)=MPICHKSM
.D FILE^DIE("","DGFDA","DGERR")
.I $D(DGERR) S RETURN="-1^Error filing data into Patient file - "_$G(DGERR("DIERR",1,"TEXT",1)) Q
.S MPINODE=$G(^DPT(DFN,"MPI")),VICN=$P(MPINODE,"^"),VCHKSUM=$P(MPINODE,"^",2)
.S VFULLICN=$P(MPINODE,"^",10)
.S RETURN=VFULLICN_"^"_VICN_"^"_VCHKSUM
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGFLICN 1114 printed Dec 13, 2024@02:43:35 Page 2
DGFLICN ;ALB/CKN - RPC - DG FULL ICN SHOW/UPDATE; 11/17/00 12:12pm ; 11/24/17 6:07pm
+1 ;;5.3;Registration;**950**;Aug 13, 1993;Build 4
+2 ;
+3 ;**950 - Story 625205 (ckn)
+4 ; This routine will support DG FULL ICN SHOW/UPDATE RPC calls
+5 QUIT
EN(RETURN,DGDATA) ;
+1 ;
+2 NEW RPCPAR,VFULLICN,VICN,VCHKSUM,DFN,MPIFICN,MPIICN,MPICHKSM,MPINODE
+3 SET RPCPAR=$PIECE(DGDATA,"^")
SET DFN=$PIECE(DGDATA,"^",3)
SET MPIFICN=$PIECE(DGDATA,"^",4)
+4 SET MPIICN=$PIECE(MPIFICN,"V")
SET MPICHKSM=$PIECE(MPIFICN,"V",2)
+5 SET MPINODE=$GET(^DPT(DFN,"MPI"))
SET VICN=$PIECE(MPINODE,"^")
SET VCHKSUM=$PIECE(MPINODE,"^",2)
+6 SET VFULLICN=$PIECE(MPINODE,"^",10)
+7 ;Only SHOW
IF RPCPAR="S"
SET RETURN=VFULLICN_"^"_VICN_"^"_VCHKSUM
QUIT
+8 ;If input parameter is for Update
+9 IF RPCPAR="U"
Begin DoDot:1
+10 NEW DGFDA,DGERR
+11 SET DGFDA(2,DFN_",",991.1)=MPIFICN
+12 SET DGFDA(2,DFN_",",991.01)=MPIICN
+13 SET DGFDA(2,DFN_",",991.02)=MPICHKSM
+14 DO FILE^DIE("","DGFDA","DGERR")
+15 IF $DATA(DGERR)
SET RETURN="-1^Error filing data into Patient file - "_$GET(DGERR("DIERR",1,"TEXT",1))
QUIT
+16 SET MPINODE=$GET(^DPT(DFN,"MPI"))
SET VICN=$PIECE(MPINODE,"^")
SET VCHKSUM=$PIECE(MPINODE,"^",2)
+17 SET VFULLICN=$PIECE(MPINODE,"^",10)
+18 SET RETURN=VFULLICN_"^"_VICN_"^"_VCHKSUM
End DoDot:1
QUIT
+19 QUIT