SDCO2 ;ALB/RMO - Classification - Check Out;30 DEC 1992 1:10 pm
;;5.3;Scheduling;**27,132**;08/13/93
;
EN ;Entry point for SDCO CLASSIFICATION protocol
; Input -- SDOE
N I,SDCLI,SDCLOEY,SDCOMF,SDCOQUIT,SDCTI,SDI,SDLINE,SDSEL,SDSELY
S VALMBCK=""
;
IF '$$EDITOK^SDCO3(SDOE,1) G Q
;
N SDVISIT
S SDVISIT=$P($G(^SCE(+SDOE,0)),U,5)
S X=$$INTV^PXAPI("SCC","SD","PIMS",SDVISIT)
D BLD^SDCO S VALMBCK="R"
Q Q
;
ASK(SDOE,SDCLOEY,SDCLHDL,SDCOQUIT) ;Ask Outpatient Classifications
; Input -- SDOE Outpatient Encounter file IEN
; SDCLOEY Classification Array for Outpatient Encounter
; SDCLHDL Classification Event Handle [Optional]
; Output -- SDCOQUIT User entered '^' or timeout
N I,IOINHI,IOINORM,SDCTI,SDCTIS,SDCTS,SDEVTF,X
S X="IOINHI;IOINORM" D ENDR^%ZISS
I '$D(SDCLOEY) G ASKQ
W !!,"--- ",IOINHI,"Classification",IOINORM," --- [",IOINHI,"Required",IOINORM,"]"
I '$G(SDCLHDL) N SDATA,SDCLHDL S SDEVTF=1 D EVT^SDCOU1(SDOE,"BEFORE",.SDCLHDL,.SDATA)
W ! S SDCTIS=$$SEQ^SDCO21
F SDCTS=1:1 S SDCTI=+$P(SDCTIS,",",SDCTS) Q:'SDCTI!($D(SDCOQUIT)) D
.I $D(SDCLOEY(SDCTI)) D
..D ONE^SDCO20(SDCTI,SDCLOEY(SDCTI),SDOE,.SDCOQUIT)
..I SDCTI=3 F I=1,2,4 D SC^SDCO21(I,SDOE,"",.SDCLOEY)
I $G(SDEVTF) D EVT^SDCOU1(SDOE,"AFTER",SDCLHDL,.SDATA)
ASKQ Q
;
CLASK(SDOE,SDCLOEY) ;Ask Classifications on Check Out
; Input -- SDOE Outpatient Encounter file IEN
; Output -- SDCLOEY Classification Array for Outpatient Encounter
; Subscripted by Class Type file IEN
; Null or 409.42 IEN^Internal Value^1=n/a
N SDOE0,SDORG
S SDOE0=$G(^SCE(+SDOE,0)),SDORG=+$P(SDOE0,"^",8)
I $$REQ^SDM1A(+SDOE0)'="CO" G CLASKQ
I SDORG=1,'$$CLINIC^SDAMU(+$P(SDOE0,"^",4)) G CLASKQ
I "^1^2^"[("^"_SDORG_"^"),$$INP^SDAM2(+$P(SDOE0,"^",2),+SDOE0)="I" G CLASKQ
I $$EXOE^SDCOU2(SDOE) G CLASKQ
D CLOE^SDCO21(SDOE,.SDCLOEY)
CLASKQ Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDCO2 1932 printed Dec 13, 2024@02:49:18 Page 2
SDCO2 ;ALB/RMO - Classification - Check Out;30 DEC 1992 1:10 pm
+1 ;;5.3;Scheduling;**27,132**;08/13/93
+2 ;
EN ;Entry point for SDCO CLASSIFICATION protocol
+1 ; Input -- SDOE
+2 NEW I,SDCLI,SDCLOEY,SDCOMF,SDCOQUIT,SDCTI,SDI,SDLINE,SDSEL,SDSELY
+3 SET VALMBCK=""
+4 ;
+5 IF '$$EDITOK^SDCO3(SDOE,1)
GOTO Q
+6 ;
+7 NEW SDVISIT
+8 SET SDVISIT=$PIECE($GET(^SCE(+SDOE,0)),U,5)
+9 SET X=$$INTV^PXAPI("SCC","SD","PIMS",SDVISIT)
+10 DO BLD^SDCO
SET VALMBCK="R"
Q QUIT
+1 ;
ASK(SDOE,SDCLOEY,SDCLHDL,SDCOQUIT) ;Ask Outpatient Classifications
+1 ; Input -- SDOE Outpatient Encounter file IEN
+2 ; SDCLOEY Classification Array for Outpatient Encounter
+3 ; SDCLHDL Classification Event Handle [Optional]
+4 ; Output -- SDCOQUIT User entered '^' or timeout
+5 NEW I,IOINHI,IOINORM,SDCTI,SDCTIS,SDCTS,SDEVTF,X
+6 SET X="IOINHI;IOINORM"
DO ENDR^%ZISS
+7 IF '$DATA(SDCLOEY)
GOTO ASKQ
+8 WRITE !!,"--- ",IOINHI,"Classification",IOINORM," --- [",IOINHI,"Required",IOINORM,"]"
+9 IF '$GET(SDCLHDL)
NEW SDATA,SDCLHDL
SET SDEVTF=1
DO EVT^SDCOU1(SDOE,"BEFORE",.SDCLHDL,.SDATA)
+10 WRITE !
SET SDCTIS=$$SEQ^SDCO21
+11 FOR SDCTS=1:1
SET SDCTI=+$PIECE(SDCTIS,",",SDCTS)
if 'SDCTI!($DATA(SDCOQUIT))
QUIT
Begin DoDot:1
+12 IF $DATA(SDCLOEY(SDCTI))
Begin DoDot:2
+13 DO ONE^SDCO20(SDCTI,SDCLOEY(SDCTI),SDOE,.SDCOQUIT)
+14 IF SDCTI=3
FOR I=1,2,4
DO SC^SDCO21(I,SDOE,"",.SDCLOEY)
End DoDot:2
End DoDot:1
+15 IF $GET(SDEVTF)
DO EVT^SDCOU1(SDOE,"AFTER",SDCLHDL,.SDATA)
ASKQ QUIT
+1 ;
CLASK(SDOE,SDCLOEY) ;Ask Classifications on Check Out
+1 ; Input -- SDOE Outpatient Encounter file IEN
+2 ; Output -- SDCLOEY Classification Array for Outpatient Encounter
+3 ; Subscripted by Class Type file IEN
+4 ; Null or 409.42 IEN^Internal Value^1=n/a
+5 NEW SDOE0,SDORG
+6 SET SDOE0=$GET(^SCE(+SDOE,0))
SET SDORG=+$PIECE(SDOE0,"^",8)
+7 IF $$REQ^SDM1A(+SDOE0)'="CO"
GOTO CLASKQ
+8 IF SDORG=1
IF '$$CLINIC^SDAMU(+$PIECE(SDOE0,"^",4))
GOTO CLASKQ
+9 IF "^1^2^"[("^"_SDORG_"^")
IF $$INP^SDAM2(+$PIECE(SDOE0,"^",2),+SDOE0)="I"
GOTO CLASKQ
+10 IF $$EXOE^SDCOU2(SDOE)
GOTO CLASKQ
+11 DO CLOE^SDCO21(SDOE,.SDCLOEY)
CLASKQ QUIT