DGRP ;ALB/MRL - REGISTRATION ENTRY POINT ;06 JUN 88@2300
;;5.3;Registration;**108,114,250,1040**;Aug 13, 1993;Build 15
;
EN W ! S DIC="^DPT(",DIC(0)="AEQMZ" S:$S(('$D(DGRPV)#2):0,DGRPV:0,1:1) DIC(0)=DIC(0)_"L" D ^DIC
I +Y'>0 D QQ^DGRPP Q
K DIRUT,DUOUT,DTOUT
S DFN=+Y I $P(Y,"^",3) D NEW
K DA,DIC
Q
;
; The following tags are used by external packages. Input DFN as
; IEN of PATIENT file. Consistency checker is automatically called.
; Screen edit allowed if DGRPV=0
;
ENED S DGRPV=0
EN1 I $G(DGRPV)=0 L +^DPT(DFN):3 E D MSG Q
D ^DGRPV
I $G(DGRPV)=0 L -^DPT(DFN)
EN2 I $G(DGRPV)=0 L +^DPT(DFN):3 E D MSG Q
D ^DGRP1
; DG*5.3*1040 - Display MT info, if no timeout
I '+$G(DGRPOUT) D DISPMAS^DGMTCOU1(DFN) ;DIPLAY MT FILE CP STATUS
I $G(DGRPV)=0 L -^DPT(DFN)
Q
;
VIEW S DGRPV=1 D EN Q:$S(('$D(Y)#2):1,Y'>0:1,1:0) D EN1 G VIEW
ELV S DGRPV=1,DGELVER=1 D EN Q:$S(('$D(Y)#2):1,Y'>0:1,1:0) D G ELV
. L +^DPT(DFN):3 E D MSG Q
. D ENED
. L -^DPT(DFN)
ELVD Q:'$D(DFN)#2 S DGELVER=1,DGRPV=0 D EN1 Q
;
NEW ;if new patient xecute new patient dr string (from patient type)
;called from DG10, DGPMV, DGRPTU and DGREG
;
;use DGRPX as scratch variable
I $D(^DPT(DFN,"TYPE")),$D(^DG(391,+^("TYPE"),"DR")),^("DR")]"" X ^("DR") S DIE="^DPT(",DA=DFN D ^DIE
K DGRPX Q
;
MSG ;If lock fails:
W *7,!!,"Patient is being edited. Try again later."
Q
;
;
RTNS ;The following is the numbering scheme for the DGRP routines
;
; DGRP : routine driver for registration screens
; DGRP_n : routine for screen n where 1<=n<=15
; DGRPE* : screen edit routines where line tag xy contains the
; DR string to edit. x = screen number, y = edit item
; DGRPH : help processor to display editable screens/data elements
; DGRPP : screen processor (controls display of high intensity, etc)
; DGRPU : utility routine (contains screen header, etc.)
; DGRPV : defines variables necessary for registration screens
;
; DGRPC* : consistency checker
; DGRPD* : data displays (pt inquiries)
;
;Variables set:
;
; DGRPV : 0 allows edit of data ; 1 for view
; DGELVER : 1 if eligibility verification ; '$D otherwise
;
;
;
FILE ; The following are the numbering schemes for fields in the
; TYPE OF PATIENT file
;
; Fields 1-15 will be a set of codes denoting whether or not a certain
; screen is on or off for that type of patient. Only certain
; screens can be turned off, so not all field numbers will be
; taken.
;
; Data from these fields can be found on node S in the same
; piece position as the field number.
;
; Fields 11-149 will be a set of codes denoting whether a certain data
; element is on or off for editing. The field number is equal
; to SCREEN #_ITEM #.
;
; Items in these field numbers are on the E node in the same
; piece position as the field number.
;
; note: because fileman does not take more than 100 pieces on
; a node, items on screen 10 or higher were put on node
; E10 on piece SCREEN#_ITEM#-100.
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGRP 3185 printed Oct 16, 2024@18:55:59 Page 2
DGRP ;ALB/MRL - REGISTRATION ENTRY POINT ;06 JUN 88@2300
+1 ;;5.3;Registration;**108,114,250,1040**;Aug 13, 1993;Build 15
+2 ;
EN WRITE !
SET DIC="^DPT("
SET DIC(0)="AEQMZ"
if $SELECT(('$DATA(DGRPV)#2)
SET DIC(0)=DIC(0)_"L"
DO ^DIC
+1 IF +Y'>0
DO QQ^DGRPP
QUIT
+2 KILL DIRUT,DUOUT,DTOUT
+3 SET DFN=+Y
IF $PIECE(Y,"^",3)
DO NEW
+4 KILL DA,DIC
+5 QUIT
+6 ;
+7 ; The following tags are used by external packages. Input DFN as
+8 ; IEN of PATIENT file. Consistency checker is automatically called.
+9 ; Screen edit allowed if DGRPV=0
+10 ;
ENED SET DGRPV=0
EN1 IF $GET(DGRPV)=0
LOCK +^DPT(DFN):3
IF '$TEST
DO MSG
QUIT
+1 DO ^DGRPV
+2 IF $GET(DGRPV)=0
LOCK -^DPT(DFN)
EN2 IF $GET(DGRPV)=0
LOCK +^DPT(DFN):3
IF '$TEST
DO MSG
QUIT
+1 DO ^DGRP1
+2 ; DG*5.3*1040 - Display MT info, if no timeout
+3 ;DIPLAY MT FILE CP STATUS
IF '+$GET(DGRPOUT)
DO DISPMAS^DGMTCOU1(DFN)
+4 IF $GET(DGRPV)=0
LOCK -^DPT(DFN)
+5 QUIT
+6 ;
VIEW SET DGRPV=1
DO EN
if $SELECT(('$DATA(Y)#2)
QUIT
DO EN1
GOTO VIEW
ELV SET DGRPV=1
SET DGELVER=1
DO EN
if $SELECT(('$DATA(Y)#2)
QUIT
Begin DoDot:1
+1 LOCK +^DPT(DFN):3
IF '$TEST
DO MSG
QUIT
+2 DO ENED
+3 LOCK -^DPT(DFN)
End DoDot:1
GOTO ELV
ELVD if '$DATA(DFN)#2
QUIT
SET DGELVER=1
SET DGRPV=0
DO EN1
QUIT
+1 ;
NEW ;if new patient xecute new patient dr string (from patient type)
+1 ;called from DG10, DGPMV, DGRPTU and DGREG
+2 ;
+3 ;use DGRPX as scratch variable
+4 IF $DATA(^DPT(DFN,"TYPE"))
IF $DATA(^DG(391,+^("TYPE"),"DR"))
IF ^("DR")]""
XECUTE ^("DR")
SET DIE="^DPT("
SET DA=DFN
DO ^DIE
+5 KILL DGRPX
QUIT
+6 ;
MSG ;If lock fails:
+1 WRITE *7,!!,"Patient is being edited. Try again later."
+2 QUIT
+3 ;
+4 ;
RTNS ;The following is the numbering scheme for the DGRP routines
+1 ;
+2 ; DGRP : routine driver for registration screens
+3 ; DGRP_n : routine for screen n where 1<=n<=15
+4 ; DGRPE* : screen edit routines where line tag xy contains the
+5 ; DR string to edit. x = screen number, y = edit item
+6 ; DGRPH : help processor to display editable screens/data elements
+7 ; DGRPP : screen processor (controls display of high intensity, etc)
+8 ; DGRPU : utility routine (contains screen header, etc.)
+9 ; DGRPV : defines variables necessary for registration screens
+10 ;
+11 ; DGRPC* : consistency checker
+12 ; DGRPD* : data displays (pt inquiries)
+13 ;
+14 ;Variables set:
+15 ;
+16 ; DGRPV : 0 allows edit of data ; 1 for view
+17 ; DGELVER : 1 if eligibility verification ; '$D otherwise
+18 ;
+19 ;
+20 ;
FILE ; The following are the numbering schemes for fields in the
+1 ; TYPE OF PATIENT file
+2 ;
+3 ; Fields 1-15 will be a set of codes denoting whether or not a certain
+4 ; screen is on or off for that type of patient. Only certain
+5 ; screens can be turned off, so not all field numbers will be
+6 ; taken.
+7 ;
+8 ; Data from these fields can be found on node S in the same
+9 ; piece position as the field number.
+10 ;
+11 ; Fields 11-149 will be a set of codes denoting whether a certain data
+12 ; element is on or off for editing. The field number is equal
+13 ; to SCREEN #_ITEM #.
+14 ;
+15 ; Items in these field numbers are on the E node in the same
+16 ; piece position as the field number.
+17 ;
+18 ; note: because fileman does not take more than 100 pieces on
+19 ; a node, items on screen 10 or higher were put on node
+20 ; E10 on piece SCREEN#_ITEM#-100.
+21 ;
+22 QUIT