source: FOIAVistA/trunk/r/MASTER_PATIENT_INDEX_VISTA-MPIF/MPIFNEW.m@ 1713

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

initial load of FOIAVistA 6/30/08 version

File size: 1.2 KB
Line 
1MPIFNEW ;BHM/RGY-Create new request for patient demographic change ;FEB 20, 1998
2 ;;1.0; MASTER PATIENT INDEX VISTA **11**;;30 Apr 99
3ADD(RNO) ;
4 ;This function allows the addition of new CMOR Change requests to be
5 ;added to the 984.9 file
6 ; RNO - is the site making the request, optional
7 ;Returned: is the IEN of the new entry in 984.9
8 ; OR 0 if no entry is added.
9 ;
10 N DIC,D0,DIE,DA,X,DLAYGO,DR,RGOK,EVN,DINUM
11 S RNO=$G(RNO)
12 F EVN=+$P(^MPIF(984.9,0),"^",3)+1:1 L +^MPIF(984.9,EVN):0 I $T S RGOK=0 D L -^MPIF(984.9,EVN) Q:RGOK
13 .I $D(^MPIF(984.9,EVN)) Q
14 .S DINUM=EVN,DIC="^MPIF(984.9,",DIC(0)="L",DLAYGO=984.9,X=$S(RNO="":$P($$SITE^VASITE(),"^",3)_"-"_EVN,1:RNO) K DD,D0 D FILE^DICN K DIC,DLAYGO,D0
15 .S DIE="^MPIF(984.9,",DR="[MPIF OPEN REQUEST]",DA=EVN D ^DIE
16 .S RGOK=1
17 .Q
18Q Q EVN
19 ;
20EDIT ; edit existing Requests that have a status of OPEN
21 ;select a patient to edit request
22 ;
23 N ERR,PT,Y
24 S DIC="^MPIF(984.9,",DIC(0)="AEMQZ",DIC("A")="Select Patient's Request you would like to edit (Must have a Status of Open): ",DIC("S")="I $D(^MPIF(984.9,""AC"",1,Y))"
25 D ^DIC
26 Q:+Y<0
27 S PT=$P(^MPIF(984.9,+Y,0),"^",4)
28 I +PT<0 W !,"No Patient associated with this Request." Q
29 S DA=+Y
30 D EDIT^MPIFEDIT
31 K DA,ERR
32 Q
Note: See TracBrowser for help on using the repository browser.