source: WorldVistAEHR/trunk/r/CONSULT_REQUEST_TRACKING-GMRC-GMRS-GMRT/GMRCPOR.m@ 1556

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1GMRCPOR ;SLC/DCM,DLT - Get DOC,LOC,TS in interactive defaults ;5/20/98 14:20
2 ;;3.0;CONSULT/REQUEST TRACKING;**1**;DEC 27, 1997
3DEM ;Similiar to load of variables done by ORUDPA
4 ;;Call from ^GMRCR0
5 S ORVP=DFN_";DPT(",VA200=1
6 K VAINDT D OERR^VADPT S GMRCPNM=VADM(1),GMRCSN=VA("PID"),GMRCDOB=$P(VADM(3),"^",2),GMRCAGE=VADM(4),SEX=$P(VADM(5),"^")
7 S ORTS=+VAIN(3),ORTS=$S(ORTS:ORTS,1:""),ORNP=+VAIN(2),ORWARD=VAIN(4),GMRCWARD=$P(VAIN(4),"^",2),(GMRCRB,ORL(1))=VAIN(5),(ORL,ORL(0),ORL(2))=""
8 I ORNP,'$D(^VA(200,ORNP,0)) S ORNP=""
9 S ORPV="" I ORNP,$D(^XUSEC("PROVIDER",ORNP)) S ORPV=ORNP
10 S ORATTEND=ORNP
11 I $P(ORWARD,"^")?1N.N S X=+ORWARD I $D(^DIC(42,+X,44)) S X=$P(^(44),"^") I X,$D(^SC(X,0)) S ORL=X_";SC(",ORL(0)=$S($L($P(^(0),"^",2)):$P(^(0),"^",2),1:$E($P(^(0),"^"),1,4)),ORL(2)=ORL
12 D DOC,LOC,DOC1
13 K O,ORL(0),DIC,VA,VAIN,VADM,VAERR,Y
14 Q
15DOC ;Get the requesting clinician
16 S DOC=""
17 I ORNP,$D(^VA(200,+ORNP,0)) S X=$P(^(0),"^") S:$P(^ORD(100.99,1,0),"^",15) DOC=X
18 I $D(ORATTEND),$D(^VA(200,+ORATTEND,0)) S X=$P(^(0),"^") W !!,"Primary Care Physician is "_X,!
19 Q
20DOC1 ;Display Requesting Clinician
21 W !,?5,"Requesting CLINICIAN : ",$S($L(DOC):DOC,1:"****** missing required information ******")
22 Q
23LOC ;GET PT. LOCATION
24 D INP^VADPT,SDE^VADPT
25 D:$L(VAIN(4)) LOC1 S (CT,C)=0,O=1 I $O(^UTILITY("VAEN",$J,0)) W !!,"Currently enrolled in the following clinics: ",!
26 S I=0 F S I=$O(^UTILITY("VAEN",$J,I)) Q:I'>0 S CT=CT+1 W:(CT#2) !?17 W:'(CT#2) ?47 W $P(^UTILITY("VAEN",$J,I,"E"),"^") S C=C+1,C(1)=$P(^("E"),"^") S:C'=1 C=-1
27 K I,VAIN
28 Q
29LOC1 ;Check for patient location
30 W !!,?5,"Patient Location : "_$P(VAIN(4),"^",2) I '$L(VAIN(4)) W "****** missing required information ******"
31 Q
Note: See TracBrowser for help on using the repository browser.