source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SDCO41.m@ 785

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1SDCO41 ;ALB/RMO - Diagnosis Cont. - Check Out;19 MAR 1993 9:15 am
2 ;;5.3;Scheduling;**15,351**;Aug 13, 1993
3 ;
4DXHLP(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"
18DXHLPQ Q
19 ;
20DXDEF(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 ;
27DX(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)
Note: See TracBrowser for help on using the repository browser.