1 | YSCEN51 ;ALB/ASF-INPATIENT HX CONT ;4/3/90 10:44 ;
|
---|
2 | ;;5.01;MENTAL HEALTH;;Dec 30, 1994
|
---|
3 | ;
|
---|
4 | 1 ; Called from routine YSCEN55
|
---|
5 | S YSFL5=0,X=0 Q:'$D(^YSG("INP",W1,6)) F S X=$O(^YSG("INP",W1,6,X)) Q:'X S X1=+^(X,0) I $D(YS(X1)) S YSFL5=1 Q
|
---|
6 | Q
|
---|
7 | A ; Called from routine YSCEN55
|
---|
8 | K YS,^UTILITY($J) D UN^YSCEN2 Q:Y<1 S (Q3,P1)=0 D FS0^YSCEN
|
---|
9 | W !!,"Enter each team desired followed by return and end with just a return",!
|
---|
10 | A0 ;
|
---|
11 | W !,"Select ",W2," Team: " R X:DTIME S YSTOUT='$T,YSUOUT=X["^" Q:YSTOUT!YSUOUT
|
---|
12 | S DIC("S")="I $P(^(1),U)=W1,$P(^(1),U,5)'=1",DIC(0)="EQM",DIC="^YSG(""SUB""," D ^DIC K DIC S:Y>0 YS(+Y)="" G:Y>0!(X?1"?".E) A0
|
---|
13 | S:'$D(YS) Q3=1 Q
|
---|
14 | ;
|
---|
15 | ENDOC ; Called from MENU option YSCENDCDOC
|
---|
16 | ;
|
---|
17 | D ^YSLRP G:YSDFN<1 END
|
---|
18 | I '$D(^YSG("INP","C",YSDFN)) W !,"No MH inpatient record found",$C(7) G ENDOC
|
---|
19 | I $D(^YSG("INP","CP",YSDFN)) W !,"Current MH inpatient.. edit through ENTER/EDIT CURRENT INPATIENT DATA option" G ENDOC
|
---|
20 | S (DA,X)=0 F S X=$O(^YSG("INP","C",YSDFN,X)) Q:'X S DA=X
|
---|
21 | DOC ;
|
---|
22 | S (YDA,W1)=DA D ZZ^YSCEN54 S X2=$P(^YSG("INP",W1,7),U,2),X1=DT D ^%DTC W !,"Discharge ",X," days ago"
|
---|
23 | DOCX ;
|
---|
24 | R !,"Do you wish to add a comment to the last entry? N// ",X:DTIME S YSTOUT='$T,YSUOUT=X["^" G:YSTOUT END
|
---|
25 | S YSR1="X",YSR2="N",YSR3="YN" D ^YSCEN14 G DOCX:X="?",END:X'="Y"
|
---|
26 | S DA=YDA,YSFLG=0 D CM^YSCEN1
|
---|
27 | END ;
|
---|
28 | K %,%X,D,D0,DA,DIC,DIE,DIPGM,DIW,DIWF,DIWL,DIWR,DIWT,DN,DQ,DR,E2,E3,G,G1,G2,G3,G6,I,J,W1,W2,X,X1,X2,Y,YSAGE,YSDFN,YSDOB,YSDTM,YSNM,YSSEX,YSSSN,YSBID,YSTM,Z,Z1 D KVAR^VADPT Q
|
---|