ESPMNI2 ;DALISC/CKA - MASTER NAME EDIT;5/92
;;1.0;POLICE & SECURITY;**14**;Mar 31, 1994
EN ;
D DT^DICRW
MNI S DIR(0)="PO^910:AEQMZ" D ^DIR K DIR
G:Y'>0!$D(DIRUT) EXIT
S ESPFN=+Y
FDISP ;Displays a master name input record- ESPFN must be defined
;Called from ESPMNI, ESPMNI1,
;Returns ESPFN
G:'$D(^ESP(910,ESPFN,0)) EXIT
S ESP0=^ESP(910,ESPFN,0),ESP1=$G(^(1)),ESP2=$G(^(2)),ESP3=$G(^(3))
;Initializing ESPD array to print record
F I=1:1:11 S ESPD(I)=$P(ESP0,U,I)
F I=12:1:17 S ESPD(I)=$P(ESP1,U,I-11)
F I=18:1:23 S ESPD(I)=$P(ESP2,U,I-17)
F I=24:1:29 S ESPD(I)=$P(ESP3,U,I-23)
W !!,"1) Name: ",ESPD(1),?40,"2) Height: ",ESPD(24)
W !?3,"SSN: ",ESPD(2),?43,"Weight: ",ESPD(25)
W !?3,"DOB: " S Y=ESPD(3) D DD^%DT W Y,?43,"Hair Color: ",$S($G(^ESP(910.7,+ESPD(26),0))]"":$P(^(0),U),1:""),!?3,"SEX: ",ESPD(8)
W ?43,"Eye Color: ",$S($G(^ESP(910.7,+ESPD(27),0))]"":$P(^(0),U),1:"")
W !?3,"RACE: ",$S($G(^DIC(10,+ESPD(9),0))]"":$P(^(0),U),1:"")
W ?43,"Skin Tone: ",$S($G(^ESP(910.7,+ESPD(28),0))]"":$P(^(0),U),1:"")
W !?3,"Category: ",ESPD(4)
W ?43,"Scars/Marks: "
W !?3,"Driver's License #: ",ESPD(10),?43,$E(ESPD(29),1,35)
W !?3,"State: ",$S($G(^DIC(5,+ESPD(11),0))]"":$P(^(0),U,1),1:"")
W !,"3) Service: ",$S($G(^DIC(49,+ESPD(5),0))]"":$P(^(0),U,1),1:"")
W !?3,"ID Badge: ",ESPD(7)
D MORE G:$D(DTOUT) EXIT I 'Y G RD
W !,"4) Place of Employment: ",?40,"5) Home Address: "
W !?3,ESPD(6),?43,ESPD(12)
W !?3,"Address: ",?43,"Home Address [Line 2]: "
W !?3,ESPD(18),?43,ESPD(13)
W !?3,"Address [Line 2]: ",?43,"City: ",ESPD(14)
W !?3,ESPD(19),?43,"State: ",$S($G(^DIC(5,+ESPD(15),0))]"":$P(^(0),U),1:"")
W !?3,"City: ",ESPD(20),?43,"Zip: ",ESPD(16)
W !?3,"State: ",$S($G(^DIC(5,+ESPD(21),0))]"":$P(^(0),U),1:""),?43,"Home Phone: ",ESPD(17)
W !?3,"Zip: ",ESPD(22)
W !?3,"Office Phone: ",ESPD(23)
D MORE G:$D(DTOUT) EXIT I 'Y G RD
;Print Aliases
W !,"6) " S ESPAKA=0 W:$O(^ESP(910,ESPFN,10,ESPAKA))'>0 "Alias: "
F I=1:1 S ESPAKA=$O(^ESP(910,ESPFN,10,ESPAKA)) Q:ESPAKA'>0 S ESPAKA(I)=$P(^(ESPAKA,0),U) W:I'=1 ?3 W "Alias ",I,": ",ESPAKA(I),!
;Print Remarks
W !,"7) Remarks: " K ^UTILITY($J,"W") S DIWL=10,DIWR=70,DIWF="W",ESPREM=0
F ESPZ=1:1 S ESPREM=$O(^ESP(910,ESPFN,20,ESPREM)) Q:ESPREM'>0 S X=^(ESPREM,0) D ^DIWP
D ^DIWW
RD R !,"Enter: <RET> to continue or 1-7 to edit: ",X:DTIME
G:X["?" HELP
G:'X EXIT
F I=1:1 S ESPX(I)=$P(X,",",I) Q:ESPX(I)=""
F I=1:1:$L(ESPX(I),",") I ESPX(I)<1!(ESPX(I)>7) W !,$C(7),"NUMBER MUST BE 1-7" S ER=1
I $D(ER) K ER W ! G RD
EDIT ;
W !!
L +^ESP(910,ESPFN):0
E W !!?5,"Record is in use. Try later.",!,$C(7) G EXIT
S DIE="^ESP(910,",DA=ESPFN,DR=""
F I=1:1 Q:ESPX(I)="" S DR=DR_$P($T(DR+ESPX(I)),";;",2) I ESPX(I+1)'="" S DR=DR_";"
D ^DIE K DR,DIE
L -^ESP(910,ESPFN):0
G:$D(DTOUT) EXIT
W !!,"Editing completed."
REV S DIR(0)="Y",DIR("A")="Do you want to review again",DIR("B")="YES" D ^DIR K DIR I Y G FDISP
EXIT W:$D(DTOUT) $C(7)
K %X,%Y,DA,DIC,DIE,DIR,DIRUT,DIWF,DIWL,DIWR,DR,ER,ESP0,ESP1,ESP2,ESP3,ESPAKA,ESPD,ESPDOB,ESPJ,ESPNO,ESPREM,ESPX,ESPZ,I,IEN,X,Y,^TMP($J,"MNI")
QUIT
MORE S DIR(0)="Y",DIR("A")="Show More",DIR("B")="YES" D ^DIR K DIR Q
HELP W !!,"Enter '^' to stop or <RET> to continue or enter the number by the fields you want to edit. You may enter any combination of numbers separated by commas (ex: 1,3,5)",! G RD
DR ;
;;.01;.02;.03;.08;.09;.04;.1;.11
;;3.01:3.06
;;.05;.07;2.06
;;.06;2.01:2.06
;;1.01:1.06
;;10
;;20
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HESPMNI2 3500 printed Dec 13, 2024@02:29:47 Page 2
ESPMNI2 ;DALISC/CKA - MASTER NAME EDIT;5/92
+1 ;;1.0;POLICE & SECURITY;**14**;Mar 31, 1994
EN ;
+1 DO DT^DICRW
MNI SET DIR(0)="PO^910:AEQMZ"
DO ^DIR
KILL DIR
+1 if Y'>0!$DATA(DIRUT)
GOTO EXIT
+2 SET ESPFN=+Y
FDISP ;Displays a master name input record- ESPFN must be defined
+1 ;Called from ESPMNI, ESPMNI1,
+2 ;Returns ESPFN
+3 if '$DATA(^ESP(910,ESPFN,0))
GOTO EXIT
+4 SET ESP0=^ESP(910,ESPFN,0)
SET ESP1=$GET(^(1))
SET ESP2=$GET(^(2))
SET ESP3=$GET(^(3))
+5 ;Initializing ESPD array to print record
+6 FOR I=1:1:11
SET ESPD(I)=$PIECE(ESP0,U,I)
+7 FOR I=12:1:17
SET ESPD(I)=$PIECE(ESP1,U,I-11)
+8 FOR I=18:1:23
SET ESPD(I)=$PIECE(ESP2,U,I-17)
+9 FOR I=24:1:29
SET ESPD(I)=$PIECE(ESP3,U,I-23)
+10 WRITE !!,"1) Name: ",ESPD(1),?40,"2) Height: ",ESPD(24)
+11 WRITE !?3,"SSN: ",ESPD(2),?43,"Weight: ",ESPD(25)
+12 WRITE !?3,"DOB: "
SET Y=ESPD(3)
DO DD^%DT
WRITE Y,?43,"Hair Color: ",$SELECT($GET(^ESP(910.7,+ESPD(26),0))]"":$PIECE(^(0),U),1:""),!?3,"SEX: ",ESPD(8)
+13 WRITE ?43,"Eye Color: ",$SELECT($GET(^ESP(910.7,+ESPD(27),0))]"":$PIECE(^(0),U),1:"")
+14 WRITE !?3,"RACE: ",$SELECT($GET(^DIC(10,+ESPD(9),0))]"":$PIECE(^(0),U),1:"")
+15 WRITE ?43,"Skin Tone: ",$SELECT($GET(^ESP(910.7,+ESPD(28),0))]"":$PIECE(^(0),U),1:"")
+16 WRITE !?3,"Category: ",ESPD(4)
+17 WRITE ?43,"Scars/Marks: "
+18 WRITE !?3,"Driver's License #: ",ESPD(10),?43,$EXTRACT(ESPD(29),1,35)
+19 WRITE !?3,"State: ",$SELECT($GET(^DIC(5,+ESPD(11),0))]"":$PIECE(^(0),U,1),1:"")
+20 WRITE !,"3) Service: ",$SELECT($GET(^DIC(49,+ESPD(5),0))]"":$PIECE(^(0),U,1),1:"")
+21 WRITE !?3,"ID Badge: ",ESPD(7)
+22 DO MORE
if $DATA(DTOUT)
GOTO EXIT
IF 'Y
GOTO RD
+23 WRITE !,"4) Place of Employment: ",?40,"5) Home Address: "
+24 WRITE !?3,ESPD(6),?43,ESPD(12)
+25 WRITE !?3,"Address: ",?43,"Home Address [Line 2]: "
+26 WRITE !?3,ESPD(18),?43,ESPD(13)
+27 WRITE !?3,"Address [Line 2]: ",?43,"City: ",ESPD(14)
+28 WRITE !?3,ESPD(19),?43,"State: ",$SELECT($GET(^DIC(5,+ESPD(15),0))]"":$PIECE(^(0),U),1:"")
+29 WRITE !?3,"City: ",ESPD(20),?43,"Zip: ",ESPD(16)
+30 WRITE !?3,"State: ",$SELECT($GET(^DIC(5,+ESPD(21),0))]"":$PIECE(^(0),U),1:""),?43,"Home Phone: ",ESPD(17)
+31 WRITE !?3,"Zip: ",ESPD(22)
+32 WRITE !?3,"Office Phone: ",ESPD(23)
+33 DO MORE
if $DATA(DTOUT)
GOTO EXIT
IF 'Y
GOTO RD
+34 ;Print Aliases
+35 WRITE !,"6) "
SET ESPAKA=0
if $ORDER(^ESP(910,ESPFN,10,ESPAKA))'>0
WRITE "Alias: "
+36 FOR I=1:1
SET ESPAKA=$ORDER(^ESP(910,ESPFN,10,ESPAKA))
if ESPAKA'>0
QUIT
SET ESPAKA(I)=$PIECE(^(ESPAKA,0),U)
if I'=1
WRITE ?3
WRITE "Alias ",I,": ",ESPAKA(I),!
+37 ;Print Remarks
+38 WRITE !,"7) Remarks: "
KILL ^UTILITY($JOB,"W")
SET DIWL=10
SET DIWR=70
SET DIWF="W"
SET ESPREM=0
+39 FOR ESPZ=1:1
SET ESPREM=$ORDER(^ESP(910,ESPFN,20,ESPREM))
if ESPREM'>0
QUIT
SET X=^(ESPREM,0)
DO ^DIWP
+40 DO ^DIWW
RD READ !,"Enter: <RET> to continue or 1-7 to edit: ",X:DTIME
+1 if X["?"
GOTO HELP
+2 if 'X
GOTO EXIT
+3 FOR I=1:1
SET ESPX(I)=$PIECE(X,",",I)
if ESPX(I)=""
QUIT
+4 FOR I=1:1:$LENGTH(ESPX(I),",")
IF ESPX(I)<1!(ESPX(I)>7)
WRITE !,$CHAR(7),"NUMBER MUST BE 1-7"
SET ER=1
+5 IF $DATA(ER)
KILL ER
WRITE !
GOTO RD
EDIT ;
+1 WRITE !!
+2 LOCK +^ESP(910,ESPFN):0
+3 IF '$TEST
WRITE !!?5,"Record is in use. Try later.",!,$CHAR(7)
GOTO EXIT
+4 SET DIE="^ESP(910,"
SET DA=ESPFN
SET DR=""
+5 FOR I=1:1
if ESPX(I)=""
QUIT
SET DR=DR_$PIECE($TEXT(DR+ESPX(I)),";;",2)
IF ESPX(I+1)'=""
SET DR=DR_";"
+6 DO ^DIE
KILL DR,DIE
+7 LOCK -^ESP(910,ESPFN):0
+8 if $DATA(DTOUT)
GOTO EXIT
+9 WRITE !!,"Editing completed."
REV SET DIR(0)="Y"
SET DIR("A")="Do you want to review again"
SET DIR("B")="YES"
DO ^DIR
KILL DIR
IF Y
GOTO FDISP
EXIT if $DATA(DTOUT)
WRITE $CHAR(7)
+1 KILL %X,%Y,DA,DIC,DIE,DIR,DIRUT,DIWF,DIWL,DIWR,DR,ER,ESP0,ESP1,ESP2,ESP3,ESPAKA,ESPD,ESPDOB,ESPJ,ESPNO,ESPREM,ESPX,ESPZ,I,IEN,X,Y,^TMP($JOB,"MNI")
+2 QUIT
MORE SET DIR(0)="Y"
SET DIR("A")="Show More"
SET DIR("B")="YES"
DO ^DIR
KILL DIR
QUIT
HELP WRITE !!,"Enter '^' to stop or <RET> to continue or enter the number by the fields you want to edit. You may enter any combination of numbers separated by commas (ex: 1,3,5)",!
GOTO RD
DR ;
+1 ;;.01;.02;.03;.08;.09;.04;.1;.11
+2 ;;3.01:3.06
+3 ;;.05;.07;2.06
+4 ;;.06;2.01:2.06
+5 ;;1.01:1.06
+6 ;;10
+7 ;;20