source: WorldVistAEHR/trunk/r/MASTER_PATIENT_INDEX_VISTA-MPIF/MPIFNQ.m@ 1211

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

initial load of WorldVistAEHR

File size: 2.6 KB
RevLine 
[613]1MPIFNQ ;BHM/RGY-Miscellaneous functions for CMOR ;FEB 20, 1998
2 ;;1.0; MASTER PATIENT INDEX VISTA ;**11**;30 Apr 99
3 ;
4 ; Integration Agreements Utilized:
5 ;
6 ; ^RGSITE(991.8, IA #2746
7 ;
8 ;
9PAT(IEN) ;Return patient CMOR (Site IEN)
10 NEW RESULT
11 S RESULT=$$GETVCCI^MPIF001(IEN)
12 I RESULT<0 Q ""
13 Q RESULT
14ICN(IEN) ;Return patient ICN
15 NEW RESULT
16 S RESULT=$$GETICN^MPIF001(IEN)
17 I RESULT<0 Q ""
18 Q +RESULT
19IEN(ICN) ;Return patient IEN
20 NEW RESULT
21 S RESULT=$$GETDFN^MPIF001(ICN)
22 I RESULT<0 Q ""
23 Q RESULT
24AUTO() ;
25 NEW TMX
26 S TMX=+$P($G(^RGSITE(991.8,1,0)),"^",2)
27 S:TMX'=1&(TMX'=0) TMX=0
28 Q TMX
29RPT1 ;
30 ; Entry point for option MPIF SENT REQUEST. This option prints
31 ; all outstanding requests for Change of CMOR that this site has sent.
32 ; NO input or output variables.
33 N X1,X2,Y,USER,AGE,DIC,L,BY,FLDS,FROM,TO,DIR,DTOUT,DUTOUT,DIROUT,DIRUT,X
34 S USER=""
35 S DIR("A")="Do you only want to list the requests you entered? ",DIR("B")="YES",DIR(0)="YAO" D ^DIR K DIR Q:$D(DIRUT)
36 I Y=1 S USER=DUZ
37 S DIR("A")="Display requests entered on or before date: ",DIR("B")="TODAY",DIR(0)="DAO^::EP" D ^DIR K DIR Q:$D(DIRUT)
38 S X2=Y,X1=DT D D^%DTC
39 S AGE=X
40 S DIC="^MPIF(984.9,",FLDS="[MPIF OUTSTANDING REQUESTS]",L=0
41 S BY="[MPIF REQUEST SORT]",FR=",,2,"_USER_","_AGE,TO=",,2,"_USER_","
42 D EN1^DIP
43 Q
44RPT2 ;
45 ; Entry point for option: MPIF RECEIVED REQUESTS to list all change
46 ; of CMOR requests that are still outstanding for review/processing
47 ; NO input or output variables.
48 N DIC,L,BY,FLDS,FROM,TO,DIR,DTOUT,DUTOUT,DIROUT
49 S DIC="^MPIF(984.9,",FLDS="[MPIF OUTSTANDING REQUESTS]",L=0
50 S BY="[MPIF PENDING REQUESTS]",FR="",TO=""
51 D EN1^DIP
52 Q
53INQ ;View CMOR request
54 N DIC,FLDS,FR,TO,L,BY,Y
55ASK S DIC="^MPIF(984.9,",DIC(0)="QEAM",DIC("A")="Select Request #: " D ^DIC Q:+Y<0
56 S FR=+Y,TO=+Y,L=0,FLDS="[MPIF REQUEST VIEW]",BY="@NUMBER" D EN1^DIP
57 G ASK
58 Q
59RPT3 ; entry point for Approved Requests
60 ;No input of output variables
61 N FR,DIC,L,BY,FLDS,FROM,TO,DIR,DTOUT,DUTOUT,DIROUT,DIRUT,X
62 S DIR("A")="Display requests APPROVED on or SINCE (date): ",DIR("B")="T-10",DIR(0)="DAO^::EP" D ^DIR K DIR Q:$D(DIRUT)
63 S FROM=Y
64 S DIC="^MPIF(984.9,",FLDS=".06,.01,2.02,.04,.07,1.02,.03"
65 S BY=".06,2.02,.04"
66 S FR="4,"_FROM_","
67 S TO="4,,"
68 D EN1^DIP
69 Q
70RPT4 ; entry point for Disapproved Requests
71 ;No input of output variables
72 N FR,DIC,L,BY,FLDS,FROM,TO,DIR,DTOUT,DUTOUT,DIROUT,DIRUT,X
73 S DIR("A")="Display requests DISAPPROVED on or SINCE (date): ",DIR("B")="T-10",DIR(0)="DAO^::EP" D ^DIR K DIR Q:$D(DIRUT)
74 S FROM=Y
75 S DIC="^MPIF(984.9,",FLDS=".06,.01,2.02,.04,.07,1.02,.03,3.02"
76 S BY=".06,2.02,.04"
77 S FR="5,"_FROM_","
78 S TO="5,,"
79 D EN1^DIP
80 Q
Note: See TracBrowser for help on using the repository browser.