Name | Value |
---|---|
NAME | DGPM WARD AT DISCHARGE |
MUMPS CODE | S X1=X,X="" I $D(^DGPM(+X1,0)) S X2=+$P(^(0),U,3) X "F %=0:0 S %=$O(^DGPM(""APMV"",X2,X1,%)) Q:'% I $D(^DGPM(+$O(^(%,0)),0)),$D(^DIC(42,+$P(^(0),U,6),0)) S X=$P(^(0),U) Q" K X1,X2 |
EXPLANATION | Determines ward of patient at discharge for admission(X). |