source: FOIAVistA/trunk/r/POLICE_AND_SECURITY-ES/ESPMNI.m@ 1328

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1ESPMNI ;DALISC/CKA - MASTER NAME INPUT;5/92
2 ;;1.0;POLICE & SECURITY;;Mar 31, 1994
3EN ;
4 ;Called from ^ESPOFF,
5 ;ESPVAR=1 Master Name Input
6 ;ESPVAR=2 Vehicle Registration
7 ;ESPVAR=3 Offense Report
8 ;ESPVAR=4 Violation Notice
9 ;returns ESPFN- internal entry # of Master Name Index file
10 S:'$D(ESPVAR) ESPVAR=1 S ESPNO=0 D DT^DICRW F I=.01:.01:.11 S ESPD(I)="",ESPD(I,"P")=""
11 F I=1.01:.01:1.06 S ESPD(I)="",ESPD(I,"P")=""
12 F I=2.01:.01:2.06 S ESPD(I)="",ESPD(I,"P")=""
13 F I=3.01:.01:3.06 S ESPD(I)="",ESPD(I,"P")=""
14X S DIR(0)="FO^1:30",DIR("A")="NAME",DIR("?")="Enter the name in'Last,First Middle' format [<30 characters]. You may also enter part of the name for lookup purposes",DIR("??")="^S D=""B"",DIC=""^ESP(910,"",DIC(0)=""EZ"" D DQ^DICQ K DIC"
15 D ^DIR K DIR I $D(DIRUT) K ESPFN G EXIT
16 S ESPX=Y
17LKUP S DIC="^ESP(910,",DIC(0)="EMZ" D ^DIC K DIC S ESPFN=+Y
18 I $D(DTOUT) G NOU
19 I Y'<0 D FND G:Y["^"!($D(DTOUT)) NOU G:ESPNO ADD G:ESPVAR=1&('Y) EN G:ESPVAR=2&('Y) NUM^ESPVREG G:ESPVAR=3&('Y) RET G:ESPVAR=4&('Y) RETV D FDISP^ESPMNI2 G:$D(DTOUT) EXIT G:ESPVAR=1 EN G:ESPVAR=2 NUM^ESPVREG G:ESPVAR=3 RET G:ESPVAR=4 RETV G EXIT
20 I Y<0 W !! G:$D(DUOUT) X
21 S DIC(0)="E" D LAYGO^ESPXREF W !! G:$D(ESPOUT) EXIT G:'X X G:X NAME
22ADD S DIR(0)="Y",DIR("A")="Do you want to add this name",DIR("B")="YES" D ^DIR G:$D(DIRUT) NOU K DIR
23 I 'Y G X
24NAME D ^ESPMNI0 G:$D(DUOUT)!('$D(ESPFN)) EN G:$D(DTOUT) EXIT
25 G CONT^ESPMNI1
26EXIT W:$D(DTOUT) $C(7)
27 K %X,%Y,DA,DIC,DIR,DIRUT,DIWF,DIWL,DIWR,DUOUT,ESPAKA,ESPD,ESPDOB,ESPOUT,ESPJ,ESPNO,ESPX,I,IEN,X,Y,^TMP($J,"MNI")
28 I ESPVAR=1 K ESPFN,ESPVAR
29 QUIT
30NOU W !!,$C(7),?20,"NO UPDATING HAS OCCURRED!!!",!! K DIR,ESPAKA,ESPD,^TMP($J,"MNI") G:$D(DTOUT) EXIT G EN
31FND ;this entry exists already
32 S Y=$P(Y(0),U,3) D DD^%DT S ESPDOB=Y,ESPNO=0
33 W !!,"This name is already in the Master Name Index file.",!!?5,"Name: ",$P(Y(0),U),?40,"SSN: ",$P(Y(0),U,2),!?5,"DOB: ",ESPDOB,?25,"SEX: ",$P(Y(0),U,8),?35,"RACE: ",$S($D(^DIC(10,+$P(Y(0),U,9),0)):$P(^DIC(10,+$P(Y(0),U,9),0),U),1:""),!
34 S DIR(0)="Y",DIR("A")="Is this the correct one" D ^DIR K DIR
35 I 'Y S ESPNO=1 Q
36YN1 S DIR(0)="Y",DIR("A")="Do you want to edit this record",DIR("B")="NO" D ^DIR K DIR W !! Q
37RET W !,"Now returning to the Offense Report!" G EXIT
38RETV W !,"Now returning to the Violation Notice!" G EXIT
Note: See TracBrowser for help on using the repository browser.