Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DGRPU1

DGRPU1.m

Go to the documentation of this file.
  1. DGRPU1 ;ALB/REW,JAM - CUSTOM LOAD/EDIT SCREEN UTILITIES ;19 Oct 2017 3:02 PM
  1. ;;5.3;Registration;**139,169,415,527,508,664,941**;Aug 13, 1993;Build 73
  1. ;
  1. ; *941* - JAM; 1. Tag QNUM modified for new field reference numbers used in ^DGRPE due to redesign of Screen layouts for screen 1 and 1.1
  1. ; Previous values: ^104^105^109,105,112^109,105,111^111^
  1. ; New values: ^108^113^109,113,104^109,113,114^114^
  1. ;
  1. QUES(DFN,DGQCODE) ; EDIT SPECIFIC PORTIONS OF REGISTRATION DATA
  1. ;
  1. ; INPUT:
  1. ; DFN
  1. ; DGQCODE = Code for question(s) to be asked
  1. ; OUTPUT:
  1. ; DGERR = ERROR VARIABLE
  1. ; DGCHANGE= 1 IF DATA MODIFIED 0 O/W
  1. ; USED:
  1. ; DGPTND = Prior value(s) of Patient File node(s) [array]
  1. ; DGQNODES= Node(s) used above
  1. ; DGNODE = Single node
  1. ; DGDR = edit=screen*10+item #
  1. ; DGRPS = Screen #
  1. ; DGCODE = CODE used by ^DGRPE
  1. ; DGQ = String of ^DGCODE^DGCODE etc.
  1. ; DGPC = Piece Number
  1. ; DGX = Line Tag offset
  1. ;
  1. N D,D0,DI,DIC,DGCODE,DGDR,DGNODE,DGQNODES,DGPC,DGPTND,DGRPS,DGQ,DGX
  1. N DQ,N,X,Y,%Y,DGPTNDM
  1. S (DGERR,DGRPS,DGCHANGE)=0
  1. I '($G(DFN)&$D(DGQCODE)) G QTE
  1. F DGX=1:1 S DGQ=$T(QDES+DGX) Q:DGQ[(U_DGQCODE_U)!(DGQ']"")
  1. F DGPC=2:1 S DGCODE=$P(DGQ,U,DGPC) Q:(DGCODE']"")!(DGCODE=DGQCODE)
  1. G:DGCODE']"" QTE
  1. S DGDR=$P($T(QNUM+DGX),U,DGPC)
  1. S DGRPS=DGDR\100
  1. S DGQNODES=$P($T(QNODE+DGX),U,DGPC)
  1. F N=1:1 S DGNODE=$P(DGQNODES,"~",N) Q:DGNODE']"" S DGPTND(DGNODE)=$G(^DPT(DFN,DGNODE))
  1. S DGQNODES=$P($T(MNODE+DGX),U,DGPC)
  1. F N=1:1 S DGNODE=$P(DGQNODES,"~",N) Q:DGNODE']"" M DGPTNDM(DGNODE)=^DPT(DFN,DGNODE) S DGPTNDM(DGNODE)=""
  1. D ^DGRPE
  1. F DGNODE=0:0 S DGNODE=$O(DGPTND(DGNODE)) Q:DGNODE']"" S:$G(^DPT(DFN,DGNODE))'=(DGPTND(DGNODE)) DGCHANGE=1
  1. S DGNODE="" F S DGNODE=$O(DGPTNDM(DGNODE)) Q:DGNODE']"" D Q:DGCHANGE
  1. .S X=0 F S X=$O(DGPTNDM(DGNODE,X)) Q:'X D Q:DGCHANGE
  1. ..S Y="" F S Y=$O(DGPTNDM(DGNODE,X,Y)) Q:Y']"" D Q:DGCHANGE
  1. ...I $G(^DPT(DFN,DGNODE,X,Y))'=DGPTNDM(DGNODE,X,Y) S DGCHANGE=1
  1. .Q:DGCHANGE
  1. .S X=0 F S X=$O(^DPT(DGNODE,X)) Q:'X D Q:DGCHANGE
  1. ..S Y="" F S Y=$O(^DPT(DGNODE,X,Y)) Q:Y']"" D Q:DGCHANGE
  1. ...I $G(^DPT(DFN,DGNODE,X,Y))'=DGPTNDM(DGNODE,X,Y) S DGCHANGE=1
  1. QTE I 'DGRPS S DGERR=1
  1. QTQ Q
  1. QDES ;MNEMONIC - DGQCODE should match with one of these
  1. ;;^ADD1^ADD2^ADD^ADD3^ADD4^
  1. QNUM ;REFERENCE NUMBERS USED TO SET DGDR FOR USE BY ^DGRPE
  1. ;;^108^113^109,113,104^109,113,114^114^
  1. QNODE ;;NODES OF THE PATIENT FILE
  1. ;;^.11~.13^.121^.11~.121~.13^.11~.121~.13~.141^.141^
  1. ;;
  1. MNODE ;;MULTIPLES OF THE PATIENT FILE
  1. ;;^^^.02~.06^.02~.06~.14^.14^