source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVADM.m@ 1150

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

initial load of WorldVistAEHR

File size: 879 bytes
RevLine 
[613]1GMRVADM ;HIRMFO/YH-Determine Patient's Admission, Discharge and Absence Status ;10/1/96
2 ;;4.0;Vitals/Measurements;;Apr 25, 1997
3EN1 ; THIS PROCEDURE RETURNS GMROK=0 IF PATIENT IS IN HOSPITAL, ELSE
4 ; IT RETURNS GMROK=1.
5 I $D(GASSES) S GMROK=0 Q
6 S GMROK=0,GENTR=1 D NOW^%DTC
7ADM ; SAME AS EN1, BUT USES PATIENT'S LAST ADMISSION.
8 S GMROK=0 I '$D(^DGPM("ATID1",DFN)) G Q
9 ;OBTAIN THE LAST ADMISSION IFN
10 S GMRADM=0,GMRADM=$O(^DGPM("ATID1",DFN,GMRADM)) I 'GMRADM G Q
11 I GENTR=2 S VAIP("D")="LAST" D IN5^VADPT S GMRWARD(1)=$P(VAIP(5),"^",2),GMRWARD=$P(VAIP(5),"^")
12 ;CHECK FOR ABSENCE & PASS
13 S VAIP("D")=GDT D IN5^VADPT,DEM^VADPT K VAIP("D")
14 I VADM(6)>0 W !!,$P(VADM(1),"^")_" died on "_$P(VADM(6),"^",2) S GMROK=2 G Q
15 I $G(VAIP(10))=0 W !!,VADM(1)_" on "_$P($G(VAIP(4)),"^",2)_" started on "_$P($G(VAIP(3)),"^",2),! S GMROK=1
16Q K D1,GT,GDG1,GDG2,GVERS,GMRDIS,GMRADM,GENTR
17 Q
Note: See TracBrowser for help on using the repository browser.