source: WorldVistAEHR/trunk/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/VSITCK1.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: 1.2 KB
RevLine 
[613]1VSITCK1 ;ISD/RJP - Visit Field Check (continued) ;6/20/96
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**76**;Aug 12, 1996
3 ; Patch PX*1*76 changes the 2nd line of all VSIT* routines to reflect
4 ; the incorporation of the module into PCE. For historical reference,
5 ; the old (VISIT TRACKING) 2nd line is included below to reference VSIT
6 ; patches.
7 ;
8 ;;2.0;VISIT TRACKING;;Aug 12, 1996;
9 ;
10 Q ; - not an entry point
11 ;
12IP(VDT,PAT) ; - check inpatient status
13 ;
14 ; - rtns <ien of patient movement>
15 ;
16 N VADMVT,VAINDT,VAERR
17 N IPM,DFN
18 S VDT=$G(VDT),PAT=$G(PAT)
19 S VAINDT=VDT,DFN=+$G(PAT) D ADM^VADPT2
20 S IPM=$S(+VADMVT>0:+VADMVT,1:"")
21 ; - dom pt is not an inpatient (from ^SDAM2)
22 I $P(^DG(43,1,0),"^",21),$P($G(^DIC(42,+$P($G(^DGPM(+VADMVT,0)),"^",6),0)),"^",3)="D" S IPM=""
23 Q IPM
24 ;
25INS4LOC(LOC) ; - Get Institution for a given Location
26 ;
27 N INS S LOC=$G(LOC),INS=""
28 D:+LOC
29 . S INS=$P(^SC(LOC,0),"^",15)
30 . S:+INS INS=$P($G(^DG(40.8,INS,0)),"^",7)
31 . S INS=$S(+INS&$D(^DIC(4,+INS,0)):INS,1:"")
32 Q INS
33 ;
34DSS4LOC(LOC) ; - Get Clinic Stop Code for a given Location
35 ;
36 N DSS S LOC=$G(LOC),DSS=""
37 D:+LOC
38 . S DSS=$P($G(^SC(LOC,0)),"^",7) S:DSS'=+DSS DSS=""
39 Q DSS
40 ;
Note: See TracBrowser for help on using the repository browser.