source: WorldVistAEHR/trunk/r/POLICE_AND_SECURITY-ES/ESPMNI2.m@ 1800

Last change on this file since 1800 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.3 KB
RevLine 
[613]1ESPMNI2 ;DALISC/CKA - MASTER NAME EDIT;5/92
2 ;;1.0;POLICE & SECURITY;**14**;Mar 31, 1994
3EN ;
4 D DT^DICRW
5MNI S DIR(0)="PO^910:AEQMZ" D ^DIR K DIR
6 G:Y'>0!$D(DIRUT) EXIT
7 S ESPFN=+Y
8FDISP ;Displays a master name input record- ESPFN must be defined
9 ;Called from ESPMNI, ESPMNI1,
10 ;Returns ESPFN
11 G:'$D(^ESP(910,ESPFN,0)) EXIT
12 S ESP0=^ESP(910,ESPFN,0),ESP1=$G(^(1)),ESP2=$G(^(2)),ESP3=$G(^(3))
13 ;Initializing ESPD array to print record
14 F I=1:1:11 S ESPD(I)=$P(ESP0,U,I)
15 F I=12:1:17 S ESPD(I)=$P(ESP1,U,I-11)
16 F I=18:1:23 S ESPD(I)=$P(ESP2,U,I-17)
17 F I=24:1:29 S ESPD(I)=$P(ESP3,U,I-23)
18 W !!,"1) Name: ",ESPD(1),?40,"2) Height: ",ESPD(24)
19 W !?3,"SSN: ",ESPD(2),?43,"Weight: ",ESPD(25)
20 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)
21 W ?43,"Eye Color: ",$S($G(^ESP(910.7,+ESPD(27),0))]"":$P(^(0),U),1:"")
22 W !?3,"RACE: ",$S($G(^DIC(10,+ESPD(9),0))]"":$P(^(0),U),1:"")
23 W ?43,"Skin Tone: ",$S($G(^ESP(910.7,+ESPD(28),0))]"":$P(^(0),U),1:"")
24 W !?3,"Category: ",ESPD(4)
25 W ?43,"Scars/Marks: "
26 W !?3,"Driver's License #: ",ESPD(10),?43,$E(ESPD(29),1,35)
27 W !?3,"State: ",$S($G(^DIC(5,+ESPD(11),0))]"":$P(^(0),U,1),1:"")
28 W !,"3) Service: ",$S($G(^DIC(49,+ESPD(5),0))]"":$P(^(0),U,1),1:"")
29 W !?3,"ID Badge: ",ESPD(7)
30 D MORE G:$D(DTOUT) EXIT I 'Y G RD
31 W !,"4) Place of Employment: ",?40,"5) Home Address: "
32 W !?3,ESPD(6),?43,ESPD(12)
33 W !?3,"Address: ",?43,"Home Address [Line 2]: "
34 W !?3,ESPD(18),?43,ESPD(13)
35 W !?3,"Address [Line 2]: ",?43,"City: ",ESPD(14)
36 W !?3,ESPD(19),?43,"State: ",$S($G(^DIC(5,+ESPD(15),0))]"":$P(^(0),U),1:"")
37 W !?3,"City: ",ESPD(20),?43,"Zip: ",ESPD(16)
38 W !?3,"State: ",$S($G(^DIC(5,+ESPD(21),0))]"":$P(^(0),U),1:""),?43,"Home Phone: ",ESPD(17)
39 W !?3,"Zip: ",ESPD(22)
40 W !?3,"Office Phone: ",ESPD(23)
41 D MORE G:$D(DTOUT) EXIT I 'Y G RD
42 ;Print Aliases
43 W !,"6) " S ESPAKA=0 W:$O(^ESP(910,ESPFN,10,ESPAKA))'>0 "Alias: "
44 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),!
45 ;Print Remarks
46 W !,"7) Remarks: " K ^UTILITY($J,"W") S DIWL=10,DIWR=70,DIWF="W",ESPREM=0
47 F ESPZ=1:1 S ESPREM=$O(^ESP(910,ESPFN,20,ESPREM)) Q:ESPREM'>0 S X=^(ESPREM,0) D ^DIWP
48 D ^DIWW
49RD R !,"Enter: <RET> to continue or 1-7 to edit: ",X:DTIME
50 G:X["?" HELP
51 G:'X EXIT
52 F I=1:1 S ESPX(I)=$P(X,",",I) Q:ESPX(I)=""
53 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
54 I $D(ER) K ER W ! G RD
55EDIT ;
56 W !!
57 L +^ESP(910,ESPFN):0
58 E W !!?5,"Record is in use. Try later.",!,$C(7) G EXIT
59 S DIE="^ESP(910,",DA=ESPFN,DR=""
60 F I=1:1 Q:ESPX(I)="" S DR=DR_$P($T(DR+ESPX(I)),";;",2) I ESPX(I+1)'="" S DR=DR_";"
61 D ^DIE K DR,DIE
62 L -^ESP(910,ESPFN):0
63 G:$D(DTOUT) EXIT
64 W !!,"Editing completed."
65REV S DIR(0)="Y",DIR("A")="Do you want to review again",DIR("B")="YES" D ^DIR K DIR I Y G FDISP
66EXIT W:$D(DTOUT) $C(7)
67 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")
68 QUIT
69MORE S DIR(0)="Y",DIR("A")="Show More",DIR("B")="YES" D ^DIR K DIR Q
70HELP 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
71DR ;
72 ;;.01;.02;.03;.08;.09;.04;.1;.11
73 ;;3.01:3.06
74 ;;.05;.07;2.06
75 ;;.06;2.01:2.06
76 ;;1.01:1.06
77 ;;10
78 ;;20
Note: See TracBrowser for help on using the repository browser.