source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SDCO2.m@ 1671

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1SDCO2 ;ALB/RMO - Classification - Check Out;30 DEC 1992 1:10 pm
2 ;;5.3;Scheduling;**27,132**;08/13/93
3 ;
4EN ;Entry point for SDCO CLASSIFICATION protocol
5 ; Input -- SDOE
6 N I,SDCLI,SDCLOEY,SDCOMF,SDCOQUIT,SDCTI,SDI,SDLINE,SDSEL,SDSELY
7 S VALMBCK=""
8 ;
9 IF '$$EDITOK^SDCO3(SDOE,1) G Q
10 ;
11 N SDVISIT
12 S SDVISIT=$P($G(^SCE(+SDOE,0)),U,5)
13 S X=$$INTV^PXAPI("SCC","SD","PIMS",SDVISIT)
14 D BLD^SDCO S VALMBCK="R"
15Q Q
16 ;
17ASK(SDOE,SDCLOEY,SDCLHDL,SDCOQUIT) ;Ask Outpatient Classifications
18 ; Input -- SDOE Outpatient Encounter file IEN
19 ; SDCLOEY Classification Array for Outpatient Encounter
20 ; SDCLHDL Classification Event Handle [Optional]
21 ; Output -- SDCOQUIT User entered '^' or timeout
22 N I,IOINHI,IOINORM,SDCTI,SDCTIS,SDCTS,SDEVTF,X
23 S X="IOINHI;IOINORM" D ENDR^%ZISS
24 I '$D(SDCLOEY) G ASKQ
25 W !!,"--- ",IOINHI,"Classification",IOINORM," --- [",IOINHI,"Required",IOINORM,"]"
26 I '$G(SDCLHDL) N SDATA,SDCLHDL S SDEVTF=1 D EVT^SDCOU1(SDOE,"BEFORE",.SDCLHDL,.SDATA)
27 W ! S SDCTIS=$$SEQ^SDCO21
28 F SDCTS=1:1 S SDCTI=+$P(SDCTIS,",",SDCTS) Q:'SDCTI!($D(SDCOQUIT)) D
29 .I $D(SDCLOEY(SDCTI)) D
30 ..D ONE^SDCO20(SDCTI,SDCLOEY(SDCTI),SDOE,.SDCOQUIT)
31 ..I SDCTI=3 F I=1,2,4 D SC^SDCO21(I,SDOE,"",.SDCLOEY)
32 I $G(SDEVTF) D EVT^SDCOU1(SDOE,"AFTER",SDCLHDL,.SDATA)
33ASKQ Q
34 ;
35CLASK(SDOE,SDCLOEY) ;Ask Classifications on Check Out
36 ; Input -- SDOE Outpatient Encounter file IEN
37 ; Output -- SDCLOEY Classification Array for Outpatient Encounter
38 ; Subscripted by Class Type file IEN
39 ; Null or 409.42 IEN^Internal Value^1=n/a
40 N SDOE0,SDORG
41 S SDOE0=$G(^SCE(+SDOE,0)),SDORG=+$P(SDOE0,"^",8)
42 I $$REQ^SDM1A(+SDOE0)'="CO" G CLASKQ
43 I SDORG=1,'$$CLINIC^SDAMU(+$P(SDOE0,"^",4)) G CLASKQ
44 I "^1^2^"[("^"_SDORG_"^"),$$INP^SDAM2(+$P(SDOE0,"^",2),+SDOE0)="I" G CLASKQ
45 I $$EXOE^SDCOU2(SDOE) G CLASKQ
46 D CLOE^SDCO21(SDOE,.SDCLOEY)
47CLASKQ Q
Note: See TracBrowser for help on using the repository browser.