source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGRP12.m@ 691

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

initial load of WorldVistAEHR

File size: 911 bytes
Line 
1DGRP12 ;ALB/MRL - REGISTRATION SCREEN 12/ADMISSION INFORMATION ;06 JUN 88@2300
2 ;;5.3;Registration;;Aug 13, 1993
3 S DGRPS=12 D H^DGRPU S DGRPW=1,(Z,C)=0 F I=0:0 S I=$O(^DGPM("ATID1",DFN,I)) Q:'I!(C=4) S I1=$O(^(I,0)) I $D(^DGPM(I1,0)) S I1=^(0),I2=$S($D(^DGPM(+$P(I1,"^",17),0)):^(0),1:""),C=C+1 D ADM
4 I 'C W !!,"NO ADMISSION DATA ON FILE FOR THIS PATIENT!!",*7
5 G ^DGRPP
6ADM S Z=C D WW^DGRPV W " Admission Date: " S Y=$P(I1,"^",1) X:Y]"" ^DD("DD") S Z=$S(Y]"":Y,1:DGRPU),Z1=25 D WW1^DGRPV W "Admit Ward: ",$S($D(^DIC(42,+$P(I1,"^",6),0)):$P(^(0),"^",1),1:DGRPU)
7 W !?4,"Admit Diagnosis: ",$S($P(I1,"^",10)]"":$P(I1,"^",10),1:DGRPU),!?5,"Discharge Date: " S Y=$S(+I2:+I2,1:"") X:Y ^DD("DD") W $S(Y]"":Y,1:"NOT DISCHARGED")
8 W !?5,"Discharge Type: ",$S($D(^DG(405.1,+$P(I2,"^",4),0)):$P(^(0),"^",1),1:$S(+I2>0:DGRPU,1:"NOT DISCHARGED")) I $P(I2,"^",5),$D(^DIC(4,+$P(I2,"^",5),0)) W " TO '",$P(^(0),"^",1),"'"
Note: See TracBrowser for help on using the repository browser.