1 | SDCO41 ;ALB/RMO - Diagnosis Cont. - Check Out;19 MAR 1993 9:15 am
|
---|
2 | ;;5.3;Scheduling;**15,351**;Aug 13, 1993
|
---|
3 | ;
|
---|
4 | DXHLP(SDCL) ;Diagnosis Help for Clinic
|
---|
5 | ; Input -- SDCL Hospital Location file IEN
|
---|
6 | ; Output -- Help
|
---|
7 | N C,DIRUT,I,SDDXD,SDDXDF,SDICDI
|
---|
8 | I '$O(^SC(SDCL,"DX",0)) G DXHLPQ
|
---|
9 | W !!,"The following diagnoses are associated with ",$$LOWER^VALM1($P($G(^SC(SDCL,0)),"^")),":"
|
---|
10 | W !!,"Default Diagnosis: " S SDDXDF=$$DXDEF(SDCL) W $S(SDDXDF:$P(SDDXDF,"^")_" "_$P(SDDXDF,"^",2),1:"[None]")
|
---|
11 | W !!,"Other diagnoses: "
|
---|
12 | S (C,I)=0 F S I=$O(^SC(SDCL,"DX",I)) Q:'I!($D(DIRUT)) I $D(^(I,0)) S SDICDI=+^(0) I '$D(^SC("ADDX",SDCL,I)) D
|
---|
13 | .S C=C+1,SDDXD=$$DX(SDICDI)
|
---|
14 | .W:C=1 !
|
---|
15 | .D PAUSE^VALM1:'(C#20) Q:$D(DIRUT) W:(C#2) ! W:'(C#2) ?40
|
---|
16 | .W $P(SDDXD,"^"),?($X+(8-$L($P(SDDXD,"^")))),$P(SDDXD,"^",2)
|
---|
17 | W:'C "None"
|
---|
18 | DXHLPQ Q
|
---|
19 | ;
|
---|
20 | DXDEF(SDCL) ;Diagnosis Default for Clinic
|
---|
21 | ; Input -- SDCL Hospital Location file IEN
|
---|
22 | ; Output -- Default
|
---|
23 | N Y
|
---|
24 | I $D(^SC("ADDX",SDCL)),$D(^SC(SDCL,"DX",+$O(^(SDCL,0)),0)) S Y=$$DX(+^(0))
|
---|
25 | Q $G(Y)
|
---|
26 | ;
|
---|
27 | DX(SDICDI,SDDXDT) ;Diagnosis Display Data
|
---|
28 | ; Input -- SDICDI IDC Diagnosis IEN
|
---|
29 | ; -- SDDXDT Date to screen against
|
---|
30 | ; Output -- Diagnosis Display Data - Code Number^Diagnosis
|
---|
31 | N Y,SDXINF
|
---|
32 | S SDXINF=$$ICDDX^ICDCODE(SDICDI,$G(SDDXDT,$G(ICDVDT)))
|
---|
33 | S Y=$S(+SDXINF>0:$P(SDXINF,"^",2)_"^"_$P(SDXINF,"^",4),1:"^Unknown")
|
---|
34 | Q $G(Y)
|
---|